Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1262718rbb; Mon, 26 Feb 2024 04:14:18 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXwEifOp1jJ2TgVqhDmURYhGDewO203MeK1l2M55+Av9hwzdiSPwdew7QgAioUIGYPytL8Bs4/8x6jNuXaCPvCjR79M3GRQI/IQZ3TH9g== X-Google-Smtp-Source: AGHT+IEXzThBHWaR6pbeygoNrmYh0groLhSJhOODncDIQkKNCWHXI+1ty8FZB5YgjucYyMdsY62H X-Received: by 2002:a05:6871:707:b0:21f:a0f8:824d with SMTP id f7-20020a056871070700b0021fa0f8824dmr7752653oap.44.1708949657870; Mon, 26 Feb 2024 04:14:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708949657; cv=pass; d=google.com; s=arc-20160816; b=uKkzI/krtwOEo999xMHht1l2CvvPZT39bnoQOolyPqGZkoaOwdyBcTUdFw7CtZ2rWk agMyZIaq43mZwrlLvvoKIJHowK6wmm3aRrIYO46PpkXgUaqkqEy9hpb64uHbzlsnPB5m Z2rEjGOGfolSrUyLT3O+hp7vF/FQTJUsw6wlgcr88Ace3kQOyvwb9/09SvTiS/557dfS GKnMewxg+i/c/ZgkA+/MXb/qUWoSeA2ExKbUCksCJCpMF43083nAMFGe7L6K/mQt46wi AWViCLsUfyzTXzaQ0wQWh2TKH+huBr0ladu8rc0FOUWAhH2FRkInVUtIEkDWixn+wQzH 68pQ== 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:cc:subject:to:reply-to:sender:from:dkim-signature :dkim-signature:date; bh=lQ4oXmAnkhL90TwdJmrliUNDTZIrHrUfs5PxAHjRVBg=; fh=UwftEdEwtg14ADOO3ZWAylrUQ27A8X0kqeA8E50kBPU=; b=H5tnmVxGLxQWhcS7Mn8YZ7cCNMPV4/aoLhOGx0vwHiKRK0NiHzBifNvJ82VygODJhv 84+4ZifFMXHqHl8FrBQIz9ahtdIzyBsQqvVSCUqrpQcCINuXLHA6XaNyZvd8JVoBMZSz 5SyMzcH+RprokKXgfVeanQ67wkKXqQuuYn8nSBBHJzmnp2+vwQIZU9E31ktnRjBJNSgi KMeriRoasDQPtucFZpm8cIOOMevkYhYrVPjhFzIOIjCrJPU33xk3QYi8liwFygUc13UQ /fyATmDSA+UAWhx2JG0L3CHj2ym9VHcIFgN9yLz50/CppDe0MiXYDlMKrN+5CVt7zCuC +P7A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=bWBMhZVj; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=PR7L31lf; 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-81304-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81304-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id g25-20020a635659000000b005dbf4efa1f8si3516608pgm.852.2024.02.26.04.14.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 04:14:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-81304-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=bWBMhZVj; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=PR7L31lf; 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-81304-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81304-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 5A152B26790 for ; Mon, 26 Feb 2024 11:48:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 837B6200DB; Mon, 26 Feb 2024 11:48:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="bWBMhZVj"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="PR7L31lf" 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 3FD851DA37; Mon, 26 Feb 2024 11:48:08 +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=1708948090; cv=none; b=NoP/pUYcrP5HHxvbPkdwlCu9W+jETK9iso93VXGxi2DZBSS/sMko/q4hFF+iI8QhRRJrAiYJua5CYYPIi4j8g6ca5UWxFehjT5pzid/FiOikESTSnVYauImL64jGcPsuTju+frs2HTlKJTq0BKeYw7w9kr5tiLpXr+gE8btcm7w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708948090; c=relaxed/simple; bh=1AR5G2Y3CctUfpvnf3R9d3cYiYxgyB1npVkEX+6XiY4=; h=Date:From:To:Subject:Cc:MIME-Version:Message-ID:Content-Type; b=WPZ1fo0q+WnAsjvr/RJxQzvSMSTx8bKXeUcT5bPrAaAMNOEtaPuDLcIVmpjCm8LJof2PZFX8ZmcnP756LxE/9MSq6q7lYlfG0HnfK8B10EyAzjerUhgMe7bdxXMmCsbqx4YXUEXwt4uDHUUb+vquhm8P9nVcD7CziV57fpf6kFM= 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=bWBMhZVj; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=PR7L31lf; 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: Mon, 26 Feb 2024 11:48:06 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708948087; 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; bh=lQ4oXmAnkhL90TwdJmrliUNDTZIrHrUfs5PxAHjRVBg=; b=bWBMhZVjC4y5RZGao6THZTfm3TGDXuYKEfjz2dQWWJecFYmT039ItX4KCr6IEn8NXny/3d si3Pd7sGvSjpTESdnMXm8CqQmlCz1XG4JY3LShKgAPLOYHOgro2vssJEyLB8n0DSSubCYn P3KPqUA8vu/JOT+DG0/biIU9bs2880T28Jfb3J42Mbu0i4d6jrGNzrvLjNBMzUHHbNyHhC mBEhIaCti+LMJlmTETOHeeVaYxq8lD2aP93lVIiH6xSokC8JKn4mBsUF0cDNLNiW1YmXHO qS6siQK809CxJFOhAM3ibMWjKBZKnHZa9WfefJeI2k+ClhwaYRSZ4UhDjdHw9A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708948087; 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; bh=lQ4oXmAnkhL90TwdJmrliUNDTZIrHrUfs5PxAHjRVBg=; b=PR7L31lftixobQoItDL8d/jXi0nYvd60SisZGg9EvckRKAy8hHAlxEUv2XSM+EAm8OESfc QaIvDIXCrkyUWFDw== From: "tip-bot2 for Ingo Molnar" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/apic] smp: Provide 'setup_max_cpus' definition on UP too Cc: Thomas Gleixner , linux-kernel@vger.kernel.org, Ingo Molnar , x86@kernel.org Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <170894808668.398.2149303099223176501.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: 429bb0269058e2e1f4ab69a0d33d374933aa15b9 Gitweb: https://git.kernel.org/tip/429bb0269058e2e1f4ab69a0d33d374933aa15b9 Author: Ingo Molnar AuthorDate: Mon, 26 Feb 2024 12:07:31 +01:00 Committer: Ingo Molnar CommitterDate: Mon, 26 Feb 2024 12:13:40 +01:00 smp: Provide 'setup_max_cpus' definition on UP too This was already defined locally by init/main.c, but let's make it generic, as arch/x86/kernel/cpu/topology.c is going to make use of it to have more uniform code. [ Keep it a C variable, not a define, because there's some namespace overlap for the 'setup_max_cpus' token in existing function argument names. ] Reviewed-by: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar -- --- include/linux/smp.h | 2 ++ init/main.c | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/smp.h b/include/linux/smp.h index e87520d..5a5985f 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h @@ -218,6 +218,8 @@ smp_call_function_any(const struct cpumask *mask, smp_call_func_t func, static inline void kick_all_cpus_sync(void) { } static inline void wake_up_all_idle_cpus(void) { } +static const unsigned int setup_max_cpus = 0; + #ifdef CONFIG_UP_LATE_INIT extern void __init up_late_init(void); static inline void smp_init(void) { up_late_init(); } diff --git a/init/main.c b/init/main.c index e24b078..5644bb1 100644 --- a/init/main.c +++ b/init/main.c @@ -603,7 +603,6 @@ static int __init rdinit_setup(char *str) __setup("rdinit=", rdinit_setup); #ifndef CONFIG_SMP -static const unsigned int setup_max_cpus = NR_CPUS; static inline void setup_nr_cpu_ids(void) { } static inline void smp_prepare_cpus(unsigned int maxcpus) { } #endif