From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.zytor.com (terminus.zytor.com [198.137.202.136]) (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 8B01B3749E8 for ; Mon, 3 Aug 2026 10:09:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.136 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785751760; cv=none; b=rtHF5t+A7ScUlCjna3CFgofTsYAnQu3imn3t6U7Zjaohp7k1HzU57IU5eb0kj9SB/8yxRSzK6feuWVP917DT2YIesfK0sXHlNH/27ijvYumFrqiQhW1gOt4kws9YDnqNSUfZh9xeVvaa5YzDQd7bfaiWt0RbtYNkKfq0LNrp4Po= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785751760; c=relaxed/simple; bh=kmLWHuXjBlqAtGsuxUAoGDbIbUXHKI4HPSQOnOlUM5A=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Ed9LWdWYjmDP4cDaFtSePGZZ8NoYw+lv0Sc06qb6v0BwEIdpMRdaW+MRANXfGYZ7y1cfscL6DAzn9UXPLE14J0tpj1BJn1ksby73oDxdhUti53LA6eoxOnoQWEis0kXlz5lTc0ozw+k6q/7aQA9qwrjGMghrw0YwBCvr8cIsiio= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com; spf=pass smtp.mailfrom=zytor.com; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b=FyyEzVC5; arc=none smtp.client-ip=198.137.202.136 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zytor.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b="FyyEzVC5" Received: from [IPV6:2601:646:8081:8d71:7c68:689f:ebc1:6368] ([IPv6:2601:646:8081:8d71:7c68:689f:ebc1:6368]) (authenticated bits=0) by mail.zytor.com (8.18.1/8.17.1) with ESMTPSA id 673A80nR4116329 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Mon, 3 Aug 2026 03:08:00 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 673A80nR4116329 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2026072801; t=1785751681; bh=gEZ7OZtvxg9qa2nEsWt4bgovTs/oqkxsybSibk7x1Xo=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=FyyEzVC5eZzey2rBUGBG7zk0v4b3fpI03HCjV+fza23yFDDhVyriDoxqfGsZssQJw /mLTuVHi6dVFrycTF9YghhTootO91kXFfG7GXxBFyHWTt/2HgPVe8Ch0ZdcQRLcE/p p1DwIJh0Sg65F/qJcSH0TtudmhALfPj7cUOKUztHolnsGg14/DWdMror6wTwr8OXta xc8N+s2i94JTM40tJqct2X2rHsqbT0mMxFVwE2PyYNn7PAPNM/OaE4576vFTB45jyj PnH0LM+xp0IrkmJHSAgS9KvYtThkl9U+i2HSirhit9P4X8wTSHEWO3xRQcMdBqL4pm 21fWzBN9idOLg== Message-ID: Date: Mon, 3 Aug 2026 03:07:54 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/2] x86/local: local_add/local_sub: Support large immediate values To: David Laight , Borislav Betkov , Ingo Molnar , Thomas Gleinxer , Dave Hansen , x86@kernel.org, Andrew Morton , linux-kernel@vger.kernel.org Cc: Nicolas Pitre , Peter Zijlstra , =?UTF-8?Q?Uwe_Kleine-K=C3=B6nig?= , rodrigo.alencar@analog.com, jic23@kernel.org References: <20260803094702.3852-1-david.laight.linux@gmail.com> <20260803094702.3852-3-david.laight.linux@gmail.com> Content-Language: en-US, sv-SE From: "H. Peter Anvin" In-Reply-To: <20260803094702.3852-3-david.laight.linux@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 2026-08-03 02:47, 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 Yep, that's right. Reviewed-by: H. Peter Anvin > --- > 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)); > } > > /**