From patchwork Thu Feb 22 18:40:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Hansen X-Patchwork-Id: 205028 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp176666dyb; Thu, 22 Feb 2024 12:00:15 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWuJRb2QFG7iAvUCxd30OBaHo5txDA2yYThfx0eVHLz7lFlFcJ+x2DTF9Uz0FzMtSVqg0qkmmwAy3SdBGjS6b9BJ12MSg== X-Google-Smtp-Source: AGHT+IE5z6RK6OOsfPV/iMuKtisL+aBeC1RmpDzgChyAzRWdGGmq3MuWhqTplnqy4bqpQ7mNrmYi X-Received: by 2002:a05:6a20:9d90:b0:1a0:6c87:9197 with SMTP id mu16-20020a056a209d9000b001a06c879197mr26789371pzb.58.1708632015238; Thu, 22 Feb 2024 12:00:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708632015; cv=pass; d=google.com; s=arc-20160816; b=DEKAB38j6RpCKtF2pbs/IXOJ+0O1HSUlEjrGLs+70f/zFCJSbR2YW2IMJVlqSebKDV Us+IeRb9ETKyTv+jqMEdBkgNAqRid2Bk7AVtJVPFYl2ljSLZuYRP49Zw6rDER1VIVM2v 3DblGGoZK54xrinn7XiFBLSsWjIQcXvFgX7UbOmHjc7mUU7NA6kRO30FicWpTxrCpT50 xdN4CDJKQCGnqR0D0krP89P9T+2lWSyRzf6fS9bVa3E1aJkr7P7CtwaZoggIHtumFMaJ fdyiP+lid67wy+apnQZbWNbmm+iq24dfisPK+6eFYszDN3l+hKcY8l4HV8VvZ8s0CEGH Hhog== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:message-id :in-reply-to:references:date:from:cc:to:subject:dkim-signature; bh=vnunAzzWUwIQFlouUuCvUWS4erGlqSzhsDvyWqIRS5o=; fh=HUgOPOMLUPcroonsK10/uEWpbBCP57e0QFUoVmMwghQ=; b=N5rdP/dGf2JGtC3i4d9oSx4V9QdXlOC57UAVf8Nv/M6Bl29iAX1s9LtKTVj/NR+wRJ uS1LM0mOSadnWYZelZlKQkfv45Eyscmy12FUT1XcTUNnchyb3JKCRwgvckXAAPSOETpb r0TT8C/m9qNt2MXZ7Oc8ceYltA7cjcoIrS2Tt7PFL2t5lgN+SAsHOhT7DUrlb7MDTbNh mMtBMp8Rv2iK2JCG8YF4C85M9dkfAG+TbUosErJsHQQx9MmTKZXychgZ6oQRgWWXgSE+ H9hJWv4mXZipXa3opHPtUmkUTGHPVoQhDCcYPulrITDdcgGgpa4UZt4aGT1JgufqiHv7 XfFQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=bETgXOOG; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-77180-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77180-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id j2-20020a056a00234200b006e470155eb4si7145860pfj.99.2024.02.22.12.00.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 12:00:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77180-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=bETgXOOG; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-77180-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77180-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 59C0828CD71 for ; Thu, 22 Feb 2024 18:49:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6BCD314EFE1; Thu, 22 Feb 2024 18:40:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="bETgXOOG" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) (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 B19DA140E3F for ; Thu, 22 Feb 2024 18:40:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.9 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708627203; cv=none; b=p3lwDtxFhXqhpE9QEpuXZ0qFerBxxpKmGRA+Kg2IeAGG2YFW+BHCo08TcZo5yvJ3AGimADiU8YiCksVt0DO7wSoo4WzfPg/4wZA6EQQux8w8UBNeFTpbrTxq4VdQxXzjCLJXxVIOg03eHPjFY21DvaZu/PnacZ+801n1Uy+DPlk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708627203; c=relaxed/simple; bh=jlRQT407YyuEjgIgy+f+wvbminlLl1hPvuPvmjlH09Y=; h=Subject:To:Cc:From:Date:References:In-Reply-To:Message-Id; b=WOWrRakq714HcGhhrxxyGSHMrV+EEP7lhpl+0pd6j1O1HElUJVlmxvBiMvBoZHaSVdsRLiHsQgStTOawhFeAVm+425nMlc7mgweDzFkV+aZgqy13yB/2TjJqdyWsWc5PxxqePZJjoaEjmvMSm8osPI/UInBtRkf0+CRglKcEkCY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=bETgXOOG; arc=none smtp.client-ip=192.198.163.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708627201; x=1740163201; h=subject:to:cc:from:date:references:in-reply-to: message-id; bh=jlRQT407YyuEjgIgy+f+wvbminlLl1hPvuPvmjlH09Y=; b=bETgXOOGtYZCsTAscMo1LIy7QXRlyKmhmJpCffzlJ46I0L4NbNnk2lKO wUdNUIObaNU6EGuMy/clQXIR2FTllf+quUfJjT+fAUpzQmB/2xkjZHYBW 3T6VHtpyU2hAI1UqEjttXKmjMlHPOJFA3UpGmIZoiN7MPCQLbuf69f+FE vR5TYIC8CIZ3vcFGhAab+5JG5RCObs7fZy/iWHMZPqWIFx3kHOFhrol5x //rVs6wZUEjzamXJAXMXHBjFRTE+k5YIqWvAwucxryCNOSdYjbxxf9fya GKmiOsVpun/hmVZ1246SNDFzha1JcjrzlTH5OLLPMNEjdRGAlcuzBjCXI w==; X-IronPort-AV: E=McAfee;i="6600,9927,10992"; a="13584558" X-IronPort-AV: E=Sophos;i="6.06,179,1705392000"; d="scan'208";a="13584558" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Feb 2024 10:40:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,179,1705392000"; d="scan'208";a="10265242" Received: from davehans-spike.ostc.intel.com (HELO localhost.localdomain) ([10.165.164.11]) by orviesa004.jf.intel.com with ESMTP; 22 Feb 2024 10:40:01 -0800 Subject: [RFC][PATCH 26/34] x86/cpu: Zap superfluous get_cpu_address_sizes() To: linux-kernel@vger.kernel.org Cc: kirill.shutemov@linux.intel.com,pbonzini@redhat.com,tglx@linutronix.de,x86@kernel.org,bp@alien8.de,Dave Hansen From: Dave Hansen Date: Thu, 22 Feb 2024 10:40:00 -0800 References: <20240222183926.517AFCD2@davehans-spike.ostc.intel.com> In-Reply-To: <20240222183926.517AFCD2@davehans-spike.ostc.intel.com> Message-Id: <20240222184000.F74060D0@davehans-spike.ostc.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791630523750276661 X-GMAIL-MSGID: 1791630523750276661 From: Dave Hansen All of the 'x86_config' state is established by the boot CPU long before generic_identify(). There is no need to call get_cpu_address_sizes() again. Signed-off-by: Dave Hansen --- b/arch/x86/kernel/cpu/common.c | 2 -- 1 file changed, 2 deletions(-) diff -puN arch/x86/kernel/cpu/common.c~zap-extra-get_cpu_address_sizes arch/x86/kernel/cpu/common.c --- a/arch/x86/kernel/cpu/common.c~zap-extra-get_cpu_address_sizes 2024-02-22 10:09:01.292957116 -0800 +++ b/arch/x86/kernel/cpu/common.c 2024-02-22 10:09:01.296957273 -0800 @@ -1770,8 +1770,6 @@ static void generic_identify(struct cpui get_cpu_cap(c); - get_cpu_address_sizes(c); - if (c->cpuid_level >= 0x00000001) { c->topo.initial_apicid = (cpuid_ebx(1) >> 24) & 0xFF; #ifdef CONFIG_X86_32