Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6543617yba; Tue, 14 May 2019 09:15:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqz5pgc1Kt4OI+8vFywrBT6E72Fd+/3qQdnS9FjUHfEv4XmyPtOhAv45XLAgbeSIXSMzcLxz X-Received: by 2002:a17:902:108a:: with SMTP id c10mr39116108pla.48.1557850536149; Tue, 14 May 2019 09:15:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557850536; cv=none; d=google.com; s=arc-20160816; b=F2rcKgdCd5Uo4DIwG3Z1e4Rj6K82oa1OsV5BixtV7bFswmpnsKV99gD7/DziBeW3uf zRitS65tM8ECN7bnS1Bd9UoaSM7zh2S7RXVBvv6Pg97GKpbVqhNAwZQTHvxfL6x1F/q1 cpefCX+97qVjn8jJBNRxsecIl4kErEmrEbZJelK7Jyd7BBidTIkvol7XZyeo1x2lgoYQ M4j5l/BeMWvWGS+FpzxJ7pjOWNazSvyv7on+ifwWO0Q2aRYVdJ3Lu87+/zzmR0qwKL9M pHIuEs0CiVgyrHJepenO2BeqBALpnWrHi/IGlRvF+g63dnONaCeVc1Nna/zeDRCZ0Zbl DmzQ== 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=D1Ob3PNLx0pjTU7U52xFClXlNxrBqGLs7T8zvFxaCz8=; b=M+G+8TkC7GE2YESfWpzgvoHHX36PJOGJYIujz5Fs5dumLoDW48en1PPdqKsi+l2mvb 8gs/E8xn0i7LsYkG+IxvtXVviB+6VHOpv6MCYDAE2RUYLmRS77ofOtYz7EURmFZKa6KG ueiYfsOxvATsACQEyRbXIlZH8wpNpArT4LfXo2hI/VW4X/f0N+hoLxW/E3gd+hf72GEF T8IlifjupLBxqGit0BSkf81+mcd3kLOHVPLdWzYxp5CpMu5v6+U5Rez0FYvQKXHHI4Ct MRKpQ4QXZdCOtflF/faDNGyFQLgnFfoG+wUsGaLjQn2QTOj/EjMqY1b4M02p+9G/X5wI CeRQ== 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 204si17662304pgf.288.2019.05.14.09.15.21; Tue, 14 May 2019 09:15:36 -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 S1726303AbfENQNy (ORCPT + 99 others); Tue, 14 May 2019 12:13:54 -0400 Received: from foss.arm.com ([217.140.101.70]:58378 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725980AbfENQNy (ORCPT ); Tue, 14 May 2019 12:13:54 -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 B9B77374; Tue, 14 May 2019 09:13:53 -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 615C33F703; Tue, 14 May 2019 09:13:52 -0700 (PDT) Subject: Re: [PATCH V4] ARM: mach-shmobile: Don't init CNTVOFF/counter if PSCI is available To: Oleksandr Tyshchenko , linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: horms@verge.net.au, magnus.damm@gmail.com, linux@armlinux.org.uk, geert@linux-m68k.org, Oleksandr Tyshchenko References: <1557850012-16612-1-git-send-email-olekstysh@gmail.com> From: Julien Grall Message-ID: <4e712484-d6a4-e358-ea66-51dfcee18b0d@arm.com> Date: Tue, 14 May 2019 17:13:50 +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: <1557850012-16612-1-git-send-email-olekstysh@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 14/05/2019 17:06, Oleksandr Tyshchenko wrote: > diff --git a/arch/arm/mach-shmobile/setup-rcar-gen2.c b/arch/arm/mach-shmobile/setup-rcar-gen2.c > index eea60b2..64e3abd 100644 > --- a/arch/arm/mach-shmobile/setup-rcar-gen2.c > +++ b/arch/arm/mach-shmobile/setup-rcar-gen2.c > @@ -17,6 +17,7 @@ > #include > #include > #include > +#include > #include > #include > #include "common.h" > @@ -63,6 +64,15 @@ void __init rcar_gen2_timer_init(void) > void __iomem *base; > u32 freq; > > + /* > + * 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 > + * and updating counter module before switching to non-secure mode > + * and we don't need to. > + */ > + if (psci_ops.cpu_on) > + goto skip_update; Are you sure this is working when ARM_PSCI_FW is not selected? Is it possible to have a .config for RCAR without ARM_PSCI_FW? Cheers, -- Julien Grall