Lines Matching refs:drc_index

422 static bool dlpar_cpu_exists(struct device_node *parent, u32 drc_index)  in dlpar_cpu_exists()  argument
438 if (my_drc_index == drc_index) { in dlpar_cpu_exists()
448 static bool drc_info_valid_index(struct device_node *parent, u32 drc_index) in drc_info_valid_index() argument
475 if (drc_index > drc.last_drc_index) in drc_info_valid_index()
480 if (drc_index == index) in drc_info_valid_index()
490 static bool valid_cpu_drc_index(struct device_node *parent, u32 drc_index) in valid_cpu_drc_index() argument
496 return drc_info_valid_index(parent, drc_index); in valid_cpu_drc_index()
512 if (drc == drc_index) in valid_cpu_drc_index()
540 static ssize_t dlpar_cpu_add(u32 drc_index) in dlpar_cpu_add() argument
545 pr_debug("Attempting to add CPU, drc index: %x\n", drc_index); in dlpar_cpu_add()
553 if (dlpar_cpu_exists(parent, drc_index)) { in dlpar_cpu_add()
555 pr_warn("CPU with drc index %x already exists\n", drc_index); in dlpar_cpu_add()
559 if (!valid_cpu_drc_index(parent, drc_index)) { in dlpar_cpu_add()
561 pr_warn("Cannot find CPU (drc index %x) to add.\n", drc_index); in dlpar_cpu_add()
565 rc = dlpar_acquire_drc(drc_index); in dlpar_cpu_add()
568 rc, drc_index); in dlpar_cpu_add()
573 dn = dlpar_configure_connector(cpu_to_be32(drc_index), parent); in dlpar_cpu_add()
576 drc_index); in dlpar_cpu_add()
577 dlpar_release_drc(drc_index); in dlpar_cpu_add()
590 dn, rc, drc_index); in dlpar_cpu_add()
592 rc = dlpar_release_drc(drc_index); in dlpar_cpu_add()
605 dn, rc, drc_index); in dlpar_cpu_add()
609 dlpar_release_drc(drc_index); in dlpar_cpu_add()
615 drc_index); in dlpar_cpu_add()
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()
679 rc = dlpar_release_drc(drc_index); in dlpar_cpu_remove()
682 drc_index, dn, rc); in dlpar_cpu_remove()
693 rc = dlpar_acquire_drc(drc_index); in dlpar_cpu_remove()
700 pr_debug("Successfully removed CPU, drc index: %x\n", drc_index); in dlpar_cpu_remove()
704 static struct device_node *cpu_drc_index_to_dn(u32 drc_index) in cpu_drc_index_to_dn() argument
715 if (my_index == drc_index) in cpu_drc_index_to_dn()
722 static int dlpar_cpu_remove_by_index(u32 drc_index) in dlpar_cpu_remove_by_index() argument
727 dn = cpu_drc_index_to_dn(drc_index); in dlpar_cpu_remove_by_index()
730 drc_index); in dlpar_cpu_remove_by_index()
734 rc = dlpar_cpu_remove(dn, drc_index); in dlpar_cpu_remove_by_index()
741 u32 drc_index; in dlpar_cpu() local
744 drc_index = hp_elog->_drc_u.drc_index; in dlpar_cpu()
751 rc = dlpar_cpu_remove_by_index(drc_index); in dlpar_cpu()
758 dlpar_unisolate_drc(drc_index); in dlpar_cpu()
765 rc = dlpar_cpu_add(drc_index); in dlpar_cpu()
783 u32 drc_index; in dlpar_cpu_probe() local
786 rc = kstrtou32(buf, 0, &drc_index); in dlpar_cpu_probe()
790 rc = dlpar_cpu_add(drc_index); in dlpar_cpu_probe()
798 u32 drc_index; in dlpar_cpu_release() local
805 rc = of_property_read_u32(dn, "ibm,my-drc-index", &drc_index); in dlpar_cpu_release()
811 rc = dlpar_cpu_remove(dn, drc_index); in dlpar_cpu_release()