Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2069948yba; Fri, 10 May 2019 05:55:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqz0IJzyLa+th5yk9JRCVLeyrIshHbGYHHFQA7XxarBfq077dNHG4xFC4kV+b3RyyqSYRQlB X-Received: by 2002:a63:ed16:: with SMTP id d22mr12984339pgi.35.1557492953392; Fri, 10 May 2019 05:55:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557492953; cv=none; d=google.com; s=arc-20160816; b=vbvswp9BRkKM6ELfnIEBAUFfZOmDlbe/hgOsNwakHpv+iXXhyUpEPsKKIT61NL4DWQ russZcunEPbHw7zWw+9DxFVXCb1XMOjoFFSRpd8dRbdd+wLq1N++j7wJPaP0Aa3tsUau oTE9wDZpj2XKjGFjckzhE2kwVAKBLE91afKp+ulrdNCcYS7TEtnbpy++h3Hqsouve2iH 4KhwwGBClQzqf6SugzXolb+e1tZxiPp6WI+QNiexUNwzGNEmsRQny10fgksB5lukOTt/ N+yAt8ShbVSLg+oPool8YcZy0C4U5KmInqx6vnty6xDwc1B3Y7xLGA3DARrJbFx3z8yY RxGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=kJ6YblSNLTUfcBZFFYGvZmf/XTNZQpxBN1Ovi3mIb4Q=; b=owWMSmxg1Lwftynop6yzCU+G/KedtcbyyhNEKWSpO7BW1k5QeXnc/Na7/op+eHzDUs SIhkZwF0j4oWbf2i1fXk5dux/p2hIBWwP9tNhU8M7k2OX/L3/NCwCr8E84oqKA2fKGvK 38x1D5V1dTyUPKNCW78TvciQuLFeq/MdjcSE7suVkW0s55PeqdpW/ASIyW7OcKM3kCGi bmjJs2DkIVlsqOxTB5e9ocnUWkdADH4IuDoBHyPVjyGnwN5STLMMIgMMlbaXL/bFegzi uThHnnnSrkeYzmnxJU7Ace/DxLWuNJDcOh5RB5PC7jzoZWV2/rAY4kEDLrbXeR1WzMnQ nSwA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n78si7311526pfb.206.2019.05.10.05.55.37; Fri, 10 May 2019 05:55:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727262AbfEJMxa (ORCPT + 99 others); Fri, 10 May 2019 08:53:30 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:46254 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727071AbfEJMx3 (ORCPT ); Fri, 10 May 2019 08:53:29 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 56026374; Fri, 10 May 2019 05:53:29 -0700 (PDT) Received: from [10.1.196.50] (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C545B3F6C4; Fri, 10 May 2019 05:53:27 -0700 (PDT) Subject: Re: [PATCH V2] ARM: mach-shmobile: Don't init CNTVOFF if PSCI is available To: Oleksandr , linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: horms@verge.net.au, magnus.damm@gmail.com, linux@armlinux.org.uk, biju.das@bp.renesas.com, Oleksandr Tyshchenko References: <1556882268-27451-1-git-send-email-olekstysh@gmail.com> <6495fca7-bdfa-9020-4eff-b2d04c19827a@gmail.com> From: Julien Grall Message-ID: Date: Fri, 10 May 2019 13:53:26 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <6495fca7-bdfa-9020-4eff-b2d04c19827a@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/05/2019 13:27, Oleksandr wrote: > > On 06.05.19 18:37, Julien Grall wrote: >> Hi Oleksandr, > > Hi Julien > > >>> --- >>>   arch/arm/mach-shmobile/setup-rcar-gen2.c | 13 ++++++++++++- >>>   1 file changed, 12 insertions(+), 1 deletion(-) >>> >>> diff --git a/arch/arm/mach-shmobile/setup-rcar-gen2.c >>> b/arch/arm/mach-shmobile/setup-rcar-gen2.c >>> index eea60b2..bc8537b 100644 >>> --- a/arch/arm/mach-shmobile/setup-rcar-gen2.c >>> +++ b/arch/arm/mach-shmobile/setup-rcar-gen2.c >>> @@ -17,7 +17,9 @@ >>>   #include >>>   #include >>>   #include >>> +#include >>>   #include >>> +#include >>>   #include >>>   #include "common.h" >>>   #include "rcar-gen2.h" >>> @@ -63,7 +65,16 @@ void __init rcar_gen2_timer_init(void) >>>       void __iomem *base; >>>       u32 freq; >>>   -    secure_cntvoff_init(); >>> +    /* >>> +     * If PSCI is available then most likely we are running on PSCI-enabled >>> +     * U-Boot which, we assume, has already taken care of resetting CNTVOFF >>> +     * before switching to non-secure mode and we don't need to. >>> +     * Another check is to be sure that we are not running on top of Xen >>> +     * hypervisor, as CNTVOFF is controlled by hypervisor itself and >>> +     * shouldn't be touched by Dom0 in such case. >> >> If you are running on top of Xen, then PSCI will be available. So is there any >> real value to check the presence of Xen as well? > > I think, no. If the PSCI is a must to run Xen, then it is certainly an excessive > check. I will drop it in V3. Xen does not offer another interface for SMP bring-up. Cheers, -- Julien Grall