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/include/asm/pgtable.h | |
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/include/asm/pgtable.h')
-rw-r--r-- | arch/mips/include/asm/pgtable.h | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/arch/mips/include/asm/pgtable.h b/arch/mips/include/asm/pgtable.h index 1854336e56a..93598ba0135 100644 --- a/arch/mips/include/asm/pgtable.h +++ b/arch/mips/include/asm/pgtable.h | |||
@@ -22,23 +22,24 @@ struct mm_struct; | |||
22 | struct vm_area_struct; | 22 | struct vm_area_struct; |
23 | 23 | ||
24 | #define PAGE_NONE __pgprot(_PAGE_PRESENT | _CACHE_CACHABLE_NONCOHERENT) | 24 | #define PAGE_NONE __pgprot(_PAGE_PRESENT | _CACHE_CACHABLE_NONCOHERENT) |
25 | #define PAGE_SHARED __pgprot(_PAGE_PRESENT | _PAGE_READ | _PAGE_WRITE | \ | 25 | #define PAGE_SHARED __pgprot(_PAGE_PRESENT | _PAGE_WRITE | (kernel_uses_smartmips_rixi ? 0 : _PAGE_READ) | \ |
26 | _page_cachable_default) | 26 | _page_cachable_default) |
27 | #define PAGE_COPY __pgprot(_PAGE_PRESENT | _PAGE_READ | \ | 27 | #define PAGE_COPY __pgprot(_PAGE_PRESENT | (kernel_uses_smartmips_rixi ? 0 : _PAGE_READ) | \ |
28 | _page_cachable_default) | 28 | (kernel_uses_smartmips_rixi ? _PAGE_NO_EXEC : 0) | _page_cachable_default) |
29 | #define PAGE_READONLY __pgprot(_PAGE_PRESENT | _PAGE_READ | \ | 29 | #define PAGE_READONLY __pgprot(_PAGE_PRESENT | (kernel_uses_smartmips_rixi ? 0 : _PAGE_READ) | \ |
30 | _page_cachable_default) | 30 | _page_cachable_default) |
31 | #define PAGE_KERNEL __pgprot(_PAGE_PRESENT | __READABLE | __WRITEABLE | \ | 31 | #define PAGE_KERNEL __pgprot(_PAGE_PRESENT | __READABLE | __WRITEABLE | \ |
32 | _PAGE_GLOBAL | _page_cachable_default) | 32 | _PAGE_GLOBAL | _page_cachable_default) |
33 | #define PAGE_USERIO __pgprot(_PAGE_PRESENT | _PAGE_READ | _PAGE_WRITE | \ | 33 | #define PAGE_USERIO __pgprot(_PAGE_PRESENT | (kernel_uses_smartmips_rixi ? 0 : _PAGE_READ) | _PAGE_WRITE | \ |
34 | _page_cachable_default) | 34 | _page_cachable_default) |
35 | #define PAGE_KERNEL_UNCACHED __pgprot(_PAGE_PRESENT | __READABLE | \ | 35 | #define PAGE_KERNEL_UNCACHED __pgprot(_PAGE_PRESENT | __READABLE | \ |
36 | __WRITEABLE | _PAGE_GLOBAL | _CACHE_UNCACHED) | 36 | __WRITEABLE | _PAGE_GLOBAL | _CACHE_UNCACHED) |
37 | 37 | ||
38 | /* | 38 | /* |
39 | * MIPS can't do page protection for execute, and considers that the same like | 39 | * If _PAGE_NO_EXEC is not defined, we can't do page protection for |
40 | * read. Also, write permissions imply read permissions. This is the closest | 40 | * execute, and consider it to be the same as read. Also, write |
41 | * we can get by reasonable means.. | 41 | * permissions imply read permissions. This is the closest we can get |
42 | * by reasonable means.. | ||
42 | */ | 43 | */ |
43 | 44 | ||
44 | /* | 45 | /* |
@@ -177,7 +178,7 @@ static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *pt | |||
177 | */ | 178 | */ |
178 | #define set_pmd(pmdptr, pmdval) do { *(pmdptr) = (pmdval); } while(0) | 179 | #define set_pmd(pmdptr, pmdval) do { *(pmdptr) = (pmdval); } while(0) |
179 | 180 | ||
180 | #ifdef CONFIG_64BIT | 181 | #ifndef __PAGETABLE_PMD_FOLDED |
181 | /* | 182 | /* |
182 | * (puds are folded into pgds so this doesn't get actually called, | 183 | * (puds are folded into pgds so this doesn't get actually called, |
183 | * but the define is needed for a generic inline function.) | 184 | * but the define is needed for a generic inline function.) |
@@ -298,8 +299,13 @@ static inline pte_t pte_mkdirty(pte_t pte) | |||
298 | static inline pte_t pte_mkyoung(pte_t pte) | 299 | static inline pte_t pte_mkyoung(pte_t pte) |
299 | { | 300 | { |
300 | pte_val(pte) |= _PAGE_ACCESSED; | 301 | pte_val(pte) |= _PAGE_ACCESSED; |
301 | if (pte_val(pte) & _PAGE_READ) | 302 | if (kernel_uses_smartmips_rixi) { |
302 | pte_val(pte) |= _PAGE_SILENT_READ; | 303 | if (!(pte_val(pte) & _PAGE_NO_READ)) |
304 | pte_val(pte) |= _PAGE_SILENT_READ; | ||
305 | } else { | ||
306 | if (pte_val(pte) & _PAGE_READ) | ||
307 | pte_val(pte) |= _PAGE_SILENT_READ; | ||
308 | } | ||
303 | return pte; | 309 | return pte; |
304 | } | 310 | } |
305 | 311 | ||