Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2043458yba; Fri, 10 May 2019 05:30:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqxDd/vWSPN+KAln/my0VVhMKg7RQWdCcVaoqo4EFTfvBmy42LbDYdhB6HkjgOHg4+zdBggV X-Received: by 2002:a17:902:9b83:: with SMTP id y3mr9000912plp.165.1557491449504; Fri, 10 May 2019 05:30:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557491449; cv=none; d=google.com; s=arc-20160816; b=pbntXWFu/nb/LPsKFqOAo4ZotG6d94blOebcrDR69LMA64s/SN5e3Ao7mVYkfmhu1W yNop8o0/vheK2WOCmvr+x6MBv3TeOp2ckChVNdsfCh9bTqEb26MCX/w3YxErw5xp2TIL 53HLkN7jFnUU50Exp8vwZfGIsFVo8SsxA4BWj09tFDbRI7tvuO8Q5DnmsCjb0DbvkDt6 9BNzfaX47TFQPoJQckIQpVHCvM6DGWLxSz2PzjKOGajM+hKt5l0U2JeIXEPjEJO94/D2 x8QmR+WlCy+zRy9LUPqaHXvg3ygYj4009jt7K/pytgzfIvOYeg8Mrg2sgJp6X/I2hbVM k83Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=8bTJnJ4u4gNj6fEkiaq/ZQUE1VT0mFgas8z16OA2vBA=; b=ZmMENbGuB0QE+5ygXd6neulsUU6ENjyuL3CKrdJ2f0ijg+vtTx1BTQlPVr4JKf0HAJ THfTZnzCFF/95Cbx1yFCsMck3evoc5SQNIkbYyueQcBz5yi0VM1pqgHzv6b/e2FA7mQI m+7qpbOLvwpVGoqunNveqQ+tfzoMTvW38pxjjfAc3G5uSP84OjRt/xZ8LOqwhZjWo+cX b3QFyFggEPwu9WOeG1OUvUtZPW3LfXTdlVc5HL5xItJf+FnUxWwGdcF7pMQwDUJ05v6h 36h2cn0NIstWwHHMDEm4rNefMvbIOgqtFI0GER1RcvBvtCnzAnDbPsiJhuqjgjX+A93o +Xwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CXH1mDUD; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n3si5587890pgp.587.2019.05.10.05.30.32; Fri, 10 May 2019 05:30:49 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CXH1mDUD; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727522AbfEJM1y (ORCPT + 99 others); Fri, 10 May 2019 08:27:54 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:36319 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727071AbfEJM1y (ORCPT ); Fri, 10 May 2019 08:27:54 -0400 Received: by mail-lj1-f194.google.com with SMTP id z1so4946376ljb.3; Fri, 10 May 2019 05:27:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=8bTJnJ4u4gNj6fEkiaq/ZQUE1VT0mFgas8z16OA2vBA=; b=CXH1mDUDprdkxXBXM3VU8xUGJCsipKouwv505rAJ/KDvO60FIoXqn5Sc4UC/jQZB1e QNJu0dCPNSVhj0zmO1axuKMbT4gZJAOwmG6VJsRzbo5o1DvwI7GNsLgDmI0sZrrDzQBu QT4AubZNf5g9CNV1wbI2V1zaWDm5jDvAvkPDe9CccUfV+L+6K1z+Y7Sq15CwKONFhjzL wwWbSH1XCJFRIx1mt0nO6V0tapCbKhnaW9c0cJwdh+GcpLSgp545Eo1QJM1/CcM0oGZD 7lyyqsondAzeDs0SW2DzE5/YkZfYClDDnSHzr/8KzB+eG/WcWwMg2u8DK5EwJWsjJ2nS ScAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=8bTJnJ4u4gNj6fEkiaq/ZQUE1VT0mFgas8z16OA2vBA=; b=fU4yiXauKYzsXS2Nx6AnIhHRGik9/gxR2Ju5gTECQ/lmz2f38l5MW/J03n0yhOFGp3 SD1iLF80X2tf4THHmxUBooKcDHZFn/9GPh7f/L51SYWk5oJOezwB77IaUgyUMHhNaHoQ QC/vtb/7WyLTI5qjoMXgR+aeZTY52Q1KlUKtC5s1a2Ja/W8ptwFT6l8wm8qtnsePWVv2 n6ozJDfVq9pZQNFyvB2URfIuGKdgQeLXbrF+zeWD6Wtjo7m7S27j9De8WrlrCZduPCWq FxdADcv1gbNSHzFpIYd6OO/YPpTT+GIX9PhE5/lHfd37GeGmk86I8bfrYv8Eiuj7mdht VJaA== X-Gm-Message-State: APjAAAV7dA6KqEQXXdUkaDCtbUo/fGRdjFAYi9Bkuc6K3sT7Y/QjJ7SW Xw4+8Fk0oWlIH2oWst5kt+0= X-Received: by 2002:a2e:2f0e:: with SMTP id v14mr5727224ljv.77.1557491271930; Fri, 10 May 2019 05:27:51 -0700 (PDT) Received: from [10.17.182.120] (ll-22.209.223.85.sovam.net.ua. [85.223.209.22]) by smtp.gmail.com with ESMTPSA id o70sm1423153lff.53.2019.05.10.05.27.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 May 2019 05:27:51 -0700 (PDT) Subject: Re: [PATCH V2] ARM: mach-shmobile: Don't init CNTVOFF if PSCI is available To: Julien Grall , 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> From: Oleksandr Message-ID: <6495fca7-bdfa-9020-4eff-b2d04c19827a@gmail.com> Date: Fri, 10 May 2019 15:27:50 +0300 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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > > Cheers, > -- Regards, Oleksandr Tyshchenko