Skip to content

Commit

Permalink
powerpc/pseries: Verify CMO memory entitlement updates with virtual I/O
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nathan Fontenot authored and Benjamin Herrenschmidt committed Jul 25, 2008
1 parent a90ab95 commit 22e1a4d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions arch/powerpc/kernel/lparcfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 22e1a4d

Please sign in to comment.