aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/mm')
-rw-r--r--arch/powerpc/mm/hash_native_64.c22
-rw-r--r--arch/powerpc/mm/hash_utils_64.c2
-rw-r--r--arch/powerpc/mm/mmu_decl.h4
-rw-r--r--arch/powerpc/mm/ppc_mmu_32.c6
4 files changed, 17 insertions, 17 deletions
diff --git a/arch/powerpc/mm/hash_native_64.c b/arch/powerpc/mm/hash_native_64.c
index bb76814c4a5b..823fa63e6485 100644
--- a/arch/powerpc/mm/hash_native_64.c
+++ b/arch/powerpc/mm/hash_native_64.c
@@ -104,7 +104,7 @@ static inline void tlbie(unsigned long va, int psize, int local)
104 spin_unlock(&native_tlbie_lock); 104 spin_unlock(&native_tlbie_lock);
105} 105}
106 106
107static inline void native_lock_hpte(hpte_t *hptep) 107static inline void native_lock_hpte(struct hash_pte *hptep)
108{ 108{
109 unsigned long *word = &hptep->v; 109 unsigned long *word = &hptep->v;
110 110
@@ -116,7 +116,7 @@ static inline void native_lock_hpte(hpte_t *hptep)
116 } 116 }
117} 117}
118 118
119static inline void native_unlock_hpte(hpte_t *hptep) 119static inline void native_unlock_hpte(struct hash_pte *hptep)
120{ 120{
121 unsigned long *word = &hptep->v; 121 unsigned long *word = &hptep->v;
122 122
@@ -128,7 +128,7 @@ static long native_hpte_insert(unsigned long hpte_group, unsigned long va,
128 unsigned long pa, unsigned long rflags, 128 unsigned long pa, unsigned long rflags,
129 unsigned long vflags, int psize) 129 unsigned long vflags, int psize)
130{ 130{
131 hpte_t *hptep = htab_address + hpte_group; 131 struct hash_pte *hptep = htab_address + hpte_group;
132 unsigned long hpte_v, hpte_r; 132 unsigned long hpte_v, hpte_r;
133 int i; 133 int i;
134 134
@@ -177,7 +177,7 @@ static long native_hpte_insert(unsigned long hpte_group, unsigned long va,
177 177
178static long native_hpte_remove(unsigned long hpte_group) 178static long native_hpte_remove(unsigned long hpte_group)
179{ 179{
180 hpte_t *hptep; 180 struct hash_pte *hptep;
181 int i; 181 int i;
182 int slot_offset; 182 int slot_offset;
183 unsigned long hpte_v; 183 unsigned long hpte_v;
@@ -217,7 +217,7 @@ static long native_hpte_remove(unsigned long hpte_group)
217static long native_hpte_updatepp(unsigned long slot, unsigned long newpp, 217static long native_hpte_updatepp(unsigned long slot, unsigned long newpp,
218 unsigned long va, int psize, int local) 218 unsigned long va, int psize, int local)
219{ 219{
220 hpte_t *hptep = htab_address + slot; 220 struct hash_pte *hptep = htab_address + slot;
221 unsigned long hpte_v, want_v; 221 unsigned long hpte_v, want_v;
222 int ret = 0; 222 int ret = 0;
223 223
@@ -250,7 +250,7 @@ static long native_hpte_updatepp(unsigned long slot, unsigned long newpp,
250 250
251static long native_hpte_find(unsigned long va, int psize) 251static long native_hpte_find(unsigned long va, int psize)
252{ 252{
253 hpte_t *hptep; 253 struct hash_pte *hptep;
254 unsigned long hash; 254 unsigned long hash;
255 unsigned long i, j; 255 unsigned long i, j;
256 long slot; 256 long slot;
@@ -293,7 +293,7 @@ static void native_hpte_updateboltedpp(unsigned long newpp, unsigned long ea,
293{ 293{
294 unsigned long vsid, va; 294 unsigned long vsid, va;
295 long slot; 295 long slot;
296 hpte_t *hptep; 296 struct hash_pte *hptep;
297 297
298 vsid = get_kernel_vsid(ea); 298 vsid = get_kernel_vsid(ea);
299 va = (vsid << 28) | (ea & 0x0fffffff); 299 va = (vsid << 28) | (ea & 0x0fffffff);
@@ -314,7 +314,7 @@ static void native_hpte_updateboltedpp(unsigned long newpp, unsigned long ea,
314static void native_hpte_invalidate(unsigned long slot, unsigned long va, 314static void native_hpte_invalidate(unsigned long slot, unsigned long va,
315 int psize, int local) 315 int psize, int local)
316{ 316{
317 hpte_t *hptep = htab_address + slot; 317 struct hash_pte *hptep = htab_address + slot;
318 unsigned long hpte_v; 318 unsigned long hpte_v;
319 unsigned long want_v; 319 unsigned long want_v;
320 unsigned long flags; 320 unsigned long flags;
@@ -344,7 +344,7 @@ static void native_hpte_invalidate(unsigned long slot, unsigned long va,
344#define LP_BITS 8 344#define LP_BITS 8
345#define LP_MASK(i) ((0xFF >> (i)) << LP_SHIFT) 345#define LP_MASK(i) ((0xFF >> (i)) << LP_SHIFT)
346 346
347static void hpte_decode(hpte_t *hpte, unsigned long slot, 347static void hpte_decode(struct hash_pte *hpte, unsigned long slot,
348 int *psize, unsigned long *va) 348 int *psize, unsigned long *va)
349{ 349{
350 unsigned long hpte_r = hpte->r; 350 unsigned long hpte_r = hpte->r;
@@ -414,7 +414,7 @@ static void hpte_decode(hpte_t *hpte, unsigned long slot,
414static void native_hpte_clear(void) 414static void native_hpte_clear(void)
415{ 415{
416 unsigned long slot, slots, flags; 416 unsigned long slot, slots, flags;
417 hpte_t *hptep = htab_address; 417 struct hash_pte *hptep = htab_address;
418 unsigned long hpte_v, va; 418 unsigned long hpte_v, va;
419 unsigned long pteg_count; 419 unsigned long pteg_count;
420 int psize; 420 int psize;
@@ -461,7 +461,7 @@ static void native_hpte_clear(void)
461static void native_flush_hash_range(unsigned long number, int local) 461static void native_flush_hash_range(unsigned long number, int local)
462{ 462{
463 unsigned long va, hash, index, hidx, shift, slot; 463 unsigned long va, hash, index, hidx, shift, slot;
464 hpte_t *hptep; 464 struct hash_pte *hptep;
465 unsigned long hpte_v; 465 unsigned long hpte_v;
466 unsigned long want_v; 466 unsigned long want_v;
467 unsigned long flags; 467 unsigned long flags;
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
index 4f2f4534a9d8..2ce9491b48d4 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -87,7 +87,7 @@ extern unsigned long dart_tablebase;
87static unsigned long _SDR1; 87static unsigned long _SDR1;
88struct mmu_psize_def mmu_psize_defs[MMU_PAGE_COUNT]; 88struct mmu_psize_def mmu_psize_defs[MMU_PAGE_COUNT];
89 89
90hpte_t *htab_address; 90struct hash_pte *htab_address;
91unsigned long htab_size_bytes; 91unsigned long htab_size_bytes;
92unsigned long htab_hash_mask; 92unsigned long htab_hash_mask;
93int mmu_linear_psize = MMU_PAGE_4K; 93int mmu_linear_psize = MMU_PAGE_4K;
diff --git a/arch/powerpc/mm/mmu_decl.h b/arch/powerpc/mm/mmu_decl.h
index 69cd1c617cdc..c94a64fd3c01 100644
--- a/arch/powerpc/mm/mmu_decl.h
+++ b/arch/powerpc/mm/mmu_decl.h
@@ -39,8 +39,8 @@ extern int __map_without_bats;
39extern unsigned long ioremap_base; 39extern unsigned long ioremap_base;
40extern unsigned int rtas_data, rtas_size; 40extern unsigned int rtas_data, rtas_size;
41 41
42struct _PTE; 42struct hash_pte;
43extern struct _PTE *Hash, *Hash_end; 43extern struct hash_pte *Hash, *Hash_end;
44extern unsigned long Hash_size, Hash_mask; 44extern unsigned long Hash_size, Hash_mask;
45 45
46extern unsigned int num_tlbcam_entries; 46extern unsigned int num_tlbcam_entries;
diff --git a/arch/powerpc/mm/ppc_mmu_32.c b/arch/powerpc/mm/ppc_mmu_32.c
index 142849de50e4..5c45d474cfcc 100644
--- a/arch/powerpc/mm/ppc_mmu_32.c
+++ b/arch/powerpc/mm/ppc_mmu_32.c
@@ -34,12 +34,12 @@
34 34
35#include "mmu_decl.h" 35#include "mmu_decl.h"
36 36
37PTE *Hash, *Hash_end; 37struct hash_pte *Hash, *Hash_end;
38unsigned long Hash_size, Hash_mask; 38unsigned long Hash_size, Hash_mask;
39unsigned long _SDR1; 39unsigned long _SDR1;
40 40
41union ubat { /* BAT register values to be loaded */ 41union ubat { /* BAT register values to be loaded */
42 BAT bat; 42 struct ppc_bat bat;
43 u32 word[2]; 43 u32 word[2];
44} BATS[8][2]; /* 8 pairs of IBAT, DBAT */ 44} BATS[8][2]; /* 8 pairs of IBAT, DBAT */
45 45
@@ -244,7 +244,7 @@ void __init MMU_init_hw(void)
244 cacheable_memzero(Hash, Hash_size); 244 cacheable_memzero(Hash, Hash_size);
245 _SDR1 = __pa(Hash) | SDR1_LOW_BITS; 245 _SDR1 = __pa(Hash) | SDR1_LOW_BITS;
246 246
247 Hash_end = (PTE *) ((unsigned long)Hash + Hash_size); 247 Hash_end = (struct hash_pte *) ((unsigned long)Hash + Hash_size);
248 248
249 printk("Total memory = %ldMB; using %ldkB for hash table (at %p)\n", 249 printk("Total memory = %ldMB; using %ldkB for hash table (at %p)\n",
250 total_memory >> 20, Hash_size >> 10, Hash); 250 total_memory >> 20, Hash_size >> 10, Hash);