powerpc: pseries: remove dlpar_attach_node dependency on full path
In preparation to stop storing the full node path in full_name, remove the dependency on full_name from dlpar_attach_node(). Callers of dlpar_attach_node() already have the parent device_node, so just pass the parent node into dlpar_attach_node instead of the path. This avoids doing a lookup of the parent node by the path. Signed-off-by: Rob Herring <robh@kernel.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
parent
b7c670d673
commit
215ee763f8
|
@ -254,13 +254,11 @@ struct device_node *dlpar_configure_connector(__be32 drc_index,
|
||||||
return first_dn;
|
return first_dn;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dlpar_attach_node(struct device_node *dn)
|
int dlpar_attach_node(struct device_node *dn, struct device_node *parent)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
dn->parent = pseries_of_derive_parent(dn->full_name);
|
dn->parent = parent;
|
||||||
if (IS_ERR(dn->parent))
|
|
||||||
return PTR_ERR(dn->parent);
|
|
||||||
|
|
||||||
rc = of_attach_node(dn);
|
rc = of_attach_node(dn);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
|
|
|
@ -463,7 +463,7 @@ static ssize_t dlpar_cpu_add(u32 drc_index)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = dlpar_attach_node(dn);
|
rc = dlpar_attach_node(dn, parent);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
saved_rc = rc;
|
saved_rc = rc;
|
||||||
pr_warn("Failed to attach node %s, rc: %d, drc index: %x\n",
|
pr_warn("Failed to attach node %s, rc: %d, drc index: %x\n",
|
||||||
|
|
|
@ -229,7 +229,7 @@ static int add_dt_node(__be32 parent_phandle, __be32 drc_index)
|
||||||
if (!dn)
|
if (!dn)
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
|
|
||||||
rc = dlpar_attach_node(dn);
|
rc = dlpar_attach_node(dn, parent_dn);
|
||||||
if (rc)
|
if (rc)
|
||||||
dlpar_free_cc_nodes(dn);
|
dlpar_free_cc_nodes(dn);
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ extern void dlpar_free_cc_nodes(struct device_node *);
|
||||||
extern void dlpar_free_cc_property(struct property *);
|
extern void dlpar_free_cc_property(struct property *);
|
||||||
extern struct device_node *dlpar_configure_connector(__be32,
|
extern struct device_node *dlpar_configure_connector(__be32,
|
||||||
struct device_node *);
|
struct device_node *);
|
||||||
extern int dlpar_attach_node(struct device_node *);
|
extern int dlpar_attach_node(struct device_node *, struct device_node *);
|
||||||
extern int dlpar_detach_node(struct device_node *);
|
extern int dlpar_detach_node(struct device_node *);
|
||||||
extern int dlpar_acquire_drc(u32 drc_index);
|
extern int dlpar_acquire_drc(u32 drc_index);
|
||||||
extern int dlpar_release_drc(u32 drc_index);
|
extern int dlpar_release_drc(u32 drc_index);
|
||||||
|
|
Loading…
Reference in New Issue