1 --- a/arch/mips/include/asm/r4kcache.h 2008-12-03 14:06:48.000000000 +0100
2 +++ b/arch/mips/include/asm/r4kcache.h 2008-12-05 08:16:03.000000000 +0100
5 #include <asm/paccess.h>
6 #include <linux/ssb/ssb.h>
7 -#define BCM4710_DUMMY_RREG() ((void) *((u8 *) KSEG1ADDR(SSB_ENUM_BASE + SSB_IMSTATE)))
8 +#define BCM4710_DUMMY_RREG() bcm4710_dummy_rreg()
10 +static inline unsigned long bcm4710_dummy_rreg(void) {
11 + return (*(volatile unsigned long *)(KSEG1ADDR(SSB_ENUM_BASE + SSB_IMSTATE)));
14 +#define BCM4710_FILL_TLB(addr) bcm4710_fill_tlb((void*)(addr))
16 +static inline unsigned long bcm4710_fill_tlb(void *addr) {
17 + return (*(unsigned long *)addr);
20 +#define BCM4710_PROTECTED_FILL_TLB(addr) bcm4710_protected_fill_tlb((void*)(addr))
22 +static inline void bcm4710_protected_fill_tlb(void *addr) {
24 + get_dbe(x, (unsigned long *)addr);;
27 -#define BCM4710_FILL_TLB(addr) (*(volatile unsigned long *)(addr))
28 -#define BCM4710_PROTECTED_FILL_TLB(addr) ({ unsigned long x; get_dbe(x, (volatile unsigned long *)(addr)); })
30 #define BCM4710_DUMMY_RREG()
32 --- a/arch/mips/mm/tlbex.c 2008-12-03 17:39:32.000000000 +0100
33 +++ b/arch/mips/mm/tlbex.c 2008-12-03 17:11:43.000000000 +0100
36 uasm_i_addu(p, ptr, tmp, ptr);
38 +#ifdef CONFIG_BCM47XX
41 UASM_i_LA_mostly(p, ptr, pgdc);
43 uasm_i_mfc0(p, tmp, C0_BADVADDR); /* get faulting address */
45 /* No need for uasm_i_nop */
48 -#ifdef CONFIG_BCM47XX
52 build_get_pmde64(&p, &l, &r, K0, K1); /* get pmd in K1 */
54 +# ifdef CONFIG_BCM47XX
57 build_get_pgde32(&p, K0, K1); /* get pgd in K1 */
61 build_update_entries(&p, K0, K1);
62 build_tlb_write_entry(&p, &l, &r, tlb_random);
64 +#ifdef CONFIG_BCM47XX
67 uasm_i_eret(&p); /* return from trap */
70 @@ -1087,12 +1093,12 @@
71 struct uasm_reloc **r, unsigned int pte,
74 -#ifdef CONFIG_BCM47XX
78 build_get_pmde64(p, l, r, pte, ptr); /* get pmd in ptr */
80 +# ifdef CONFIG_BCM47XX
83 build_get_pgde32(p, pte, ptr); /* get pgd in ptr */
87 build_update_entries(p, tmp, ptr);
88 build_tlb_write_entry(p, l, r, tlb_indexed);
90 +#ifdef CONFIG_BCM47XX
93 uasm_i_eret(p); /* return from trap */
96 --- a/arch/mips/kernel/genex.S 2008-11-16 15:33:32.000000000 +0100
97 +++ b/arch/mips/kernel/genex.S 2008-12-05 07:14:52.000000000 +0100
100 #include <asm/page.h>
102 +#ifdef CONFIG_BCM47XX
115 #define PANIC_PIC(msg) \
120 #ifdef CONFIG_BCM47XX
124 #if R5432_CP0_INTERRUPT_WAR
130 +#ifdef CONFIG_BCM47XX