From nobody Wed Dec 17 20:59:50 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 75F85206F21 for ; Fri, 14 Mar 2025 21:41:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741988518; cv=none; b=nOHkGmbXsrbHBj6fWBIRKqwGNHj4NDl5u7qKTuiowaNX4a2A3WYHN1GdT+P1GwXg+ur3he5i4oSvO0fpNZefMY0iY7nOm7fuMGhXawOK0UTIRxdmQNRQv/hi4mL4Q/FeOiXZLDHFxfu95Kdw5M41VywtnSO0y+Pg56Z4gBaKq6w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741988518; c=relaxed/simple; bh=yOdRu7Fcxv19X60rh949WLYqt0bzYdV5JlS82PVB8vo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=vEqn0zd5JDtra5vyog3VGKHKmgksnvGI2sBv9TmTdC4zRFsCve2KXJJOMLNZ+zol2CyCVPGIq4o6napRQIasVNxia+r/BX4UL1T/dHTGTIma2cYdK1YjUaPrv4Mxs0f1+4YmBGl+xKRwwvtS1rT9dmCCMQEuujJK2vudp34a27Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LQm6Iw24; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LQm6Iw24" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9E386C4CEED; Fri, 14 Mar 2025 21:41:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1741988518; bh=yOdRu7Fcxv19X60rh949WLYqt0bzYdV5JlS82PVB8vo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LQm6Iw24PHbIExUGvoTW+2mLwJGDJoJlxHjmW6cZU8Kd0ZnHNbAbcSJ+2wmkRQP7Q iiPSLokbVJ/fM+mjFhF7eRkcS9Meor05L3LBy+xyVv90SjedQK8nde+7foBLGjU8U9 S7thg/Pn4zMs3xYOZiRDzFmwlRuXK212czSe9Igh5UNrm4crsSANR+vTZnYekyAVhu Lvu1Ay6yOXH0GrbGx7DJ50SZP+geLdkfb2yuLqc+BFi4EL0SCerVECcm+GOyGIgFbo FNJ+x5KZh+WM6hIYoZy4vdJKrLsuj8Cpf9hpb7DloVx9uD8zfUJH5uB1ze5iJWMAts HHQ4qeAB80/Vw== From: Josh Poimboeuf To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, Linus Torvalds , Peter Zijlstra , Borislav Petkov , "H. Peter Anvin" , Uros Bizjak , Andrew Cooper , Ingo Molnar Subject: [PATCH 07/20] x86/alternative: Remove operand numbering restrictions Date: Fri, 14 Mar 2025 14:41:20 -0700 Message-ID: <3a2c1e24ebc72d6c32294b094fc3fefd9c2afdc2.1741988314.git.jpoimboe@kernel.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" alternative_input() and alternative_io() arbitrarily require input constraint operand numbering to start at index 1. No more callers rely on that. Simplify the interfaces by removing that restriction. Signed-off-by: Josh Poimboeuf --- arch/x86/include/asm/alternative.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/x86/include/asm/alternative.h b/arch/x86/include/asm/alte= rnative.h index 484dfea35aaa..3804b82cb03c 100644 --- a/arch/x86/include/asm/alternative.h +++ b/arch/x86/include/asm/alternative.h @@ -214,17 +214,15 @@ static inline int alternatives_text_reserved(void *st= art, void *end) * * Peculiarities: * No memory clobber here. - * Argument numbers start with 1. - * Leaving an unused argument 0 to keep API compatibility. */ #define alternative_input(oldinstr, newinstr, ft_flags, input...) \ asm_inline volatile(ALTERNATIVE(oldinstr, newinstr, ft_flags) \ - : : "i" (0), ## input) + : : input) =20 /* Like alternative_input, but with a single output argument */ #define alternative_io(oldinstr, newinstr, ft_flags, output, input...) \ asm_inline volatile(ALTERNATIVE(oldinstr, newinstr, ft_flags) \ - : output : "i" (0), ## input) + : output : input) =20 /* * Like alternative_io, but for replacing a direct call with another one. --=20 2.48.1