Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Nathan Fontenot and committed by
Michael Ellerman
e9d764f8 90edf184

+6
+6
arch/powerpc/platforms/pseries/dlpar.c
··· 356 356 case PSERIES_HP_ELOG_RESOURCE_MEM: 357 357 rc = dlpar_memory(hp_elog); 358 358 break; 359 + case PSERIES_HP_ELOG_RESOURCE_CPU: 360 + rc = dlpar_cpu(hp_elog); 361 + break; 359 362 default: 360 363 pr_warn_ratelimited("Invalid resource (%d) specified\n", 361 364 hp_elog->resource); ··· 388 385 if (!strncmp(arg, "memory", 6)) { 389 386 hp_elog->resource = PSERIES_HP_ELOG_RESOURCE_MEM; 390 387 arg += strlen("memory "); 388 + } else if (!strncmp(arg, "cpu", 3)) { 389 + hp_elog->resource = PSERIES_HP_ELOG_RESOURCE_CPU; 390 + arg += strlen("cpu "); 391 391 } else { 392 392 pr_err("Invalid resource specified: \"%s\"\n", buf); 393 393 rc = -EINVAL;