Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1172711rdb; Fri, 16 Feb 2024 07:26:09 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUMjf+UEhBmA3AnlkOdwnNz6+n4T8dybD77Hgjz2Ty2JElfxvNt/F//VOCdDTNS5qtnhWqycPU93MziMPlvoO7dyxN3l3vC/NYv9926PA== X-Google-Smtp-Source: AGHT+IFMOY240ze3PW+0rYx8oNv/FxfcedTCqkBvDZMCBM39Eqifectg3fqv0b/IQLHP0hSIDTQG X-Received: by 2002:a17:902:d582:b0:1db:8a5e:d53a with SMTP id k2-20020a170902d58200b001db8a5ed53amr6277280plh.6.1708097168725; Fri, 16 Feb 2024 07:26:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708097168; cv=pass; d=google.com; s=arc-20160816; b=MxmtIXm9rouDmijYQI3q8cQCG5IicenZe2JO6PqNdCilKP6v030xSOOOzltoBUsNzF t2qohTMZFlancPzlLZHD4186jE1vs5wkhFtNDPp89QK9TGyPX9T4o5gMuVQ2NJBYMmeh bR0Eb2sV/PMgD03kFerJqzebjnap0Yt13B7rL5J/83C6GgTChT1glcjM6j8PvF9MRoCy YTY/mR+6bOvhsrI1hoL7cm28h+31vZJ0+XFL+s26v9JVMXO/Ox5gUkzjX7iptKA12dhx /8zueqeDci5RxoADve72lJnUQq7m9TOjdEwdYRnQbUD/RAo+D2SRxQbCI11TmQoBHgwX jr7Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:in-reply-to:cc:subject:to:reply-to:sender :from:dkim-signature:dkim-signature:date; bh=LnW/7hFzJREU+amgRdoJeNGQYxeX1T9VLva7Rqt9CSk=; fh=HfXWoIhgCc+vt39DMIJv/Ec0aAKnw0eFA8QxuIQTUoQ=; b=H0XbhA/mXExob/8u0Sg31wN0DtAbpPFjN4htrproKH+KNq2j0iLEzuHlcaLnylvZpS XC4P6JBgmdh3uDX92zAJcfZmLO6HfbRmMGoThXxj5Qs0P22qGzJHHsPtC2U1J+pRcai3 jxDjllYb4HOTufqygSdNRpn/d479OIobSt54+OOEaCGjcwGkica9zRRI/XNvyGvJuD3i I/PVRdYnggHx7tHiNKFvrSgax+eOOmgxyUTId6RXgyGAPKeZajoauxVmUvULlzbekPJo ZmK4JCqpFe+a8zKIh69/UvZ3b9LXEcZI524UA7MNVyDBK6NRMgX1jLqiTVloIqVf8jbs dcOg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=pNvhz1xT; 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-68832-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68832-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id k14-20020a170902d58e00b001db7eb50ff1si23400plh.104.2024.02.16.07.26.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 07:26:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-68832-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=pNvhz1xT; 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-68832-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68832-linux.lists.archive=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 14DE72868A7 for ; Fri, 16 Feb 2024 15:25:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CBF1214A0BD; Fri, 16 Feb 2024 15:17:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="pNvhz1xT"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="NQavSsHk" 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 9DA4912F58D; Fri, 16 Feb 2024 15:17:20 +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=1708096642; cv=none; b=VdcT6PjzeFT/n+anxgkcEbJxwiQgCv2/60KtDp/4AfPCCBRXmAARsG5rbvpdE/wye9CPkJMAgRau8ojsoCyy2qmgdC90TzKpfTJuHEgDA4TwUSdNnq3x7Wna93Hrp8K1+BPhrHQ0/x5+dRD+l35ISJ2XJILPweFOSbDIowIIRNA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708096642; c=relaxed/simple; bh=Dm2iZ9HLlGYd37OtAQ8x9GyVGjKS2r9PKcMY9oxKvXU=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=oycAM9oQmqTneUaWvnZSAcram6p0f4EUszPuKHOqNFnksppBHQKTKof1FDo6iaz41ST0yLR+Grm84YUFO1Zs8dv3dsvyEGBBgCsxbtT6qrqRKYKervLHk/WjpT9scuWQjRxN+4rjLqF2WBoLPhsuuBsUVQqdKkPHBEvGhr+DC14= 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=pNvhz1xT; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=NQavSsHk; 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 Date: Fri, 16 Feb 2024 15:17:18 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708096639; 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=LnW/7hFzJREU+amgRdoJeNGQYxeX1T9VLva7Rqt9CSk=; b=pNvhz1xTL41UOW++DAAcb62bl18Se5GQQmSTAdQrkRzfVt7JR3BBunR/g9bEc78VdxpNeE ovLXpzjipkYqd7peJT20bEnlBMJcj2lEbCYgasG4H4yZJCP7H7wVFCjq2IoYF8LKP/Pj8Z 8buA1twE9wZl8Qf0C60BJAaVDquO+uqZEMyTPGemCfEZMcZmu77JhOZjMWWry6TTStP+u2 zT7LNAbHnsoW+5UyyBzVUS9Dg+i+Lw9lUVSI73trWfmF7+XhMRbFRvKUDVPN6rygO3C+sp CLUhY8D5GpHiqBh6PS4T/bAc+aI6B/qKFg8c30af+QV6YgGY4mGw2DvSk/Cqsw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708096639; 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=LnW/7hFzJREU+amgRdoJeNGQYxeX1T9VLva7Rqt9CSk=; b=NQavSsHkPzRq8fd9cg73GWFIjO13gZS19j23L7FjsECWpPdoZAQpkT3HVI2yErbNkahfvD B/7yWGEWQro/4PBQ== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/apic] x86/mpparse: Prepare for callback separation Cc: Thomas Gleixner , Michael Kelley , Sohil Mehta , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240212154639.433811243@linutronix.de> References: <20240212154639.433811243@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <170809663835.398.15945356152743640847.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit The following commit has been merged into the x86/apic branch of tip: Commit-ID: d0a85126b137598eab969e5ba283e5e70ca9c686 Gitweb: https://git.kernel.org/tip/d0a85126b137598eab969e5ba283e5e70ca9c686 Author: Thomas Gleixner AuthorDate: Tue, 13 Feb 2024 22:05:04 +01:00 Committer: Thomas Gleixner CommitterDate: Thu, 15 Feb 2024 22:07:40 +01:00 x86/mpparse: Prepare for callback separation In preparation of splitting the get_smp_config() callback, rename default_get_smp_config() to mpparse_get_smp_config() and provide an early and late wrapper. Signed-off-by: Thomas Gleixner Tested-by: Michael Kelley Tested-by: Sohil Mehta Link: https://lore.kernel.org/r/20240212154639.433811243@linutronix.de --- arch/x86/include/asm/mpspec.h | 12 ++++++++---- arch/x86/kernel/mpparse.c | 12 +++++++++++- arch/x86/kernel/x86_init.c | 2 +- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/arch/x86/include/asm/mpspec.h b/arch/x86/include/asm/mpspec.h index c154dd7..72700ae 100644 --- a/arch/x86/include/asm/mpspec.h +++ b/arch/x86/include/asm/mpspec.h @@ -60,12 +60,16 @@ static inline void early_get_smp_config(void) extern void e820__memblock_alloc_reserved_mpc_new(void); extern int enable_update_mptable; extern void mpparse_find_mptable(void); -extern void default_get_smp_config(unsigned int early); +extern void mpparse_parse_early_smp_config(void); +extern void mpparse_parse_smp_config(void); +extern void mpparse_get_smp_config(unsigned int early); #else static inline void e820__memblock_alloc_reserved_mpc_new(void) { } -#define enable_update_mptable 0 -#define mpparse_find_mptable 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 mpparse_parse_early_smp_config x86_init_noop +#define mpparse_parse_smp_config x86_init_noop +#define mpparse_get_smp_config x86_init_uint_noop #endif int generic_processor_info(int apicid); diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c index 86acccd..b22093d 100644 --- a/arch/x86/kernel/mpparse.c +++ b/arch/x86/kernel/mpparse.c @@ -473,7 +473,7 @@ static int __init check_physptr(struct mpf_intel *mpf, unsigned int early) /* * Scan the memory blocks for an SMP configuration block. */ -void __init default_get_smp_config(unsigned int early) +void __init mpparse_get_smp_config(unsigned int early) { struct mpf_intel *mpf; @@ -538,6 +538,16 @@ out: early_memunmap(mpf, sizeof(*mpf)); } +void __init mpparse_parse_early_smp_config(void) +{ + mpparse_get_smp_config(true); +} + +void __init mpparse_parse_smp_config(void) +{ + mpparse_get_smp_config(false); +} + static void __init smp_reserve_memory(struct mpf_intel *mpf) { memblock_reserve(mpf->physptr, get_mpc_size(mpf->physptr)); diff --git a/arch/x86/kernel/x86_init.c b/arch/x86/kernel/x86_init.c index 0bbef49..5d86d57 100644 --- a/arch/x86/kernel/x86_init.c +++ b/arch/x86/kernel/x86_init.c @@ -71,7 +71,7 @@ struct x86_init_ops x86_init __initdata = { .mpparse = { .setup_ioapic_ids = x86_init_noop, .find_mptable = mpparse_find_mptable, - .get_smp_config = default_get_smp_config, + .get_smp_config = mpparse_get_smp_config, }, .irqs = {