iommu: Convert to using %pOF instead of full_name
Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring <robh@kernel.org> Cc: Joerg Roedel <joro@8bytes.org> Cc: Heiko Stuebner <heiko@sntech.de> Cc: iommu@lists.linux-foundation.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Reviewed-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Joerg Roedel <jroedel@suse.de>
This commit is contained in:
parent
ebae3e830a
commit
6bd4f1c754
@ -530,8 +530,8 @@ u32 get_stash_id(u32 stash_dest_hint, u32 vcpu)
|
|||||||
if (node) {
|
if (node) {
|
||||||
prop = of_get_property(node, "cache-stash-id", NULL);
|
prop = of_get_property(node, "cache-stash-id", NULL);
|
||||||
if (!prop) {
|
if (!prop) {
|
||||||
pr_debug("missing cache-stash-id at %s\n",
|
pr_debug("missing cache-stash-id at %pOF\n",
|
||||||
node->full_name);
|
node);
|
||||||
of_node_put(node);
|
of_node_put(node);
|
||||||
return ~(u32)0;
|
return ~(u32)0;
|
||||||
}
|
}
|
||||||
@ -557,8 +557,8 @@ found_cpu_node:
|
|||||||
if (stash_dest_hint == cache_level) {
|
if (stash_dest_hint == cache_level) {
|
||||||
prop = of_get_property(node, "cache-stash-id", NULL);
|
prop = of_get_property(node, "cache-stash-id", NULL);
|
||||||
if (!prop) {
|
if (!prop) {
|
||||||
pr_debug("missing cache-stash-id at %s\n",
|
pr_debug("missing cache-stash-id at %pOF\n",
|
||||||
node->full_name);
|
node);
|
||||||
of_node_put(node);
|
of_node_put(node);
|
||||||
return ~(u32)0;
|
return ~(u32)0;
|
||||||
}
|
}
|
||||||
@ -568,8 +568,7 @@ found_cpu_node:
|
|||||||
|
|
||||||
prop = of_get_property(node, "next-level-cache", NULL);
|
prop = of_get_property(node, "next-level-cache", NULL);
|
||||||
if (!prop) {
|
if (!prop) {
|
||||||
pr_debug("can't find next-level-cache at %s\n",
|
pr_debug("can't find next-level-cache at %pOF\n", node);
|
||||||
node->full_name);
|
|
||||||
of_node_put(node);
|
of_node_put(node);
|
||||||
return ~(u32)0; /* can't traverse any further */
|
return ~(u32)0; /* can't traverse any further */
|
||||||
}
|
}
|
||||||
@ -1063,8 +1062,7 @@ static int fsl_pamu_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
guts_node = of_find_matching_node(NULL, guts_device_ids);
|
guts_node = of_find_matching_node(NULL, guts_device_ids);
|
||||||
if (!guts_node) {
|
if (!guts_node) {
|
||||||
dev_err(dev, "could not find GUTS node %s\n",
|
dev_err(dev, "could not find GUTS node %pOF\n", dev->of_node);
|
||||||
dev->of_node->full_name);
|
|
||||||
ret = -ENODEV;
|
ret = -ENODEV;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
@ -1246,8 +1244,7 @@ static __init int fsl_pamu_init(void)
|
|||||||
|
|
||||||
pdev = platform_device_alloc("fsl-of-pamu", 0);
|
pdev = platform_device_alloc("fsl-of-pamu", 0);
|
||||||
if (!pdev) {
|
if (!pdev) {
|
||||||
pr_err("could not allocate device %s\n",
|
pr_err("could not allocate device %pOF\n", np);
|
||||||
np->full_name);
|
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
goto error_device_alloc;
|
goto error_device_alloc;
|
||||||
}
|
}
|
||||||
@ -1259,8 +1256,7 @@ static __init int fsl_pamu_init(void)
|
|||||||
|
|
||||||
ret = platform_device_add(pdev);
|
ret = platform_device_add(pdev);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
pr_err("could not add device %s (err=%i)\n",
|
pr_err("could not add device %pOF (err=%i)\n", np, ret);
|
||||||
np->full_name, ret);
|
|
||||||
goto error_device_add;
|
goto error_device_add;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -619,8 +619,8 @@ static int handle_attach_device(struct fsl_dma_domain *dma_domain,
|
|||||||
for (i = 0; i < num; i++) {
|
for (i = 0; i < num; i++) {
|
||||||
/* Ensure that LIODN value is valid */
|
/* Ensure that LIODN value is valid */
|
||||||
if (liodn[i] >= PAACE_NUMBER_ENTRIES) {
|
if (liodn[i] >= PAACE_NUMBER_ENTRIES) {
|
||||||
pr_debug("Invalid liodn %d, attach device failed for %s\n",
|
pr_debug("Invalid liodn %d, attach device failed for %pOF\n",
|
||||||
liodn[i], dev->of_node->full_name);
|
liodn[i], dev->of_node);
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -684,8 +684,7 @@ static int fsl_pamu_attach_device(struct iommu_domain *domain,
|
|||||||
liodn_cnt = len / sizeof(u32);
|
liodn_cnt = len / sizeof(u32);
|
||||||
ret = handle_attach_device(dma_domain, dev, liodn, liodn_cnt);
|
ret = handle_attach_device(dma_domain, dev, liodn, liodn_cnt);
|
||||||
} else {
|
} else {
|
||||||
pr_debug("missing fsl,liodn property at %s\n",
|
pr_debug("missing fsl,liodn property at %pOF\n", dev->of_node);
|
||||||
dev->of_node->full_name);
|
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -720,8 +719,7 @@ static void fsl_pamu_detach_device(struct iommu_domain *domain,
|
|||||||
if (prop)
|
if (prop)
|
||||||
detach_device(dev, dma_domain);
|
detach_device(dev, dma_domain);
|
||||||
else
|
else
|
||||||
pr_debug("missing fsl,liodn property at %s\n",
|
pr_debug("missing fsl,liodn property at %pOF\n", dev->of_node);
|
||||||
dev->of_node->full_name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int configure_domain_geometry(struct iommu_domain *domain, void *data)
|
static int configure_domain_geometry(struct iommu_domain *domain, void *data)
|
||||||
|
@ -245,8 +245,7 @@ static int __init of_iommu_init(void)
|
|||||||
const of_iommu_init_fn init_fn = match->data;
|
const of_iommu_init_fn init_fn = match->data;
|
||||||
|
|
||||||
if (init_fn && init_fn(np))
|
if (init_fn && init_fn(np))
|
||||||
pr_err("Failed to initialise IOMMU %s\n",
|
pr_err("Failed to initialise IOMMU %pOF\n", np);
|
||||||
of_node_full_name(np));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1008,20 +1008,20 @@ static int rk_iommu_group_set_iommudata(struct iommu_group *group,
|
|||||||
ret = of_parse_phandle_with_args(np, "iommus", "#iommu-cells", 0,
|
ret = of_parse_phandle_with_args(np, "iommus", "#iommu-cells", 0,
|
||||||
&args);
|
&args);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(dev, "of_parse_phandle_with_args(%s) => %d\n",
|
dev_err(dev, "of_parse_phandle_with_args(%pOF) => %d\n",
|
||||||
np->full_name, ret);
|
np, ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
if (args.args_count != 0) {
|
if (args.args_count != 0) {
|
||||||
dev_err(dev, "incorrect number of iommu params found for %s (found %d, expected 0)\n",
|
dev_err(dev, "incorrect number of iommu params found for %pOF (found %d, expected 0)\n",
|
||||||
args.np->full_name, args.args_count);
|
args.np, args.args_count);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
pd = of_find_device_by_node(args.np);
|
pd = of_find_device_by_node(args.np);
|
||||||
of_node_put(args.np);
|
of_node_put(args.np);
|
||||||
if (!pd) {
|
if (!pd) {
|
||||||
dev_err(dev, "iommu %s not found\n", args.np->full_name);
|
dev_err(dev, "iommu %pOF not found\n", args.np);
|
||||||
return -EPROBE_DEFER;
|
return -EPROBE_DEFER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user