summaryrefslogtreecommitdiff
path: root/include/asm-ppc
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-ppc')
-rw-r--r--include/asm-ppc/bitops.h2
-rw-r--r--include/asm-ppc/mmu.h25
-rw-r--r--include/asm-ppc/processor.h2
3 files changed, 18 insertions, 11 deletions
diff --git a/include/asm-ppc/bitops.h b/include/asm-ppc/bitops.h
index daa66cf..adaf091 100644
--- a/include/asm-ppc/bitops.h
+++ b/include/asm-ppc/bitops.h
@@ -178,6 +178,7 @@ static __inline__ int fls(unsigned int x)
{
return __ilog2(x) + 1;
}
+#define PLATFORM_FLS
/**
* fls64 - find last set bit in a 64-bit word
@@ -230,6 +231,7 @@ extern __inline__ int ffs(int x)
{
return __ilog2(x & -x) + 1;
}
+#define PLATFORM_FFS
/*
* hweightN: returns the hamming weight (i.e. the number
diff --git a/include/asm-ppc/mmu.h b/include/asm-ppc/mmu.h
index eda2959..a019d0b 100644
--- a/include/asm-ppc/mmu.h
+++ b/include/asm-ppc/mmu.h
@@ -450,6 +450,8 @@ extern void print_bats(void);
(((epn) & MAS3_RPN) | (wimge))
#define FSL_BOOKE_MAS3(rpn, user, perms) \
(((rpn) & MAS3_RPN) | (user) | (perms))
+#define FSL_BOOKE_MAS7(rpn) \
+ (((u64)(rpn)) >> 32)
#define BOOKE_PAGESZ_1K 0
#define BOOKE_PAGESZ_4K 1
@@ -480,20 +482,21 @@ extern int find_tlb_idx(void *addr, u8 tlbsel);
extern unsigned int setup_ddr_tlbs(unsigned int memsize_in_meg);
+extern void write_tlb(u32 _mas0, u32 _mas1, u32 _mas2, u32 _mas3, u32 _mas7);
+
#define SET_TLB_ENTRY(_tlb, _epn, _rpn, _perms, _wimge, _ts, _esel, _sz, _iprot) \
- { .tlb = _tlb, .epn = _epn, .rpn = _rpn, .perms = _perms, \
- .wimge = _wimge, .ts = _ts, .esel = _esel, .tsize = _sz, .iprot = _iprot }
+ { .mas0 = FSL_BOOKE_MAS0(_tlb, _esel, 0), \
+ .mas1 = FSL_BOOKE_MAS1(1, _iprot, 0, _ts, _sz), \
+ .mas2 = FSL_BOOKE_MAS2(_epn, _wimge), \
+ .mas3 = FSL_BOOKE_MAS3(_rpn, 0, _perms), \
+ .mas7 = FSL_BOOKE_MAS7(_rpn), }
struct fsl_e_tlb_entry {
- u8 tlb;
- u32 epn;
- u64 rpn;
- u8 perms;
- u8 wimge;
- u8 ts;
- u8 esel;
- u8 tsize;
- u8 iprot;
+ u32 mas0;
+ u32 mas1;
+ u32 mas2;
+ u32 mas3;
+ u32 mas7;
};
extern struct fsl_e_tlb_entry tlb_table[];
diff --git a/include/asm-ppc/processor.h b/include/asm-ppc/processor.h
index 0a4c66c..3764a5a 100644
--- a/include/asm-ppc/processor.h
+++ b/include/asm-ppc/processor.h
@@ -518,6 +518,7 @@
#define SPRN_MAS5 0x275 /* MMU Assist Register 5 */
#define SPRN_MAS6 0x276 /* MMU Assist Register 6 */
#define SPRN_MAS7 0x3B0 /* MMU Assist Register 7 */
+#define SPRN_MAS8 0x155 /* MMU Assist Register 8 */
#define SPRN_IVOR32 0x210 /* Interrupt Vector Offset Register 32 */
#define SPRN_IVOR33 0x211 /* Interrupt Vector Offset Register 33 */
@@ -720,6 +721,7 @@
#define MAS5 SPRN_MAS5
#define MAS6 SPRN_MAS6
#define MAS7 SPRN_MAS7
+#define MAS8 SPRN_MAS8
#if defined(CONFIG_4xx) || defined(CONFIG_44x) || defined(CONFIG_MPC85xx)
#define DAR_DEAR DEAR