ARM: 5886/1: arm: Fix cpu_proc_fin() for proc-v7.S and make kexec work

The comments in arm_machine_restart() suggest that cpu_proc_fin()
will clean and disable cache and turn off interrupts. This does
not seem to be implemented for proc-v7.S, implement it the same
way as for proc-v6.S.

This also makes kexec work for v7. Note that a related TLB and
branch traget flush patch is also needed to avoid kexec
"crc error".

Note that there are still some issues that seem to be related
to L2 cache being on and causing occasional uncompress "crc error"
with kexec. Anyways, this gets kexec mostly working on V7 for now.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
Tony Lindgren 2010-01-19 17:01:33 +01:00 committed by Russell King
parent ad3e6c0b1f
commit 1f667c690b
1 changed files with 8 additions and 1 deletions

View File

@ -45,7 +45,14 @@ ENTRY(cpu_v7_proc_init)
ENDPROC(cpu_v7_proc_init) ENDPROC(cpu_v7_proc_init)
ENTRY(cpu_v7_proc_fin) ENTRY(cpu_v7_proc_fin)
mov pc, lr stmfd sp!, {lr}
cpsid if @ disable interrupts
bl v7_flush_kern_cache_all
mrc p15, 0, r0, c1, c0, 0 @ ctrl register
bic r0, r0, #0x1000 @ ...i............
bic r0, r0, #0x0006 @ .............ca.
mcr p15, 0, r0, c1, c0, 0 @ disable caches
ldmfd sp!, {pc}
ENDPROC(cpu_v7_proc_fin) ENDPROC(cpu_v7_proc_fin)
/* /*