From: robh@kernel.org (Rob Herring)
To: linux-riscv@lists.infradead.org
Subject: [PATCH 14/21] riscv: use for_each_of_cpu_node iterator
Date: Wed, 5 Sep 2018 14:37:31 -0500 [thread overview]
Message-ID: <20180905193738.19325-15-robh@kernel.org> (raw)
In-Reply-To: <20180905193738.19325-1-robh@kernel.org>
Use the for_each_of_cpu_node iterator to iterate over cpu nodes. This
has the side effect of defaulting to iterating using "cpu" node names in
preference to the deprecated (for FDT) device_type == "cpu".
Cc: Palmer Dabbelt <palmer@sifive.com>
Cc: Albert Ou <aou@eecs.berkeley.edu>
Cc: linux-riscv at lists.infradead.org
Signed-off-by: Rob Herring <robh@kernel.org>
---
Please ack and I will take via the DT tree. This is dependent on the
first 2 patches.
arch/riscv/kernel/smpboot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/riscv/kernel/smpboot.c b/arch/riscv/kernel/smpboot.c
index 56abab6a9812..3c59afe67951 100644
--- a/arch/riscv/kernel/smpboot.c
+++ b/arch/riscv/kernel/smpboot.c
@@ -52,7 +52,7 @@ void __init setup_smp(void)
struct device_node *dn = NULL;
int hart, im_okay_therefore_i_am = 0;
- while ((dn = of_find_node_by_type(dn, "cpu"))) {
+ for_each_of_cpu_node(dn) {
hart = riscv_of_processor_hart(dn);
if (hart >= 0) {
set_cpu_possible(hart, true);
--
2.17.1
next prev parent reply other threads:[~2018-09-05 19:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-05 19:37 [PATCH 00/21] DT cpu node iterator Rob Herring
2018-09-05 19:37 ` Rob Herring [this message]
2018-09-10 13:37 ` [PATCH 14/21] riscv: use for_each_of_cpu_node iterator Christoph Hellwig
2018-09-10 13:51 ` Rob Herring
2018-09-18 22:53 ` Palmer Dabbelt
[not found] ` <CAHTX3d+BFKM-jFo8Ww_dXwAzsDVoWqE==erfwVTeijHfh8kkOw@mail.gmail.com>
2018-09-07 13:58 ` [PATCH 00/21] DT cpu node iterator Rob Herring
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=20180905193738.19325-15-robh@kernel.org \
--to=robh@kernel.org \
--cc=linux-riscv@lists.infradead.org \
/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).