From nobody Mon May 11 04:12:55 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 76266C433F5 for ; Fri, 15 Apr 2022 09:42:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351824AbiDOJox (ORCPT ); Fri, 15 Apr 2022 05:44:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233838AbiDOJov (ORCPT ); Fri, 15 Apr 2022 05:44:51 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A019BAC056; Fri, 15 Apr 2022 02:42:22 -0700 (PDT) Date: Fri, 15 Apr 2022 09:42:19 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1650015741; 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=TzfZgH2CpYL1WXpv7y3pqSWAMrDt8KsmWhxyBSsv7e4=; b=4fZMWsd7dScKZvzIA0nuWdtRbT8Rm4HssOnMjP83EH5ikwxFoX1+/HUex/U2mgp3aOp09b NzA2StEX4rDrsCSQjDb1W43+rLkf+Go3OwYQ2y3i65vjoe6/SSBeBAZ66LLoS85ASmi3Vf gMp9i2SyI3rxJRuu5NCmWQ17kbHSRJXit46BO5mKCrWMwsSqWlpVC1dEzhSI3fZSG+pdGg 3ObYL/Sl8IAM+oVwRoVHRqd2FXp1jtxr6OyBOQDAPvGiIP4iQNiVYAy8iKY8P3LkkJTqzo qIry9OcuFZfMijENYK9KZZJPoCO4d1MwjAjDM4S/yAE7Dkmv2l/6AkvrbM2kbw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1650015741; 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=TzfZgH2CpYL1WXpv7y3pqSWAMrDt8KsmWhxyBSsv7e4=; b=Oh9Fatgm2Hn4SMAKGmFveiqA78ZEZ5ZU8AFCdHu+YZajhHjw/I/+uYvc/4JA3gu5JRlrhN eBWQqvMkiN+fybAw== From: "tip-bot2 for Brian Gerst" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/core] x86/asm: Merge load_gs_index() Cc: Brian Gerst , Borislav Petkov , Thomas Gleixner , Andy Lutomirski , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20220325153953.162643-5-brgerst@gmail.com> References: <20220325153953.162643-5-brgerst@gmail.com> MIME-Version: 1.0 Message-ID: <165001573943.4207.9341858824402363883.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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/core branch of tip: Commit-ID: 203d8919a9eda5d1bc68ac3cd7637588334c9dc1 Gitweb: https://git.kernel.org/tip/203d8919a9eda5d1bc68ac3cd76375883= 34c9dc1 Author: Brian Gerst AuthorDate: Fri, 25 Mar 2022 11:39:53 -04:00 Committer: Borislav Petkov CommitterDate: Thu, 14 Apr 2022 14:15:54 +02:00 x86/asm: Merge load_gs_index() Merge the 32- and 64-bit implementations of load_gs_index(). Signed-off-by: Brian Gerst Signed-off-by: Borislav Petkov Reviewed-by: Thomas Gleixner Acked-by: Andy Lutomirski Link: https://lore.kernel.org/r/20220325153953.162643-5-brgerst@gmail.com --- arch/x86/include/asm/segment.h | 7 ------- arch/x86/include/asm/special_insns.h | 7 ++++--- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/arch/x86/include/asm/segment.h b/arch/x86/include/asm/segment.h index 617b366..2e7890d 100644 --- a/arch/x86/include/asm/segment.h +++ b/arch/x86/include/asm/segment.h @@ -350,13 +350,6 @@ static inline void __loadsegment_fs(unsigned short val= ue) #define savesegment(seg, value) \ asm("mov %%" #seg ",%0":"=3Dr" (value) : : "memory") =20 -/* - * x86-32 user GS accessors. This is ugly and could do with some cleaning= up. - */ -#ifdef CONFIG_X86_32 -# define load_gs_index(v) loadsegment(gs, (v)) -#endif /* X86_32 */ - #endif /* !__ASSEMBLY__ */ #endif /* __KERNEL__ */ =20 diff --git a/arch/x86/include/asm/special_insns.h b/arch/x86/include/asm/sp= ecial_insns.h index 68c257a..45b18eb 100644 --- a/arch/x86/include/asm/special_insns.h +++ b/arch/x86/include/asm/special_insns.h @@ -184,14 +184,15 @@ static inline void wbinvd(void) native_wbinvd(); } =20 -#ifdef CONFIG_X86_64 =20 static inline void load_gs_index(unsigned int selector) { +#ifdef CONFIG_X86_64 native_load_gs_index(selector); -} - +#else + loadsegment(gs, selector); #endif +} =20 #endif /* CONFIG_PARAVIRT_XXL */