Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp415822lqh; Fri, 31 May 2024 05:36:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVMDh+lrRVZDzuQDiEJrkl13O8FK4/pVmj1sw7O0vjLADa3JuEfHOklzm+mPTXR3NgeNtOdi7g+a+IP+g5Oz+ekElmG/tIkEnGXsW1K2g== X-Google-Smtp-Source: AGHT+IG0Bm3O46LUjj0x3I6F5hb41IHiCSU82kg1WBtMPgue2EkMkQKrzOb+la7QRsJwuAXEIn6w X-Received: by 2002:a05:6870:f71d:b0:24f:f282:241c with SMTP id 586e51a60fabf-2508c0d7f15mr1649425fac.59.1717158974806; Fri, 31 May 2024 05:36:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717158974; cv=pass; d=google.com; s=arc-20160816; b=NvsGNHKYqlj9SLkZ1hvKGF7VKsX43XJ+gVdbdntSLhU26cC+iMy+HLtCLWLX0o3V62 4t6whrdzVQpW5iWWpcd/ixiuvJ7wMlgDpSDOOjz6LiYiuPBa03gjv2MxA2ZENEcQJJVs 4VkgKNN77/VgaPVrKzdYNd6zW01NcMFd60IrnSm2Cg1o7L1TpfXGBVFSI7fp6uVlmkp0 MxCJ3QQjZVqCjN40FeroIB6IwBpHVv0eqqqkue3ZeB0nluNhvJ53EwlrAwivb2CATxcE +YpKYwZxQGhVJ0V1onNM8oYqLIvyfzugVe/yVTkVcER3JyqznBAsf+c+iN9K3An0jrYy 2CQA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=rTU+udF0RaUyQB58XJzuzSuAsCZle2DjwuP7xRyCD98=; fh=b+GcvI4Pcayc3mqYGvUYD/O2AEP50jeeZwnwIXNAGVQ=; b=1Kv5sTxQjBtUSj0LJ2A0LrZqVVTH+8jMFUt8aOAekQWjK6++BZPJOBBa/hSSIwkSRJ CohV89FtFSZVwh56CytZDPaP22oJR1Dw4DP/YIOu6YyFGieXHLLPIvrzDUNC3nYmNxJB 3VuQfxAdpmybSOc5oEuCcAlQZ6C+NqhxLAJ5tboy+p4qETMU8B3wP5PsbgXHsbR8IF7h Kz/a8V8opSh4++82S5hNtAK5Qdq/XO5Xw/U9Nb3wTOak3FIYpGn+KpUzKHD+kjVkbDH9 Dl4a60804J0ALAXGKYCrXzuhu4PSSpVqSkx+hJiRWK3JPpGKJ7dXrD4CfYObTRHNunih 9VtQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jWZoEgU4; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-196789-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196789-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6ae4b43ecafsi18017386d6.591.2024.05.31.05.36.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 05:36:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-196789-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jWZoEgU4; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-196789-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196789-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 7944F1C24630 for ; Fri, 31 May 2024 12:36:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0591C15884C; Fri, 31 May 2024 12:35:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jWZoEgU4" 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 3248D158D90 for ; Fri, 31 May 2024 12:35:19 +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=1717158920; cv=none; b=ZDtcApOlvebUluBQmlliJFMuV+38XCqkJHF/7r2oSYfHUW+l94xxlPFO4IyJBsSyHKW1Cvg7NQOlPuS69lD+C3qDrNliMLTZ6Fkmt0sY8yNk884EGf8/ABGiY2GkBK6MeT2CQM3/EIJEUWH7Y6EAvbYlvYwbdfmJ7P6L5GiRNnQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717158920; c=relaxed/simple; bh=wqYNbMnNKnYTuOhIAZEDLwWTDb3cK6kIfqvEGugdDBg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mvH0/q3DLSnzB2bU5FW3lBcr2IVzsUBv8zNtpKt12rKgW2zXIxJsVPtQJfQmeuml/CRgivKDJycr57ntvTqjDSP3MU0FTP7VEmrXwDPPBvNFh4Z4AwoEIGZINgBtFx+8NQy6SXfWe1YlZ2sm4blvsvr8ngQdC3hnnd0zei/3R3g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jWZoEgU4; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 02479C32781; Fri, 31 May 2024 12:35:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717158919; bh=wqYNbMnNKnYTuOhIAZEDLwWTDb3cK6kIfqvEGugdDBg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jWZoEgU4Xc0WVJuCLJ+6Hs6q4NpYSC10UkRGFzsiFumy7spbDFeCWjkrRybOA69Lx t12Pdcof10CDEDBY9JSOa5lHSkekKFVgYUQghHE/RfsQw20VQhHdH144HsewFyBbyP OkT73cy7BKoBZ/E4EteUrNzUfIls6+VXPggxKvXN7sxcU89EFD9aB6d4jrPjw32UjR nud6bhkWf6Y+jXnQAYEsex7N6da3frywY4+VokVYqNxiquO5QJpq4kydPw0r1yusU4 wAV4NA9p12tlnhrwvFNBIDCRINm1U+dc6wjw4ixHxk7XeT2t2TigXC29W1bbKcvLxl 21GUYz/sFR4Tg== From: Borislav Petkov To: X86 ML Cc: LKML , "Borislav Petkov (AMD)" Subject: [PATCH 03/14] x86/alternative: Convert alternative() Date: Fri, 31 May 2024 14:35:00 +0200 Message-ID: <20240531123512.21427-4-bp@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240531123512.21427-1-bp@kernel.org> References: <20240531123512.21427-1-bp@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: "Borislav Petkov (AMD)" Split conversion deliberately into minimal pieces to ease bisection because debugging alternatives is a nightmare. Signed-off-by: Borislav Petkov (AMD) --- arch/x86/include/asm/alternative.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/x86/include/asm/alternative.h b/arch/x86/include/asm/alternative.h index 8554c2c339ff..c622ec7c4462 100644 --- a/arch/x86/include/asm/alternative.h +++ b/arch/x86/include/asm/alternative.h @@ -316,14 +316,11 @@ static inline int alternatives_text_reserved(void *start, void *end) * without volatile and memory clobber. */ #define alternative(oldinstr, newinstr, ft_flags) \ - asm_inline volatile (ALTERNATIVE(oldinstr, newinstr, ft_flags) : : : "memory") + asm_inline volatile(N_ALTERNATIVE(oldinstr, newinstr, ft_flags) : : : "memory") #define alternative_2(oldinstr, newinstr1, ft_flags1, newinstr2, ft_flags2) \ asm_inline volatile(ALTERNATIVE_2(oldinstr, newinstr1, ft_flags1, newinstr2, ft_flags2) ::: "memory") -#define n_alternative(oldinstr, newinstr, ft_flags) \ - asm_inline volatile (N_ALTERNATIVE(oldinstr, newinstr, ft_flags) : : : "memory") - #define n_alternative_2(oldinstr, newinstr1, ft_flags1, newinstr2, ft_flags2) \ asm_inline volatile(N_ALTERNATIVE_2(oldinstr, newinstr1, ft_flags1, newinstr2, ft_flags2) ::: "memory") -- 2.43.0