[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200409103121.GD25948@bogus>
Date: Thu, 9 Apr 2020 11:31:21 +0100
From: Sudeep Holla <sudeep.holla@....com>
To: Jiaxun Yang <jiaxun.yang@...goat.com>
Cc: linux-mips@...r.kernel.org,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Huacai Chen <chenhc@...ote.com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...hat.com>,
Namhyung Kim <namhyung@...nel.org>,
Florian Fainelli <f.fainelli@...il.com>,
Robert Richter <rric@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Jason Cooper <jason@...edaemon.net>,
Marc Zyngier <maz@...nel.org>,
Paul Burton <paulburton@...nel.org>,
Allison Randal <allison@...utok.net>,
Enrico Weigelt <info@...ux.net>,
Kate Stewart <kstewart@...uxfoundation.org>,
Vladimir Kondratiev <vladimir.kondratiev@...el.com>,
Richard Fontana <rfontana@...hat.com>,
Paul Cercueil <paul@...pouillou.net>,
Zhou Yanjie <zhouyanjie@...o.com>,
周琰杰 (Zhou Yanjie)
<zhouyanjie@...yeetech.com>, YunQiang Su <syq@...ian.org>,
Arnd Bergmann <arnd@...db.de>,
Serge Semin <fancer.lancer@...il.com>,
Matt Redfearn <matt.redfearn@...s.com>,
Steve Winslow <swinslow@...il.com>,
Alexios Zavras <alexios.zavras@...el.com>,
Peter Xu <peterx@...hat.com>,
afzal mohammed <afzal.mohd.ma@...il.com>,
Kamal Dasu <kdasu.kdev@...il.com>,
Mike Rapoport <rppt@...ux.ibm.com>,
Oleksij Rempel <linux@...pel-privat.de>,
Sudeep Holla <sudeep.holla@....com>,
linux-kernel@...r.kernel.org,
bcm-kernel-feedback-list@...adcom.com, oprofile-list@...ts.sf.net
Subject: Re: [PATCH 05/12] MIPS: Switch to arch_topology
On Wed, Apr 08, 2020 at 07:34:15PM +0800, Jiaxun Yang wrote:
> Previously, MIPS is using self-defined "globalnumber" in struct
> mips_cpuinfo to store topology information. However, it's not friendly
> to DeviceTree based systems and lack of cpu_capacity related feature
> which can take advantage of multi-cluster system.
>
> Here, we enabled arch_topology for MIPS and adapted some functions
> to fit arch_topology structure.
> Also, we implmented smp_store_cpu_info to probe CPU's topology information
> by "globalnumber" registers in VP ASE or Ebase.CPUNum for legacy systems.
>
> Signed-off-by: Jiaxun Yang <jiaxun.yang@...goat.com>
> ---
> arch/mips/Kconfig | 1 +
> arch/mips/include/asm/cpu-info.h | 49 ----------------------------
> arch/mips/include/asm/smp.h | 2 --
> arch/mips/include/asm/topology.h | 48 +++++++++++++++++++++++++---
> arch/mips/kernel/cpu-probe.c | 43 -------------------------
> arch/mips/kernel/setup.c | 1 +
> arch/mips/kernel/smp.c | 55 ++++----------------------------
> arch/mips/kernel/topology.c | 42 ++++++++++++++++++++++++
> 8 files changed, 93 insertions(+), 148 deletions(-)
>
[...]
> diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
> index 8a418783a6bb..b9fefc5dc702 100644
> --- a/arch/mips/kernel/setup.c
> +++ b/arch/mips/kernel/setup.c
> @@ -784,6 +784,7 @@ void __init setup_arch(char **cmdline_p)
> dmi_setup();
>
> resource_init();
> + init_cpu_topology();
> plat_smp_setup();
>
Continuing my reply on previous patch, I see possible_cpu_mask being
set up in plat_smp_setup. Why not reverse the order above. Further I see
that the logical->physical CPU mapping is done in plat_smp_setup which
is required to store/save any topology information.
--
Regards,
Sudeep
Powered by blists - more mailing lists