diff options
Diffstat (limited to 'arch/xtensa/kernel/head.S')
-rw-r--r-- | arch/xtensa/kernel/head.S | 51 |
1 files changed, 50 insertions, 1 deletions
diff --git a/arch/xtensa/kernel/head.S b/arch/xtensa/kernel/head.S index 74ec62c892bc..aeeb3cc8a410 100644 --- a/arch/xtensa/kernel/head.S +++ b/arch/xtensa/kernel/head.S | |||
@@ -103,7 +103,7 @@ _SetupMMU: | |||
103 | 103 | ||
104 | ENDPROC(_start) | 104 | ENDPROC(_start) |
105 | 105 | ||
106 | __INIT | 106 | __REF |
107 | .literal_position | 107 | .literal_position |
108 | 108 | ||
109 | ENTRY(_startup) | 109 | ENTRY(_startup) |
@@ -302,6 +302,55 @@ should_never_return: | |||
302 | 302 | ||
303 | ENDPROC(_startup) | 303 | ENDPROC(_startup) |
304 | 304 | ||
305 | #ifdef CONFIG_HOTPLUG_CPU | ||
306 | |||
307 | ENTRY(cpu_restart) | ||
308 | |||
309 | #if XCHAL_DCACHE_IS_WRITEBACK | ||
310 | ___flush_invalidate_dcache_all a2 a3 | ||
311 | #else | ||
312 | ___invalidate_dcache_all a2 a3 | ||
313 | #endif | ||
314 | memw | ||
315 | movi a2, CCON # MX External Register to Configure Cache | ||
316 | movi a3, 0 | ||
317 | wer a3, a2 | ||
318 | extw | ||
319 | |||
320 | rsr a0, prid | ||
321 | neg a2, a0 | ||
322 | movi a3, cpu_start_id | ||
323 | s32i a2, a3, 0 | ||
324 | #if XCHAL_DCACHE_IS_WRITEBACK | ||
325 | dhwbi a3, 0 | ||
326 | #endif | ||
327 | 1: | ||
328 | l32i a2, a3, 0 | ||
329 | dhi a3, 0 | ||
330 | bne a2, a0, 1b | ||
331 | |||
332 | /* | ||
333 | * Initialize WB, WS, and clear PS.EXCM (to allow loop instructions). | ||
334 | * Set Interrupt Level just below XCHAL_DEBUGLEVEL to allow | ||
335 | * xt-gdb to single step via DEBUG exceptions received directly | ||
336 | * by ocd. | ||
337 | */ | ||
338 | movi a1, 1 | ||
339 | movi a0, 0 | ||
340 | wsr a1, windowstart | ||
341 | wsr a0, windowbase | ||
342 | rsync | ||
343 | |||
344 | movi a1, LOCKLEVEL | ||
345 | wsr a1, ps | ||
346 | rsync | ||
347 | |||
348 | j _startup | ||
349 | |||
350 | ENDPROC(cpu_restart) | ||
351 | |||
352 | #endif /* CONFIG_HOTPLUG_CPU */ | ||
353 | |||
305 | /* | 354 | /* |
306 | * DATA section | 355 | * DATA section |
307 | */ | 356 | */ |