Received: by 2002:a19:f614:0:0:0:0:0 with SMTP id x20csp65123lfe; Fri, 15 Apr 2022 19:45:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyDOOwANl2wCbuFSq8TaUSC+obN0SL6hEkmCj6o3YIn/JuPwn9mY5zMVPGG5rV6DY+d7+rj X-Received: by 2002:a63:ad4d:0:b0:378:4b82:b881 with SMTP id y13-20020a63ad4d000000b003784b82b881mr1472918pgo.282.1650077118313; Fri, 15 Apr 2022 19:45:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650077118; cv=none; d=google.com; s=arc-20160816; b=cQz1/Q0bpPNB31B8x7l5sx6tbW3MgWSJmAXMWwpKKYQvQ5aYxP1EA8/FXDlxobeaj8 IsqGCQo8HBKHEVVUiYnR2dmX54c/2CxzqFb0LCVL+ysCcT4yPYnTrBK5ogQm8uDSHIq9 eHpC+ZlwgnmYuuVyCcBUiu2BhbtCi/cjUhREEMhrLQGzkNqcnJNlfjVqaNuScEZOzKjB EIjD73FfGSWsf3tIkh0aw/qFa7t07ui6KzzaTWWzSrVXgpnv6hF/B9vhDwF/Vj1KgUCz 2iwNB3UVf61OqTfh1pAk6InLITY1aEaiPQvF1s7OtXF/0rruNbpfZyL5ee+/G9H7cDPK l+Bg== 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=TzfZgH2CpYL1WXpv7y3pqSWAMrDt8KsmWhxyBSsv7e4=; b=gff/dvwnTnzfzWJB4eimVzDcu7FL9Q+rolnYIna9+D4vEQPeDUUHfrWAzDiyduyTjN 4DZC4QFWR9VBvPQsiiBKpEgXV2CyOMqqPm4gpZpFlhkIKfZhA/OSnlrQmB3vC3297jsC Vluiqzoy67m1BTpJWhjzGVHJrO5JGoSN31t52S/ggoYLBQiBrGL3TDjkgKEZhp9EC97j pGrXVjbBD+bbOe/qBW2u4MS3gZOPhCbJ+/FfdV7dFO/Gy/0z10pOE7BsZS6+mR8dC7nB jLWmtOm7Bk6iSUEbZVlwKCCrqNy52LryKhff/UzAzQ2YbaPDplF8s5ia/ruWA23LHOnn xBxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=4fZMWsd7; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id x7-20020a656aa7000000b003a110c10577si3403664pgu.106.2022.04.15.19.45.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 19:45:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=4fZMWsd7; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0CA46A6E2B; Fri, 15 Apr 2022 18:52:37 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351813AbiDOJox (ORCPT + 99 others); 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: 7bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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/core branch of tip: Commit-ID: 203d8919a9eda5d1bc68ac3cd7637588334c9dc1 Gitweb: https://git.kernel.org/tip/203d8919a9eda5d1bc68ac3cd7637588334c9dc1 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 value) #define savesegment(seg, value) \ asm("mov %%" #seg ",%0":"=r" (value) : : "memory") -/* - * 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__ */ diff --git a/arch/x86/include/asm/special_insns.h b/arch/x86/include/asm/special_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(); } -#ifdef CONFIG_X86_64 static inline void load_gs_index(unsigned int selector) { +#ifdef CONFIG_X86_64 native_load_gs_index(selector); -} - +#else + loadsegment(gs, selector); #endif +} #endif /* CONFIG_PARAVIRT_XXL */