aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/ppc_mmu_32.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/mm/ppc_mmu_32.c')
-rw-r--r--arch/powerpc/mm/ppc_mmu_32.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/arch/powerpc/mm/ppc_mmu_32.c b/arch/powerpc/mm/ppc_mmu_32.c
index ed7fcfe5fd37..2ed43a493b31 100644
--- a/arch/powerpc/mm/ppc_mmu_32.c
+++ b/arch/powerpc/mm/ppc_mmu_32.c
@@ -42,18 +42,14 @@ unsigned long _SDR1;
42 42
43union ubat { /* BAT register values to be loaded */ 43union ubat { /* BAT register values to be loaded */
44 BAT bat; 44 BAT bat;
45#ifdef CONFIG_PPC64BRIDGE
46 u64 word[2];
47#else
48 u32 word[2]; 45 u32 word[2];
49#endif 46} BATS[8][2]; /* 8 pairs of IBAT, DBAT */
50} BATS[4][2]; /* 4 pairs of IBAT, DBAT */
51 47
52struct batrange { /* stores address ranges mapped by BATs */ 48struct batrange { /* stores address ranges mapped by BATs */
53 unsigned long start; 49 unsigned long start;
54 unsigned long limit; 50 unsigned long limit;
55 unsigned long phys; 51 unsigned long phys;
56} bat_addrs[4]; 52} bat_addrs[8];
57 53
58/* 54/*
59 * Return PA for this VA if it is mapped by a BAT, or 0 55 * Return PA for this VA if it is mapped by a BAT, or 0
@@ -190,7 +186,7 @@ void hash_preload(struct mm_struct *mm, unsigned long ea,
190 return; 186 return;
191 pmd = pmd_offset(pgd_offset(mm, ea), ea); 187 pmd = pmd_offset(pgd_offset(mm, ea), ea);
192 if (!pmd_none(*pmd)) 188 if (!pmd_none(*pmd))
193 add_hash_page(mm->context, ea, pmd_val(*pmd)); 189 add_hash_page(mm->context.id, ea, pmd_val(*pmd));
194} 190}
195 191
196/* 192/*
@@ -220,15 +216,9 @@ void __init MMU_init_hw(void)
220 216
221 if ( ppc_md.progress ) ppc_md.progress("hash:enter", 0x105); 217 if ( ppc_md.progress ) ppc_md.progress("hash:enter", 0x105);
222 218
223#ifdef CONFIG_PPC64BRIDGE
224#define LG_HPTEG_SIZE 7 /* 128 bytes per HPTEG */
225#define SDR1_LOW_BITS (lg_n_hpteg - 11)
226#define MIN_N_HPTEG 2048 /* min 256kB hash table */
227#else
228#define LG_HPTEG_SIZE 6 /* 64 bytes per HPTEG */ 219#define LG_HPTEG_SIZE 6 /* 64 bytes per HPTEG */
229#define SDR1_LOW_BITS ((n_hpteg - 1) >> 10) 220#define SDR1_LOW_BITS ((n_hpteg - 1) >> 10)
230#define MIN_N_HPTEG 1024 /* min 64kB hash table */ 221#define MIN_N_HPTEG 1024 /* min 64kB hash table */
231#endif
232 222
233 /* 223 /*
234 * Allow 1 HPTE (1/8 HPTEG) for each page of memory. 224 * Allow 1 HPTE (1/8 HPTEG) for each page of memory.