diff options
author | Nathan Fontenot <nfont@austin.ibm.com> | 2008-07-23 14:27:30 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2008-07-25 01:44:41 -0400 |
commit | dfc3403f0e5ffb94ee29942f313b87d4061d951b (patch) | |
tree | 8e16a830d4869907f5f3b423dd400c927fcf8e4b /include | |
parent | 11529396ea3190113173f7a15e59a58dbcaa36c8 (diff) |
powerpc/pseries: Add memory entitlement capabilities to /proc/ppc64/lparcfg
Update /proc/ppc64/lparcfg to display Cooperative Memory
Overcommitment statistics as reported by the H_GET_MPP hcall. This
also updates the lparcfg interface to allow setting memory entitlement
and weight.
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 'include')
-rw-r--r-- | include/asm-powerpc/hvcall.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/include/asm-powerpc/hvcall.h b/include/asm-powerpc/hvcall.h index bf6cd7cb996c..46e76456cbbd 100644 --- a/include/asm-powerpc/hvcall.h +++ b/include/asm-powerpc/hvcall.h | |||
@@ -210,7 +210,9 @@ | |||
210 | #define H_JOIN 0x298 | 210 | #define H_JOIN 0x298 |
211 | #define H_VASI_STATE 0x2A4 | 211 | #define H_VASI_STATE 0x2A4 |
212 | #define H_ENABLE_CRQ 0x2B0 | 212 | #define H_ENABLE_CRQ 0x2B0 |
213 | #define MAX_HCALL_OPCODE H_ENABLE_CRQ | 213 | #define H_SET_MPP 0x2D0 |
214 | #define H_GET_MPP 0x2D4 | ||
215 | #define MAX_HCALL_OPCODE H_GET_MPP | ||
214 | 216 | ||
215 | #ifndef __ASSEMBLY__ | 217 | #ifndef __ASSEMBLY__ |
216 | 218 | ||
@@ -270,6 +272,20 @@ struct hcall_stats { | |||
270 | }; | 272 | }; |
271 | #define HCALL_STAT_ARRAY_SIZE ((MAX_HCALL_OPCODE >> 2) + 1) | 273 | #define HCALL_STAT_ARRAY_SIZE ((MAX_HCALL_OPCODE >> 2) + 1) |
272 | 274 | ||
275 | struct hvcall_mpp_data { | ||
276 | unsigned long entitled_mem; | ||
277 | unsigned long mapped_mem; | ||
278 | unsigned short group_num; | ||
279 | unsigned short pool_num; | ||
280 | unsigned char mem_weight; | ||
281 | unsigned char unallocated_mem_weight; | ||
282 | unsigned long unallocated_entitlement; /* value in bytes */ | ||
283 | unsigned long pool_size; | ||
284 | signed long loan_request; | ||
285 | unsigned long backing_mem; | ||
286 | }; | ||
287 | |||
288 | int h_get_mpp(struct hvcall_mpp_data *); | ||
273 | #endif /* __ASSEMBLY__ */ | 289 | #endif /* __ASSEMBLY__ */ |
274 | #endif /* __KERNEL__ */ | 290 | #endif /* __KERNEL__ */ |
275 | #endif /* _ASM_POWERPC_HVCALL_H */ | 291 | #endif /* _ASM_POWERPC_HVCALL_H */ |