diff mbox series

[v2,2/4] RISC-V: Fix of_get_cpu_node usage

Message ID 20190410230443.15729-3-atish.patra@wdc.com (mailing list archive)
State New, archived
Headers show
Series Miscellaneous kernel command line fixes | expand

Commit Message

Atish Patra April 10, 2019, 11:04 p.m. UTC
of_get_cpu_node expects a logical cpu id not a hartid.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
---
 arch/riscv/kernel/cpu.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Christoph Hellwig April 11, 2019, 6:59 a.m. UTC | #1
On Wed, Apr 10, 2019 at 04:04:41PM -0700, Atish Patra wrote:
> of_get_cpu_node expects a logical cpu id not a hartid.

But only because you changed that with your patch 1, so it should
be folded into that.
Atish Patra April 11, 2019, 6:14 p.m. UTC | #2
On 4/10/19 11:59 PM, Christoph Hellwig wrote:
> On Wed, Apr 10, 2019 at 04:04:41PM -0700, Atish Patra wrote:
>> of_get_cpu_node expects a logical cpu id not a hartid.
> 
> But only because you changed that with your patch 1, so it should
> be folded into that.
> 

Yes. I should merge this to patch 1. Otherwise, git bisect will have 
issues later with patch 1.

Regards,
Atish
diff mbox series

Patch

diff --git a/arch/riscv/kernel/cpu.c b/arch/riscv/kernel/cpu.c
index cf2fca12414a..c8d2a3223099 100644
--- a/arch/riscv/kernel/cpu.c
+++ b/arch/riscv/kernel/cpu.c
@@ -136,8 +136,7 @@  static void c_stop(struct seq_file *m, void *v)
 static int c_show(struct seq_file *m, void *v)
 {
 	unsigned long cpu_id = (unsigned long)v - 1;
-	struct device_node *node = of_get_cpu_node(cpuid_to_hartid_map(cpu_id),
-						   NULL);
+	struct device_node *node = of_get_cpu_node(cpu_id, NULL);
 	const char *compat, *isa, *mmu;
 
 	seq_printf(m, "processor\t: %lu\n", cpu_id);