Skip to content

Commit e9d764f

Browse files
nfontmpe
authored andcommitted
powerpc/pseries: Enable kernel CPU dlpar from sysfs
Enable new kernel cpu hotplug functionality by allowing cpu dlpar requests to be initiated from sysfs. Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
1 parent 90edf18 commit e9d764f

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

  • arch/powerpc/platforms/pseries

‎arch/powerpc/platforms/pseries/dlpar.c‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,9 @@ static int handle_dlpar_errorlog(struct pseries_hp_errorlog *hp_elog)
356356
case PSERIES_HP_ELOG_RESOURCE_MEM:
357357
rc = dlpar_memory(hp_elog);
358358
break;
359+
case PSERIES_HP_ELOG_RESOURCE_CPU:
360+
rc = dlpar_cpu(hp_elog);
361+
break;
359362
default:
360363
pr_warn_ratelimited("Invalid resource (%d) specified\n",
361364
hp_elog->resource);
@@ -385,6 +388,9 @@ static ssize_t dlpar_store(struct class *class, struct class_attribute *attr,
385388
if (!strncmp(arg, "memory", 6)) {
386389
hp_elog->resource = PSERIES_HP_ELOG_RESOURCE_MEM;
387390
arg += strlen("memory ");
391+
} else if (!strncmp(arg, "cpu", 3)) {
392+
hp_elog->resource = PSERIES_HP_ELOG_RESOURCE_CPU;
393+
arg += strlen("cpu ");
388394
} else {
389395
pr_err("Invalid resource specified: \"%s\"\n", buf);
390396
rc = -EINVAL;

0 commit comments

Comments
 (0)