From mboxrd@z Thu Jan 1 00:00:00 1970 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 618A21A071C; Tue, 22 Apr 2025 02:16:18 +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=1745288178; cv=none; b=EK1vNwuOCxESYxKS9VjKwibEot1s0StGH7nY5X1t0JVAGUDe41dMcha2uMi25tFe8zSXd7mqdG6/lb12ebDB8JAeAz6XpFXSEwcpY6NfDiGndmGwMMRtWX1l/7EotBlJ4oKOp6YS9lMdDDqxxAhwtc4FZ1DqcewUxmKgtSoWMUg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745288178; c=relaxed/simple; bh=k0CvyBXD/JneYEp1nm10fppRGqN6XZUKVHkWxBtVi+4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=q+0TDVxwOPn89zu78w3RzBh6584jXjtkbnrJmHUvOsNY1CdZRJz9RcqnRVssvfA0gKqfMvpWmrtRBSyu2m+RNzs2v7Ukp9OHJHNCFgQsqsbMGgT9YC6TOikpij2l19jZZKI0+oB6NRDrDG9HvRm5gnQRjXbodOPBl1/qiAIw3PI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Euri6nnR; 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="Euri6nnR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 298E7C4CEE4; Tue, 22 Apr 2025 02:16:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1745288178; bh=k0CvyBXD/JneYEp1nm10fppRGqN6XZUKVHkWxBtVi+4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Euri6nnRWUntrxw18EYulB8bHD2cg/uaDk71PztKxr2K7eiP1o5iOhuS5Jm+ICupM t4HRf6bvbenRge0mRh4CYDR0KyPnBwJjEBfmbKgIC6lQCkBfkHzEnfi2ERfTZ+ny2g Mu9CJutbX41L5VtJv5S/x6BMbRv3wdKKrsHcc1lvraJh3vRPDJ/9z2PLK+B5EwUKQ9 YZ4VxQzpwkd8PCjs+5VAZC5rnra+cIPpSiGZDSuQKraLAlAs6AoZRNSw2AiwzIA2j4 E9V+1MILNQzx+exSRBJJcjcIaZKlFPeqr43wh1YZhGJ8P4JK2vT51PJfXFY3J9yrM+ fNZDQXHGcWk+w== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Andrew Jones , kernel test robot , Alexandre Ghiti , Sasha Levin , paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org Subject: [PATCH AUTOSEL 6.14 14/30] riscv: Provide all alternative macros all the time Date: Mon, 21 Apr 2025 22:15:34 -0400 Message-Id: <20250422021550.1940809-14-sashal@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250422021550.1940809-1-sashal@kernel.org> References: <20250422021550.1940809-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.14.3 Content-Transfer-Encoding: 8bit From: Andrew Jones [ Upstream commit fb53a9aa5f5b8bf302f3260a7f1f5a24345ce62a ] We need to provide all six forms of the alternative macros (ALTERNATIVE, ALTERNATIVE_2, _ALTERNATIVE_CFG, _ALTERNATIVE_CFG_2, __ALTERNATIVE_CFG, __ALTERNATIVE_CFG_2) for all four cases derived from the two ifdefs (RISCV_ALTERNATIVE, __ASSEMBLY__) in order to ensure all configs can compile. Define this missing ones and ensure all are defined to consume all parameters passed. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202504130710.3IKz6Ibs-lkp@intel.com/ Signed-off-by: Andrew Jones Tested-by: Alexandre Ghiti Reviewed-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20250414120947.135173-2-ajones@ventanamicro.com Signed-off-by: Alexandre Ghiti Signed-off-by: Sasha Levin --- arch/riscv/include/asm/alternative-macros.h | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/arch/riscv/include/asm/alternative-macros.h b/arch/riscv/include/asm/alternative-macros.h index 721ec275ce57e..231d777d936c2 100644 --- a/arch/riscv/include/asm/alternative-macros.h +++ b/arch/riscv/include/asm/alternative-macros.h @@ -115,24 +115,19 @@ \old_c .endm -#define _ALTERNATIVE_CFG(old_c, ...) \ - ALTERNATIVE_CFG old_c - -#define _ALTERNATIVE_CFG_2(old_c, ...) \ - ALTERNATIVE_CFG old_c +#define __ALTERNATIVE_CFG(old_c, ...) ALTERNATIVE_CFG old_c +#define __ALTERNATIVE_CFG_2(old_c, ...) ALTERNATIVE_CFG old_c #else /* !__ASSEMBLY__ */ -#define __ALTERNATIVE_CFG(old_c) \ - old_c "\n" +#define __ALTERNATIVE_CFG(old_c, ...) old_c "\n" +#define __ALTERNATIVE_CFG_2(old_c, ...) old_c "\n" -#define _ALTERNATIVE_CFG(old_c, ...) \ - __ALTERNATIVE_CFG(old_c) +#endif /* __ASSEMBLY__ */ -#define _ALTERNATIVE_CFG_2(old_c, ...) \ - __ALTERNATIVE_CFG(old_c) +#define _ALTERNATIVE_CFG(old_c, ...) __ALTERNATIVE_CFG(old_c) +#define _ALTERNATIVE_CFG_2(old_c, ...) __ALTERNATIVE_CFG_2(old_c) -#endif /* __ASSEMBLY__ */ #endif /* CONFIG_RISCV_ALTERNATIVE */ /* -- 2.39.5