diff options
author | Nathan Fontenot <nfont@austin.ibm.com> | 2008-07-24 04:31:52 +1000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2008-07-25 15:44:43 +1000 |
commit | 22e1a4dd3f2a9009d1d8896a5e833b6094877008 (patch) | |
tree | a4ca84f39e698a3ddf4b06562a520a288131897d /arch/powerpc/kernel/lparcfg.c | |
parent | a90ab95a9576d35de0d05f9f4fc435edcccafaa9 (diff) | |
download | linux-22e1a4dd3f2a9009d1d8896a5e833b6094877008.tar.gz linux-22e1a4dd3f2a9009d1d8896a5e833b6094877008.tar.bz2 linux-22e1a4dd3f2a9009d1d8896a5e833b6094877008.zip |
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>
Diffstat (limited to 'arch/powerpc/kernel/lparcfg.c')
-rw-r--r-- | arch/powerpc/kernel/lparcfg.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c index 848c3e5a6370..64381a204a58 100644 --- a/arch/powerpc/kernel/lparcfg.c +++ b/arch/powerpc/kernel/lparcfg.c @@ -34,6 +34,7 @@ #include <asm/time.h> #include <asm/prom.h> #include <asm/vdso_datapage.h> +#include <asm/vio.h> #define MODULE_VERS "1.8" #define MODULE_NAME "lparcfg" @@ -527,6 +528,15 @@ static ssize_t update_mpp(u64 *entitlement, u8 *weight) u8 new_weight; ssize_t rc; + if (entitlement) { + /* Check with vio to ensure the new memory entitlement + * can be handled. + */ + rc = vio_cmo_entitlement_update(*entitlement); + if (rc) + return rc; + } + rc = h_get_mpp(&mpp_data); if (rc) return rc; |