aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/book3s_hv_builtin.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kvm/book3s_hv_builtin.c')
-rw-r--r--arch/powerpc/kvm/book3s_hv_builtin.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/powerpc/kvm/book3s_hv_builtin.c b/arch/powerpc/kvm/book3s_hv_builtin.c
index 7315ec6e8177..d43120355eec 100644
--- a/arch/powerpc/kvm/book3s_hv_builtin.c
+++ b/arch/powerpc/kvm/book3s_hv_builtin.c
@@ -55,12 +55,14 @@ static LIST_HEAD(free_rmas);
55static DEFINE_SPINLOCK(rma_lock); 55static DEFINE_SPINLOCK(rma_lock);
56 56
57/* Work out RMLS (real mode limit selector) field value for a given RMA size. 57/* Work out RMLS (real mode limit selector) field value for a given RMA size.
58 Assumes POWER7. */ 58 Assumes POWER7 or PPC970. */
59static inline int lpcr_rmls(unsigned long rma_size) 59static inline int lpcr_rmls(unsigned long rma_size)
60{ 60{
61 switch (rma_size) { 61 switch (rma_size) {
62 case 32ul << 20: /* 32 MB */ 62 case 32ul << 20: /* 32 MB */
63 return 8; 63 if (cpu_has_feature(CPU_FTR_ARCH_206))
64 return 8; /* only supported on POWER7 */
65 return -1;
64 case 64ul << 20: /* 64 MB */ 66 case 64ul << 20: /* 64 MB */
65 return 3; 67 return 3;
66 case 128ul << 20: /* 128 MB */ 68 case 128ul << 20: /* 128 MB */
@@ -90,8 +92,9 @@ void kvm_rma_init(void)
90 void *rma; 92 void *rma;
91 struct page *pg; 93 struct page *pg;
92 94
93 /* Only do this in HV mode */ 95 /* Only do this on PPC970 in HV mode */
94 if (!cpu_has_feature(CPU_FTR_HVMODE)) 96 if (!cpu_has_feature(CPU_FTR_HVMODE) ||
97 !cpu_has_feature(CPU_FTR_ARCH_201))
95 return; 98 return;
96 99
97 if (!kvm_rma_size || !kvm_rma_count) 100 if (!kvm_rma_size || !kvm_rma_count)