diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-01-12 12:50:42 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-02-15 11:36:44 -0500 |
commit | 6fc31d54443bdc25a8166be15e3920a7e39d195d (patch) | |
tree | 70ae632dec09e31e7db475de53ee620c2bf1c183 /arch/arm/kernel/head.S | |
parent | ebf53826e105f488f4f628703a108e98940d1dc5 (diff) |
ARM: Defer lookup of machine_type to setup.c
Since the debug macros no longer depend on the machine type information,
the machine type lookup can be deferred to setup_arch() in setup.c which
simplifies the code somewhat.
We also move the __error_a functionality into setup.c for displaying a
message when a bad machine ID is passed to the kernel via the LL debug
code. We also log this into the kernel ring buffer which makes it
possible to retrieve the message via a debugger.
Original idea from Grant Likely.
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/head.S')
-rw-r--r-- | arch/arm/kernel/head.S | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index c0225da3fb21..8a154b940fef 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S | |||
@@ -87,14 +87,10 @@ ENTRY(stext) | |||
87 | movs r10, r5 @ invalid processor (r5=0)? | 87 | movs r10, r5 @ invalid processor (r5=0)? |
88 | THUMB( it eq ) @ force fixup-able long branch encoding | 88 | THUMB( it eq ) @ force fixup-able long branch encoding |
89 | beq __error_p @ yes, error 'p' | 89 | beq __error_p @ yes, error 'p' |
90 | bl __lookup_machine_type @ r5=machinfo | ||
91 | movs r8, r5 @ invalid machine (r5=0)? | ||
92 | THUMB( it eq ) @ force fixup-able long branch encoding | ||
93 | beq __error_a @ yes, error 'a' | ||
94 | 90 | ||
95 | /* | 91 | /* |
96 | * r1 = machine no, r2 = atags, | 92 | * r1 = machine no, r2 = atags, |
97 | * r8 = machinfo, r9 = cpuid, r10 = procinfo | 93 | * r9 = cpuid, r10 = procinfo |
98 | */ | 94 | */ |
99 | bl __vet_atags | 95 | bl __vet_atags |
100 | #ifdef CONFIG_SMP_ON_UP | 96 | #ifdef CONFIG_SMP_ON_UP |
@@ -105,7 +101,7 @@ ENTRY(stext) | |||
105 | /* | 101 | /* |
106 | * The following calls CPU specific code in a position independent | 102 | * The following calls CPU specific code in a position independent |
107 | * manner. See arch/arm/mm/proc-*.S for details. r10 = base of | 103 | * manner. See arch/arm/mm/proc-*.S for details. r10 = base of |
108 | * xxx_proc_info structure selected by __lookup_machine_type | 104 | * xxx_proc_info structure selected by __lookup_processor_type |
109 | * above. On return, the CPU will be ready for the MMU to be | 105 | * above. On return, the CPU will be ready for the MMU to be |
110 | * turned on, and r0 will hold the CPU control register value. | 106 | * turned on, and r0 will hold the CPU control register value. |
111 | */ | 107 | */ |
@@ -124,7 +120,6 @@ ENDPROC(stext) | |||
124 | * amount which are required to get the kernel running, which | 120 | * amount which are required to get the kernel running, which |
125 | * generally means mapping in the kernel code. | 121 | * generally means mapping in the kernel code. |
126 | * | 122 | * |
127 | * r8 = machinfo | ||
128 | * r9 = cpuid | 123 | * r9 = cpuid |
129 | * r10 = procinfo | 124 | * r10 = procinfo |
130 | * | 125 | * |