linux/arch/arm
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
..
boot [ARM] 3488/1: make icedcc_putc do the right thing 2006-05-02 20:40:56 +01:00
common [ARM] 3478/1: SharpSL SCOOP: Fix potenial build failure 2006-04-18 23:18:53 +01:00
configs [ARM] 3508/1: Update collie defconfig 2006-05-09 22:27:51 +01:00
kernel [ARM] arch/arm/kernel/dma-isa.c: named initializers 2006-05-16 22:09:46 +01:00
lib [ARM] 3524/1: ARM EABI: more 64-bit aligned stack fixes 2006-05-16 11:39:31 +01:00
mach-aaec2000 [ARM] 3507/1: Replace map_desc.physical with map_desc.pfn: aaed2000 2006-05-07 22:49:24 +01:00
mach-at91rm9200 Fix AT91RM9200 build breakage 2006-04-14 18:38:01 -07:00
mach-clps711x [ARM] 3304/1: Add help descriptions to ARCH config items that don't have one 2006-02-08 21:09:05 +00:00
mach-clps7500 [ARM] 3260/1: remove phys_ram from struct machine_desc (part 2) 2006-01-13 20:51:52 +00:00
mach-ebsa110 [ARM] 3260/1: remove phys_ram from struct machine_desc (part 2) 2006-01-13 20:51:52 +00:00
mach-ep93xx [ARM] 3451/1: ep93xx: use the m48t86 rtc driver on the ts72xx platform 2006-04-02 16:17:40 +01:00
mach-footbridge [PATCH] RTC: Remove RTC UIP synchronization on ARM 2006-03-28 09:16:00 -08:00
mach-h720x [ARM] 3260/1: remove phys_ram from struct machine_desc (part 2) 2006-01-13 20:51:52 +00:00
mach-imx [ARM] 3501/1: i.MX: fix lowlevel debug macros 2006-05-07 18:56:27 +01:00
mach-integrator Merge master.kernel.org:/home/rmk/linux-2.6-serial 2006-03-28 13:52:37 -08:00
mach-iop3xx [ARM] 3391/1: use PLAT8250_DEV_PLATFORM{,1} for platform device id instead of 0/1 2006-03-23 12:59:08 +00:00
mach-ixp4xx [ARM] 3487/1: IXP4xx: Support non-PCI systems 2006-04-30 15:34:29 +01:00
mach-ixp23xx [ARM] 3439/2: xsc3: add I/O coherency support 2006-04-02 00:07:39 +01:00
mach-ixp2000 [ARM] 3383/3: ixp2000: ixdp2x01 platform serial conversion 2006-03-25 23:03:13 +00:00
mach-l7200 [ARM] 3260/1: remove phys_ram from struct machine_desc (part 2) 2006-01-13 20:51:52 +00:00
mach-lh7a40x [ARM] Remove asm/arch/irq.h 2006-03-21 22:05:46 +00:00
mach-omap1 [ARM] 3460/1: ARM: OMAP: Remove unnecessary nop_release() 2006-04-09 22:21:02 +01:00
mach-omap2 [ARM] 3460/1: ARM: OMAP: Remove unnecessary nop_release() 2006-04-09 22:21:02 +01:00
mach-pxa [ARM] 3500/1: fix PXA27x DMA allocation priority 2006-05-05 22:32:24 +01:00
mach-realview [ARM] 3527/1: MPCore Boot Lockup Fix 2006-05-16 16:50:21 +01:00
mach-rpc [ARM] 3260/1: remove phys_ram from struct machine_desc (part 2) 2006-01-13 20:51:52 +00:00
mach-s3c2410 [ARM] 3529/1: s3c24xx: fix restoring control register with undefined instruction 2006-05-17 16:31:11 +01:00
mach-sa1100 [ARM] Allow SA1100 RTC alarm to be configured for wakeup 2006-05-06 11:26:30 +01:00
mach-shark [ARM] 3260/1: remove phys_ram from struct machine_desc (part 2) 2006-01-13 20:51:52 +00:00
mach-versatile [ARM] Adapt vic.c to allow for multiple VICs in a system. 2006-03-21 22:05:52 +00:00
mm [ARM] 3526/1: ioremap should use vunmap instead of vfree on ARM 2006-05-16 11:39:31 +01:00
nwfpe [ARM] 3111/2: old ABI compat: adjust NWFPE to be operational within an EABI kernel 2006-01-14 16:36:50 +00:00
oprofile [ARM] Use kcalloc to allocate counter_config array rather than kmalloc 2006-03-21 23:30:02 +00:00
plat-omap [ARM] 3461/1: ARM: OMAP: Fix clk_get() when using id and name 2006-04-09 22:21:05 +01:00
tools [ARM] Update mach-types 2006-05-08 20:31:11 +01:00
vfp [ARM] 3499/1: Fix VFP FPSCR corruption for double exception case 2006-05-05 22:32:23 +01:00
Kconfig [ARM] 3487/1: IXP4xx: Support non-PCI systems 2006-04-30 15:34:29 +01:00
Kconfig-nommu [ARM] nommu: fixups for the exception vectors 2006-03-27 15:18:50 +01:00
Kconfig.debug [ARM] Fix typo in arch/arm/Kconfig.debug 2005-09-09 15:57:17 +01:00
Makefile [ARM] 3484/1: Correct AEABI CFLAGS for correct enum handling 2006-04-25 20:36:04 +01:00