diff options
author | Hyok S. Choi <hyok.choi@samsung.com> | 2006-06-28 09:10:01 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-06-28 12:59:56 -0400 |
commit | d090dddaba7c8da6401bb259340dce05ca32f564 (patch) | |
tree | c35d9e22dc09d40144b4a672962269ff60c9ad07 /arch/arm/mm/proc-arm6_7.S | |
parent | a4f7e76367f7775ecf534a37b4623c83d9d7ba74 (diff) |
[ARM] nommu: Initial uCLinux support for MMU-based CPUs
In noMMU mode, various of functions which are defined in mm/proc-*.S
is not valid or needed to be avoided. i.g. switch_mm is not needed,
just returns and this makes the I & D caches are valid which shows
great improvement of performance including task switching and IPC.
Signed-off-by: Hyok S. Choi <hyok.choi@samsung.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm/proc-arm6_7.S')
-rw-r--r-- | arch/arm/mm/proc-arm6_7.S | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/mm/proc-arm6_7.S b/arch/arm/mm/proc-arm6_7.S index 540359b475d0..7a705edfa4b2 100644 --- a/arch/arm/mm/proc-arm6_7.S +++ b/arch/arm/mm/proc-arm6_7.S | |||
@@ -2,6 +2,7 @@ | |||
2 | * linux/arch/arm/mm/proc-arm6,7.S | 2 | * linux/arch/arm/mm/proc-arm6,7.S |
3 | * | 3 | * |
4 | * Copyright (C) 1997-2000 Russell King | 4 | * Copyright (C) 1997-2000 Russell King |
5 | * hacked for non-paged-MM by Hyok S. Choi, 2003. | ||
5 | * | 6 | * |
6 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 as | 8 | * it under the terms of the GNU General Public License version 2 as |
@@ -199,10 +200,12 @@ ENTRY(cpu_arm7_do_idle) | |||
199 | */ | 200 | */ |
200 | ENTRY(cpu_arm6_switch_mm) | 201 | ENTRY(cpu_arm6_switch_mm) |
201 | ENTRY(cpu_arm7_switch_mm) | 202 | ENTRY(cpu_arm7_switch_mm) |
203 | #ifdef CONFIG_MMU | ||
202 | mov r1, #0 | 204 | mov r1, #0 |
203 | mcr p15, 0, r1, c7, c0, 0 @ flush cache | 205 | mcr p15, 0, r1, c7, c0, 0 @ flush cache |
204 | mcr p15, 0, r0, c2, c0, 0 @ update page table ptr | 206 | mcr p15, 0, r0, c2, c0, 0 @ update page table ptr |
205 | mcr p15, 0, r1, c5, c0, 0 @ flush TLBs | 207 | mcr p15, 0, r1, c5, c0, 0 @ flush TLBs |
208 | #endif | ||
206 | mov pc, lr | 209 | mov pc, lr |
207 | 210 | ||
208 | /* | 211 | /* |
@@ -214,6 +217,7 @@ ENTRY(cpu_arm7_switch_mm) | |||
214 | .align 5 | 217 | .align 5 |
215 | ENTRY(cpu_arm6_set_pte) | 218 | ENTRY(cpu_arm6_set_pte) |
216 | ENTRY(cpu_arm7_set_pte) | 219 | ENTRY(cpu_arm7_set_pte) |
220 | #ifdef CONFIG_MMU | ||
217 | str r1, [r0], #-2048 @ linux version | 221 | str r1, [r0], #-2048 @ linux version |
218 | 222 | ||
219 | eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY | 223 | eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY |
@@ -232,6 +236,7 @@ ENTRY(cpu_arm7_set_pte) | |||
232 | movne r2, #0 | 236 | movne r2, #0 |
233 | 237 | ||
234 | str r2, [r0] @ hardware version | 238 | str r2, [r0] @ hardware version |
239 | #endif /* CONFIG_MMU */ | ||
235 | mov pc, lr | 240 | mov pc, lr |
236 | 241 | ||
237 | /* | 242 | /* |
@@ -243,7 +248,9 @@ ENTRY(cpu_arm6_reset) | |||
243 | ENTRY(cpu_arm7_reset) | 248 | ENTRY(cpu_arm7_reset) |
244 | mov r1, #0 | 249 | mov r1, #0 |
245 | mcr p15, 0, r1, c7, c0, 0 @ flush cache | 250 | mcr p15, 0, r1, c7, c0, 0 @ flush cache |
251 | #ifdef CONFIG_MMU | ||
246 | mcr p15, 0, r1, c5, c0, 0 @ flush TLB | 252 | mcr p15, 0, r1, c5, c0, 0 @ flush TLB |
253 | #endif | ||
247 | mov r1, #0x30 | 254 | mov r1, #0x30 |
248 | mcr p15, 0, r1, c1, c0, 0 @ turn off MMU etc | 255 | mcr p15, 0, r1, c1, c0, 0 @ turn off MMU etc |
249 | mov pc, r0 | 256 | mov pc, r0 |
@@ -253,19 +260,27 @@ ENTRY(cpu_arm7_reset) | |||
253 | .type __arm6_setup, #function | 260 | .type __arm6_setup, #function |
254 | __arm6_setup: mov r0, #0 | 261 | __arm6_setup: mov r0, #0 |
255 | mcr p15, 0, r0, c7, c0 @ flush caches on v3 | 262 | mcr p15, 0, r0, c7, c0 @ flush caches on v3 |
263 | #ifdef CONFIG_MMU | ||
256 | mcr p15, 0, r0, c5, c0 @ flush TLBs on v3 | 264 | mcr p15, 0, r0, c5, c0 @ flush TLBs on v3 |
257 | mov r0, #0x3d @ . ..RS BLDP WCAM | 265 | mov r0, #0x3d @ . ..RS BLDP WCAM |
258 | orr r0, r0, #0x100 @ . ..01 0011 1101 | 266 | orr r0, r0, #0x100 @ . ..01 0011 1101 |
267 | #else | ||
268 | mov r0, #0x3c @ . ..RS BLDP WCA. | ||
269 | #endif | ||
259 | mov pc, lr | 270 | mov pc, lr |
260 | .size __arm6_setup, . - __arm6_setup | 271 | .size __arm6_setup, . - __arm6_setup |
261 | 272 | ||
262 | .type __arm7_setup, #function | 273 | .type __arm7_setup, #function |
263 | __arm7_setup: mov r0, #0 | 274 | __arm7_setup: mov r0, #0 |
264 | mcr p15, 0, r0, c7, c0 @ flush caches on v3 | 275 | mcr p15, 0, r0, c7, c0 @ flush caches on v3 |
276 | #ifdef CONFIG_MMU | ||
265 | mcr p15, 0, r0, c5, c0 @ flush TLBs on v3 | 277 | mcr p15, 0, r0, c5, c0 @ flush TLBs on v3 |
266 | mcr p15, 0, r0, c3, c0 @ load domain access register | 278 | mcr p15, 0, r0, c3, c0 @ load domain access register |
267 | mov r0, #0x7d @ . ..RS BLDP WCAM | 279 | mov r0, #0x7d @ . ..RS BLDP WCAM |
268 | orr r0, r0, #0x100 @ . ..01 0111 1101 | 280 | orr r0, r0, #0x100 @ . ..01 0111 1101 |
281 | #else | ||
282 | mov r0, #0x7c @ . ..RS BLDP WCA. | ||
283 | #endif | ||
269 | mov pc, lr | 284 | mov pc, lr |
270 | .size __arm7_setup, . - __arm7_setup | 285 | .size __arm7_setup, . - __arm7_setup |
271 | 286 | ||