From patchwork Tue Feb 27 09:17:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 207103 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2581618dyb; Tue, 27 Feb 2024 01:20:57 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX9lYz+hIhQ9fNULbavaHS3YJliOZ6H/yGEsvLZTPm++jr52ky9ufDfMhH8XcARALHLmh/6D/gFCzyX3AxAfL2e5BzJYw== X-Google-Smtp-Source: AGHT+IFCxc4vrVKs4J3zMghw/wfqdQXr/jVuOdJZtZUXhKQsQO3hzkwy9CC8nsx8jZ7u5vxL0kTo X-Received: by 2002:aca:2318:0:b0:3c1:ab8f:1745 with SMTP id e24-20020aca2318000000b003c1ab8f1745mr1595927oie.23.1709025657199; Tue, 27 Feb 2024 01:20:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709025657; cv=pass; d=google.com; s=arc-20160816; b=JsIBGGMZKqYRDwLe92s6GEh3dx92FZ0zOjhDLdgYnpvbiUz/uMDXJ99YLbi7NXRuxV HDkjjDbebv+heF4w9Ju/TZsYPf1eaibM+C3+YFdIGrdgeD14sUFKRQWWcElMLzk/hx6k iQl8lr38KNP3yWCbG1uz9ncic9nm9FRLqEB8DbywOOpQNfJEp/VipCdk9asNVPke5yR6 mF022v92JuE/+DveHOnoUkLtir+gmHZ/QoHlAsRxKfPLI/6NxzlkLCLjoSl8imJEdenW 3AU/EqSbO+MEG/69VzCdmGSlSvzH6nCAdzJtHqdHio5lzTemi81JvcPHl4dop33O0JHg jPWA== 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=82bOYWrJvFEunRWgySC5j6mQRmSHiA00j9Nwmc91GQ8=; fh=7tQvVcl1ERfC8pX1g2S/NotSGAvWedPvfAHQFmeJt5w=; b=qDHGPYmvRozjwBeAY+QabXvExJ4fLPaV7TR3HFbWhCYDanPnP8FPyQvfjbFU1lRhSB PnqeZaXLp7PB4w9WKGPZlXUmvuirpal192bA7yzR33V0AiBlMlc7b0AaKP0DplFw9hRh 009R8703qPNk+9Q+/D/+06elaDDzTrzBm1n+OAhrVUptzVrrpaH+6hbwG1M912CeDI5W tnIlFtbtiV9dbeoW5ms1w2es9WmrbdFSmr5odfjGQGm/6Y8dEZAmtRiH2BuSP10ZUqxK UtNUOvtUlNz4BYBC4eV9B3XXXNBzUE6VfQAod3v+w0miCimr5l5CBOIbv+pgpgZDiXt5 +Xpw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=pW786ZNr; 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-82939-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82939-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id n66-20020a632745000000b005dbde399b23si5145632pgn.901.2024.02.27.01.20.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 01:20:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82939-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=@linutronix.de header.s=2020 header.b=pW786ZNr; 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-82939-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82939-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id C89DF2881D1 for ; Tue, 27 Feb 2024 09:18:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 53393136996; Tue, 27 Feb 2024 09:17:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="pW786ZNr"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="zK/w95Ri" 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 254A354F95; Tue, 27 Feb 2024 09:17:33 +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=1709025456; cv=none; b=KpWeeHXLDqocc3avMuw7qota1jzsOSWqUFq4TTgulQaVhqmC/nyxnOQFezQ5x9C1TGetL6eRyqhUr4oAfiKPW9xOEDSFQ5EkR7Zga5rZn4k9jdr7MbXM6e0caFapugm8cUVRZe1qlSUImqevw15Lqq7YpiS0mXp+DIDS8crRBRk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709025456; c=relaxed/simple; bh=UfrPwCoCCnUVvRRlmmQoCX61QovK/icqyXUtDqAYUmY=; h=Date:From:To:Subject:Cc:MIME-Version:Message-ID:Content-Type; b=sR5iC9pGFp3lxMEaDFa/tDQvNHRgAU98cJw25r03S8A4dzvNMZlbaLMx+7CIImVkB5UjPgOlUwBf5Y4ZKhQQVr1+an2sZAbO46VlwFMgCT1gaoi99jUrzH7Q+LR5gDdJ/w2X1E71T4ytYzpQyKSQNrNe5W2y5pLoakzS6e2TQ3U= 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=pW786ZNr; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=zK/w95Ri; 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: Tue, 27 Feb 2024 09:17:31 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1709025452; 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=82bOYWrJvFEunRWgySC5j6mQRmSHiA00j9Nwmc91GQ8=; b=pW786ZNroA+agB03FWQgHjxZ7vt3BtAGAeqk3Gd74VU2JAgp4xvdGH0pEJ+m7nb8ztMn3V n/X1/VgpsgrD3tcaemvZXR0yogYR3EtftEoNXOcc+1A2E2Gt5iibH4FiMWEoeZOYesklRf hoa+Xbc7Td4rKk4czhWiUWmp0AeoGRYOjtibLrrHfo9/AHNA4QIVPyz2Bb6L+HqaL1WJxy pmts/l990QlRWGil5M73e9PEPTurI5zErHXYFSJnwVZSHnm5YgfvbxDSGXlmQZoITRYT78 2l0F4oxA2jOfCv4Tevy2jIhld8+wh1xtvNV7u9uVvT2heR8F90pF6TUlir3qDA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1709025452; 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=82bOYWrJvFEunRWgySC5j6mQRmSHiA00j9Nwmc91GQ8=; b=zK/w95RiK6F+Y6C8/RmncCmQWfXwR3+o2VuXcG3f0pLVgY1XfQ2LaON7Pkwr75jTkbT+4n tJACPN2CB2sFvvDA== 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: Avoid 'setup_max_cpus' namespace collision/shadowing Cc: Ingo Molnar , Thomas Gleixner , linux-kernel@vger.kernel.org, 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: <170902545127.398.16793174204330570275.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792043287419451143 X-GMAIL-MSGID: 1792043287419451143 The following commit has been merged into the x86/apic branch of tip: Commit-ID: 4c8a49854130da0117a0fdb858551824919a2389 Gitweb: https://git.kernel.org/tip/4c8a49854130da0117a0fdb858551824919a2389 Author: Ingo Molnar AuthorDate: Tue, 27 Feb 2024 09:58:15 +01:00 Committer: Ingo Molnar CommitterDate: Tue, 27 Feb 2024 10:05:32 +01:00 smp: Avoid 'setup_max_cpus' namespace collision/shadowing bringup_nonboot_cpus() gets passed the 'setup_max_cpus' variable in init/main.c - which is also the name of the parameter, shadowing the name. To reduce confusion and to allow the 'setup_max_cpus' value to be #defined in the header, use the 'max_cpus' name for the function parameter name. Signed-off-by: Ingo Molnar Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org --- include/linux/cpu.h | 2 +- kernel/cpu.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/linux/cpu.h b/include/linux/cpu.h index dcb89c9..61a0ddf 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h @@ -112,7 +112,7 @@ void notify_cpu_starting(unsigned int cpu); extern void cpu_maps_update_begin(void); extern void cpu_maps_update_done(void); int bringup_hibernate_cpu(unsigned int sleep_cpu); -void bringup_nonboot_cpus(unsigned int setup_max_cpus); +void bringup_nonboot_cpus(unsigned int max_cpus); #else /* CONFIG_SMP */ #define cpuhp_tasks_frozen 0 diff --git a/kernel/cpu.c b/kernel/cpu.c index e6ec3ba..023ddf8 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -1909,14 +1909,14 @@ static bool __init cpuhp_bringup_cpus_parallel(unsigned int ncpus) static inline bool cpuhp_bringup_cpus_parallel(unsigned int ncpus) { return false; } #endif /* CONFIG_HOTPLUG_PARALLEL */ -void __init bringup_nonboot_cpus(unsigned int setup_max_cpus) +void __init bringup_nonboot_cpus(unsigned int max_cpus) { /* Try parallel bringup optimization if enabled */ - if (cpuhp_bringup_cpus_parallel(setup_max_cpus)) + if (cpuhp_bringup_cpus_parallel(max_cpus)) return; /* Full per CPU serialized bringup */ - cpuhp_bringup_mask(cpu_present_mask, setup_max_cpus, CPUHP_ONLINE); + cpuhp_bringup_mask(cpu_present_mask, max_cpus, CPUHP_ONLINE); } #ifdef CONFIG_PM_SLEEP_SMP