diff options
author | Jaroslav Kysela <perex@hera.kernel.org> | 2005-06-21 10:39:41 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@hera.kernel.org> | 2005-06-21 10:39:41 -0400 |
commit | fae6ec69c84d71b1d5bda9ede1a262c1681684aa (patch) | |
tree | eb4aff9a5c2b7d04ce09a3717bb1dd4a79fe7595 /arch/arm/kernel/head.S | |
parent | bbc0274e9bb2e3f1d724d445a2bd32566b9b66f7 (diff) | |
parent | 1d345dac1f30af1cd9f3a1faa12f9f18f17f236e (diff) |
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'arch/arm/kernel/head.S')
-rw-r--r-- | arch/arm/kernel/head.S | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index 4733877296d4..bd4823c74645 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S | |||
@@ -2,6 +2,8 @@ | |||
2 | * linux/arch/arm/kernel/head.S | 2 | * linux/arch/arm/kernel/head.S |
3 | * | 3 | * |
4 | * Copyright (C) 1994-2002 Russell King | 4 | * Copyright (C) 1994-2002 Russell King |
5 | * Copyright (c) 2003 ARM Limited | ||
6 | * All Rights Reserved | ||
5 | * | 7 | * |
6 | * This program is free software; you can redistribute it and/or modify | 8 | * 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 | 9 | * it under the terms of the GNU General Public License version 2 as |
@@ -165,6 +167,48 @@ __mmap_switched: | |||
165 | stmia r6, {r0, r4} @ Save control register values | 167 | stmia r6, {r0, r4} @ Save control register values |
166 | b start_kernel | 168 | b start_kernel |
167 | 169 | ||
170 | #if defined(CONFIG_SMP) | ||
171 | .type secondary_startup, #function | ||
172 | ENTRY(secondary_startup) | ||
173 | /* | ||
174 | * Common entry point for secondary CPUs. | ||
175 | * | ||
176 | * Ensure that we're in SVC mode, and IRQs are disabled. Lookup | ||
177 | * the processor type - there is no need to check the machine type | ||
178 | * as it has already been validated by the primary processor. | ||
179 | */ | ||
180 | msr cpsr_c, #PSR_F_BIT | PSR_I_BIT | MODE_SVC | ||
181 | bl __lookup_processor_type | ||
182 | movs r10, r5 @ invalid processor? | ||
183 | moveq r0, #'p' @ yes, error 'p' | ||
184 | beq __error | ||
185 | |||
186 | /* | ||
187 | * Use the page tables supplied from __cpu_up. | ||
188 | */ | ||
189 | adr r4, __secondary_data | ||
190 | ldmia r4, {r5, r6, r13} @ address to jump to after | ||
191 | sub r4, r4, r5 @ mmu has been enabled | ||
192 | ldr r4, [r6, r4] @ get secondary_data.pgdir | ||
193 | adr lr, __enable_mmu @ return address | ||
194 | add pc, r10, #12 @ initialise processor | ||
195 | @ (return control reg) | ||
196 | |||
197 | /* | ||
198 | * r6 = &secondary_data | ||
199 | */ | ||
200 | ENTRY(__secondary_switched) | ||
201 | ldr sp, [r6, #4] @ get secondary_data.stack | ||
202 | mov fp, #0 | ||
203 | b secondary_start_kernel | ||
204 | |||
205 | .type __secondary_data, %object | ||
206 | __secondary_data: | ||
207 | .long . | ||
208 | .long secondary_data | ||
209 | .long __secondary_switched | ||
210 | #endif /* defined(CONFIG_SMP) */ | ||
211 | |||
168 | 212 | ||
169 | 213 | ||
170 | /* | 214 | /* |