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 1667EC27C65 for ; Tue, 11 Jun 2024 20:22:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=pn9TiZhBvp8DA1ci5DB3OMrPbG/Gnf51c46bONYBfTU=; b=KZ9998Cf/z4m21DDabOIwLSWYe RuFbujWvqj/PLJbI5hVx8JubjstUJqZfecS/WICPPGjMIjgrjb1YC15s3eJBnvGVABcrepmOMAr2S GFAO68DAAZCoxewf88DzTs7gcpMpFMkllSqT+qv8VRAB72ljGHeefMrrNQFVhfgWQuz+/+RHbQSMC 3g+E6UK9yDQjO5NHe0TMKJa1wUqJp6Lrevy2zFAHqvstOPL4ste4OponEckZkN4yVSVMuLiJFM7iE C49xIPRV9SI59QP8UyeqWiBAGKAmfDeBsQIkfdzUDQtlYooZAz0VG+Ulb7AmcBIhHgN59b4/u9W7N VdqlHoVQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sH80u-0000000A9pn-0T5M; Tue, 11 Jun 2024 20:22:40 +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 1sH80r-0000000A9pF-0DuD for linux-arm-kernel@lists.infradead.org; Tue, 11 Jun 2024 20:22:38 +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 B03E1152B; Tue, 11 Jun 2024 13:22:59 -0700 (PDT) Received: from J2N7QTR9R3 (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id ED8483F5A1; Tue, 11 Jun 2024 13:22:32 -0700 (PDT) Date: Tue, 11 Jun 2024 21:22:27 +0100 From: Mark Rutland To: Linus Torvalds Cc: Peter Anvin , Ingo Molnar , Borislav Petkov , Thomas Gleixner , Rasmus Villemoes , Josh Poimboeuf , Catalin Marinas , Will Deacon , Linux Kernel Mailing List , the arch/x86 maintainers , linux-arm-kernel@lists.infradead.org, linux-arch Subject: Re: [PATCH 4/7] arm64: add 'runtime constant' support Message-ID: References: <20240610204821.230388-1-torvalds@linux-foundation.org> <20240610204821.230388-5-torvalds@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240611_132237_155276_F2E27207 X-CRM114-Status: GOOD ( 14.92 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jun 11, 2024 at 11:59:21AM -0700, Linus Torvalds wrote: > On Tue, 11 Jun 2024 at 10:59, Linus Torvalds > wrote: > > > > So I'll look at doing this for x86 and see how it works. > > Oh - and when I started looking at it, I immediately remembered why I > didn't want to use alternatives originally. > > The alternatives are finalized much too early for this. By the time > the dcache code works, the alternatives have already been applied. > > I guess all the arm64 alternative callbacks are basically finalized > very early, basically when the CPU models etc have been setup. On arm64 we have early ("boot") and late ("system-wide") alternatives. We apply the system-wide alternatives in apply_alternatives_all(), a few callees deep under smp_cpus_done(), after secondary CPUs are brought up, since that has to handle mismatched features in big.LITTLE systems. I had assumed that we could use late/system-wide alternatives here, since those get applied after vfs_caches_init_early(), but maybe that's too late? > We could do a "late alternatives", I guess, but now it's even more > infrastructure just for the constants. Fair enough; thanks for taking a look. Mark.