summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2009-09-03 08:20:24 -0500
committerTom Rix <Tom.Rix@windriver.com>2009-10-03 09:04:16 -0500
commit176c84efc5760a78deb3f68bd23a987d26b6f099 (patch)
tree3f7f4ad5722d55c7e8b2f33b90ac0195ea3be192 /include
parente568fd99ab26a469646b9ad670443923174919c1 (diff)
ppc/85xx: Add a simple function to search the TLB
Allow us to search the TLB array based on an address. This is useful if we want to change an entry but dont know where it happens to be located. For example, the boot page mapping we use on MP or the flash TLB that we change the WIMGE settings for after we've relocated. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'include')
-rw-r--r--include/asm-ppc/mmu.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/asm-ppc/mmu.h b/include/asm-ppc/mmu.h
index fa92b90c33..eda2959b7d 100644
--- a/include/asm-ppc/mmu.h
+++ b/include/asm-ppc/mmu.h
@@ -387,8 +387,10 @@ extern void print_bats(void);
* FSL Book-E support
*/
-#define MAS0_TLBSEL(x) ((x << 28) & 0x30000000)
-#define MAS0_ESEL(x) ((x << 16) & 0x0FFF0000)
+#define MAS0_TLBSEL_MSK 0x30000000
+#define MAS0_TLBSEL(x) ((x << 28) & MAS0_TLBSEL_MSK)
+#define MAS0_ESEL_MSK 0x0FFF0000
+#define MAS0_ESEL(x) ((x << 16) & MAS0_ESEL_MSK)
#define MAS0_NV(x) ((x) & 0x00000FFF)
#define MAS1_VALID 0x80000000
@@ -474,6 +476,7 @@ extern void set_tlb(u8 tlb, u32 epn, u64 rpn,
extern void disable_tlb(u8 esel);
extern void invalidate_tlb(u8 tlb);
extern void init_tlbs(void);
+extern int find_tlb_idx(void *addr, u8 tlbsel);
extern unsigned int setup_ddr_tlbs(unsigned int memsize_in_meg);