Revision c3fb04162a1c8ddcf6caa6e19020da3f0fd23103 authored by Dimitry Andric on 17 May 2006, 15:31:11 UTC, committed by Russell King on 17 May 2006, 15:31:11 UTC
Patch from Dimitry Andric

In arch/arm/mach-s3c2410/sleep.S, the coprocessor registers are saved at
suspend time, and restored at resume time. However, an undefined
instruction is used when attempting to restore a non-existent "auxiliary
control register".  This leads to a crash on S3C2412, which has an ARM926
core instead of an ARM920.

At suspend time, the following fragment runs:

	mrc	p15, 0, r7, c2, c0, 0	@ translation table base address
	mrc	p15, 0, r8, c2, c0, 0	@ auxiliary control register
	mrc	p15, 0, r9, c1, c0, 0	@ control register

and at resume time, the following fragment runs:

	mcr	p15, 0, r7, c2, c0, 0		@ translation table base
	mcr	p15, 0, r8, c1, c1, 0		@ auxilliary control
	...
	mcr	p15, 0, r9, c1, c0, 0		@ turn on MMU, etc

There are several problems with these fragments:
1. The ARM920 and ARM926 cores don't have any "auxiliary control
   register", at least not according to the ARM920 and ARM926 TRM's.
2. The 2nd line of suspend erroneously saves the c2 register again.
3. This saved c2 value is restored using an undefined instruction.  For
   some reason this does not crash on ARM920, but does crash on ARM926.

The following patch fixes all these problems.

Signed-off-by: Dimitry Andric <dimitry@andric.com>
Yes, this looks sensible

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
1 parent 0c056c5
History
File Mode Size
irq
power
.gitignore -rw-r--r-- 51 bytes
Kconfig.hz -rw-r--r-- 1.2 KB
Kconfig.preempt -rw-r--r-- 2.3 KB
Makefile -rw-r--r-- 2.4 KB
acct.c -rw-r--r-- 15.8 KB
audit.c -rw-r--r-- 29.5 KB
audit.h -rw-r--r-- 2.8 KB
auditfilter.c -rw-r--r-- 21.2 KB
auditsc.c -rw-r--r-- 35.1 KB
capability.c -rw-r--r-- 6.6 KB
compat.c -rw-r--r-- 24.1 KB
configs.c -rw-r--r-- 3.3 KB
cpu.c -rw-r--r-- 4.8 KB
cpuset.c -rw-r--r-- 71.1 KB
dma.c -rw-r--r-- 3.5 KB
exec_domain.c -rw-r--r-- 4.4 KB
exit.c -rw-r--r-- 41.5 KB
extable.c -rw-r--r-- 2.0 KB
fork.c -rw-r--r-- 39.7 KB
futex.c -rw-r--r-- 26.2 KB
futex_compat.c -rw-r--r-- 3.2 KB
hrtimer.c -rw-r--r-- 19.5 KB
intermodule.c -rw-r--r-- 5.1 KB
itimer.c -rw-r--r-- 9.3 KB
kallsyms.c -rw-r--r-- 10.4 KB
kexec.c -rw-r--r-- 27.6 KB
kfifo.c -rw-r--r-- 4.6 KB
kmod.c -rw-r--r-- 7.6 KB
kprobes.c -rw-r--r-- 17.2 KB
ksysfs.c -rw-r--r-- 1.9 KB
kthread.c -rw-r--r-- 5.0 KB
module.c -rw-r--r-- 54.9 KB
mutex-debug.c -rw-r--r-- 11.6 KB
mutex-debug.h -rw-r--r-- 3.4 KB
mutex.c -rw-r--r-- 8.6 KB
mutex.h -rw-r--r-- 1.3 KB
panic.c -rw-r--r-- 6.2 KB
params.c -rw-r--r-- 16.7 KB
pid.c -rw-r--r-- 8.4 KB
posix-cpu-timers.c -rw-r--r-- 41.1 KB
posix-timers.c -rw-r--r-- 27.5 KB
printk.c -rw-r--r-- 26.2 KB
profile.c -rw-r--r-- 14.5 KB
ptrace.c -rw-r--r-- 11.5 KB
rcupdate.c -rw-r--r-- 17.5 KB
rcutorture.c -rw-r--r-- 17.1 KB
relay.c -rw-r--r-- 23.9 KB
resource.c -rw-r--r-- 11.6 KB
sched.c -rw-r--r-- 155.6 KB
seccomp.c -rw-r--r-- 1.1 KB
signal.c -rw-r--r-- 65.0 KB
softirq.c -rw-r--r-- 11.4 KB
softlockup.c -rw-r--r-- 3.9 KB
spinlock.c -rw-r--r-- 7.8 KB
stop_machine.c -rw-r--r-- 4.7 KB
sys.c -rw-r--r-- 49.2 KB
sys_ni.c -rw-r--r-- 3.7 KB
sysctl.c -rw-r--r-- 58.8 KB
time.c -rw-r--r-- 17.1 KB
timer.c -rw-r--r-- 40.7 KB
uid16.c -rw-r--r-- 5.1 KB
user.c -rw-r--r-- 5.1 KB
wait.c -rw-r--r-- 7.1 KB
workqueue.c -rw-r--r-- 15.1 KB

back to top