diff options
author | Nathan Fontenot <nfont@austin.ibm.com> | 2008-07-23 14:31:52 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2008-07-25 01:44:43 -0400 |
commit | 22e1a4dd3f2a9009d1d8896a5e833b6094877008 (patch) | |
tree | a4ca84f39e698a3ddf4b06562a520a288131897d /arch/powerpc/kernel | |
parent | a90ab95a9576d35de0d05f9f4fc435edcccafaa9 (diff) |
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')
-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 @@ | |||
34 | #include <asm/time.h> | 34 | #include <asm/time.h> |
35 | #include <asm/prom.h> | 35 | #include <asm/prom.h> |
36 | #include <asm/vdso_datapage.h> | 36 | #include <asm/vdso_datapage.h> |
37 | #include <asm/vio.h> | ||
37 | 38 | ||
38 | #define MODULE_VERS "1.8" | 39 | #define MODULE_VERS "1.8" |
39 | #define MODULE_NAME "lparcfg" | 40 | #define MODULE_NAME "lparcfg" |
@@ -527,6 +528,15 @@ static ssize_t update_mpp(u64 *entitlement, u8 *weight) | |||
527 | u8 new_weight; | 528 | u8 new_weight; |
528 | ssize_t rc; | 529 | ssize_t rc; |
529 | 530 | ||
531 | if (entitlement) { | ||
532 | /* Check with vio to ensure the new memory entitlement | ||
533 | * can be handled. | ||
534 | */ | ||
535 | rc = vio_cmo_entitlement_update(*entitlement); | ||
536 | if (rc) | ||
537 | return rc; | ||
538 | } | ||
539 | |||
530 | rc = h_get_mpp(&mpp_data); | 540 | rc = h_get_mpp(&mpp_data); |
531 | if (rc) | 541 | if (rc) |
532 | return rc; | 542 | return rc; |