Lines Matching refs:dn

324 static int dlpar_offline_cpu(struct device_node *dn)  in dlpar_offline_cpu()  argument
332 intserv = of_get_property(dn, "ibm,ppc-interrupt-server#s", &len); in dlpar_offline_cpu()
356 pr_warn("Unable to remove last online CPU %pOFn\n", dn); in dlpar_offline_cpu()
380 static int dlpar_online_cpu(struct device_node *dn) in dlpar_online_cpu() argument
388 intserv = of_get_property(dn, "ibm,ppc-interrupt-server#s", &len); in dlpar_online_cpu()
404 dlpar_offline_cpu(dn); in dlpar_online_cpu()
519 static int pseries_cpuhp_attach_nodes(struct device_node *dn) in pseries_cpuhp_attach_nodes() argument
528 for (of_changeset_init(&cs); dn != NULL; dn = dn->sibling) { in pseries_cpuhp_attach_nodes()
529 ret = of_changeset_attach_node(&cs, dn); in pseries_cpuhp_attach_nodes()
542 struct device_node *dn, *parent; in dlpar_cpu_add() local
573 dn = dlpar_configure_connector(cpu_to_be32(drc_index), parent); in dlpar_cpu_add()
574 if (!dn) { in dlpar_cpu_add()
582 rc = pseries_cpuhp_attach_nodes(dn); in dlpar_cpu_add()
590 dn, rc, drc_index); in dlpar_cpu_add()
594 dlpar_free_cc_nodes(dn); in dlpar_cpu_add()
599 update_numa_distance(dn); in dlpar_cpu_add()
601 rc = dlpar_online_cpu(dn); in dlpar_cpu_add()
605 dn, rc, drc_index); in dlpar_cpu_add()
607 rc = dlpar_detach_node(dn); in dlpar_cpu_add()
614 pr_debug("Successfully added CPU %pOFn, drc index: %x\n", dn, in dlpar_cpu_add()
622 struct device_node *dn; in pseries_cpuhp_cache_use_count() local
626 for_each_of_cpu_node(dn) { in pseries_cpuhp_cache_use_count()
627 if (of_find_next_cache_node(dn) == cachedn) in pseries_cpuhp_cache_use_count()
631 for_each_node_by_type(dn, "cache") { in pseries_cpuhp_cache_use_count()
632 if (of_find_next_cache_node(dn) == cachedn) in pseries_cpuhp_cache_use_count()
641 struct device_node *dn; in pseries_cpuhp_detach_nodes() local
650 dn = cpudn; in pseries_cpuhp_detach_nodes()
651 while ((dn = of_find_next_cache_node(dn))) { in pseries_cpuhp_detach_nodes()
652 if (pseries_cpuhp_cache_use_count(dn) > 1) in pseries_cpuhp_detach_nodes()
655 ret = of_changeset_detach_node(&cs, dn); in pseries_cpuhp_detach_nodes()
666 static ssize_t dlpar_cpu_remove(struct device_node *dn, u32 drc_index) in dlpar_cpu_remove() argument
671 dn, drc_index); in dlpar_cpu_remove()
673 rc = dlpar_offline_cpu(dn); in dlpar_cpu_remove()
675 pr_warn("Failed to offline CPU %pOFn, rc: %d\n", dn, rc); in dlpar_cpu_remove()
682 drc_index, dn, rc); in dlpar_cpu_remove()
683 dlpar_online_cpu(dn); in dlpar_cpu_remove()
687 rc = pseries_cpuhp_detach_nodes(dn); in dlpar_cpu_remove()
691 pr_warn("Failed to detach CPU %pOFn, rc: %d", dn, rc); in dlpar_cpu_remove()
695 dlpar_online_cpu(dn); in dlpar_cpu_remove()
706 struct device_node *dn; in cpu_drc_index_to_dn() local
710 for_each_node_by_type(dn, "cpu") { in cpu_drc_index_to_dn()
711 rc = of_property_read_u32(dn, "ibm,my-drc-index", &my_index); in cpu_drc_index_to_dn()
719 return dn; in cpu_drc_index_to_dn()
724 struct device_node *dn; in dlpar_cpu_remove_by_index() local
727 dn = cpu_drc_index_to_dn(drc_index); in dlpar_cpu_remove_by_index()
728 if (!dn) { in dlpar_cpu_remove_by_index()
734 rc = dlpar_cpu_remove(dn, drc_index); in dlpar_cpu_remove_by_index()
735 of_node_put(dn); in dlpar_cpu_remove_by_index()
797 struct device_node *dn; in dlpar_cpu_release() local
801 dn = of_find_node_by_path(buf); in dlpar_cpu_release()
802 if (!dn) in dlpar_cpu_release()
805 rc = of_property_read_u32(dn, "ibm,my-drc-index", &drc_index); in dlpar_cpu_release()
807 of_node_put(dn); in dlpar_cpu_release()
811 rc = dlpar_cpu_remove(dn, drc_index); in dlpar_cpu_release()
812 of_node_put(dn); in dlpar_cpu_release()
827 err = pseries_add_processor(rd->dn); in pseries_smp_notifier()
830 pseries_remove_processor(rd->dn); in pseries_smp_notifier()