Lines Matching +full:used +full:- +full:by +full:- +full:rtas

1 // SPDX-License-Identifier: GPL-2.0-only
3 * pSeries_reconfig.c - support for dynamic reconfiguration (including PCI
26 int err = -ENOMEM; in pSeries_reconfig_add_node()
32 np->full_name = kstrdup(kbasename(path), GFP_KERNEL); in pSeries_reconfig_add_node()
33 if (!np->full_name) in pSeries_reconfig_add_node()
36 np->properties = proplist; in pSeries_reconfig_add_node()
40 np->parent = pseries_of_derive_parent(path); in pSeries_reconfig_add_node()
41 if (IS_ERR(np->parent)) { in pSeries_reconfig_add_node()
42 err = PTR_ERR(np->parent); in pSeries_reconfig_add_node()
52 of_node_put(np->parent); in pSeries_reconfig_add_node()
58 of_node_put(np->parent); in pSeries_reconfig_add_node()
59 kfree(np->full_name); in pSeries_reconfig_add_node()
71 return -EINVAL; in pSeries_reconfig_remove_node()
76 return -EBUSY; in pSeries_reconfig_remove_node()
85 * /proc/powerpc/ofdt - yucky binary interface for adding and removing
87 * in-kernel wrapper for the RTAS ibm,configure-connector call.
94 next = prop->next; in release_prop_list()
95 kfree(prop->name); in release_prop_list()
96 kfree(prop->value); in release_prop_list()
103 * parse_next_property - process the next property from raw input buffer
104 * @buf: input buffer, must be nul-terminated
136 *length = -1; in parse_next_property()
138 if (*length == -1) { in parse_next_property()
176 if (!(new->name = kstrdup(name, GFP_KERNEL))) in new_property()
178 if (!(new->value = kmalloc(length + 1, GFP_KERNEL))) in new_property()
181 memcpy(new->value, value, length); in new_property()
182 *(((char *)new->value) + length) = 0; in new_property()
183 new->length = length; in new_property()
184 new->next = last; in new_property()
188 kfree(new->name); in new_property()
189 kfree(new->value); in new_property()
206 return -EINVAL; in do_add_node()
212 return -EINVAL; in do_add_node()
215 /* rv = build_prop_list(tmp, bufsize - (tmp - buf), &proplist); */ in do_add_node()
222 rv = -ENOMEM; in do_add_node()
228 rv = -EINVAL; in do_add_node()
243 int rv = -ENODEV; in do_remove_node()
283 return -ENODEV; in do_add_property()
286 return -EINVAL; in do_add_property()
290 return -ENOMEM; in do_add_property()
304 return -ENODEV; in do_remove_property()
311 return -EINVAL; in do_remove_property()
327 return -ENODEV; in do_update_property()
331 return -EINVAL; in do_update_property()
334 return -ENODEV; in do_update_property()
338 return -ENOMEM; in do_update_property()
340 if (!strcmp(name, "slb-size") || !strcmp(name, "ibm,slb-size")) in do_update_property()
347 * ofdt_write - perform operations on the Open Firmware device tree
349 * @file: not used
352 * @off: not used
375 rv = -EINVAL; in ofdt_write()
382 rv = do_add_node(tmp, count - (tmp - kbuf)); in ofdt_write()
386 rv = do_add_property(tmp, count - (tmp - kbuf)); in ofdt_write()
388 rv = do_remove_property(tmp, count - (tmp - kbuf)); in ofdt_write()
390 rv = do_update_property(tmp, count - (tmp - kbuf)); in ofdt_write()
392 rv = -EINVAL; in ofdt_write()
403 /* create /proc/powerpc/ofdt write-only by root */