From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ADCF413EFF3 for ; Wed, 18 Dec 2024 09:47:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734515235; cv=none; b=SZuCleHfyuXwFwhl3fYckZzYDZFE6+RcrYQ6wOH8bWjurImykq3qBHSEkCv9tPHtzNVboUEaXoXV8z2NoC1aMNtm7tjlsxedx3LJ85aCxTXgLSippqZ2IZLVQF4QJ1P/VsqGlcLsCF7CBdTjMX1njFzlkgH2W42vTrE8Q/l1/VU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734515235; c=relaxed/simple; bh=2KlSg7nEeCtTdQpyPNcvmpYwcGR+bw8PV9t0fpC4pss=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GqRRBNcWdVEPayppncYqzIBwehc7QnNi8joUW2lafTlpBY5ytiDFWjNLVQ+OeuweIyUE9oGk5yZda06+ENbSn4kASyR2H81CPVFiGNBuGGK8/3+KPAEApK+VzJFDgwg3YGUrbDvfUmPc4qGSdUMCQ7ZDIA0W9p2yXWMS7Rlg+TY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=seHHWH2C; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="seHHWH2C" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=MNDH5paV1OUMZGX8baGNztSq8zK9KFxDsURbsEWfvLc=; b=seHHWH2CSNkqZGPy1ja7/jba/q s9S8ksGFyz/vcVRldq9EgU+/WPonM7bprZ7JOaK0DyXhy9pCAOSh6kk9G/ZbrCLBaN1KYAVcJhhi8 H7v1GXlR9d0hH91W/yL8A6vEA1NM26xlUALEYUIG63VMojP26rUcLDCljwutxUMLvYieW7VnO22zW qqfzBm1wUha+QSl8oE95kYXU9NkNRaiG3S8tWB0CU35YvGcTlKB+PUzc5C6IN4jjn+hYrnG1OgV7r AJknuiIpOgBMwJ5aE7Nkx6E54TWngtIRSfd+5DG0fCWbEEJoEU2pod+4tN0jfyyjW86R3/2J1LVfL /18Lq+/A==; Received: from 77-249-17-89.cable.dynamic.v4.ziggo.nl ([77.249.17.89] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.98 #2 (Red Hat Linux)) id 1tNqe2-0000000AalM-0Ikx; Wed, 18 Dec 2024 09:47:06 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 4ABC73002A0; Wed, 18 Dec 2024 10:47:05 +0100 (CET) Date: Wed, 18 Dec 2024 10:47:05 +0100 From: Peter Zijlstra To: Juergen Gross Cc: linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, Josh Poimboeuf , Jason Baron , Steven Rostedt , Ard Biesheuvel , Stephen Rothwell Subject: Re: [PATCH] x86/static-call: fix 32-bit build Message-ID: <20241218094705.GD2484@noisy.programming.kicks-ass.net> References: <20241218080228.9742-1-jgross@suse.com> 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: <20241218080228.9742-1-jgross@suse.com> On Wed, Dec 18, 2024 at 09:02:28AM +0100, Juergen Gross wrote: > In 32-bit x86 builds CONFIG_STATIC_CALL_INLINE isn't set, leading to > static_call_initialized not being available. > > Define it as "0" in that case. > > Reported-by: Stephen Rothwell > Fixes: 0ef8047b737d ("x86/static-call: provide a way to do very early static-call updates") > Signed-off-by: Juergen Gross Works for me -- I seem to have missed those patches landing, and I'm assuming this patch is going to go along with them others that introduce the problem. Acked-by: Peter Zijlstra (Intel) > --- > include/linux/static_call.h | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/include/linux/static_call.h b/include/linux/static_call.h > index 785980af8972..78a77a4ae0ea 100644 > --- a/include/linux/static_call.h > +++ b/include/linux/static_call.h > @@ -138,7 +138,6 @@ > #ifdef CONFIG_HAVE_STATIC_CALL > #include > > -extern int static_call_initialized; > /* > * Either @site or @tramp can be NULL. > */ > @@ -161,6 +160,8 @@ extern void arch_static_call_transform(void *site, void *tramp, void *func, bool > > #ifdef CONFIG_HAVE_STATIC_CALL_INLINE > > +extern int static_call_initialized; > + > extern int __init static_call_init(void); > > extern void static_call_force_reinit(void); > @@ -226,6 +227,8 @@ extern long __static_call_return0(void); > > #elif defined(CONFIG_HAVE_STATIC_CALL) > > +#define static_call_initialized 0 > + > static inline int static_call_init(void) { return 0; } > > #define DEFINE_STATIC_CALL(name, _func) \ > @@ -282,6 +285,8 @@ extern long __static_call_return0(void); > > #else /* Generic implementation */ > > +#define static_call_initialized 0 > + > static inline int static_call_init(void) { return 0; } > > static inline long __static_call_return0(void) > -- > 2.43.0 > >