Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6226302rwb; Tue, 22 Nov 2022 10:20:02 -0800 (PST) X-Google-Smtp-Source: AA0mqf58ZXG54iV1SGgcnN5PQtHb7wW4Z1pX6ZT0LwNBGU7WP3+fq7TLlQgFypgSvcPGdkmGa8Lg X-Received: by 2002:a63:b16:0:b0:46e:c052:a6b0 with SMTP id 22-20020a630b16000000b0046ec052a6b0mr4373180pgl.91.1669141202463; Tue, 22 Nov 2022 10:20:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669141202; cv=none; d=google.com; s=arc-20160816; b=NQRSqInLc2XjWRw9QuQBYeRUEPduzkORagb9cy0jBP0x/kDz+5hyOJ1V/N/JThUpk8 zGy3dgSy2MiLkHUlsiopJADRVkvGIcBvc0t6KzDddq7374+outCMH/I6WhKrLyp3KIqC E8pEpHsQCXbypW72+yruOxw8OpBy2XWIoz38dGES2eEEIxMvtdFU6U6Z8M+2URwuJVWM W3OZFbqjjZp+I/6BOMUvO8At5vY7/sn+8yTjRTD+CGl84PKFhIFq0WmuBFPrcO8zqd0i eT/v9hjTqYH1MqVmfAwE3gq3aPku8RikcVr/I6t7FYHeD3GRKAY/J8+zxUoAKEEtrLxg 7k2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=iGdsqCOwnGEZlC9+sno+kd261SceMOT/kVpnaYNTnSA=; b=O9ZAfjsR4qYAODrQSdGuJoRNYMX/pPcoWiYnrZMV3zDvGl6jcoudKM+sm1B1WwcFkZ YGpKvpVe94sI4sb9y6DUQvPic2oLwQKIEUtPWb7lEK7WMNCvZtpD7V3Wsff7y1uBKx/V P4mv3wKiMpBcK/8NiQkAV2GBm9N3n35eGQZmy4RTPXmQzDfEyRa0hBLQPOtDDif1tZun ijR97SpJEm4ygI0xzX4AuVDT9/IQtzyeCzFvhLgSOpnafraVBpNvrR4rXz+a/FtbcD+1 ZgjSmTfde6QPMDP62iV3YZ5F4DnKYDqxANJ+MjejHyvQEQDhK6y8K5rqmveW50bMRIc6 ETtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=U419Zewq; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=VYor3tld; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l27-20020a63ba5b000000b0045837277570si14210077pgu.286.2022.11.22.10.19.50; Tue, 22 Nov 2022 10:20:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=U419Zewq; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=VYor3tld; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234261AbiKVSFE (ORCPT + 90 others); Tue, 22 Nov 2022 13:05:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234112AbiKVSEx (ORCPT ); Tue, 22 Nov 2022 13:04:53 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCBE869DFC; Tue, 22 Nov 2022 10:04:52 -0800 (PST) Date: Tue, 22 Nov 2022 18:04:50 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1669140291; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iGdsqCOwnGEZlC9+sno+kd261SceMOT/kVpnaYNTnSA=; b=U419Zewqp0pz8L1+p6vV5arNwk3J4uIsC1N4yyyXyFuWgQifuLQ/z6sHcj3u2qD/AlKuGm KtNq02DQHT+WsfS+SH7z7SVhYrv8PW+tJfQIafcn4h1pHazKp2z+gk5rFMS/NXQyZUxWVu 9Iw6QVWUi+ABWf3Ql35lY95qJo1Smlarm/stV2PhJLSnZUyhIm6wmn33xUwHKeQQlIXeY0 EiZJAkyMiJHNGXrrx4sEfrJUbWnbw9kL2KWEwbSgSh9P5m53Cgw1O0URMELUnwopddgdhM vnnSLavF06S1Q6NT1YiRFcFJet8TSmrc0WnS1OhrubRyrAqo8r2P9UEqG9ouFw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1669140291; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iGdsqCOwnGEZlC9+sno+kd261SceMOT/kVpnaYNTnSA=; b=VYor3tld8xeU4WAqxgJK9xlpI0YoPLtAr0RPOwItiom+u5boEknTPJHxkOWfbu9p4cI3Yd X6xGp7AvQnrbvLBA== From: "tip-bot2 for Juergen Gross" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/cpu] x86/cpu: Remove unneeded 64-bit dependency in arch_enter_from_user_mode() Cc: Juergen Gross , Borislav Petkov , Dave Hansen , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20221104072701.20283-3-jgross@suse.com> References: <20221104072701.20283-3-jgross@suse.com> MIME-Version: 1.0 Message-ID: <166914029025.4906.10157484903409499772.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/cpu branch of tip: Commit-ID: 0bafc51babe2344e9b0ff6629a4f044727728349 Gitweb: https://git.kernel.org/tip/0bafc51babe2344e9b0ff6629a4f044727728349 Author: Juergen Gross AuthorDate: Fri, 04 Nov 2022 08:26:58 +01:00 Committer: Borislav Petkov CommitterDate: Tue, 22 Nov 2022 16:11:57 +01:00 x86/cpu: Remove unneeded 64-bit dependency in arch_enter_from_user_mode() The check for 64-bit mode when testing X86_FEATURE_XENPV isn't needed, as Xen PV guests are no longer supported in 32-bit mode, see a13f2ef168cb ("x86/xen: remove 32-bit Xen PV guest support"). While at it switch from boot_cpu_has() to cpu_feature_enabled(). Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov Acked-by: Dave Hansen Link: https://lore.kernel.org/r/20221104072701.20283-3-jgross@suse.com --- arch/x86/include/asm/entry-common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/entry-common.h b/arch/x86/include/asm/entry-common.h index 674ed46..1179038 100644 --- a/arch/x86/include/asm/entry-common.h +++ b/arch/x86/include/asm/entry-common.h @@ -24,8 +24,8 @@ static __always_inline void arch_enter_from_user_mode(struct pt_regs *regs) /* * For !SMAP hardware we patch out CLAC on entry. */ - if (boot_cpu_has(X86_FEATURE_SMAP) || - (IS_ENABLED(CONFIG_64BIT) && boot_cpu_has(X86_FEATURE_XENPV))) + if (cpu_feature_enabled(X86_FEATURE_SMAP) || + cpu_feature_enabled(X86_FEATURE_XENPV)) mask |= X86_EFLAGS_AC; WARN_ON_ONCE(flags & mask);