From: Sudeep Holla <sudeep.holla@arm.com>
To: Atish Patra <atish.patra@wdc.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
"Peter Zijlstra \(Intel\)" <peterz@infradead.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Palmer Dabbelt <palmer@sifive.com>,
Will Deacon <will.deacon@arm.com>,
linux-riscv@lists.infradead.org,
Morten Rasmussen <morten.rasmussen@arm.com>,
Jeffrey Hugo <jhugo@codeaurora.org>,
Andreas Schwab <schwab@suse.de>, Ingo Molnar <mingo@kernel.org>,
devicetree@vger.kernel.org, Albert Ou <aou@eecs.berkeley.edu>,
Sudeep Holla <sudeep.holla@arm.com>,
Rob Herring <robh+dt@kernel.org>,
Paul Walmsley <paul.walmsley@sifive.com>,
Thomas Gleixner <tglx@linutronix.de>,
linux-arm-kernel@lists.infradead.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org,
Jeremy Linton <jeremy.linton@arm.com>,
Otto Sabart <ottosabart@seberm.com>,
Anup Patel <anup@brainfault.org>
Subject: Re: [RFT PATCH v5 3/5] cpu-topology: Move cpu topology code to common code.
Date: Wed, 29 May 2019 11:48:01 +0100 [thread overview]
Message-ID: <20190529104801.GA13155@e107155-lin> (raw)
In-Reply-To: <20190524000653.13005-4-atish.patra@wdc.com>
On Thu, May 23, 2019 at 05:06:50PM -0700, Atish Patra wrote:
> Both RISC-V & ARM64 are using cpu-map device tree to describe
> their cpu topology. It's better to move the relevant code to
> a common place instead of duplicate code.
>
I couldn't test this on any ARM64 server platforms, tested on Juno
and other embedded platforms.
Tested-by: Sudeep Holla <sudeep.holla@arm.com>
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
> Signed-off-by: Atish Patra <atish.patra@wdc.com>
> Tested-by: Jeffrey Hugo <jhugo@codeaurora.org>
> ---
> arch/arm64/include/asm/topology.h | 23 ---
> arch/arm64/kernel/topology.c | 303 +-----------------------------
> drivers/base/arch_topology.c | 296 +++++++++++++++++++++++++++++
> include/linux/arch_topology.h | 28 +++
> include/linux/topology.h | 1 +
> 5 files changed, 329 insertions(+), 322 deletions(-)
>
[...]
> diff --git a/arch/arm64/kernel/topology.c b/arch/arm64/kernel/topology.c
> index 0825c4a856e3..6b95c91e7d67 100644
> --- a/arch/arm64/kernel/topology.c
> +++ b/arch/arm64/kernel/topology.c
>
[...]
> -static int __init parse_cluster(struct device_node *cluster, int depth)
> -{
> - char name[10];
> - bool leaf = true;
> - bool has_cores = false;
> - struct device_node *c;
> - static int package_id __initdata;
> - int core_id = 0;
[Ultra minor nit]: you seem to have reordered the above declaration when
you moved, just noticed as it showed up when comparing.
> diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c
> index 1739d7e1952a..20a960131bee 100644
> --- a/drivers/base/arch_topology.c
> +++ b/drivers/base/arch_topology.c
[...]
> +
> +static int __init parse_cluster(struct device_node *cluster, int depth)
> +{
> + char name[10];
> + bool leaf = true;
> + bool has_cores = false;
> + int core_id = 0;
> + static int package_id __initdata;
> + struct device_node *c;
> + int i, ret;
> +
[...]
> +#if defined(CONFIG_ARM64) || defined(CONFIG_RISCV)
> +void update_siblings_masks(unsigned int cpu);
> +#endif
> +void remove_cpu_topology(unsigned int cpuid);
> +
Another thing(not a block and we can do it once this is merged) is to
remove these #ifdefs
--
Regards,
Sudeep
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2019-05-29 10:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-24 0:06 [RFT PATCH v5 0/5] Unify CPU topology across ARM & RISC-V Atish Patra
2019-05-24 0:06 ` [RFT PATCH v5 1/5] Documentation: DT: arm: add support for sockets defining package boundaries Atish Patra
2019-05-24 0:06 ` [RFT PATCH v5 2/5] dt-binding: cpu-topology: Move cpu-map to a common binding Atish Patra
2019-05-24 0:06 ` [RFT PATCH v5 3/5] cpu-topology: Move cpu topology code to common code Atish Patra
2019-05-24 8:13 ` Greg Kroah-Hartman
2019-05-24 8:57 ` Sudeep Holla
2019-05-24 9:38 ` Will Deacon
2019-05-29 10:48 ` Sudeep Holla [this message]
2019-05-29 17:24 ` Atish Patra
2019-05-24 0:06 ` [RFT PATCH v5 4/5] arm: Use common cpu_topology structure and functions Atish Patra
2019-05-29 15:10 ` Sudeep Holla
2019-05-24 0:06 ` [RFT PATCH v5 5/5] RISC-V: Parse cpu topology during boot Atish Patra
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=20190529104801.GA13155@e107155-lin \
--to=sudeep.holla@arm.com \
--cc=anup@brainfault.org \
--cc=aou@eecs.berkeley.edu \
--cc=atish.patra@wdc.com \
--cc=catalin.marinas@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jeremy.linton@arm.com \
--cc=jhugo@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=mingo@kernel.org \
--cc=morten.rasmussen@arm.com \
--cc=ottosabart@seberm.com \
--cc=palmer@sifive.com \
--cc=paul.walmsley@sifive.com \
--cc=peterz@infradead.org \
--cc=rafael@kernel.org \
--cc=robh+dt@kernel.org \
--cc=schwab@suse.de \
--cc=tglx@linutronix.de \
--cc=will.deacon@arm.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).