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 ED31D35C193 for ; Mon, 3 Aug 2026 10:01:25 +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=1785751288; cv=none; b=aRVbZrv6D5QVUkDE1qfw248cXvUtvBypc/wpkSXxiIp2dDNUurFvFW5KnVfjWBX99zdab4k6g6eHzCj0Av6GQ/GmC8D9PHSXoGBP3lx+f12KpLCHSUFT+ImYepXLpYQtQ/wFZvzOJdB6u9VtbhY6jEPwim+C8gd/gc4j62YOZdk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785751288; c=relaxed/simple; bh=dnbK7PhwBJvY17tgpKYTOIfXWChAnf1oqyd2oH4iOrI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=MyhBG9u55xusxwOeBhdnwwUMUmb0+y0aVI/WxpztaitkN9HsImwKvjqWXUWMZqGX8/Aby8k8RFtP41KGjlX+Kyt+9hXCq/Nru6IpK2YVynduQjNpZhK3uGbV2t2I5KYxxcZfXvOn83V4S6i6MwIiMHLnoKWcY1Sr/5Y4dUx4+N4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=pass smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=UWhvaBS6; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=pass 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="UWhvaBS6" 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=TjPOt6odS2sXnEuSlMYB1bRyHQ5io5EH4/JcFdEIbq8=; b=UWhvaBS6BzhRqd9gntNrognZow 5Gb7UC/xqynkQQ1D7XLSMnzzWcSFtC8na7+pO2LIqqN9Nc+KMktnei9AEcazweTyEayHeU7oAkIff 8zDNj902E5FuyxdTBNUSII9FWjAIyfa9dnjoAJRoMVNVEFCJYYddMhf5W5ZOmY9cUJWI1mt2izD19 QnOSlZJSCcSoJgLkipjRQOtMjCGppdQ390MKzxOpudcJ9I54Tczwu0hqvodWvwR7egJMiANOCoosL 0bf/QQvly96P64ksi8wAs30yU/ll6KEolGK1kDBhowfOUqTi1npmdeNM77dK2cOCJSHedABUgVyGp IHoKjvQA==; Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.99.1 #2 (Red Hat Linux)) id 1wqpTv-0000000D7YA-24ii; Mon, 03 Aug 2026 10:01:15 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 9B675301519; Mon, 03 Aug 2026 12:01:14 +0200 (CEST) Date: Mon, 3 Aug 2026 12:01:14 +0200 From: Peter Zijlstra To: David Laight Cc: Borislav Betkov , Ingo Molnar , Thomas Gleinxer , Dave Hansen , x86@kernel.org, Andrew Morton , linux-kernel@vger.kernel.org, Nicolas Pitre , "H. Peter Anvin" , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , rodrigo.alencar@analog.com, jic23@kernel.org Subject: Re: [PATCH 2/2] x86/local: local_add/local_sub: Support large immediate values Message-ID: <20260803100114.GG49951@noisy.programming.kicks-ass.net> References: <20260803094702.3852-1-david.laight.linux@gmail.com> <20260803094702.3852-3-david.laight.linux@gmail.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: <20260803094702.3852-3-david.laight.linux@gmail.com> On Mon, Aug 03, 2026 at 10:47:02AM +0100, David Laight wrote: > Replace the "ir" constraint with "er" so that constants over 2^31 > get loaded into a register. > > Signed-off-by: David Laight > --- > arch/x86/include/asm/local.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/x86/include/asm/local.h b/arch/x86/include/asm/local.h > index 4957018fef3e..68af7b74450a 100644 > --- a/arch/x86/include/asm/local.h > +++ b/arch/x86/include/asm/local.h > @@ -32,14 +32,14 @@ static inline void local_add(long i, local_t *l) > { > asm volatile(_ASM_ADD "%1,%0" > : "+m" (l->a.counter) > - : "ir" (i)); > + : "er" (i)); > } > > static inline void local_sub(long i, local_t *l) > { > asm volatile(_ASM_SUB "%1,%0" > : "+m" (l->a.counter) > - : "ir" (i)); > + : "er" (i)); > } And the other two sites already have "er", how inconsistent :/ Acked-by: Peter Zijlstra (Intel)