linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Atish Patra <atish.patra@wdc.com>
To: linux-kernel@vger.kernel.org
Cc: Albert Ou <aou@eecs.berkeley.edu>,
	Dmitriy Cherkasov <dmitriy@oss-tech.org>,
	Anup Patel <anup@brainfault.org>,
	Palmer Dabbelt <palmer@sifive.com>,
	Johan Hovold <johan@kernel.org>,
	Atish Patra <atish.patra@wdc.com>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Andreas Schwab <schwab@suse.de>,
	linux-riscv@lists.infradead.org
Subject: [PATCH v2 2/4] RISC-V: Fix of_get_cpu_node usage
Date: Wed, 10 Apr 2019 16:04:41 -0700	[thread overview]
Message-ID: <20190410230443.15729-3-atish.patra@wdc.com> (raw)
In-Reply-To: <20190410230443.15729-1-atish.patra@wdc.com>

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

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);
-- 
2.21.0


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  parent reply	other threads:[~2019-04-10 23:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-10 23:04 [PATCH v2 0/4] Miscellaneous kernel command line fixes Atish Patra
2019-04-10 23:04 ` [PATCH v2 1/4] RISC-V: Add RISC-V specific arch_match_cpu_phys_id Atish Patra
2019-04-11  6:58   ` Christoph Hellwig
2019-04-10 23:04 ` Atish Patra [this message]
2019-04-11  6:59   ` [PATCH v2 2/4] RISC-V: Fix of_get_cpu_node usage Christoph Hellwig
2019-04-11 18:14     ` Atish Patra
2019-04-10 23:04 ` [PATCH v2 3/4] RISC-V: Implement nosmp commandline option Atish Patra
2019-04-11  7:01   ` Christoph Hellwig
2019-04-11 18:42     ` Atish Patra
2019-04-10 23:04 ` [PATCH v2 4/4] RISC-V: Support nr_cpus command line option 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=20190410230443.15729-3-atish.patra@wdc.com \
    --to=atish.patra@wdc.com \
    --cc=anup@brainfault.org \
    --cc=aou@eecs.berkeley.edu \
    --cc=dmitriy@oss-tech.org \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@sifive.com \
    --cc=paul.walmsley@sifive.com \
    --cc=schwab@suse.de \
    /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).