1 Index: linux-2.6.23.17/arch/mips/Kconfig
2 ===================================================================
3 --- linux-2.6.23.17.orig/arch/mips/Kconfig
4 +++ linux-2.6.23.17/arch/mips/Kconfig
5 @@ -15,6 +15,22 @@ choice
10 + bool "Texas Instruments AR7"
12 + select DMA_NONCOHERENT
14 + select NO_EXCEPT_FILL
15 + select SWAP_IO_SPACE
16 + select SYS_HAS_CPU_MIPS32_R1
17 + select SYS_HAS_EARLY_PRINTK
18 + select SYS_SUPPORTS_32BIT_KERNEL
19 + select SYS_SUPPORTS_KGDB
20 + select SYS_SUPPORTS_LITTLE_ENDIAN
21 + select SYS_SUPPORTS_BIG_ENDIAN
23 + select GENERIC_HARDIRQS_NO__DO_IRQ
26 bool "Alchemy processor based machines"
28 Index: linux-2.6.23.17/arch/mips/kernel/traps.c
29 ===================================================================
30 --- linux-2.6.23.17.orig/arch/mips/kernel/traps.c
31 +++ linux-2.6.23.17/arch/mips/kernel/traps.c
32 @@ -1075,10 +1075,23 @@ void *set_except_vector(int n, void *add
34 exception_handlers[n] = handler;
35 if (n == 0 && cpu_has_divec) {
36 - *(volatile u32 *)(ebase + 0x200) = 0x08000000 |
37 - (0x03ffffff & (handler >> 2));
38 - flush_icache_range(ebase + 0x200, ebase + 0x204);
40 + if ((handler ^ (ebase + 4)) & 0xfc000000) {
41 + /* lui k0, 0x0000 */
42 + *(u32 *)(ebase + 0x200) = 0x3c1a0000 | (handler >> 16);
43 + /* ori k0, 0x0000 */
44 + *(u32 *)(ebase + 0x204) =
45 + 0x375a0000 | (handler & 0xffff);
47 + *(u32 *)(ebase + 0x208) = 0x03400008;
49 + *(u32 *)(ebase + 0x20C) = 0x00000000;
50 + flush_icache_range(ebase + 0x200, ebase + 0x210);
52 + *(volatile u32 *)(ebase + 0x200) =
53 + 0x08000000 | (0x03ffffff & (handler >> 2));
54 + flush_icache_range(ebase + 0x200, ebase + 0x204);
57 return (void *)old_handler;
60 Index: linux-2.6.23.17/arch/mips/Makefile
61 ===================================================================
62 --- linux-2.6.23.17.orig/arch/mips/Makefile
63 +++ linux-2.6.23.17/arch/mips/Makefile
64 @@ -161,6 +161,13 @@ libs-$(CONFIG_SIBYTE_CFE) += arch/mips/s
68 +# Texas Instruments AR7
70 +core-$(CONFIG_AR7) += arch/mips/ar7/
71 +cflags-$(CONFIG_AR7) += -Iinclude/asm-mips/ar7
72 +load-$(CONFIG_AR7) += 0xffffffff94100000
75 # Acer PICA 61, Mips Magnum 4000 and Olivetti M700.
77 core-$(CONFIG_MACH_JAZZ) += arch/mips/jazz/
78 Index: linux-2.6.23.17/include/asm-mips/page.h
79 ===================================================================
80 --- linux-2.6.23.17.orig/include/asm-mips/page.h
81 +++ linux-2.6.23.17/include/asm-mips/page.h
82 @@ -184,8 +184,10 @@ typedef struct { unsigned long pgprot; }
83 #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
84 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
86 -#define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + UNCAC_BASE)
87 -#define CAC_ADDR(addr) ((addr) - UNCAC_BASE + PAGE_OFFSET)
88 +#define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + UNCAC_BASE + \
90 +#define CAC_ADDR(addr) ((addr) - UNCAC_BASE + PAGE_OFFSET - \
93 #include <asm-generic/memory_model.h>
94 #include <asm-generic/page.h>