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

powerpc/pseries: Verify CMO memory entitlement updates with virtual I/O

Verify memory entitlement updates can be handled by vio.

Signed-off-by: Nathan Fontenot <nfont@austin.ibm.com>
Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>
Acked-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

authored by

Nathan Fontenot and committed by
Benjamin Herrenschmidt
22e1a4dd a90ab95a

+10
+10
arch/powerpc/kernel/lparcfg.c
··· 34 34 #include <asm/time.h> 35 35 #include <asm/prom.h> 36 36 #include <asm/vdso_datapage.h> 37 + #include <asm/vio.h> 37 38 38 39 #define MODULE_VERS "1.8" 39 40 #define MODULE_NAME "lparcfg" ··· 527 526 u64 new_entitled; 528 527 u8 new_weight; 529 528 ssize_t rc; 529 + 530 + if (entitlement) { 531 + /* Check with vio to ensure the new memory entitlement 532 + * can be handled. 533 + */ 534 + rc = vio_cmo_entitlement_update(*entitlement); 535 + if (rc) 536 + return rc; 537 + } 530 538 531 539 rc = h_get_mpp(&mpp_data); 532 540 if (rc)