linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@arm.com>
To: Jiaxun Yang <jiaxun.yang@flygoat.com>
Cc: linux-mips@vger.kernel.org,
	"Thomas Bogendoerfer" <tsbogend@alpha.franken.de>,
	"Huacai Chen" <chenhc@lemote.com>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Ingo Molnar" <mingo@redhat.com>,
	"Arnaldo Carvalho de Melo" <acme@kernel.org>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Alexander Shishkin" <alexander.shishkin@linux.intel.com>,
	"Jiri Olsa" <jolsa@redhat.com>,
	"Namhyung Kim" <namhyung@kernel.org>,
	"Florian Fainelli" <f.fainelli@gmail.com>,
	"Robert Richter" <rric@kernel.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Jason Cooper" <jason@lakedaemon.net>,
	"Marc Zyngier" <maz@kernel.org>,
	"Paul Burton" <paulburton@kernel.org>,
	"Allison Randal" <allison@lohutok.net>,
	"Enrico Weigelt" <info@metux.net>,
	"Kate Stewart" <kstewart@linuxfoundation.org>,
	"Vladimir Kondratiev" <vladimir.kondratiev@intel.com>,
	"Richard Fontana" <rfontana@redhat.com>,
	"Paul Cercueil" <paul@crapouillou.net>,
	"Zhou Yanjie" <zhouyanjie@zoho.com>,
	"周琰杰 (Zhou Yanjie)" <zhouyanjie@wanyeetech.com>,
	"YunQiang Su" <syq@debian.org>, "Arnd Bergmann" <arnd@arndb.de>,
	"Serge Semin" <fancer.lancer@gmail.com>,
	"Matt Redfearn" <matt.redfearn@mips.com>,
	"Steve Winslow" <swinslow@gmail.com>,
	"Alexios Zavras" <alexios.zavras@intel.com>,
	"Peter Xu" <peterx@redhat.com>,
	"afzal mohammed" <afzal.mohd.ma@gmail.com>,
	"Kamal Dasu" <kdasu.kdev@gmail.com>,
	"Mike Rapoport" <rppt@linux.ibm.com>,
	"Oleksij Rempel" <linux@rempel-privat.de>,
	"Sudeep Holla" <sudeep.holla@arm.com>,
	linux-kernel@vger.kernel.org,
	bcm-kernel-feedback-list@broadcom.com,
	oprofile-list@lists.sf.net
Subject: Re: [PATCH 05/12] MIPS: Switch to arch_topology
Date: Thu, 9 Apr 2020 11:31:21 +0100	[thread overview]
Message-ID: <20200409103121.GD25948@bogus> (raw)
In-Reply-To: <20200408113505.2528103-6-jiaxun.yang@flygoat.com>

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@flygoat.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

  reply	other threads:[~2020-04-09 10:31 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-08 11:34 [PATCH 00/12] MIPS: Topology & DeviceTree CPU rework Jiaxun Yang
2020-04-08 11:34 ` [PATCH 01/12] MIPS: setup: Drop prefill_possible_map Jiaxun Yang
2020-04-08 11:34 ` [PATCH 02/12] MIPS: prom: Add helper to parse CPU node in dt Jiaxun Yang
2020-04-08 11:34 ` [PATCH 03/12] arch_topology: Make it avilable for MIPS Jiaxun Yang
2020-04-08 18:23   ` Valentin Schneider
2020-04-09 10:13   ` Sudeep Holla
2020-04-08 11:34 ` [PATCH 04/12] arch_topology: Reset all cpus in reset_cpu_topology Jiaxun Yang
2020-04-08 18:23   ` Valentin Schneider
2020-04-09 10:19   ` Sudeep Holla
2020-04-08 11:34 ` [PATCH 05/12] MIPS: Switch to arch_topology Jiaxun Yang
2020-04-09 10:31   ` Sudeep Holla [this message]
2020-04-08 12:59 ` [PATCH 06/12] MIPS: Kernel: Switch to new topology interface Jiaxun Yang
2020-04-08 12:59 ` [PATCH 07/12] MIPS: CPS & MT: " Jiaxun Yang
2020-04-08 12:59 ` [PATCH 08/12] irqchip: mips-cpu: " Jiaxun Yang
2020-04-08 12:59 ` [PATCH 09/12] MIPS: bmips: " Jiaxun Yang
2020-04-08 12:59 ` [PATCH 10/12] MIPS: nlm: " Jiaxun Yang
2020-04-08 12:59 ` [PATCH 11/12] MIPS: Loongson64: " Jiaxun Yang
2020-04-08 12:59 ` [PATCH 12/12] MIPS: ip27: Fix includes Jiaxun Yang
2020-04-09  9:19   ` Mike Rapoport
2020-04-09  9:38     ` Jiaxun Yang
2020-04-09 10:07       ` Mike Rapoport

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200409103121.GD25948@bogus \
    --to=sudeep.holla@arm.com \
    --cc=acme@kernel.org \
    --cc=afzal.mohd.ma@gmail.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=alexios.zavras@intel.com \
    --cc=allison@lohutok.net \
    --cc=arnd@arndb.de \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=chenhc@lemote.com \
    --cc=f.fainelli@gmail.com \
    --cc=fancer.lancer@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=info@metux.net \
    --cc=jason@lakedaemon.net \
    --cc=jiaxun.yang@flygoat.com \
    --cc=jolsa@redhat.com \
    --cc=kdasu.kdev@gmail.com \
    --cc=kstewart@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux@rempel-privat.de \
    --cc=mark.rutland@arm.com \
    --cc=matt.redfearn@mips.com \
    --cc=maz@kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=oprofile-list@lists.sf.net \
    --cc=paul@crapouillou.net \
    --cc=paulburton@kernel.org \
    --cc=peterx@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rafael@kernel.org \
    --cc=rfontana@redhat.com \
    --cc=rppt@linux.ibm.com \
    --cc=rric@kernel.org \
    --cc=swinslow@gmail.com \
    --cc=syq@debian.org \
    --cc=tglx@linutronix.de \
    --cc=tsbogend@alpha.franken.de \
    --cc=vladimir.kondratiev@intel.com \
    --cc=zhouyanjie@wanyeetech.com \
    --cc=zhouyanjie@zoho.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).