From patchwork Tue Feb 13 21:05:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 200616 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp810699dyb; Tue, 13 Feb 2024 13:11:30 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXZ7ZrDhQKf7ibOb+OaZ3D1RHE3FxOoAuDrMcZY5+C2Y+7Dku6W204w1OM8H0j5028EDUfTuugIDgcu8eBryrYDnef9Kw== X-Google-Smtp-Source: AGHT+IFdO06jDy8SdGAOzQOyKZeK7/htesbfp1FrW8E2g8ZAQ8pepQfobqgWKQjGs6M70s2LA+cD X-Received: by 2002:a17:906:e218:b0:a38:a2f:c12a with SMTP id gf24-20020a170906e21800b00a380a2fc12amr320361ejb.64.1707858690094; Tue, 13 Feb 2024 13:11:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707858690; cv=pass; d=google.com; s=arc-20160816; b=N0uTZ/o6LWdveFJDekHxKNXwjed1skvDFxdlhck/iXDcvpw62zS6tJrFCWN5k4AI7I 6X2gofVl2+C7bvlQqAnr11dSl5Dw88QhXkSVCp95bbodl2/Tq2kp7+dHZ+BMGoW0yLef uIQ8rpX/MYes+6g9GbonRDdDb0NE6SKyw3rJEV74Vk9woPsB2rFze3pOUE5tDu7mvD6P dkx4lBTWZrp4h7a0xVyJNZdOpmAULnr/CmFXfXmebPUENX5yScQsSkImYaIy7urCL95H ycf0SMONLlgr5f7OscI538MDuGEIq84ixsJ/VAHFYdC3qupdw9TY/hQDZyF1hEhT5nro 7RSg== 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=NtG+NkhBlWKdTVS2uSrZkf1qicXfNPh//z9VJFkyc+s=; fh=un4W4RzpphFEu2rjIEZTber8I6541md9Rf09rYHiuoU=; b=IQ0lx6yMfAcc5GSVMoLb5PTwkeYYPIQtdrGdAYDooqCdrwOemD9smLfjE4KgzOohOY 6FfaZKgSf7cS01uJzQ2KU2ih/G4WRPeZ4bu0YNapG6JJ1aYFZ6zXj6RybiX676xhLeMS /mSNrK4+OwEO6rqbwrHxw8++9c+jwTYoqO2ElhMtQYgDfber5oDY60nameTczNog4UzX nzpwIXt/y47AcPDUW2BqKRqTvGD5GqoCPXtXFBhPqFvp0CuZj0MlxuvIGLbBF+LKlymG Bo12ZMDp/ntS0tGalIHb8nNspSgeuW/XyxIs8L2Vm3i8UK8hgCbJMDjdBoAgfiP7V9Qf lWSg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=JsoGh9jX; 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-64269-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64269-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de X-Forwarded-Encrypted: i=2; AJvYcCWR/QHNJMEJ3axDWWlaalfEXFpFzhaPNScY+bRg8eiIJrSDgGtL75u5l3BkJqjpgnAu0EdgBtzQPRgsPUzf9bQRRdJUGw== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id oq9-20020a170906cc8900b00a3d2e89d236si239406ejb.1029.2024.02.13.13.11.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 13:11:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64269-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=JsoGh9jX; 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-64269-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64269-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 A31F41F23E0C for ; Tue, 13 Feb 2024 21:11:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B3DC56A34B; Tue, 13 Feb 2024 21:05:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="JsoGh9jX"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="JvneRClu" 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 F05E369DF2 for ; Tue, 13 Feb 2024 21:05:03 +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=1707858305; cv=none; b=iXgeFj9wBIxOZ5GJqh05yCY/j2xaUWRS+TuSKtbCY9ryZXR/6CTCQd7zWOM+qBWUX8RW0UJRo0fYNNs9O0Rk5xdxFexh24KOSM3zasEyBxunedQZxFJKMkJfiPVIdGHuJeEYD2mhAbeGr2G6Ib5Hmbk1X9/0YcF5/IJx9K8InfQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707858305; c=relaxed/simple; bh=2K7hvxJC4a54AdrlFX3PG7FtV2n6DGusrXxBwQBqezA=; h=Message-ID:From:To:Cc:Subject:References:MIME-Version: Content-Type:Date; b=Kj2I0XxLyVQsYZXCNLSu8UTUWGbQpcGSJdF8LNsZylL43I14iXZr9IvuCjVC9exWVUPCIDzM3FZ7NXD09BQRX6i9eeyD5dzqzMIG4nO+VK5FTrF++1X09EBGP7IJhlSfkTXQrXDCUR7cjvon6uqezHGVWFpR12bOsnTcFI10WIk= 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=JsoGh9jX; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=JvneRClu; 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.306287711@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1707858302; 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=NtG+NkhBlWKdTVS2uSrZkf1qicXfNPh//z9VJFkyc+s=; b=JsoGh9jXe2NrdBzw7wzi3gqBs30YWkDTGJysoKpeqjf3OwThLB5p7ES4uDVdstLVyqdUTg YcBrbTihpan5l+kR9deB7ILW6WKL42rc/ts0bgfNfHz7TvB7Lu98Qju8GHqbSUrN23JpY/ aM4F3lLvCR/pLdK0o77P4TTc9YToyyj85jmsM6cJHw5jX/SFkgLbRGs43ri1cpJhQeUOek sIc/rsi1y0yofOHUg5DwElzZq+BUT/z0ulSZbJtkVprAc6sHO7NRo32SbMacPQVJmQHeKm h92zwZ9XmmyyC1fUH06HCiGIhFNwh0+qqb7sU/lXMT1xqQVnEFHM+4kPVFvdSg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1707858302; 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=NtG+NkhBlWKdTVS2uSrZkf1qicXfNPh//z9VJFkyc+s=; b=JvneRCluZZfQuebkBf1F6dp+6FWwm4jYX/o+CUG6YiRXIoNVs1tKoLuYRuV6EL0DELL2mG j/3AIKy+560GxHDg== From: Thomas Gleixner To: LKML Cc: x86@kernel.org, Tom Lendacky , Andrew Cooper , Arjan van de Ven , Huang Rui , Juergen Gross , Dimitri Sivanich , Sohil Mehta , K Prateek Nayak , Kan Liang , Zhang Rui , "Paul E. McKenney" , Feng Tang , Andy Shevchenko , Michael Kelley , "Peter Zijlstra (Intel)" , Andy Shevchenko , Wei Liu Subject: [patch V3 08/22] x86/mpparse: Rename default_find_smp_config() References: <20240212154529.402604963@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Date: Tue, 13 Feb 2024 22:05:02 +0100 (CET) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790819634307571541 X-GMAIL-MSGID: 1790819634307571541 From: Thomas Gleixner MPTABLE is no longer the default SMP configuration mechanism. Rename it to mpparse_find_mptable() because that's what it does. Signed-off-by: Thomas Gleixner --- arch/x86/include/asm/mpspec.h | 13 ++++--------- arch/x86/include/asm/x86_init.h | 4 ++-- arch/x86/kernel/mpparse.c | 2 +- arch/x86/kernel/setup.c | 6 ++---- arch/x86/kernel/x86_init.c | 2 +- arch/x86/platform/ce4100/ce4100.c | 2 +- arch/x86/platform/intel-mid/intel-mid.c | 2 +- arch/x86/xen/smp_pv.c | 2 +- 8 files changed, 13 insertions(+), 20 deletions(-) --- --- a/arch/x86/include/asm/mpspec.h +++ b/arch/x86/include/asm/mpspec.h @@ -56,21 +56,16 @@ static inline void early_get_smp_config( x86_init.mpparse.get_smp_config(1); } -static inline void find_smp_config(void) -{ - x86_init.mpparse.find_smp_config(); -} - #ifdef CONFIG_X86_MPPARSE extern void e820__memblock_alloc_reserved_mpc_new(void); extern int enable_update_mptable; -extern void default_find_smp_config(void); +extern void mpparse_find_mptable(void); extern void default_get_smp_config(unsigned int early); #else static inline void e820__memblock_alloc_reserved_mpc_new(void) { } -#define enable_update_mptable 0 -#define default_find_smp_config x86_init_noop -#define default_get_smp_config x86_init_uint_noop +#define enable_update_mptable 0 +#define mpparse_find_mptable x86_init_noop +#define default_get_smp_config x86_init_uint_noop #endif int generic_processor_info(int apicid); --- a/arch/x86/include/asm/x86_init.h +++ b/arch/x86/include/asm/x86_init.h @@ -15,12 +15,12 @@ struct irq_domain; /** * struct x86_init_mpparse - platform specific mpparse ops * @setup_ioapic_ids: platform specific ioapic id override - * @find_smp_config: find the smp configuration + * @find_mptable: Find MPTABLE early to reserve the memory region * @get_smp_config: get the smp configuration */ struct x86_init_mpparse { void (*setup_ioapic_ids)(void); - void (*find_smp_config)(void); + void (*find_mptable)(void); void (*get_smp_config)(unsigned int early); }; --- a/arch/x86/kernel/mpparse.c +++ b/arch/x86/kernel/mpparse.c @@ -587,7 +587,7 @@ static int __init smp_scan_config(unsign return ret; } -void __init default_find_smp_config(void) +void __init mpparse_find_mptable(void) { unsigned int address; --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c @@ -970,10 +970,8 @@ void __init setup_arch(char **cmdline_p) high_memory = (void *)__va(max_pfn * PAGE_SIZE - 1) + 1; #endif - /* - * Find and reserve possible boot-time SMP configuration: - */ - find_smp_config(); + /* Find and reserve MPTABLE area */ + x86_init.mpparse.find_mptable(); early_alloc_pgt_buf(); --- a/arch/x86/kernel/x86_init.c +++ b/arch/x86/kernel/x86_init.c @@ -70,7 +70,7 @@ struct x86_init_ops x86_init __initdata .mpparse = { .setup_ioapic_ids = x86_init_noop, - .find_smp_config = default_find_smp_config, + .find_mptable = mpparse_find_mptable, .get_smp_config = default_get_smp_config, }, --- a/arch/x86/platform/ce4100/ce4100.c +++ b/arch/x86/platform/ce4100/ce4100.c @@ -138,7 +138,7 @@ void __init x86_ce4100_early_setup(void) x86_init.oem.arch_setup = sdv_arch_setup; x86_init.resources.probe_roms = x86_init_noop; x86_init.mpparse.get_smp_config = x86_init_uint_noop; - x86_init.mpparse.find_smp_config = x86_init_noop; + x86_init.mpparse.find_mptable = x86_init_noop; x86_init.pci.init = ce4100_pci_init; x86_init.pci.init_irq = sdv_pci_init; --- a/arch/x86/platform/intel-mid/intel-mid.c +++ b/arch/x86/platform/intel-mid/intel-mid.c @@ -118,7 +118,7 @@ void __init x86_intel_mid_early_setup(vo machine_ops.emergency_restart = intel_mid_reboot; /* Avoid searching for BIOS MP tables */ - x86_init.mpparse.find_smp_config = x86_init_noop; + x86_init.mpparse.find_mptable = x86_init_noop; x86_init.mpparse.get_smp_config = x86_init_uint_noop; set_bit(MP_BUS_ISA, mp_bus_not_pci); } --- a/arch/x86/xen/smp_pv.c +++ b/arch/x86/xen/smp_pv.c @@ -455,6 +455,6 @@ void __init xen_smp_init(void) smp_ops = xen_smp_ops; /* Avoid searching for BIOS MP tables */ - x86_init.mpparse.find_smp_config = x86_init_noop; + x86_init.mpparse.find_mptable = x86_init_noop; x86_init.mpparse.get_smp_config = _get_smp_config; }