linux-kernel-test/arch/arm
Lennert Buytenhek afe4b25e7d [ARM] 3881/4: xscale: clean up cp0/cp1 handling
XScale cores either have a DSP coprocessor (which contains a single
40 bit accumulator register), or an iWMMXt coprocessor (which contains
eight 64 bit registers.)

Because of the small amount of state in the DSP coprocessor, access to
the DSP coprocessor (CP0) is always enabled, and DSP context switching
is done unconditionally on every task switch.  Access to the iWMMXt
coprocessor (CP0/CP1) is enabled only when an iWMMXt instruction is
first issued, and iWMMXt context switching is done lazily.

CONFIG_IWMMXT is supposed to mean 'the cpu we will be running on will
have iWMMXt support', but boards are supposed to select this config
symbol by hand, and at least one pxa27x board doesn't get this right,
so on that board, proc-xscale.S will incorrectly assume that we have a
DSP coprocessor, enable CP0 on boot, and we will then only save the
first iWMMXt register (wR0) on context switches, which is Bad.

This patch redefines CONFIG_IWMMXT as 'the cpu we will be running on
might have iWMMXt support, and we will enable iWMMXt context switching
if it does.'  This means that with this patch, running a CONFIG_IWMMXT=n
kernel on an iWMMXt-capable CPU will no longer potentially corrupt iWMMXt
state over context switches, and running a CONFIG_IWMMXT=y kernel on a
non-iWMMXt capable CPU will still do DSP context save/restore.

These changes should make iWMMXt work on PXA3xx, and as a side effect,
enable proper acc0 save/restore on non-iWMMXt capable xsc3 cores such
as IOP13xx and IXP23xx (which will not have CONFIG_CPU_XSCALE defined),
as well as setting and using HWCAP_IWMMXT properly.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Acked-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-12-03 17:52:22 +00:00
..
boot fix file specification in comments 2006-10-03 23:01:26 +02:00
common [ARM] Remove compatibility layer for ARM irqs 2006-11-30 12:24:47 +00:00
configs [ARM] Remove DEBUG_WAITQ 2006-11-30 12:24:47 +00:00
kernel [ARM] 3881/4: xscale: clean up cp0/cp1 handling 2006-12-03 17:52:22 +00:00
lib Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
mach-aaec2000 [ARM] Remove compatibility layer for ARM irqs 2006-11-30 12:24:47 +00:00
mach-at91rm9200 [ARM] Remove compatibility layer for ARM irqs 2006-11-30 12:24:47 +00:00
mach-clps711x [ARM] Remove compatibility layer for ARM irqs 2006-11-30 12:24:47 +00:00
mach-clps7500 [ARM] Remove compatibility layer for ARM irqs 2006-11-30 12:24:47 +00:00
mach-ebsa110 [ARM] Remove compatibility layer for ARM irqs 2006-11-30 12:24:47 +00:00
mach-ep93xx [ARM] Remove compatibility layer for ARM irqs 2006-11-30 12:24:47 +00:00
mach-footbridge [ARM] Remove compatibility layer for ARM irqs 2006-11-30 12:24:47 +00:00
mach-h720x [ARM] Remove compatibility layer for ARM irqs 2006-11-30 12:24:47 +00:00
mach-imx [ARM] Remove compatibility layer for ARM irqs 2006-11-30 12:24:47 +00:00
mach-integrator [ARM] Remove compatibility layer for ARM irqs 2006-11-30 12:24:47 +00:00
mach-iop32x [ARM] Remove compatibility layer for ARM irqs 2006-11-30 12:24:47 +00:00
mach-iop33x [ARM] Remove compatibility layer for ARM irqs 2006-11-30 12:24:47 +00:00
mach-ixp4xx [ARM] 3958/1: add platform device (pxa2xx-udc)to ixp4xx 2006-12-01 17:14:28 +00:00
mach-ixp23xx [ARM] Remove compatibility layer for ARM irqs 2006-11-30 12:24:47 +00:00
mach-ixp2000 [ARM] 3965/1: ixp2000: fix handling of pci master aborts 2006-12-01 16:55:22 +00:00
mach-l7200 [ARM] Remove compatibility layer for ARM irqs 2006-11-30 12:24:47 +00:00
mach-lh7a40x [ARM] Remove compatibility layer for ARM irqs 2006-11-30 12:24:47 +00:00
mach-netx [ARM] Remove compatibility layer for ARM irqs 2006-11-30 12:24:47 +00:00
mach-omap1 [ARM] Remove compatibility layer for ARM irqs 2006-11-30 12:24:47 +00:00
mach-omap2 [ARM] Remove compatibility layer for ARM irqs 2006-11-30 12:24:47 +00:00
mach-pnx4008 [ARM] Remove compatibility layer for ARM irqs 2006-11-30 12:24:47 +00:00
mach-pxa [ARM] 3881/4: xscale: clean up cp0/cp1 handling 2006-12-03 17:52:22 +00:00
mach-realview Initial blind fixup for arm for irq changes 2006-10-06 10:59:54 -07:00
mach-rpc [ARM] Remove compatibility layer for ARM irqs 2006-11-30 12:24:47 +00:00
mach-s3c2410 [ARM] Remove compatibility layer for ARM irqs 2006-11-30 12:24:47 +00:00
mach-sa1100 [ARM] 3939/1: don't reset SA11x0 clock counter 2006-11-30 12:52:44 +00:00
mach-shark [ARM] Remove compatibility layer for ARM irqs 2006-11-30 12:24:47 +00:00
mach-versatile [ARM] Fix Versatile PB initialisation to use .init_machine 2006-11-30 22:42:20 +00:00
mm [ARM] 3881/4: xscale: clean up cp0/cp1 handling 2006-12-03 17:52:22 +00:00
nwfpe [ARM] 3729/3: EABI padding rules necessitate the packed attribute of floatx80 2006-07-13 13:04:24 +01:00
oprofile [ARM] Remove OP_MAX_COUNTER 2006-11-14 15:15:40 +00:00
plat-iop Initial blind fixup for arm for irq changes 2006-10-06 10:59:54 -07:00
plat-omap [ARM] Remove compatibility layer for ARM irqs 2006-11-30 12:24:47 +00:00
tools [ARM] Update mach-types 2006-10-16 21:14:51 +01:00
vfp [ARM] 3900/1: Fix VFP Division by Zero exception handling. 2006-10-28 10:15:31 +01:00
Kconfig [ARM] 3881/4: xscale: clean up cp0/cp1 handling 2006-12-03 17:52:22 +00:00
Kconfig-nommu [ARM] nommu: manage the CP15 things 2006-09-27 17:34:30 +01:00
Kconfig.debug [ARM] Remove DEBUG_WAITQ 2006-11-30 12:24:47 +00:00
Makefile [ARM] Add KBUILD_IMAGE target support 2006-10-29 12:51:05 +00:00