aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/head-common.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/kernel/head-common.S')
-rw-r--r--arch/arm/kernel/head-common.S19
1 files changed, 10 insertions, 9 deletions
diff --git a/arch/arm/kernel/head-common.S b/arch/arm/kernel/head-common.S
index 1c3c6ea5f9e7..bde52df1c668 100644
--- a/arch/arm/kernel/head-common.S
+++ b/arch/arm/kernel/head-common.S
@@ -36,7 +36,6 @@ __switch_data:
36 * r2 = atags pointer 36 * r2 = atags pointer
37 * r9 = processor ID 37 * r9 = processor ID
38 */ 38 */
39 .type __mmap_switched, %function
40__mmap_switched: 39__mmap_switched:
41 adr r3, __switch_data + 4 40 adr r3, __switch_data + 4
42 41
@@ -59,6 +58,7 @@ __mmap_switched:
59 bic r4, r0, #CR_A @ Clear 'A' bit 58 bic r4, r0, #CR_A @ Clear 'A' bit
60 stmia r7, {r0, r4} @ Save control register values 59 stmia r7, {r0, r4} @ Save control register values
61 b start_kernel 60 b start_kernel
61ENDPROC(__mmap_switched)
62 62
63/* 63/*
64 * Exception handling. Something went wrong and we can't proceed. We 64 * Exception handling. Something went wrong and we can't proceed. We
@@ -69,8 +69,6 @@ __mmap_switched:
69 * and hope for the best (useful if bootloader fails to pass a proper 69 * and hope for the best (useful if bootloader fails to pass a proper
70 * machine ID for example). 70 * machine ID for example).
71 */ 71 */
72
73 .type __error_p, %function
74__error_p: 72__error_p:
75#ifdef CONFIG_DEBUG_LL 73#ifdef CONFIG_DEBUG_LL
76 adr r0, str_p1 74 adr r0, str_p1
@@ -84,8 +82,8 @@ str_p1: .asciz "\nError: unrecognized/unsupported processor variant (0x"
84str_p2: .asciz ").\n" 82str_p2: .asciz ").\n"
85 .align 83 .align
86#endif 84#endif
85ENDPROC(__error_p)
87 86
88 .type __error_a, %function
89__error_a: 87__error_a:
90#ifdef CONFIG_DEBUG_LL 88#ifdef CONFIG_DEBUG_LL
91 mov r4, r1 @ preserve machine ID 89 mov r4, r1 @ preserve machine ID
@@ -115,13 +113,14 @@ __error_a:
115 adr r0, str_a3 113 adr r0, str_a3
116 bl printascii 114 bl printascii
117 b __error 115 b __error
116ENDPROC(__error_a)
117
118str_a1: .asciz "\nError: unrecognized/unsupported machine ID (r1 = 0x" 118str_a1: .asciz "\nError: unrecognized/unsupported machine ID (r1 = 0x"
119str_a2: .asciz ").\n\nAvailable machine support:\n\nID (hex)\tNAME\n" 119str_a2: .asciz ").\n\nAvailable machine support:\n\nID (hex)\tNAME\n"
120str_a3: .asciz "\nPlease check your kernel config and/or bootloader.\n" 120str_a3: .asciz "\nPlease check your kernel config and/or bootloader.\n"
121 .align 121 .align
122#endif 122#endif
123 123
124 .type __error, %function
125__error: 124__error:
126#ifdef CONFIG_ARCH_RPC 125#ifdef CONFIG_ARCH_RPC
127/* 126/*
@@ -138,6 +137,7 @@ __error:
138#endif 137#endif
1391: mov r0, r0 1381: mov r0, r0
140 b 1b 139 b 1b
140ENDPROC(__error)
141 141
142 142
143/* 143/*
@@ -153,7 +153,6 @@ __error:
153 * r5 = proc_info pointer in physical address space 153 * r5 = proc_info pointer in physical address space
154 * r9 = cpuid (preserved) 154 * r9 = cpuid (preserved)
155 */ 155 */
156 .type __lookup_processor_type, %function
157__lookup_processor_type: 156__lookup_processor_type:
158 adr r3, 3f 157 adr r3, 3f
159 ldmda r3, {r5 - r7} 158 ldmda r3, {r5 - r7}
@@ -169,6 +168,7 @@ __lookup_processor_type:
169 blo 1b 168 blo 1b
170 mov r5, #0 @ unknown processor 169 mov r5, #0 @ unknown processor
1712: mov pc, lr 1702: mov pc, lr
171ENDPROC(__lookup_processor_type)
172 172
173/* 173/*
174 * This provides a C-API version of the above function. 174 * This provides a C-API version of the above function.
@@ -179,6 +179,7 @@ ENTRY(lookup_processor_type)
179 bl __lookup_processor_type 179 bl __lookup_processor_type
180 mov r0, r5 180 mov r0, r5
181 ldmfd sp!, {r4 - r7, r9, pc} 181 ldmfd sp!, {r4 - r7, r9, pc}
182ENDPROC(lookup_processor_type)
182 183
183/* 184/*
184 * Look in <asm/procinfo.h> and arch/arm/kernel/arch.[ch] for 185 * Look in <asm/procinfo.h> and arch/arm/kernel/arch.[ch] for
@@ -201,7 +202,6 @@ ENTRY(lookup_processor_type)
201 * r3, r4, r6 corrupted 202 * r3, r4, r6 corrupted
202 * r5 = mach_info pointer in physical address space 203 * r5 = mach_info pointer in physical address space
203 */ 204 */
204 .type __lookup_machine_type, %function
205__lookup_machine_type: 205__lookup_machine_type:
206 adr r3, 3b 206 adr r3, 3b
207 ldmia r3, {r4, r5, r6} 207 ldmia r3, {r4, r5, r6}
@@ -216,6 +216,7 @@ __lookup_machine_type:
216 blo 1b 216 blo 1b
217 mov r5, #0 @ unknown machine 217 mov r5, #0 @ unknown machine
2182: mov pc, lr 2182: mov pc, lr
219ENDPROC(__lookup_machine_type)
219 220
220/* 221/*
221 * This provides a C-API version of the above function. 222 * This provides a C-API version of the above function.
@@ -226,6 +227,7 @@ ENTRY(lookup_machine_type)
226 bl __lookup_machine_type 227 bl __lookup_machine_type
227 mov r0, r5 228 mov r0, r5
228 ldmfd sp!, {r4 - r6, pc} 229 ldmfd sp!, {r4 - r6, pc}
230ENDPROC(lookup_machine_type)
229 231
230/* Determine validity of the r2 atags pointer. The heuristic requires 232/* Determine validity of the r2 atags pointer. The heuristic requires
231 * that the pointer be aligned, in the first 16k of physical RAM and 233 * that the pointer be aligned, in the first 16k of physical RAM and
@@ -239,8 +241,6 @@ ENTRY(lookup_machine_type)
239 * r2 either valid atags pointer, or zero 241 * r2 either valid atags pointer, or zero
240 * r5, r6 corrupted 242 * r5, r6 corrupted
241 */ 243 */
242
243 .type __vet_atags, %function
244__vet_atags: 244__vet_atags:
245 tst r2, #0x3 @ aligned? 245 tst r2, #0x3 @ aligned?
246 bne 1f 246 bne 1f
@@ -257,3 +257,4 @@ __vet_atags:
257 257
2581: mov r2, #0 2581: mov r2, #0
259 mov pc, lr 259 mov pc, lr
260ENDPROC(__vet_atags)