android_kernel_xiaomi_sm7250/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 [ARM] 2884/1: BAST - fix PC104 IRQ routing 2005-09-07 17:24:48 +01:00
bast.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
clock.c [ARM] 3469/1: S3C24XX: clkout missing hclk selector 2006-04-09 22:21:10 +01:00
clock.h [ARM] 3361/1: S3C24XX - add USB bus clock source 2006-03-21 22:06:20 +00:00
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 [ARM] 3266/1: S3C2400 - adds macro S3C24XX 2006-01-26 15:20:50 +00:00
devs.c [ARM] 3358/1: [S3C2410] add missing SPI DMA resources 2006-03-15 16:03:05 +00:00
devs.h Create platform_device.h to contain all the platform device details. 2005-10-29 19:07:23 +01:00
dma.c [ARM] 3266/1: S3C2400 - adds macro S3C24XX 2006-01-26 15:20:50 +00:00
gpio.c [ARM] 3284/1: S3C2400 - adds support to GPIO 2006-02-01 21:24:23 +00:00
irq.c [ARM] Wrap calls to descriptor handlers 2005-09-04 19:45:00 +01:00
irq.h [PATCH] ARM: 2829/1: S3C2410 - split s3c2440 irq specifics from core irq.c 2005-07-26 19:20:27 +01:00
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 [ARM] 3260/1: remove phys_ram from struct machine_desc (part 2) 2006-01-13 20:51:52 +00:00
mach-h1940.c [ARM] 3326/1: H1940 - Control latches 2006-02-10 22:40:51 +00:00
mach-n30.c [ARM] 3260/1: remove phys_ram from struct machine_desc (part 2) 2006-01-13 20:51:52 +00:00
mach-nexcoder.c [ARM] 3260/1: remove phys_ram from struct machine_desc (part 2) 2006-01-13 20:51:52 +00:00
mach-osiris.c [ARM] 3375/1: S3C2440 - fix osiris machine build 2006-03-21 22:06:22 +00:00
mach-otom.c [ARM] 3260/1: remove phys_ram from struct machine_desc (part 2) 2006-01-13 20:51:52 +00:00
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 [ARM] 3260/1: remove phys_ram from struct machine_desc (part 2) 2006-01-13 20:51:52 +00:00
Makefile [ARM] 3440/1: [S3C2410] make SMDK2410 and SMDK2440 similarities common 2006-04-01 18:33:42 +01:00
Makefile.boot Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
pm-simtec.c [ARM] 2889/1: S3C2410 - Add machine Anubis 2005-09-07 11:49:23 +01:00
pm.c [ARM] 2874/1: S3C2410 - add cpu_init() call after sleep wakeup 2005-09-03 19:39:26 +01:00
pm.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
s3c2400-gpio.c [ARM] 3284/1: S3C2400 - adds support to GPIO 2006-02-01 21:24:23 +00:00
s3c2400.h [ARM] 3314/1: S3C2400 - adds s3c2400.h 2006-02-09 16:47:58 +00:00
s3c2410-gpio.c [ARM] 3284/1: S3C2400 - adds support to GPIO 2006-02-01 21:24:23 +00:00
s3c2410.c Create platform_device.h to contain all the platform device details. 2005-10-29 19:07:23 +01:00
s3c2410.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
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 Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
s3c2440-irq.c [ARM] Wrap calls to descriptor handlers 2005-09-04 19:45:00 +01:00
s3c2440.c [ARM] Move asm/hardware/clock.h to linux/clk.h 2006-01-07 16:15:52 +00:00
s3c2440.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sleep.S [ARM] 3529/1: s3c24xx: fix restoring control register with undefined instruction 2006-05-17 16:31:11 +01:00
time.c [ARM] 3329/1: S3C24XX - fix time for osiris machine 2006-03-21 22:06:01 +00:00
usb-simtec.c [PATCH] IRQ type flags 2006-01-08 20:13:46 -08:00
usb-simtec.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00