Lines Matching +full:used +full:- +full:by +full:- +full:rtas
1 // SPDX-License-Identifier: GPL-2.0+
19 #include <asm/rtas.h>
22 /* free up the memory used by a slot */
25 of_node_put(slot->dn); in dealloc_slot_struct()
26 kfree(slot->name); in dealloc_slot_struct()
38 slot->name = kstrdup(drc_name, GFP_KERNEL); in alloc_slot_struct()
39 if (!slot->name) in alloc_slot_struct()
41 slot->dn = of_node_get(dn); in alloc_slot_struct()
42 slot->index = drc_index; in alloc_slot_struct()
43 slot->power_domain = power_domain; in alloc_slot_struct()
44 slot->hotplug_slot.ops = &rpaphp_hotplug_slot_ops; in alloc_slot_struct()
59 if (!strcmp(tmp_slot->name, slot->name)) in is_registered()
68 struct hotplug_slot *php_slot = &slot->hotplug_slot; in rpaphp_deregister_slot()
70 dbg("%s - Entry: deregistering slot=%s\n", in rpaphp_deregister_slot()
71 __func__, slot->name); in rpaphp_deregister_slot()
73 list_del(&slot->rpaphp_slot_list); in rpaphp_deregister_slot()
77 dbg("%s - Exit: rc[%d]\n", __func__, retval); in rpaphp_deregister_slot()
84 struct hotplug_slot *php_slot = &slot->hotplug_slot; in rpaphp_register_slot()
88 int slotno = -1; in rpaphp_register_slot()
91 __func__, slot->dn, slot->index, slot->name, in rpaphp_register_slot()
92 slot->power_domain, slot->type); in rpaphp_register_slot()
96 err("rpaphp_register_slot: slot[%s] is already registered\n", slot->name); in rpaphp_register_slot()
97 return -EAGAIN; in rpaphp_register_slot()
100 for_each_child_of_node(slot->dn, child) { in rpaphp_register_slot()
101 retval = of_property_read_u32(child, "ibm,my-drc-index", &my_index); in rpaphp_register_slot()
102 if (my_index == slot->index) { in rpaphp_register_slot()
103 slotno = PCI_SLOT(PCI_DN(child)->devfn); in rpaphp_register_slot()
109 retval = pci_hp_register(php_slot, slot->bus, slotno, slot->name); in rpaphp_register_slot()
116 list_add(&slot->rpaphp_slot_list, &rpaphp_slot_head); in rpaphp_register_slot()
117 info("Slot [%s] registered\n", slot->name); in rpaphp_register_slot()