Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2132888pxb; Fri, 25 Mar 2022 11:39:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRGhMPJ37zehiTWFQWk+JsQSxjTC64i05qKMHWb0+++azG3BSwCs3ZBcGVAo4jjZkqipnt X-Received: by 2002:a17:90a:da02:b0:1bf:3919:f2a with SMTP id e2-20020a17090ada0200b001bf39190f2amr26485009pjv.208.1648233596442; Fri, 25 Mar 2022 11:39:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648233596; cv=none; d=google.com; s=arc-20160816; b=WcIPr/1D5EkpS0xF4n8LUWM5oBod4Tu0p/O1VArUuo2w90bkzbh4WU5MbqLQlUpSFS uNPayQKB9yWBm136XrxsUdvgIBPZQPh51jHGjvdlSF3T5C9brh7l6A+QHJqiCWjvVeyy bRhEDigimZ7niixgwuKwAgLJGnGapN1zoGUCmN+f9Z1+ea1DklnfGb/YJbMieJU+C08b H9IzHOzYiDtlljDfQycDc3gSm0XAm/HliO1Cacz6gRgeNMvVT8q/iCmmz2qH7YBLVhcq LfdZ4j4gvNUZfBJPHJxxlmcEXUDlaxzY37cqF6OJI+Vsizm5qL/ORpl0qDXMGWAIDoBb xAMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:mime-version:references:subject:cc:to:from :dkim-signature:dkim-signature:message-id; bh=dhbG1adkOE8R+sSmMcE/7esFfa52zfgf9U61mYJxyYw=; b=DxGUyET93ZilSWqZyLQRt3VTCQgntMI45HSdzx7juKumAvh3RwJgtuoUXZFN3XALL7 cZf3CPn2LCyf2KEll8gFw++KW5Lcdq6y0VXZxC73Qm1jjkyF15/P1VNyTCT5KedddxoL kPiwxcxNSTfrrRrZA0Wtw7n8EhUwW6OAg+eeCvmTuqseThipVhKjUv7paqvDESHiwS40 JmoVLyuG5G2UzyeXdYry+85XTyOLsxYhYD4aHYlyi/Naq0KQmIJI2HF+8ACFRKTIkiSo Z+PJexJS/9Cpx+2vYai15HEIDek5ZRu5EJdSiEG79HV13qw47PwSIILdzKzlVJGDrlIN FAPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=NEYa9909; dkim=neutral (no key) header.i=@linutronix.de; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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. [23.128.96.19]) by mx.google.com with ESMTPS id u6-20020a656706000000b003821ef7e1b7si3164419pgf.191.2022.03.25.11.39.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 11:39:56 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=NEYa9909; dkim=neutral (no key) header.i=@linutronix.de; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 91C5519751B; Fri, 25 Mar 2022 10:57:31 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350585AbiCXNst (ORCPT + 99 others); Thu, 24 Mar 2022 09:48:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350563AbiCXNsn (ORCPT ); Thu, 24 Mar 2022 09:48:43 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76F777CDD0 for ; Thu, 24 Mar 2022 06:47:11 -0700 (PDT) Message-ID: <20220324134623.465066249@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1648129630; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=dhbG1adkOE8R+sSmMcE/7esFfa52zfgf9U61mYJxyYw=; b=NEYa9909YrtsAWAufxNgT+hBwo+G/s5ZXsE6I1Cwsg2rFoHX5hBKycmuhL6/DeBbPAseoN PRieKodSwQx+EgOqy/GawS2nIumvDAX3cIoFG3vB3ZYdaDDVT2BFdvnQ3WW8ceRPOQNwCG jd0oiwJWwMUmFyiqmXwG43JG+M9eVYgow0z57GNErKOaccSgGE3hw3j3CwU3jAFMYJvZiT eHaDBCMAsOEIFYJLvy99VojwrJ6JVALz83Mo2+ZvKZonmAmI88/A7cI5NaVwhwlPv6w93d 1QiIFHWK18LOPNNS26tnB5dqb6KgxJom1a9XgWzzVCdEG9z6UrbREOFoY4CpGA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1648129630; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=dhbG1adkOE8R+sSmMcE/7esFfa52zfgf9U61mYJxyYw=; b=WI9lMIfXdT+CqFDMctIkehPGZ5k1Ul7EltWd8i3tpjN9ysbIrq2xv/Dp9ubeBjPHzH18sK wsLYlT7156aS4BBQ== From: Thomas Gleixner To: LKML Cc: x86@kernel.org, "Chang S. Bae" Subject: [patch 2/7] x86/fpu: Remove unused supervisor only offsets References: <20220324134548.432837672@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Date: Thu, 24 Mar 2022 14:47:09 +0100 (CET) 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 No users. Signed-off-by: Thomas Gleixner --- arch/x86/kernel/fpu/xstate.c | 30 ------------------------------ 1 file changed, 30 deletions(-) --- a/arch/x86/kernel/fpu/xstate.c +++ b/arch/x86/kernel/fpu/xstate.c @@ -83,8 +83,6 @@ static unsigned int xstate_sizes[XFEATUR { [ 0 ... XFEATURE_MAX - 1] = -1}; static unsigned int xstate_comp_offsets[XFEATURE_MAX] __ro_after_init = { [ 0 ... XFEATURE_MAX - 1] = -1}; -static unsigned int xstate_supervisor_only_offsets[XFEATURE_MAX] __ro_after_init = - { [ 0 ... XFEATURE_MAX - 1] = -1}; /* * Return whether the system supports a given xfeature. @@ -325,33 +323,6 @@ static void __init setup_xstate_comp_off } /* - * Setup offsets of a supervisor-state-only XSAVES buffer: - * - * The offsets stored in xstate_comp_offsets[] only work for one specific - * value of the Requested Feature BitMap (RFBM). In cases where a different - * RFBM value is used, a different set of offsets is required. This set of - * offsets is for when RFBM=xfeatures_mask_supervisor(). - */ -static void __init setup_supervisor_only_offsets(void) -{ - unsigned int next_offset; - int i; - - next_offset = FXSAVE_SIZE + XSAVE_HDR_SIZE; - - for_each_extended_xfeature(i, fpu_kernel_cfg.max_features) { - if (!xfeature_is_supervisor(i)) - continue; - - if (xfeature_is_aligned(i)) - next_offset = ALIGN(next_offset, 64); - - xstate_supervisor_only_offsets[i] = next_offset; - next_offset += xstate_sizes[i]; - } -} - -/* * Print out xstate component offsets and sizes */ static void __init print_xstate_offset_size(void) @@ -951,7 +922,6 @@ void __init fpu__init_system_xstate(unsi setup_init_fpu_buf(); setup_xstate_comp_offsets(); - setup_supervisor_only_offsets(); /* * Paranoia check whether something in the setup modified the