• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/arch/powerpc/platforms/pseries/

Lines Matching refs:dn

70 	struct device_node *dn;
73 dn = kzalloc(sizeof(*dn), GFP_KERNEL);
74 if (!dn)
82 dn->full_name = kasprintf(GFP_KERNEL, "/%s", name);
83 if (!dn->full_name) {
84 kfree(dn);
88 return dn;
91 static void dlpar_free_one_cc_node(struct device_node *dn)
95 while (dn->properties) {
96 prop = dn->properties;
97 dn->properties = prop->next;
101 kfree(dn->full_name);
102 kfree(dn);
105 static void dlpar_free_cc_nodes(struct device_node *dn)
107 if (dn->child)
108 dlpar_free_cc_nodes(dn->child);
110 if (dn->sibling)
111 dlpar_free_cc_nodes(dn->sibling);
113 dlpar_free_one_cc_node(dn);
126 struct device_node *dn;
163 dn = dlpar_parse_cc_node(ccwa);
164 if (!dn)
167 dn->parent = last_dn->parent;
168 last_dn->sibling = dn;
169 last_dn = dn;
173 dn = dlpar_parse_cc_node(ccwa);
174 if (!dn)
178 first_dn = dn;
180 dn->parent = last_dn;
182 last_dn->child = dn;
185 last_dn = dn;
253 int dlpar_attach_node(struct device_node *dn)
260 of_node_set_flag(dn, OF_DYNAMIC);
261 kref_init(&dn->kref);
262 dn->parent = derive_parent(dn->full_name);
263 if (!dn->parent)
267 PSERIES_RECONFIG_ADD, dn);
270 dn->full_name);
274 of_attach_node(dn);
277 ent = proc_mkdir(strrchr(dn->full_name, '/') + 1, dn->parent->pde);
279 proc_device_tree_add_node(dn, ent);
282 of_node_put(dn->parent);
286 int dlpar_detach_node(struct device_node *dn)
289 struct device_node *parent = dn->parent;
290 struct property *prop = dn->properties;
293 remove_proc_entry(prop->name, dn->pde);
297 if (dn->pde)
298 remove_proc_entry(dn->pde->name, parent->pde);
302 PSERIES_RECONFIG_REMOVE, dn);
303 of_detach_node(dn);
304 of_node_put(dn); /* Must decrement the refcount */
365 static int dlpar_online_cpu(struct device_node *dn)
372 intserv = of_get_property(dn, "ibm,ppc-interrupt-server#s", &len);
406 struct device_node *dn;
418 dn = dlpar_configure_connector(drc_index);
419 if (!dn) {
428 cpu_name = kasprintf(GFP_KERNEL, "/cpus%s", dn->full_name);
430 dlpar_free_cc_nodes(dn);
435 kfree(dn->full_name);
436 dn->full_name = cpu_name;
440 dlpar_free_cc_nodes(dn);
445 rc = dlpar_attach_node(dn);
448 dlpar_free_cc_nodes(dn);
452 rc = dlpar_online_cpu(dn);
459 static int dlpar_offline_cpu(struct device_node *dn)
466 intserv = of_get_property(dn, "ibm,ppc-interrupt-server#s", &len);
515 struct device_node *dn;
519 dn = of_find_node_by_path(buf);
520 if (!dn)
523 drc_index = of_get_property(dn, "ibm,my-drc-index", NULL);
525 of_node_put(dn);
530 rc = dlpar_offline_cpu(dn);
532 of_node_put(dn);
539 of_node_put(dn);
543 rc = dlpar_detach_node(dn);
549 of_node_put(dn);