linux/arch
Paul Walmsley 1b59789b7d ARM: 7566/1: vfp: fix save and restore when running on pre-VFPv3 and CONFIG_VFPv3 set
commit 39141ddfb6 upstream.

After commit 846a136881 ("ARM: vfp: fix
saving d16-d31 vfp registers on v6+ kernels"), the OMAP 2430SDP board
started crashing during boot with omap2plus_defconfig:

[    3.875122] mmcblk0: mmc0:e624 SD04G 3.69 GiB
[    3.915954]  mmcblk0: p1
[    4.086639] Internal error: Oops - undefined instruction: 0 [#1] SMP ARM
[    4.093719] Modules linked in:
[    4.096954] CPU: 0    Not tainted  (3.6.0-02232-g759e00b #570)
[    4.103149] PC is at vfp_reload_hw+0x1c/0x44
[    4.107666] LR is at __und_usr_fault_32+0x0/0x8

It turns out that the context save/restore fix unmasked a latent bug
in commit 5aaf254409 ("ARM: 6203/1: Make
VFPv3 usable on ARMv6").  When CONFIG_VFPv3 is set, but the kernel is
booted on a pre-VFPv3 core, the code attempts to save and restore the
d16-d31 VFP registers.  These are only present on non-D16 VFPv3+, so
this results in an undefined instruction exception.  The code didn't
crash before commit 846a136 because the save and restore code was
only touching d0-d15, present on all VFP.

Fix by implementing a request from Russell King to add a new HWCAP
flag that affirmatively indicates the presence of the d16-d31
registers:

   http://marc.info/?l=linux-arm-kernel&m=135013547905283&w=2

and some feedback from Måns to clarify the name of the HWCAP flag.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Dave Martin <dave.martin@linaro.org>
Cc: Måns Rullgård <mans.rullgard@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-12-17 10:37:43 -08:00
..
alpha alpha: Add missing RCU idle APIs on idle loop 2012-10-13 05:38:54 +09:00
arm ARM: 7566/1: vfp: fix save and restore when running on pre-VFPv3 and CONFIG_VFPv3 set 2012-12-17 10:37:43 -08:00
avr32 avr32: fix nop compile fails from system.h split up 2012-04-04 08:23:44 -07:00
blackfin blackfin: fix ifdef fustercluck in mach-bf538/boards/ezkit.c 2012-04-26 14:46:51 -04:00
c6x irq: Kill pointless irqd_to_hw export 2012-04-10 22:39:17 -06:00
cris cris: Add missing RCU idle APIs on idle loop 2012-10-13 05:38:54 +09:00
frv frv: Add missing RCU idle APIs on idle loop 2012-10-13 05:38:54 +09:00
h8300 h8300: Add missing RCU idle APIs on idle loop 2012-10-13 05:38:53 +09:00
hexagon hexagon: add missing cpu.h include 2012-04-23 12:57:24 -05:00
ia64 ia64: Add missing RCU idle APIs on idle loop 2012-10-13 05:38:53 +09:00
m32r m32r: Add missing RCU idle APIs on idle loop 2012-10-13 05:38:55 +09:00
m68k m68k: fix sigset_t accessor functions 2012-11-26 11:37:46 -08:00
microblaze microblaze: Do not select GENERIC_GPIO by default 2012-06-10 00:36:05 +09:00
mips mips,kgdb: fix recursive page fault with CONFIG_KPROBES 2012-10-21 09:27:57 -07:00
mn10300 mn10300: Add missing RCU idle APIs on idle loop 2012-10-13 05:38:54 +09:00
openrisc
parisc PARISC: fix user-triggerable panic on parisc 2012-12-03 11:47:05 -08:00
powerpc powerpc/eeh: Lock module while handling EEH event 2012-12-03 11:47:23 -08:00
s390 s390/signal: set correct address space control 2012-11-26 11:38:01 -08:00
score score: Add missing RCU idle APIs on idle loop 2012-10-13 05:38:55 +09:00
sh sh: Fix up tracepoint build fallout from static key introduction. 2012-04-27 11:12:38 +09:30
sparc sparc64: not any error from do_sigaltstack() should fail rt_sigreturn() 2012-12-03 11:47:10 -08:00
tile arch/tile: avoid generating .eh_frame information in modules 2012-10-28 10:14:12 -07:00
um um: Implement a custom pte_same() function 2012-06-01 15:18:18 +08:00
unicore32 Merge branch 'for-linus' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping 2012-04-04 17:13:43 -07:00
x86 x86, fpu: Avoid FPU lazy restore after suspend 2012-12-10 10:59:39 -08:00
xtensa xtensa: Add missing RCU idle APIs on idle loop 2012-10-13 05:38:54 +09:00
.gitignore
Kconfig