linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [v1 PATCH 1/4] RISC-V: Add RISC-V specific arch_match_cpu_phys_id
@ 2019-03-19 22:20 Atish Patra
  2019-03-19 22:20 ` [v1 PATCH 2/4] RISC-V: Fix of_get_cpu_node usage Atish Patra
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Atish Patra @ 2019-03-19 22:20 UTC (permalink / raw)
  To: linux-riscv
  Cc: Atish Patra, Albert Ou, Andreas Schwab, Anup Patel,
	Dmitriy Cherkasov, Johan Hovold, linux-kernel, Palmer Dabbelt,
	Paul Walmsley, Damien Le Moal, Anup Patel

OF/DT core has a hook for architecture specific logical cpuid to hartid
mapping. By implementing this, we can pass the logical cpu id to cpu
node parsing functions.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
---
 arch/riscv/kernel/smp.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/riscv/kernel/smp.c b/arch/riscv/kernel/smp.c
index 0c41d07e..94db7266 100644
--- a/arch/riscv/kernel/smp.c
+++ b/arch/riscv/kernel/smp.c
@@ -70,6 +70,11 @@ void riscv_cpuid_to_hartid_mask(const struct cpumask *in, struct cpumask *out)
 	for_each_cpu(cpu, in)
 		cpumask_set_cpu(cpuid_to_hartid_map(cpu), out);
 }
+
+bool arch_match_cpu_phys_id(int cpu, u64 phys_id)
+{
+	return phys_id == cpuid_to_hartid_map(cpu);
+}
 /* Unsupported */
 int setup_profiling_timer(unsigned int multiplier)
 {
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-03-20  1:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-19 22:20 [v1 PATCH 1/4] RISC-V: Add RISC-V specific arch_match_cpu_phys_id Atish Patra
2019-03-19 22:20 ` [v1 PATCH 2/4] RISC-V: Fix of_get_cpu_node usage Atish Patra
2019-03-19 22:20 ` [v1 PATCH 3/4] RISC-V: Implement nosmp commandline option Atish Patra
2019-03-19 22:20 ` [v1 PATCH 4/4] RISC-V: Support nr_cpus command line option Atish Patra
2019-03-19 23:56   ` Damien Le Moal
2019-03-19 23:58     ` Damien Le Moal
2019-03-20  1:29       ` Atish Patra

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).