diff options
author | Chris Dearman <chris@mips.com> | 2007-09-18 19:58:24 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2008-04-28 12:14:25 -0400 |
commit | 351336929ccf222ae38ff0cb7a8dd5fd5c6236a0 (patch) | |
tree | d9e9253bd30cf011d248ad3b63761a9a725e5cb0 /include/asm-mips/pgtable.h | |
parent | bec5052743ec8ae4c5669918cf9b130bf15709a2 (diff) |
[MIPS] Allow setting of the cache attribute at run time.
Slightly tacky, but there is a precedent in the sparc archirecture code.
Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'include/asm-mips/pgtable.h')
-rw-r--r-- | include/asm-mips/pgtable.h | 51 |
1 files changed, 29 insertions, 22 deletions
diff --git a/include/asm-mips/pgtable.h b/include/asm-mips/pgtable.h index 009b7b14231f..582f56f42f0e 100644 --- a/include/asm-mips/pgtable.h +++ b/include/asm-mips/pgtable.h | |||
@@ -23,15 +23,15 @@ 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_READ | _PAGE_WRITE | \ |
26 | PAGE_CACHABLE_DEFAULT) | 26 | _page_cachable_default) |
27 | #define PAGE_COPY __pgprot(_PAGE_PRESENT | _PAGE_READ | \ | 27 | #define PAGE_COPY __pgprot(_PAGE_PRESENT | _PAGE_READ | \ |
28 | PAGE_CACHABLE_DEFAULT) | 28 | _page_cachable_default) |
29 | #define PAGE_READONLY __pgprot(_PAGE_PRESENT | _PAGE_READ | \ | 29 | #define PAGE_READONLY __pgprot(_PAGE_PRESENT | _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 | _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 | ||
@@ -40,23 +40,30 @@ struct vm_area_struct; | |||
40 | * read. Also, write permissions imply read permissions. This is the closest | 40 | * read. Also, write permissions imply read permissions. This is the closest |
41 | * we can get by reasonable means.. | 41 | * we can get by reasonable means.. |
42 | */ | 42 | */ |
43 | #define __P000 PAGE_NONE | 43 | |
44 | #define __P001 PAGE_READONLY | 44 | /* |
45 | #define __P010 PAGE_COPY | 45 | * Dummy values to fill the table in mmap.c |
46 | #define __P011 PAGE_COPY | 46 | * The real values will be generated at runtime |
47 | #define __P100 PAGE_READONLY | 47 | */ |
48 | #define __P101 PAGE_READONLY | 48 | #define __P000 __pgprot(0) |
49 | #define __P110 PAGE_COPY | 49 | #define __P001 __pgprot(0) |
50 | #define __P111 PAGE_COPY | 50 | #define __P010 __pgprot(0) |
51 | 51 | #define __P011 __pgprot(0) | |
52 | #define __S000 PAGE_NONE | 52 | #define __P100 __pgprot(0) |
53 | #define __S001 PAGE_READONLY | 53 | #define __P101 __pgprot(0) |
54 | #define __S010 PAGE_SHARED | 54 | #define __P110 __pgprot(0) |
55 | #define __S011 PAGE_SHARED | 55 | #define __P111 __pgprot(0) |
56 | #define __S100 PAGE_READONLY | 56 | |
57 | #define __S101 PAGE_READONLY | 57 | #define __S000 __pgprot(0) |
58 | #define __S110 PAGE_SHARED | 58 | #define __S001 __pgprot(0) |
59 | #define __S111 PAGE_SHARED | 59 | #define __S010 __pgprot(0) |
60 | #define __S011 __pgprot(0) | ||
61 | #define __S100 __pgprot(0) | ||
62 | #define __S101 __pgprot(0) | ||
63 | #define __S110 __pgprot(0) | ||
64 | #define __S111 __pgprot(0) | ||
65 | |||
66 | extern unsigned long _page_cachable_default; | ||
60 | 67 | ||
61 | /* | 68 | /* |
62 | * ZERO_PAGE is a global shared page that is always zero; used | 69 | * ZERO_PAGE is a global shared page that is always zero; used |