Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp963858lqt; Fri, 7 Jun 2024 04:19:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXcZfjq5JZcTWo1W2M6sLbZmHltWstlUvul5gFGC4NPXJMl5CeOZj6vPwRxFL5CTKCBdP7ndXpD4gHO8ecB5ECFvYk5R19KM4UxIs7ESg== X-Google-Smtp-Source: AGHT+IEF+qK5Hf613exAGT0KlyzzWNM0zyysEvALh5JDgFJeE//KjI9T8GSHGzP7tQQn2FwOkGtq X-Received: by 2002:a05:622a:1791:b0:43e:2574:ea9e with SMTP id d75a77b69052e-44041cb8451mr27613621cf.50.1717759174743; Fri, 07 Jun 2024 04:19:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717759174; cv=pass; d=google.com; s=arc-20160816; b=o62xNsQVK7gG+FSkCYODKRoUotxS+VXl+U52nOohlNHfSj4oDoMxOCrmgSQgjA5NcD gPOdt7pE9yuTbi27Dm7su3Zm0+7d9Dmc9Wm7A1TYRrJGMtdehfInGqhlaXGIk1f2K559 8BLfY7/aDeDkoNvOgWhSDS7vvxTzlzvJCiHRGQ9Of9zL1X8BOo0dDNjaHDpfE252TZF5 QTEwztoKzPo+sHdIV4Wqo7AkRfobVk3t9ysWjiwDFG+mqgeOHfppn2C8KK3+VyZtQK6m KcMU2l280WAljb1o+gwqkyy0xpUFSuupIWEGa9+FJL+YcYSyReVW9qxvVyPmfPP1E24Z iitA== 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=hyVl94A+FDu3h82p5hxvQuGZCGBm0NtF8Q6pBKWi+8A=; fh=b+GcvI4Pcayc3mqYGvUYD/O2AEP50jeeZwnwIXNAGVQ=; b=GxVEUwjQywzUZ1ZWF+EK6BvT0LYZty/nb3VLwB7SRPCOCS70LHeqaiXnS8Lw7voVue 1xo0wRMQ21wshRXOuAbrBV4OrnUQFquzsJdNvLASKqQLZvvwAQ3Rlyeuz63laZWA8BBQ wBUqpnMQAR+roeMrxdOc+qG8ZVTkoTXNOv29jdajOFoNZxMHpjlRLr0BnovAuSWvOuUi LzIoA8fsfnzzpiBHNBdbMP8tchRnmhIivOuHrSVxtMAkBZn+vStXMC0BvKC7WVItZn9F Gd1PlEGz0m84405bWb4tPlLqeqE1tD18qgAlAEqiqraeCCndFE5ja6pfNM7KXC7BhVIB 28yA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZUFMFR2c; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-205890-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-205890-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. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-44038b645bfsi34016271cf.607.2024.06.07.04.19.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 04:19:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-205890-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZUFMFR2c; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-205890-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-205890-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 733671C20892 for ; Fri, 7 Jun 2024 11:19:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 43AF51946BA; Fri, 7 Jun 2024 11:17:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZUFMFR2c" 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 7261419414D for ; Fri, 7 Jun 2024 11:17: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=1717759039; cv=none; b=fLr2N2tp+uO48yREIc2ATCtnDz055D+S2lBvdpSlEq7tIwBKIxGNNd7cpyv3KmN/eitZg2kMxRQLNFsXQZsvI5m9bSo31d9FzcLYUcRJnpPldn9vLx7XT8UWDi1b+kc8ekVeQhdl/AULwoJNsDoKHSEbnBw/4zMfDFWRwwNe3aw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717759039; c=relaxed/simple; bh=jX1K1qcahG4Vu37vWyHa5G78VbBr/6o4XnfwKu5fGm8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kfndsI/s6NLJfMI5gTK9Fy60BXxGBZSKMLUOxzRIFG7PWxAMfVtYP6oRY6C7xzE4uN4ZsB4iRmFJBuE9aLfHyVC7mvr4gxVDTUQlY+Sg5gFCAo6gwXlkKkx7DQMdTllabQeV0iK8MdoHoEYavdGeV9PY66/Xok2Q45J/m4Nr92s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZUFMFR2c; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2E3E8C32786; Fri, 7 Jun 2024 11:17:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717759039; bh=jX1K1qcahG4Vu37vWyHa5G78VbBr/6o4XnfwKu5fGm8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZUFMFR2cNGUKSMc+qXLfgKCE7sTZwvnPDvT0zcTZzXKja6Cx/0HKLgMW3OZQYzg/V u6mPG6WxhlugDq43S4MaoNzhH1+Wvnuu37kjc++smZa5P2SM3hdPIwScqEHFBNV5S4 xiSp8fg81N3DqUjW3kLmxDlSEE4BDWkNzLZiZeoKL8FU4xZEVVnvYsBZhJO7z6j0Rf HEaNeoSGJRg4/cup/XKNR71pTkV1oJh9MLG0LB7dfAfzfPz0DbmjSXz4CVcdaxJBwO G0rA3UnN5omC9AcsmC0/HPdoz12dvKfMAaMokc0xw+D4txcmwtfdEJHa70B/hjRXAX 8tiIEWevUjtyw== From: Borislav Petkov To: X86 ML Cc: LKML , "Borislav Petkov (AMD)" Subject: [PATCH v1 09/14] x86/alternative: Convert ALTERNATIVE_TERNARY() Date: Fri, 7 Jun 2024 13:16:56 +0200 Message-ID: <20240607111701.8366-10-bp@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240607111701.8366-1-bp@kernel.org> References: <20240607111701.8366-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)" The C macro. Signed-off-by: Borislav Petkov (AMD) --- arch/x86/include/asm/alternative.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/arch/x86/include/asm/alternative.h b/arch/x86/include/asm/alternative.h index bc260f27d7f1..007baab32c14 100644 --- a/arch/x86/include/asm/alternative.h +++ b/arch/x86/include/asm/alternative.h @@ -274,15 +274,9 @@ static inline int alternatives_text_reserved(void *start, void *end) /* If @feature is set, patch in @newinstr_yes, otherwise @newinstr_no. */ #define ALTERNATIVE_TERNARY(oldinstr, ft_flags, newinstr_yes, newinstr_no) \ - ALTERNATIVE_2(oldinstr, newinstr_no, X86_FEATURE_ALWAYS, \ - newinstr_yes, ft_flags) - -/* If @feature is set, patch in @newinstr_yes, otherwise @newinstr_no. */ -#define N_ALTERNATIVE_TERNARY(oldinstr, ft_flags, newinstr_yes, newinstr_no) \ N_ALTERNATIVE_2(oldinstr, newinstr_no, X86_FEATURE_ALWAYS, \ newinstr_yes, ft_flags) - #define ALTERNATIVE_3(oldinsn, newinsn1, ft_flags1, newinsn2, ft_flags2, \ newinsn3, ft_flags3) \ OLDINSTR_3(oldinsn, 1, 2, 3) \ -- 2.43.0