diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-02-27 19:19:22 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-02-27 19:19:22 -0500 |
commit | f1dd6ad599732fc89f36fdd65a2c2cf3c63a8711 (patch) | |
tree | 5092207128e47cba99dc0fe373fff6a36f4cb4b8 /arch/mips/mm/cache.c | |
parent | 8d37a371b6869920e6c40c495c68eabba1ef3909 (diff) | |
parent | e10b234b3c4e255d3300a486c4ac15b43253ac6d (diff) |
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (141 commits)
MIPS: Alchemy: defconfig updates
MIPS: Alchemy: Fix Au1100 ethernet build failure
MIPS: Alchemy: Repair db1500/bosporus builds
MIPS: ARC: Cleanup unused definitions from sgialib.h
MIPS: Cobalt: convert legacy port addresses to GT-64111 bus addresses
MIPS: Alchemy: use 36bit addresses for PCMCIA resources.
MIPS: Cobalt: Fix theoretical port aliasing issue
MIPS: Use ALIGN(x, bytes) instead of __ALIGN_MASK(x, bytes - 1)
MIPS: Crazy spinlock speed test.
MIPS: Optimize spinlocks.
MIPS: Alchemy: devboard PM needs to save CPLD registers.
MIPS: PowerTV: Eliminate duplicate opcode definition macros
MIPS: Lemote 2F: Move printks out of port_access_lock.
MIPS: PNX833x: Convert IRQ controller locks to raw spinlocks.
MIPS: Octeon: Replace spinlock with raw_spinlocks in dma-octeon.c.
MIPS: Octeon: Replace rwlocks in irq_chip handlers with raw_spinlocks.
MIPS: Octeon: Convert octeon_irq_msi_lock to raw spinlock.
MIPS: Loongson: Remove pointless sample_lock from oprofile code.
MIPS: SNI: Convert sni_rm200_i8259A_lock to raw spinlock.
MIPS: i8259: Convert IRQ controller lock to raw spinlock.
...
Diffstat (limited to 'arch/mips/mm/cache.c')
-rw-r--r-- | arch/mips/mm/cache.c | 53 |
1 files changed, 37 insertions, 16 deletions
diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c index e716cafc346d..be8627bc5b02 100644 --- a/arch/mips/mm/cache.c +++ b/arch/mips/mm/cache.c | |||
@@ -137,22 +137,43 @@ EXPORT_SYMBOL_GPL(_page_cachable_default); | |||
137 | 137 | ||
138 | static inline void setup_protection_map(void) | 138 | static inline void setup_protection_map(void) |
139 | { | 139 | { |
140 | protection_map[0] = PAGE_NONE; | 140 | if (kernel_uses_smartmips_rixi) { |
141 | protection_map[1] = PAGE_READONLY; | 141 | protection_map[0] = __pgprot(_page_cachable_default | _PAGE_PRESENT | _PAGE_NO_EXEC | _PAGE_NO_READ); |
142 | protection_map[2] = PAGE_COPY; | 142 | protection_map[1] = __pgprot(_page_cachable_default | _PAGE_PRESENT | _PAGE_NO_EXEC); |
143 | protection_map[3] = PAGE_COPY; | 143 | protection_map[2] = __pgprot(_page_cachable_default | _PAGE_PRESENT | _PAGE_NO_EXEC | _PAGE_NO_READ); |
144 | protection_map[4] = PAGE_READONLY; | 144 | protection_map[3] = __pgprot(_page_cachable_default | _PAGE_PRESENT | _PAGE_NO_EXEC); |
145 | protection_map[5] = PAGE_READONLY; | 145 | protection_map[4] = __pgprot(_page_cachable_default | _PAGE_PRESENT | _PAGE_NO_READ); |
146 | protection_map[6] = PAGE_COPY; | 146 | protection_map[5] = __pgprot(_page_cachable_default | _PAGE_PRESENT); |
147 | protection_map[7] = PAGE_COPY; | 147 | protection_map[6] = __pgprot(_page_cachable_default | _PAGE_PRESENT | _PAGE_NO_READ); |
148 | protection_map[8] = PAGE_NONE; | 148 | protection_map[7] = __pgprot(_page_cachable_default | _PAGE_PRESENT); |
149 | protection_map[9] = PAGE_READONLY; | 149 | |
150 | protection_map[10] = PAGE_SHARED; | 150 | protection_map[8] = __pgprot(_page_cachable_default | _PAGE_PRESENT | _PAGE_NO_EXEC | _PAGE_NO_READ); |
151 | protection_map[11] = PAGE_SHARED; | 151 | protection_map[9] = __pgprot(_page_cachable_default | _PAGE_PRESENT | _PAGE_NO_EXEC); |
152 | protection_map[12] = PAGE_READONLY; | 152 | protection_map[10] = __pgprot(_page_cachable_default | _PAGE_PRESENT | _PAGE_NO_EXEC | _PAGE_WRITE | _PAGE_NO_READ); |
153 | protection_map[13] = PAGE_READONLY; | 153 | protection_map[11] = __pgprot(_page_cachable_default | _PAGE_PRESENT | _PAGE_NO_EXEC | _PAGE_WRITE); |
154 | protection_map[14] = PAGE_SHARED; | 154 | protection_map[12] = __pgprot(_page_cachable_default | _PAGE_PRESENT | _PAGE_NO_READ); |
155 | protection_map[15] = PAGE_SHARED; | 155 | protection_map[13] = __pgprot(_page_cachable_default | _PAGE_PRESENT); |
156 | protection_map[14] = __pgprot(_page_cachable_default | _PAGE_PRESENT | _PAGE_WRITE | _PAGE_NO_READ); | ||
157 | protection_map[15] = __pgprot(_page_cachable_default | _PAGE_PRESENT | _PAGE_WRITE); | ||
158 | |||
159 | } else { | ||
160 | protection_map[0] = PAGE_NONE; | ||
161 | protection_map[1] = PAGE_READONLY; | ||
162 | protection_map[2] = PAGE_COPY; | ||
163 | protection_map[3] = PAGE_COPY; | ||
164 | protection_map[4] = PAGE_READONLY; | ||
165 | protection_map[5] = PAGE_READONLY; | ||
166 | protection_map[6] = PAGE_COPY; | ||
167 | protection_map[7] = PAGE_COPY; | ||
168 | protection_map[8] = PAGE_NONE; | ||
169 | protection_map[9] = PAGE_READONLY; | ||
170 | protection_map[10] = PAGE_SHARED; | ||
171 | protection_map[11] = PAGE_SHARED; | ||
172 | protection_map[12] = PAGE_READONLY; | ||
173 | protection_map[13] = PAGE_READONLY; | ||
174 | protection_map[14] = PAGE_SHARED; | ||
175 | protection_map[15] = PAGE_SHARED; | ||
176 | } | ||
156 | } | 177 | } |
157 | 178 | ||
158 | void __cpuinit cpu_cache_init(void) | 179 | void __cpuinit cpu_cache_init(void) |