Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp27668lqp; Tue, 11 Jun 2024 13:22:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXEF5M8koBhH4K/pAI7MZcO6qkvTWyl0wPh0vR5+ONQ7OAAHyApYScuI/O/x9TSKgLAoVEaCBpzsXX8m9adZyXmJV1YYHaihFNy30lM+g== X-Google-Smtp-Source: AGHT+IHTXgs0VU2EMlkdBjH0Ojz/RJg4D7YvgdR8iFMmstG9pYC8TcUWDEZMDzuCiE/jqaP+Ri3P X-Received: by 2002:a05:622a:1ba5:b0:43f:edde:7a55 with SMTP id d75a77b69052e-44041c77982mr197706561cf.28.1718137365567; Tue, 11 Jun 2024 13:22:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718137365; cv=pass; d=google.com; s=arc-20160816; b=DwdVKhhSGSTTGwgsQD8s4zhANEZon5l+HrLj7oWHQnCcNDVD4Fz9zMjPhvS/lEsZY3 TjDKbrhqIRwVESOclNLucvKxYDKDUCSrAIP6OvnUGrt/0zHBZovycW8Up5V9i0z90cMg lBW9BTxZZUUhtzCkJ96TvqsVW4t41bEYyn+saNcpDsBV6rUbQ6+3FerwTfHXi5Bhq/sd CZYmf6ci8l/6AEoarTbA+RDL47JsIRKdCSiYfJ5Vjanna+p4DmIvvdeHHz23wGBUSHFV YawrRSXLMZsEoLNrn/ks8kjD3IWLQrMjX/W/E+zvoffIR2dQBzqAZqMEyXxYqOoVG5pf 7BpA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=pn9TiZhBvp8DA1ci5DB3OMrPbG/Gnf51c46bONYBfTU=; fh=pRn1dCCCDMYFjvWA3G+g8ETmqk49SnxJqcrd5w2g+yU=; b=m34YSCsojIghRzIWOIHrmj7An5FHdnlmEpJzMhwPP0+6WmAaZ+RiWmM34jLQqPM08b bL0yQ8ZqZQ5pBULEJRB89rkFuoaphAvCKzLaf/fpAw+d214qW2Sc/GcncUQuR9xoCEIC 9rBi4JuxfJC6OfoYM5qX7isOq/JYFZORr5YbcenvO47R82R0O5Prew8QnhuWp17jhc3F eebk+HHWtSzau9jXl2eBFPo8qPp7ziRZEiU+x0ZraPaiAch9+CJd59oFZfZ2GMvlxycm 9HDDy0qPIdc9z4gSxvrg8fRDKkzSJcVP+etqsD04xBrSmvMufmvL9hHs27/20JtWuvKU iEeg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-210571-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210571-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d75a77b69052e-44038a6fa2dsi145229221cf.117.2024.06.11.13.22.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 13:22:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-210571-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-210571-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210571-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 4D6F61C2357D for ; Tue, 11 Jun 2024 20:22:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2AA5114F9F7; Tue, 11 Jun 2024 20:22:39 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3DBFD639; Tue, 11 Jun 2024 20:22:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718137358; cv=none; b=j7cGGXcgk79cW7XU7JuPzmIkz7LOhGZH+lp/HtsmuicatAeez8INYXIV36gga0CRJAO0H4xuDK3YSObGVzk6E0TCbM0u/j8Ey994D/BqZgMYpUCOicwIu3jSir+UCHJdjNQRPh0ZeE6AhF05qbC42HZiuW6nmLvhvTmyYDowG5g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718137358; c=relaxed/simple; bh=ADVyi3gtsxEt8iNfxhJM26ydN47s4hPau4g5PTZylJ0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=p76LrqndlMBRZDRXs8YkXY4o90y4nXJWhopgIEWO4gP8g0X3uHRiU+WdvOtpJ572fTFZ2ju46LXWFH0x6vhMjiIoR4vDwEjGmogRPY8nJN3XzHoGruq6EPXTJgKjQVY2fvmCEGSIFM6QEzK0hYCNmx4KKbJPc7e5Ue88+NQCYFg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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.