android_kernel_xiaomi_sm8350/arch/arm/mach-s3c2410
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
..
bast-irq.c
bast.h
clock.c [ARM] 3469/1: S3C24XX: clkout missing hclk selector 2006-04-09 22:21:10 +01:00
clock.h
common-smdk.c [ARM] 3475/1: S3C2410: fix spelling mistake in SMDK partition table 2006-04-13 09:57:15 +01:00
common-smdk.h [ARM] 3440/1: [S3C2410] make SMDK2410 and SMDK2440 similarities common 2006-04-01 18:33:42 +01:00
cpu.c [PATCH] s/;;/;/g 2006-03-24 07:33:24 -08:00
cpu.h
devs.c
devs.h
dma.c
gpio.c
irq.c
irq.h
Kconfig [ARM] 3440/1: [S3C2410] make SMDK2410 and SMDK2440 similarities common 2006-04-01 18:33:42 +01:00
mach-anubis.c [ARM] 3449/1: [S3C2410] Anubis - fix NAND timings 2006-04-02 10:32:46 +01:00
mach-bast.c
mach-h1940.c
mach-n30.c
mach-nexcoder.c
mach-osiris.c
mach-otom.c
mach-rx3715.c [ARM] 3452/1: [S3C2410] RX3715 - add nand information 2006-04-02 16:16:15 +01:00
mach-smdk2410.c [ARM] 3440/1: [S3C2410] make SMDK2410 and SMDK2440 similarities common 2006-04-01 18:33:42 +01:00
mach-smdk2440.c [ARM] 3440/1: [S3C2410] make SMDK2410 and SMDK2440 similarities common 2006-04-01 18:33:42 +01:00
mach-vr1000.c
Makefile [ARM] 3440/1: [S3C2410] make SMDK2410 and SMDK2440 similarities common 2006-04-01 18:33:42 +01:00
Makefile.boot
pm-simtec.c
pm.c
pm.h
s3c2400-gpio.c
s3c2400.h
s3c2410-gpio.c
s3c2410.c
s3c2410.h
s3c2440-clock.c [ARM] 3474/1: S3C2440: USB rate writes wrong var to CLKDIVN 2006-04-11 18:20:06 +01:00
s3c2440-dsc.c
s3c2440-irq.c
s3c2440.c
s3c2440.h
sleep.S [ARM] 3529/1: s3c24xx: fix restoring control register with undefined instruction 2006-05-17 16:31:11 +01:00
time.c
usb-simtec.c
usb-simtec.h