Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp416819lqh; Fri, 31 May 2024 05:38:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXQgHb29clqqM1aMwTZX7E9San5ApNUW2KHUul51FbJ1hYtVHoYcMGHNIezMZSvC3cIaRxLftY8oIMqM2wWqOWggN0zP2s0g/P4z/t1jw== X-Google-Smtp-Source: AGHT+IGWtAmsM1rT09tXiO2ZtULf+XgO5iXLEr64vTiv8cozdQbNamaT/fNhhgDpC1WAspYa7RNt X-Received: by 2002:a05:6214:20cb:b0:6ab:7ab4:f309 with SMTP id 6a1803df08f44-6ae0e768290mr81963196d6.1.1717159091841; Fri, 31 May 2024 05:38:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717159091; cv=pass; d=google.com; s=arc-20160816; b=f6+ZoKPOwguvQ7SHL2Td1w1JZNTs2MN0zrXt73zJgL7kneDEqqKThJHLqKLgq0sJJM wttTUwA3/DN+mgqubtL7mrGGeJQHDOUgfLX6VCfjaJntpixjfAxVmcaNaEVbPMXJSAEY FSEJzOApa6rc8r8XIkvWymCREc14R2Pe8G65xITNcJ3uxe+cP1GQImayN4dGDaP27ps5 QePaGepfNUAdXC1Agtl1x/uHy9wyjK2AU6QeCLfPRSWEuYG42ci8TaE1IYyb3yFu6CbM 97qznCfC23hNhXNGuUloNyFqgxcuc27O5Y983oroNlW7oNzXcHr/LtfMIBUu27uOwnIk p2Ag== 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=KmFVeB/G0ynVgVAOu5B9pWeX+jk7/+dzksHYtkGmS78=; fh=b+GcvI4Pcayc3mqYGvUYD/O2AEP50jeeZwnwIXNAGVQ=; b=sYYE8tlsXD2JiR7wuWSDvmKZGLFtyVh4aVGpBCLaumPtHtcDnhkiaqOsOzTKcQh9cD L/UAO/x5RFt9BCUBLfj+oZEZO07rhzAJqcKFN9n01EY8h6qwhCbQ5jtC4lMCcU0G8nPz 8lUroL2vt+HPW33ZJvoyXFXrRsBDI3Eer8UEoZAg0iwOiThDeR4zJrKKajw4qBG3hX5P 7NMH2t5dcfPgIo1InFnm1d9N0CadRTQOhh9SLmppMxy6IUBzIXVSDJOITTjfaKWTaIv2 dSg7ElLtR26qca6nDfZmNQgKqv21Dxg9oKI8D1zj1zYF1KhgbKH0fn24cNDML3U85+0a +uSA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=g7ZhDjsE; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-196795-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196795-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 6a1803df08f44-6ae4b4150ebsi19488056d6.364.2024.05.31.05.38.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 05:38:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-196795-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=g7ZhDjsE; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-196795-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196795-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 BA7F71C221B0 for ; Fri, 31 May 2024 12:37:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5F5CD176184; Fri, 31 May 2024 12:35:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="g7ZhDjsE" 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 8102A16F282 for ; Fri, 31 May 2024 12:35:27 +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=1717158927; cv=none; b=myPJ5Gc3PlUQqAWbCS+iX8hoiXpKePJ3G+4q8UW9Hc0ZuNX31NwvP5Gk5itjREe/rXC6kou5NNJB8g8+oCNAQ9QKnln7OiE1sGfmj7KqXWT8JX3UygGWuZOFyFzp0xNj00VJvSqbAH0/pqd4nLGrycEkOQKSGcFXYBtMNgMyS5I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717158927; c=relaxed/simple; bh=oaM4gPS6c2Nwk34PW367bO82k88VoCS8rWqPUvkNmV8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Q1rZzDKg712gTZ0oqMxEuOWPTwJURbWZl1Sx9OkSZagsq1cocGzrzqnDS7Hsrvun80JKVgkhCDI3KndAykRWj4VOpkcZ2egHMijmT8WJN7xl500sP2BDPyk/bcKl0IA4l+xEKYqLna+u3re3aIXcm5hcpgu3nVvvrqPoOWEBE5k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=g7ZhDjsE; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8B2F8C116B1; Fri, 31 May 2024 12:35:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717158927; bh=oaM4gPS6c2Nwk34PW367bO82k88VoCS8rWqPUvkNmV8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g7ZhDjsE0FvoznvJBgINAFKkO67JXsg0YiHRNBb2NKOuTRD2425e1wfiLO+hQUJyu 3HKNwX2UQM0Fghfvu+AA7vUXPC0TmK2QRtnyo3+Mpb2OOWhzJwVSzmT6l68gXfS7TO HxBkKNcwK/OVzrnX6LStI8hQTp8a5pjI+OXiD5WJ2T7f7yzJRoAfaGqBfNKjoA13j/ 1WTQYgy9q28C69mZFBMCdA10bVFJPht2Y8wKd9N1posNezDsvxQGFC23l0QPUx4Y56 vuJt2YIFJENUjQbQ81l40ppaau9wB9L0Vkrqu7NTPVxV7NqJvRV29sU6RJbLwt2mmJ SnBOqyPKCknGA== From: Borislav Petkov To: X86 ML Cc: LKML , "Borislav Petkov (AMD)" Subject: [PATCH 09/14] x86/alternative: Convert ALTERNATIVE_TERNARY() Date: Fri, 31 May 2024 14:35:06 +0200 Message-ID: <20240531123512.21427-10-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)" 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 bad1558d6382..73ee18705ef1 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