Lines Matching +full:my +full:- +full:drc +full:- +full:index

1 // SPDX-License-Identifier: GPL-2.0
7 #define pr_fmt(fmt) "pseries-pmem: " fmt
34 pr_debug("Attempting to add pmem node, drc index: %x\n", drc_index); in pmem_drc_add_node()
38 pr_err("Failed to acquire DRC, rc: %d, drc index: %x\n", in pmem_drc_add_node()
40 return -EINVAL; in pmem_drc_add_node()
45 pr_err("configure-connector failed for drc %x\n", drc_index); in pmem_drc_add_node()
47 return -EINVAL; in pmem_drc_add_node()
53 pr_err("Failed to attach node %pOF, rc: %d, drc index: %x\n", in pmem_drc_add_node()
62 pr_info("Successfully added %pOF, drc index: %x\n", dn, drc_index); in pmem_drc_add_node()
70 uint32_t index; in pmem_drc_remove_node() local
74 if (of_property_read_u32(dn, "ibm,my-drc-index", &index)) in pmem_drc_remove_node()
76 if (index == drc_index) in pmem_drc_remove_node()
81 pr_err("Attempting to remove unused DRC index %x\n", drc_index); in pmem_drc_remove_node()
82 return -ENODEV; in pmem_drc_remove_node()
85 pr_debug("Attempting to remove %pOF, drc index: %x\n", dn, drc_index); in pmem_drc_remove_node()
87 /* * NB: tears down the ibm,pmemory device as a side-effect */ in pmem_drc_remove_node()
94 pr_err("Failed to release drc (%x) for CPU %pOFn, rc: %d\n", in pmem_drc_remove_node()
100 pr_info("Successfully removed PMEM with drc index: %x\n", drc_index); in pmem_drc_remove_node()
112 pmem_node = of_find_node_by_type(NULL, "ibm,persistent-memory"); in dlpar_hp_pmem()
115 return -ENODEV; in dlpar_hp_pmem()
118 if (hp_elog->id_type != PSERIES_HP_ELOG_ID_DRC_INDEX) { in dlpar_hp_pmem()
120 hp_elog->id_type); in dlpar_hp_pmem()
121 return -EINVAL; in dlpar_hp_pmem()
124 drc_index = be32_to_cpu(hp_elog->_drc_u.drc_index); in dlpar_hp_pmem()
128 if (hp_elog->action == PSERIES_HP_ELOG_ACTION_ADD) { in dlpar_hp_pmem()
130 } else if (hp_elog->action == PSERIES_HP_ELOG_ACTION_REMOVE) { in dlpar_hp_pmem()
133 pr_err("Unsupported hotplug action (%d)\n", hp_elog->action); in dlpar_hp_pmem()
134 rc = -EINVAL; in dlpar_hp_pmem()
142 { .type = "ibm,persistent-memory", },
154 pmem_node = of_find_node_by_type(NULL, "ibm,persistent-memory"); in pseries_pmem_init()
161 * reconfig notifier to handle the hot-add/remove cases too. in pseries_pmem_init()