Skip to content

Commit

Permalink
iommu: fsl_pamu: use for_each_of_cpu_node iterator
Browse files Browse the repository at this point in the history
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: Joerg Roedel <joro@8bytes.org>
Cc: iommu@lists.linux-foundation.org
Signed-off-by: Rob Herring <robh@kernel.org>
  • Loading branch information
Rob Herring committed Sep 28, 2018
1 parent 37dc218 commit a9a455e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/iommu/fsl_pamu.c
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ u32 get_stash_id(u32 stash_dest_hint, u32 vcpu)
return ~(u32)0;
}

for_each_node_by_type(node, "cpu") {
for_each_of_cpu_node(node) {
prop = of_get_property(node, "reg", &len);
for (i = 0; i < len / sizeof(u32); i++) {
if (be32_to_cpup(&prop[i]) == vcpu) {
Expand Down

0 comments on commit a9a455e

Please sign in to comment.