forked from Minki/linux
powerpc/pseries: Add hypercall wrappers for hash page table resizing
This adds the hypercall numbers and wrapper functions for the hash page table resizing hypercalls. These hypercall numbers are defined in the PAPR ACR "HPT resizing option". It also adds a new firmware feature flag to track the presence of the HPT resizing calls. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
parent
de55ce0de9
commit
64b40ffbc8
@ -42,7 +42,7 @@
|
||||
#define FW_FEATURE_SPLPAR ASM_CONST(0x0000000000100000)
|
||||
#define FW_FEATURE_LPAR ASM_CONST(0x0000000000400000)
|
||||
#define FW_FEATURE_PS3_LV1 ASM_CONST(0x0000000000800000)
|
||||
/* Free ASM_CONST(0x0000000001000000) */
|
||||
#define FW_FEATURE_HPT_RESIZE ASM_CONST(0x0000000001000000)
|
||||
#define FW_FEATURE_CMO ASM_CONST(0x0000000002000000)
|
||||
#define FW_FEATURE_VPHN ASM_CONST(0x0000000004000000)
|
||||
#define FW_FEATURE_XCMO ASM_CONST(0x0000000008000000)
|
||||
@ -66,7 +66,8 @@ enum {
|
||||
FW_FEATURE_MULTITCE | FW_FEATURE_SPLPAR | FW_FEATURE_LPAR |
|
||||
FW_FEATURE_CMO | FW_FEATURE_VPHN | FW_FEATURE_XCMO |
|
||||
FW_FEATURE_SET_MODE | FW_FEATURE_BEST_ENERGY |
|
||||
FW_FEATURE_TYPE1_AFFINITY | FW_FEATURE_PRRN,
|
||||
FW_FEATURE_TYPE1_AFFINITY | FW_FEATURE_PRRN |
|
||||
FW_FEATURE_HPT_RESIZE,
|
||||
FW_FEATURE_PSERIES_ALWAYS = 0,
|
||||
FW_FEATURE_POWERNV_POSSIBLE = FW_FEATURE_OPAL,
|
||||
FW_FEATURE_POWERNV_ALWAYS = 0,
|
||||
|
@ -276,6 +276,8 @@
|
||||
#define H_GET_MPP_X 0x314
|
||||
#define H_SET_MODE 0x31C
|
||||
#define H_CLEAR_HPT 0x358
|
||||
#define H_RESIZE_HPT_PREPARE 0x36C
|
||||
#define H_RESIZE_HPT_COMMIT 0x370
|
||||
#define H_SIGNAL_SYS_RESET 0x380
|
||||
#define MAX_HCALL_OPCODE H_SIGNAL_SYS_RESET
|
||||
|
||||
|
@ -210,6 +210,18 @@ static inline long plpar_pte_protect(unsigned long flags, unsigned long ptex,
|
||||
return plpar_hcall_norets(H_PROTECT, flags, ptex, avpn);
|
||||
}
|
||||
|
||||
static inline long plpar_resize_hpt_prepare(unsigned long flags,
|
||||
unsigned long shift)
|
||||
{
|
||||
return plpar_hcall_norets(H_RESIZE_HPT_PREPARE, flags, shift);
|
||||
}
|
||||
|
||||
static inline long plpar_resize_hpt_commit(unsigned long flags,
|
||||
unsigned long shift)
|
||||
{
|
||||
return plpar_hcall_norets(H_RESIZE_HPT_COMMIT, flags, shift);
|
||||
}
|
||||
|
||||
static inline long plpar_tce_get(unsigned long liobn, unsigned long ioba,
|
||||
unsigned long *tce_ret)
|
||||
{
|
||||
|
@ -64,6 +64,7 @@ hypertas_fw_features_table[] = {
|
||||
{FW_FEATURE_VPHN, "hcall-vphn"},
|
||||
{FW_FEATURE_SET_MODE, "hcall-set-mode"},
|
||||
{FW_FEATURE_BEST_ENERGY, "hcall-best-energy-1*"},
|
||||
{FW_FEATURE_HPT_RESIZE, "hcall-hpt-resize"},
|
||||
};
|
||||
|
||||
/* Build up the firmware features bitmask using the contents of
|
||||
|
Loading…
Reference in New Issue
Block a user