diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-22 14:22:59 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-22 14:22:59 -0400 |
commit | 7578634990fb47cc30083fbd812689aa6deacfc0 (patch) | |
tree | f493860658579d9572a19b3a41fcea2de035e49f /arch/arm/mm/proc-v7.S | |
parent | d7f5e3df3574c6e38b99f5fe22f15540b2b9811d (diff) | |
parent | 5957a4eb284dd6f522b248b674792416466555b2 (diff) |
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (60 commits)
[ARM] 4524/1: S3C: Move register out of include/asm-arm/arch-s3c2410
[ARM] 4523/1: S3C: Remove FIFO_MAX from uncompression headers
[ARM] 4522/1: S3C: split include/asm-arm/arch/memory.h
[ARM] 4521/2: S3C: Reorganise VA mapping headers
[ARM] 4520/1: S3C: Remove old VA values from static map
[ARM] 4519/1: S3C: split S3C2400 values out of S3C24XX map.h
[ARM] 4518/1: S3C: Rename watchdog configuration options
[ARM] 4517/1: S3C: Fix debug macros for ARM926 output
[ARM] 4516/1: S3C: Fix uncompressor serial output for ARM926
[ARM] 4515/1: S3C: Move uncompress code to plat-s3c
[ARM] 4514/1: S3C: Rename DEBUG_S3C2410_PORT and DEBUG_S3C_UART
[ARM] 4513/1: S3C: Rename CONFIG_S3C2410_LOWLEVEL_UART_PORT
[ARM] 4512/1: S3C: rename the debug macros for per-cpu updates
[ARM] 4511/1: S3C: updated LLSERIAL Kconfig defines for CPU support
[ARM] 4510/1: S3C: split debug-macro support into plat-s3c
[ARM] 4509/1: S3C: Create initial arch/arm/plat-s3c
[ARM] 4508/1: S3C: Move items to include/asm-arm/plat-s3c
[ARM] 4461/1: MXC platform and i.MX31ADS core support
[ARM] 4507/1: pxa2xx clock_event_device
[ARM] 4497/1: Only allow safe cache configurations on ARMv6 and later
...
Diffstat (limited to 'arch/arm/mm/proc-v7.S')
-rw-r--r-- | arch/arm/mm/proc-v7.S | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index 718f4782ee8b..e0acc5ae6f6f 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S | |||
@@ -77,6 +77,7 @@ ENTRY(cpu_v7_dcache_clean_area) | |||
77 | * - we are not using split page tables | 77 | * - we are not using split page tables |
78 | */ | 78 | */ |
79 | ENTRY(cpu_v7_switch_mm) | 79 | ENTRY(cpu_v7_switch_mm) |
80 | #ifdef CONFIG_MMU | ||
80 | mov r2, #0 | 81 | mov r2, #0 |
81 | ldr r1, [r1, #MM_CONTEXT_ID] @ get mm->context.id | 82 | ldr r1, [r1, #MM_CONTEXT_ID] @ get mm->context.id |
82 | orr r0, r0, #TTB_RGN_OC_WB @ mark PTWs outer cacheable, WB | 83 | orr r0, r0, #TTB_RGN_OC_WB @ mark PTWs outer cacheable, WB |
@@ -86,6 +87,7 @@ ENTRY(cpu_v7_switch_mm) | |||
86 | isb | 87 | isb |
87 | mcr p15, 0, r1, c13, c0, 1 @ set context ID | 88 | mcr p15, 0, r1, c13, c0, 1 @ set context ID |
88 | isb | 89 | isb |
90 | #endif | ||
89 | mov pc, lr | 91 | mov pc, lr |
90 | 92 | ||
91 | /* | 93 | /* |
@@ -109,6 +111,7 @@ ENTRY(cpu_v7_switch_mm) | |||
109 | * 1111 0 1 1 r/w r/w | 111 | * 1111 0 1 1 r/w r/w |
110 | */ | 112 | */ |
111 | ENTRY(cpu_v7_set_pte_ext) | 113 | ENTRY(cpu_v7_set_pte_ext) |
114 | #ifdef CONFIG_MMU | ||
112 | str r1, [r0], #-2048 @ linux version | 115 | str r1, [r0], #-2048 @ linux version |
113 | 116 | ||
114 | bic r3, r1, #0x000003f0 | 117 | bic r3, r1, #0x000003f0 |
@@ -136,6 +139,7 @@ ENTRY(cpu_v7_set_pte_ext) | |||
136 | 139 | ||
137 | str r3, [r0] | 140 | str r3, [r0] |
138 | mcr p15, 0, r0, c7, c10, 1 @ flush_pte | 141 | mcr p15, 0, r0, c7, c10, 1 @ flush_pte |
142 | #endif | ||
139 | mov pc, lr | 143 | mov pc, lr |
140 | 144 | ||
141 | cpu_v7_name: | 145 | cpu_v7_name: |
@@ -169,6 +173,7 @@ __v7_setup: | |||
169 | mcr p15, 0, r10, c7, c5, 0 @ I+BTB cache invalidate | 173 | mcr p15, 0, r10, c7, c5, 0 @ I+BTB cache invalidate |
170 | #endif | 174 | #endif |
171 | dsb | 175 | dsb |
176 | #ifdef CONFIG_MMU | ||
172 | mcr p15, 0, r10, c8, c7, 0 @ invalidate I + D TLBs | 177 | mcr p15, 0, r10, c8, c7, 0 @ invalidate I + D TLBs |
173 | mcr p15, 0, r10, c2, c0, 2 @ TTB control register | 178 | mcr p15, 0, r10, c2, c0, 2 @ TTB control register |
174 | orr r4, r4, #TTB_RGN_OC_WB @ mark PTWs outer cacheable, WB | 179 | orr r4, r4, #TTB_RGN_OC_WB @ mark PTWs outer cacheable, WB |
@@ -176,21 +181,12 @@ __v7_setup: | |||
176 | mcr p15, 0, r4, c2, c0, 1 @ load TTB1 | 181 | mcr p15, 0, r4, c2, c0, 1 @ load TTB1 |
177 | mov r10, #0x1f @ domains 0, 1 = manager | 182 | mov r10, #0x1f @ domains 0, 1 = manager |
178 | mcr p15, 0, r10, c3, c0, 0 @ load domain access register | 183 | mcr p15, 0, r10, c3, c0, 0 @ load domain access register |
179 | #ifndef CONFIG_CPU_L2CACHE_DISABLE | ||
180 | @ L2 cache configuration in the L2 aux control register | ||
181 | mrc p15, 1, r10, c9, c0, 2 | ||
182 | bic r10, r10, #(1 << 16) @ L2 outer cache | ||
183 | mcr p15, 1, r10, c9, c0, 2 | ||
184 | @ L2 cache is enabled in the aux control register | ||
185 | mrc p15, 0, r10, c1, c0, 1 | ||
186 | orr r10, r10, #2 | ||
187 | mcr p15, 0, r10, c1, c0, 1 | ||
188 | #endif | 184 | #endif |
189 | mrc p15, 0, r0, c1, c0, 0 @ read control register | 185 | adr r5, v7_crval |
190 | ldr r10, cr1_clear @ get mask for bits to clear | 186 | ldmia r5, {r5, r6} |
191 | bic r0, r0, r10 @ clear bits them | 187 | mrc p15, 0, r0, c1, c0, 0 @ read control register |
192 | ldr r10, cr1_set @ get mask for bits to set | 188 | bic r0, r0, r5 @ clear bits them |
193 | orr r0, r0, r10 @ set them | 189 | orr r0, r0, r6 @ set them |
194 | mov pc, lr @ return to head.S:__ret | 190 | mov pc, lr @ return to head.S:__ret |
195 | 191 | ||
196 | /* | 192 | /* |
@@ -199,12 +195,9 @@ __v7_setup: | |||
199 | * rrrr rrrx xxx0 0101 xxxx xxxx x111 xxxx < forced | 195 | * rrrr rrrx xxx0 0101 xxxx xxxx x111 xxxx < forced |
200 | * 0 110 0011 1.00 .111 1101 < we want | 196 | * 0 110 0011 1.00 .111 1101 < we want |
201 | */ | 197 | */ |
202 | .type cr1_clear, #object | 198 | .type v7_crval, #object |
203 | .type cr1_set, #object | 199 | v7_crval: |
204 | cr1_clear: | 200 | crval clear=0x0120c302, mmuset=0x00c0387d, ucset=0x00c0187c |
205 | .word 0x0120c302 | ||
206 | cr1_set: | ||
207 | .word 0x00c0387d | ||
208 | 201 | ||
209 | __v7_setup_stack: | 202 | __v7_setup_stack: |
210 | .space 4 * 11 @ 11 registers | 203 | .space 4 * 11 @ 11 registers |