From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 667B5C4345F for ; Fri, 3 May 2024 15:21:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NDmCDZq2qicEftSknUmNHp+hgjfKps0BuKvjj0rILTE=; b=GuzFx2ImsXYztW YlYFy+FUlxaXyrhnWuCARTCGVeU4RbzQ23RO9VDc0ncVmBwn4qAky1rZgWQ7Uca+l0ve/SsKPmv1v KioJL7D63V1CVHkubCPMzFAvh1oOd+Crbq2+UTYqPAnHMV53T+T7CFrET6FWBNeiuBz49C+Gy4U+H U39d1yweo/E950EcCSwSl7fAhvJvLlTUFVLS4Va62UigXp4UUU/srbchFWeaLhf/YjpFFIS3J++1W QA4q/RLbZxvvq3EnOhzGyvLtsr/qe5RRQPykkx8YQPAOrMYE7/Hg3Z17qFzuAqZseXrg4Ra3cKoNM VTCneyG+Z5kaJTBrcxxQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2uip-0000000H1RK-2CZf; Fri, 03 May 2024 15:21:15 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2uim-0000000H1Qt-44qg for linux-arm-kernel@lists.infradead.org; Fri, 03 May 2024 15:21:14 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5799913D5; Fri, 3 May 2024 08:21:36 -0700 (PDT) Received: from FVFF77S0Q05N (unknown [10.57.34.156]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D103F3F73F; Fri, 3 May 2024 08:21:08 -0700 (PDT) Date: Fri, 3 May 2024 16:21:06 +0100 From: Mark Rutland To: Anshuman Khandual Cc: Puranjay Mohan , Catalin Marinas , Will Deacon , Sumit Garg , Stephen Boyd , Douglas Anderson , "Peter Zijlstra (Intel)" , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, puranjay12@gmail.com Subject: Re: [PATCH v2 1/2] arm64/arch_timer: include Message-ID: References: <20240502123449.2690-1-puranjay@kernel.org> <7008cd0c-5b65-4289-9015-434cbe3d7e21@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <7008cd0c-5b65-4289-9015-434cbe3d7e21@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240503_082113_078888_AF1AD996 X-CRM114-Status: GOOD ( 23.82 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, May 03, 2024 at 02:37:45PM +0530, Anshuman Khandual wrote: > > > On 5/2/24 18:04, Puranjay Mohan wrote: > > arch_timer.h includes linux/smp.h to use DEFINE_PER_CPU() and it works > > because smp.h includes percpu.h. The next commit will remove percpu.h > > from smp.h and it will break this usage. > > > > Explicitly include percpu.h and remove smp.h > > But this particular change does not seem to be necessary for changing > raw_smp_processor_id() as current_thread_info()->cpu being done in the > later patch ? You might still leave header inclusion in > arch/arm64/include/asm/smp.h while dropping the per cpu cpu_number ? Why would that be preferable? The general rule is that if a file uses something explicitly, it should include the relevant header directly rather than something that happens to transitively include that header. We made a mistake and included the wrong header in commit: 6acc71ccac7187fc ("arm64: arch_timer: Allows a CPU-specific erratum to only affect a subset of CPUs") ... so we should fix that regardless of the next patch. The point of the next patch is to effectively revert commit: 57c82954e77fa12c ("arm64: make cpu number a percpu variable") ... and reverting that means we should stop including from ; anything depending on that is already doing something wrong, and leaving the include there only serves to paper over bugs. Mark. > > > > > Signed-off-by: Puranjay Mohan > > --- > > arch/arm64/include/asm/arch_timer.h | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/arch/arm64/include/asm/arch_timer.h b/arch/arm64/include/asm/arch_timer.h > > index 934c658ee947..f5794d50f51d 100644 > > --- a/arch/arm64/include/asm/arch_timer.h > > +++ b/arch/arm64/include/asm/arch_timer.h > > @@ -15,7 +15,7 @@ > > #include > > #include > > #include > > -#include > > +#include > > #include > > > > #include _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel