diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-09-06 16:07:45 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-10-01 11:41:00 -0400 |
commit | 639b0ae7f5bcd645862a9c3ea2d4321475c71d7a (patch) | |
tree | 34e26970f8c907c9027037fc9ae5a9ab7cd2d1a2 /arch/arm/mm/proc-macros.S | |
parent | 9e8b5199a753a2583a8ef8360e6428304a242283 (diff) |
[ARM] Convert ARMv6 and ARMv7 to use new memory types
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm/proc-macros.S')
-rw-r--r-- | arch/arm/mm/proc-macros.S | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/arch/arm/mm/proc-macros.S b/arch/arm/mm/proc-macros.S index d1be25313d7b..64e593020857 100644 --- a/arch/arm/mm/proc-macros.S +++ b/arch/arm/mm/proc-macros.S | |||
@@ -104,14 +104,38 @@ | |||
104 | * 11x0 0 1 0 r/w r/o | 104 | * 11x0 0 1 0 r/w r/o |
105 | * 1111 0 1 1 r/w r/w | 105 | * 1111 0 1 1 r/w r/w |
106 | */ | 106 | */ |
107 | .macro armv6_set_pte_ext | 107 | .macro armv6_mt_table pfx |
108 | \pfx\()_mt_table: | ||
109 | .long 0x00 @ L_PTE_MT_UNCACHED | ||
110 | .long PTE_EXT_TEX(1) @ L_PTE_MT_BUFFERABLE | ||
111 | .long PTE_CACHEABLE @ L_PTE_MT_WRITETHROUGH | ||
112 | .long PTE_CACHEABLE | PTE_BUFFERABLE @ L_PTE_MT_WRITEBACK | ||
113 | .long PTE_BUFFERABLE @ L_PTE_MT_DEV_SHARED | ||
114 | .long 0x00 @ unused | ||
115 | .long 0x00 @ L_PTE_MT_MINICACHE (not present) | ||
116 | .long PTE_EXT_TEX(1) | PTE_CACHEABLE | PTE_BUFFERABLE @ L_PTE_MT_WRITEALLOC | ||
117 | .long 0x00 @ unused | ||
118 | .long PTE_EXT_TEX(1) @ L_PTE_MT_DEV_WC | ||
119 | .long 0x00 @ unused | ||
120 | .long PTE_CACHEABLE | PTE_BUFFERABLE @ L_PTE_MT_DEV_CACHED | ||
121 | .long PTE_EXT_TEX(2) @ L_PTE_MT_DEV_NONSHARED | ||
122 | .long 0x00 @ L_PTE_MT_DEV_IXP2000 | ||
123 | .long 0x00 @ unused | ||
124 | .long 0x00 @ unused | ||
125 | .endm | ||
126 | |||
127 | .macro armv6_set_pte_ext pfx | ||
108 | str r1, [r0], #-2048 @ linux version | 128 | str r1, [r0], #-2048 @ linux version |
109 | 129 | ||
110 | bic r3, r1, #0x000003f0 | 130 | bic r3, r1, #0x000003fc |
111 | bic r3, r3, #PTE_TYPE_MASK | 131 | bic r3, r3, #PTE_TYPE_MASK |
112 | orr r3, r3, r2 | 132 | orr r3, r3, r2 |
113 | orr r3, r3, #PTE_EXT_AP0 | 2 | 133 | orr r3, r3, #PTE_EXT_AP0 | 2 |
114 | 134 | ||
135 | adr ip, \pfx\()_mt_table | ||
136 | and r2, r1, #L_PTE_MT_MASK | ||
137 | ldr r2, [ip, r2] | ||
138 | |||
115 | tst r1, #L_PTE_WRITE | 139 | tst r1, #L_PTE_WRITE |
116 | tstne r1, #L_PTE_DIRTY | 140 | tstne r1, #L_PTE_DIRTY |
117 | orreq r3, r3, #PTE_EXT_APX | 141 | orreq r3, r3, #PTE_EXT_APX |
@@ -124,6 +148,8 @@ | |||
124 | tst r1, #L_PTE_EXEC | 148 | tst r1, #L_PTE_EXEC |
125 | orreq r3, r3, #PTE_EXT_XN | 149 | orreq r3, r3, #PTE_EXT_XN |
126 | 150 | ||
151 | orr r3, r3, r2 | ||
152 | |||
127 | tst r1, #L_PTE_YOUNG | 153 | tst r1, #L_PTE_YOUNG |
128 | tstne r1, #L_PTE_PRESENT | 154 | tstne r1, #L_PTE_PRESENT |
129 | moveq r3, #0 | 155 | moveq r3, #0 |