Lines Matching full:dn

328 static int dlpar_offline_cpu(struct device_node *dn)  in dlpar_offline_cpu()  argument
336 intserv = of_get_property(dn, "ibm,ppc-interrupt-server#s", &len); in dlpar_offline_cpu()
360 pr_warn("Unable to remove last online CPU %pOFn\n", dn); in dlpar_offline_cpu()
384 static int dlpar_online_cpu(struct device_node *dn) in dlpar_online_cpu() argument
392 intserv = of_get_property(dn, "ibm,ppc-interrupt-server#s", &len); in dlpar_online_cpu()
416 dlpar_offline_cpu(dn); in dlpar_online_cpu()
531 static int pseries_cpuhp_attach_nodes(struct device_node *dn) in pseries_cpuhp_attach_nodes() argument
540 for (of_changeset_init(&cs); dn != NULL; dn = dn->sibling) { in pseries_cpuhp_attach_nodes()
541 ret = of_changeset_attach_node(&cs, dn); in pseries_cpuhp_attach_nodes()
554 struct device_node *dn, *parent; in dlpar_cpu_add() local
585 dn = dlpar_configure_connector(cpu_to_be32(drc_index), parent); in dlpar_cpu_add()
586 if (!dn) { in dlpar_cpu_add()
594 rc = pseries_cpuhp_attach_nodes(dn); in dlpar_cpu_add()
602 dn, rc, drc_index); in dlpar_cpu_add()
606 dlpar_free_cc_nodes(dn); in dlpar_cpu_add()
611 update_numa_distance(dn); in dlpar_cpu_add()
613 rc = dlpar_online_cpu(dn); in dlpar_cpu_add()
617 dn, rc, drc_index); in dlpar_cpu_add()
619 rc = dlpar_detach_node(dn); in dlpar_cpu_add()
626 pr_debug("Successfully added CPU %pOFn, drc index: %x\n", dn, in dlpar_cpu_add()
634 struct device_node *dn, *tn; in pseries_cpuhp_cache_use_count() local
638 for_each_of_cpu_node(dn) { in pseries_cpuhp_cache_use_count()
639 tn = of_find_next_cache_node(dn); in pseries_cpuhp_cache_use_count()
645 for_each_node_by_type(dn, "cache") { in pseries_cpuhp_cache_use_count()
646 tn = of_find_next_cache_node(dn); in pseries_cpuhp_cache_use_count()
657 struct device_node *dn; in pseries_cpuhp_detach_nodes() local
666 dn = cpudn; in pseries_cpuhp_detach_nodes()
667 while ((dn = of_find_next_cache_node(dn))) { in pseries_cpuhp_detach_nodes()
668 if (pseries_cpuhp_cache_use_count(dn) > 1) { in pseries_cpuhp_detach_nodes()
669 of_node_put(dn); in pseries_cpuhp_detach_nodes()
673 ret = of_changeset_detach_node(&cs, dn); in pseries_cpuhp_detach_nodes()
674 of_node_put(dn); in pseries_cpuhp_detach_nodes()
685 static ssize_t dlpar_cpu_remove(struct device_node *dn, u32 drc_index) in dlpar_cpu_remove() argument
690 dn, drc_index); in dlpar_cpu_remove()
692 rc = dlpar_offline_cpu(dn); in dlpar_cpu_remove()
694 pr_warn("Failed to offline CPU %pOFn, rc: %d\n", dn, rc); in dlpar_cpu_remove()
701 drc_index, dn, rc); in dlpar_cpu_remove()
702 dlpar_online_cpu(dn); in dlpar_cpu_remove()
706 rc = pseries_cpuhp_detach_nodes(dn); in dlpar_cpu_remove()
710 pr_warn("Failed to detach CPU %pOFn, rc: %d", dn, rc); in dlpar_cpu_remove()
714 dlpar_online_cpu(dn); in dlpar_cpu_remove()
725 struct device_node *dn; in cpu_drc_index_to_dn() local
729 for_each_node_by_type(dn, "cpu") { in cpu_drc_index_to_dn()
730 rc = of_property_read_u32(dn, "ibm,my-drc-index", &my_index); in cpu_drc_index_to_dn()
738 return dn; in cpu_drc_index_to_dn()
743 struct device_node *dn; in dlpar_cpu_remove_by_index() local
746 dn = cpu_drc_index_to_dn(drc_index); in dlpar_cpu_remove_by_index()
747 if (!dn) { in dlpar_cpu_remove_by_index()
753 rc = dlpar_cpu_remove(dn, drc_index); in dlpar_cpu_remove_by_index()
754 of_node_put(dn); in dlpar_cpu_remove_by_index()
816 struct device_node *dn; in dlpar_cpu_release() local
820 dn = of_find_node_by_path(buf); in dlpar_cpu_release()
821 if (!dn) in dlpar_cpu_release()
824 rc = of_property_read_u32(dn, "ibm,my-drc-index", &drc_index); in dlpar_cpu_release()
826 of_node_put(dn); in dlpar_cpu_release()
830 rc = dlpar_cpu_remove(dn, drc_index); in dlpar_cpu_release()
831 of_node_put(dn); in dlpar_cpu_release()
846 err = pseries_add_processor(rd->dn); in pseries_smp_notifier()
849 pseries_remove_processor(rd->dn); in pseries_smp_notifier()