linux-stable/arch
Dimitry Andric c3fb04162a [ARM] 3529/1: s3c24xx: fix restoring control register with undefined instruction
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>
2006-05-17 16:31:11 +01:00
..
alpha [PATCH] Alpha: strncpy() fix 2006-04-25 07:51:06 -07:00
arm [ARM] 3529/1: s3c24xx: fix restoring control register with undefined instruction 2006-05-17 16:31:11 +01:00
arm26 [PATCH] No arch-specific strpbrk implementations 2006-04-11 06:18:40 -07:00
cris [PATCH] No arch-specific strpbrk implementations 2006-04-11 06:18:40 -07:00
frv [PATCH] No arch-specific strpbrk implementations 2006-04-11 06:18:40 -07:00
h8300 [PATCH] No arch-specific strpbrk implementations 2006-04-11 06:18:40 -07:00
i386 [PATCH] i386/x86_64: Force pci=noacpi on HP XW9300 2006-05-16 07:59:31 -07:00
ia64 [IA64] strcpy returns NULL pointer and not destination pointer 2006-05-05 11:34:55 -07:00
m32r [PATCH] m32r: update switch_to macro for tuning 2006-04-19 09:13:51 -07:00
m68k [PATCH] No arch-specific strpbrk implementations 2006-04-11 06:18:40 -07:00
m68knommu [PATCH] No arch-specific strpbrk implementations 2006-04-11 06:18:40 -07:00
mips [PATCH] drop task argument of audit_syscall_{entry,exit} 2006-05-01 06:06:18 -04:00
parisc [PARISC] Add new entries to the syscall table 2006-04-21 22:20:35 +00:00
powerpc [PATCH] Fix pSeries identification in prom_init.c 2006-05-16 21:31:25 +10:00
ppc [PATCH] ppc32/8xx: Fix r3 trashing due to 8MB TLB page instantiation 2006-05-09 16:03:11 +10:00
s390 [PATCH] s390: add vmsplice system call 2006-05-15 11:20:55 -07:00
sh [PATCH] No arch-specific strpbrk implementations 2006-04-11 06:18:40 -07:00
sh64 [PATCH] No arch-specific strpbrk implementations 2006-04-11 06:18:40 -07:00
sparc [SPARC]: Handle UNWIND_INFO properly. 2006-05-12 12:45:50 -07:00
sparc64 [SPARC]: Handle UNWIND_INFO properly. 2006-05-12 12:45:50 -07:00
um [PATCH] uml: change timer initialization 2006-05-03 20:05:40 -07:00
v850 [PATCH] No arch-specific strpbrk implementations 2006-04-11 06:18:40 -07:00
x86_64 [PATCH] x86_64: Don't schedule on exception stack on preemptive kernels 2006-05-16 07:59:32 -07:00
xtensa [PATCH] No arch-specific strpbrk implementations 2006-04-11 06:18:40 -07:00