Message ID | 20240212154639.931761608@linutronix.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-64279-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp811696dyb; Tue, 13 Feb 2024 13:13:36 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVdzpAvglxQNk/kzTUf0QJyz8QkQddDbVZ7wfxYvT5DCnJchV8oyGpRP0ysaSClqSJG7lz89Nggj/FBkaKnCuiGdYoXRA== X-Google-Smtp-Source: AGHT+IE823tOKcklQgL1oSfSTvOwoBTb5B8w88FzVpX7MbTT1iE7UfUDBpRyo1AfsOD2/wH6zXd8 X-Received: by 2002:ac2:4466:0:b0:511:51ec:8684 with SMTP id y6-20020ac24466000000b0051151ec8684mr434943lfl.50.1707858816753; Tue, 13 Feb 2024 13:13:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707858816; cv=pass; d=google.com; s=arc-20160816; b=Fp7HkP/X7e4sq7e0dfkQyQnqcoorp4yX71vnbR3fLbErJe7wVeMbPwT0jrk2y5HAAp B0uZjUCkjao4Kj5GkHQAbuMmia1hp/2bVqG+FxfqKCj7YZ+g3Blkgd+146MzHAjMhj5h eSCPzqjy1HdM5RRr7MFr6RxwBwuP8VrN+2QugA8CjKsnYO8cFdn47sO8W/3eT7QjPWq7 VlvjNyYPQrIr1PjlIB+6GB58/2e32q4Oadk7zddO1aH2dAEaXsKSDJ7ios2vluECNeDX rU/lg/jE9tbkSl+/xeoKXRax6YcsO1h2Hf78Ic54PeHTjp9atg5FWsDEEuhiKdGjVctX JY9A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=date:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:subject:cc:to:from:dkim-signature :dkim-signature:message-id; bh=yULM2Gj9hY++VfH+YxKvELgZNf/bRFWwj5nxSBjyXNI=; fh=nRvqhhVKa9Zhc081r8Lz07uEcgzOtxnuQoEEbElQeWE=; b=onX+irrY1Dlztf85FmB6fq/axjfx704pS1kAWfumPQVUejCqqRNyQ54px/sNoUYJ9K 4X7StER/lNtYYXuAAFULIYyZ2L5pecTA19dOD1VXeWO0VC8xV2z4tbEA5hbA+iXkqacK PYqjRARKvclpnqxl6gakIaJxc4729kVHy9bQyYP7zIkQNUtR5ML7ccpRji3Vcno3Bbg0 +s96ify6u7kItShXGXsk++m+/BEYmtRvj0ENdg88Esw6aCIFHsiCW1hGTy8pvL/yGuiN 7eDW3xwJUD2UE24J0jxkOkwRg1c0NGJVeGppY+DmEWeiFHFcnd7+FcSQqS4uLTaxsOW1 le9Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=JDRkOor+; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-64279-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64279-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de X-Forwarded-Encrypted: i=2; AJvYcCUDcE5/NWsT/6apSkd2pfD61W7zM7YkVkLtAmty+6ujXP70mLPRyonoa4HzhnSs2JQYptvhhpD/JwzDeCV9YPQ/G1rpow== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a27-20020a1709062b1b00b00a3d2bd18e21si254794ejg.71.2024.02.13.13.13.36 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 13:13:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64279-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=JDRkOor+; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-64279-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64279-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 5A2311F235E9 for <ouuuleilei@gmail.com>; Tue, 13 Feb 2024 21:13:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 766E378686; Tue, 13 Feb 2024 21:05:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="JDRkOor+"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="wbWWgI7H" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 4A22A779F2 for <linux-kernel@vger.kernel.org>; Tue, 13 Feb 2024 21:05:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707858319; cv=none; b=AL6e1s5dkACFFdAIQJrxAjKgZf6e6CoJ1CvOxCH7kbOLkoLcsejlh2vkhCcA8WWJUbn6RxnfTww1Imyeb2iiGlFKNtPh2XxpCX/n3XF864Wy8lHn2Cw246/6+rdDSxN/SvFMURZx5euz+SQzTHRU/98aFRZ+MDiAf2DkO5y/r1g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707858319; c=relaxed/simple; bh=fFDDm+IcPIJ8ufw0BZKYFGMy6vU1yM2Z0NwvzimfUPM=; h=Message-ID:From:To:Cc:Subject:References:MIME-Version: Content-Type:Date; b=XlG/ExQn2bRViVHf/oAxLINeuy3oYDzwAdZgVzQYt5+L+Y0/045qghHjzHW8gh6EbnRNgs2uLv1CvlQOYFY5WF7Cjj95AwiK/paG/diFa/mAH9BdkYNyiVAxbfzP7ApeaBWtCXYW+Y83Au5aX0VSSHMeXKl4JPtFlNiAyd+5d8M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=JDRkOor+; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=wbWWgI7H; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Message-ID: <20240212154639.931761608@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1707858316; 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=yULM2Gj9hY++VfH+YxKvELgZNf/bRFWwj5nxSBjyXNI=; b=JDRkOor+tdCFby6x3IuKyyIR64tpc3Yp0iExZNAojUGNYRcTYxSl2q6UIcCwfw4P1KjtCS ThCAI3qD0TaTo/01i7xFW8kIkRQGDef6g2hMbztVqIH2nVthPEwR9sDeRUR2yyz1iYKC6b +GfoVVrdZp1gepuidgwWPXUnnVDF4Xap0zUCsgaD6vQPZMLGtfIjBPqWAJ2HahMFK6EznH WTc7HUcMtXl0cNPQ61qT8gFpAE6EN/cZENI8ktrFzqetYUKSTHgN56THZIG/+d3XqUSJev ih0fLoZnBMNN8H6NG+FenZcfK6efYmYOB4gOQWlswe5ndSsIGz2B5qk/elzelQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1707858316; 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=yULM2Gj9hY++VfH+YxKvELgZNf/bRFWwj5nxSBjyXNI=; b=wbWWgI7H08J+gqeR0lshjzk5jBNFhte+1/cT5Q9T7NlOPbva5dSxp62OR+joSXlaT8Ac0c tmcalz+YGbl9nfDQ== From: Thomas Gleixner <tglx@linutronix.de> To: LKML <linux-kernel@vger.kernel.org> Cc: x86@kernel.org, Tom Lendacky <thomas.lendacky@amd.com>, Andrew Cooper <andrew.cooper3@citrix.com>, Arjan van de Ven <arjan@linux.intel.com>, Huang Rui <ray.huang@amd.com>, Juergen Gross <jgross@suse.com>, Dimitri Sivanich <dimitri.sivanich@hpe.com>, Sohil Mehta <sohil.mehta@intel.com>, K Prateek Nayak <kprateek.nayak@amd.com>, Kan Liang <kan.liang@linux.intel.com>, Zhang Rui <rui.zhang@intel.com>, "Paul E. McKenney" <paulmck@kernel.org>, Feng Tang <feng.tang@intel.com>, Andy Shevchenko <andy@infradead.org>, Michael Kelley <mhklinux@outlook.com>, "Peter Zijlstra (Intel)" <peterz@infradead.org>, Andy Shevchenko <andy.shevchenko@gmail.com>, Wei Liu <wei.liu@kernel.org> Subject: [patch V3 18/22] x86/mm/numa: Move early mptable evaluation into common code References: <20240212154529.402604963@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Date: Tue, 13 Feb 2024 22:05:16 +0100 (CET) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790819766714314720 X-GMAIL-MSGID: 1790819766714314720 |
Series |
x86/topology: More cleanups and preparatory work
|
|
Commit Message
Thomas Gleixner
Feb. 13, 2024, 9:05 p.m. UTC
From: Thomas Gleixner <tglx@linutronix.de> There is no reason to have the early mptable evaluation conditionally invoked only from the AMD numa topology code. Make it explicit and invoke it from setup_arch() right after the corresponding ACPI init call. Remove the pointless wrapper and invoke x86_init::mpparse::early_parse_smp_config() directly. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> --- arch/x86/include/asm/mpspec.h | 5 ----- arch/x86/kernel/setup.c | 2 ++ arch/x86/mm/amdtopology.c | 7 ------- 3 files changed, 2 insertions(+), 12 deletions(-) ---
--- a/arch/x86/include/asm/mpspec.h +++ b/arch/x86/include/asm/mpspec.h @@ -46,11 +46,6 @@ extern int smp_found_config; # define smp_found_config 0 #endif -static inline void early_get_smp_config(void) -{ - x86_init.mpparse.early_parse_smp_cfg(); -} - #ifdef CONFIG_X86_MPPARSE extern void e820__memblock_alloc_reserved_mpc_new(void); extern int enable_update_mptable; --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c @@ -1086,7 +1086,9 @@ void __init setup_arch(char **cmdline_p) early_platform_quirks(); + /* Some platforms need the APIC registered for NUMA configuration */ early_acpi_boot_init(); + x86_init.mpparse.early_parse_smp_cfg(); x86_flattree_get_config(); --- a/arch/x86/mm/amdtopology.c +++ b/arch/x86/mm/amdtopology.c @@ -161,13 +161,6 @@ int __init amd_numa_init(void) */ cores = topology_get_domain_size(TOPO_CORE_DOMAIN); - /* - * Scan MPTABLE to map the local APIC and ensure that the boot CPU - * APIC ID is valid. This is required because on pre ACPI/SRAT - * systems IO-APICs are mapped before the boot CPU. - */ - early_get_smp_config(); - apicid = boot_cpu_physical_apicid; if (apicid > 0) pr_info("BSP APIC ID: %02x\n", apicid);