dlpar.c (cecdd52a3dd312564f81a39df08378b7b39a2654) dlpar.c (75a2d4226b53710380d1017b3f4c88f937ddba78)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Support for dynamic reconfiguration for PCI, Memory, and CPU
4 * Hotplug and Dynamic Logical Partitioning on RPA platforms.
5 *
6 * Copyright (C) 2009 Nathan Fontenot
7 * Copyright (C) 2009 IBM Corporation
8 */

--- 498 unchanged lines hidden (view full) ---

507 } else {
508 pr_err("Invalid id_type specified.\n");
509 return -EINVAL;
510 }
511
512 return 0;
513}
514
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Support for dynamic reconfiguration for PCI, Memory, and CPU
4 * Hotplug and Dynamic Logical Partitioning on RPA platforms.
5 *
6 * Copyright (C) 2009 Nathan Fontenot
7 * Copyright (C) 2009 IBM Corporation
8 */

--- 498 unchanged lines hidden (view full) ---

507 } else {
508 pr_err("Invalid id_type specified.\n");
509 return -EINVAL;
510 }
511
512 return 0;
513}
514
515static ssize_t dlpar_store(struct class *class, struct class_attribute *attr,
515static ssize_t dlpar_store(const struct class *class, const struct class_attribute *attr,
516 const char *buf, size_t count)
517{
518 struct pseries_hp_errorlog hp_elog;
519 char *argbuf;
520 char *args;
521 int rc;
522
523 args = argbuf = kstrdup(buf, GFP_KERNEL);

--- 22 unchanged lines hidden (view full) ---

546 kfree(argbuf);
547
548 if (rc)
549 pr_err("Could not handle DLPAR request \"%s\"\n", buf);
550
551 return rc ? rc : count;
552}
553
516 const char *buf, size_t count)
517{
518 struct pseries_hp_errorlog hp_elog;
519 char *argbuf;
520 char *args;
521 int rc;
522
523 args = argbuf = kstrdup(buf, GFP_KERNEL);

--- 22 unchanged lines hidden (view full) ---

546 kfree(argbuf);
547
548 if (rc)
549 pr_err("Could not handle DLPAR request \"%s\"\n", buf);
550
551 return rc ? rc : count;
552}
553
554static ssize_t dlpar_show(struct class *class, struct class_attribute *attr,
554static ssize_t dlpar_show(const struct class *class, const struct class_attribute *attr,
555 char *buf)
556{
557 return sprintf(buf, "%s\n", "memory,cpu");
558}
559
560static CLASS_ATTR_RW(dlpar);
561
562int __init dlpar_workqueue_init(void)

--- 22 unchanged lines hidden ---
555 char *buf)
556{
557 return sprintf(buf, "%s\n", "memory,cpu");
558}
559
560static CLASS_ATTR_RW(dlpar);
561
562int __init dlpar_workqueue_init(void)

--- 22 unchanged lines hidden ---