[PATCH 12/18 v2] powerpc: Verify CMO memory entitlement updates with virtual I/O
Robert Jennings
rcj at linux.vnet.ibm.com
Thu Jun 26 06:18:18 EST 2008
From: Nathan Fontenot <nfont at austin.ibm.com>
Verify memory entitlement updates can be handled by vio.
Signed-off-by: Nathan Fontenot <nfont at austin.ibm.com>
Signed-off-by: Robert Jennings <rcj at linux.vnet.ibm.com>
---
arch/powerpc/kernel/lparcfg.c | 10 ++++++++++
1 file changed, 10 insertions(+)
Index: b/arch/powerpc/kernel/lparcfg.c
===================================================================
--- 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.7"
#define MODULE_NAME "lparcfg"
@@ -528,6 +529,15 @@ static ssize_t update_mpp(u64 *entitleme
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;
More information about the Linuxppc-dev
mailing list