[PATCH 12/18 v2] powerpc: Verify CMO memory entitlement updates with virtual I/O
From: Robert Jennings <hidden>
Date: 2008-06-25 20:18:29
=46rom: Nathan Fontenot [off-list ref] Verify memory entitlement updates can be handled by vio. Signed-off-by: Nathan Fontenot <redacted> Signed-off-by: Robert Jennings <redacted> --- arch/powerpc/kernel/lparcfg.c | 10 ++++++++++ 1 file changed, 10 insertions(+) Index: b/arch/powerpc/kernel/lparcfg.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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>
=20 #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;
=20
+ if (entitlement) {
+ /* Check with vio to ensure the new memory entitlement
+ * can be handled.
+ */
+ rc =3D vio_cmo_entitlement_update(*entitlement);
+ if (rc)
+ return rc;
+ }
+
rc =3D h_get_mpp(&mpp_data);
if (rc)
return rc;