[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1c8392b8-ea7b-48ef-8932-02f41e1233a3@csgroup.eu>
Date: Tue, 26 Aug 2025 06:54:29 +0200
From: Christophe Leroy <christophe.leroy@...roup.eu>
To: K Prateek Nayak <kprateek.nayak@....com>,
Madhavan Srinivasan <maddy@...ux.ibm.com>,
Michael Ellerman <mpe@...erman.id.au>, Nicholas Piggin <npiggin@...il.com>,
Heiko Carstens <hca@...ux.ibm.com>, Vasily Gorbik <gor@...ux.ibm.com>,
Alexander Gordeev <agordeev@...ux.ibm.com>,
Christian Borntraeger <borntraeger@...ux.ibm.com>,
Sven Schnelle <svens@...ux.ibm.com>, Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>, Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>, linuxppc-dev@...ts.ozlabs.org,
linux-kernel@...r.kernel.org, linux-s390@...r.kernel.org
Cc: Dietmar Eggemann <dietmar.eggemann@....com>,
Steven Rostedt <rostedt@...dmis.org>, Ben Segall <bsegall@...gle.com>,
Mel Gorman <mgorman@...e.de>, Valentin Schneider <vschneid@...hat.com>,
thomas.weissschuh@...utronix.de, Li Chen <chenl311@...natelecom.cn>,
Bibo Mao <maobibo@...ngson.cn>, Mete Durlu <meted@...ux.ibm.com>,
Tobias Huschle <huschle@...ux.ibm.com>,
Easwar Hariharan <easwar.hariharan@...ux.microsoft.com>,
Guo Weikang <guoweikang.kernel@...il.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
Brian Gerst <brgerst@...il.com>,
Patryk Wlazlyn <patryk.wlazlyn@...ux.intel.com>,
Swapnil Sapkal <swapnil.sapkal@....com>,
"Yury Norov [NVIDIA]" <yury.norov@...il.com>,
Sudeep Holla <sudeep.holla@....com>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
Andrea Righi <arighi@...dia.com>, Yicong Yang <yangyicong@...ilicon.com>,
Ricardo Neri <ricardo.neri-calderon@...ux.intel.com>,
Tim Chen <tim.c.chen@...ux.intel.com>,
Vinicius Costa Gomes <vinicius.gomes@...el.com>
Subject: Re: [PATCH v7 3/8] powerpc/smp: Export cpu_coregroup_mask()
Le 26/08/2025 à 06:13, K Prateek Nayak a écrit :
> Deine cpu_coregroup_mask() to export the per-cpu cpu_corgrp_map when
> coregroups are supported(). When has_coregroup_support() returns false,
> cpu_coregroup_mask() returns the mask used by the PKG domain.
>
> Since this will only be used after CONFIG_SCHED_MC is added for PowerPC,
> no functional changes are intended at this point.
>
> Signed-off-by: K Prateek Nayak <kprateek.nayak@....com>
> ---
> arch/powerpc/include/asm/smp.h | 2 ++
> arch/powerpc/kernel/smp.c | 8 ++++++++
> 2 files changed, 10 insertions(+)
>
> diff --git a/arch/powerpc/include/asm/smp.h b/arch/powerpc/include/asm/smp.h
> index b77927ccb0ab..86de4d0dd0aa 100644
> --- a/arch/powerpc/include/asm/smp.h
> +++ b/arch/powerpc/include/asm/smp.h
> @@ -148,6 +148,8 @@ static inline const struct cpumask *cpu_smt_mask(int cpu)
> }
> #endif /* CONFIG_SCHED_SMT */
>
> +extern const struct cpumask *cpu_coregroup_mask(int cpu);
'extern' keyword is pointless for function prototypes, remove it.
See report from checkpatch:
$ ./scripts/checkpatch.pl --strict -g a064a30c52a5
CHECK: extern prototypes should be avoided in .h files
#28: FILE: arch/powerpc/include/asm/smp.h:151:
+extern const struct cpumask *cpu_coregroup_mask(int cpu);
total: 0 errors, 0 warnings, 1 checks, 22 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or
--fix-inplace.
Commit a064a30c52a5 ("powerpc/smp: Export cpu_coregroup_mask()") has
style problems, please review.
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
> +
> /* Since OpenPIC has only 4 IPIs, we use slightly different message numbers.
> *
> * Make sure this matches openpic_request_IPIs in open_pic.c, or what shows up
> diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
> index 4f48262658cc..e623f2864dc4 100644
> --- a/arch/powerpc/kernel/smp.c
> +++ b/arch/powerpc/kernel/smp.c
> @@ -1059,6 +1059,14 @@ static bool has_coregroup_support(void)
> return coregroup_enabled;
> }
>
> +const struct cpumask *cpu_coregroup_mask(int cpu)
> +{
> + if (has_coregroup_support())
> + return per_cpu(cpu_corgrp_map, cpu);
> +
> + return cpu_node_mask(cpu);
> +}
> +
> static const struct cpumask *cpu_mc_mask(struct sched_domain_topology_level *tl, int cpu)
> {
> return cpu_corgrp_mask(cpu);
Powered by blists - more mailing lists