linux/arch/arm/mach-pxa
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
..
akita-ioexp.c [PATCH] I2C: Remove .owner setting from i2c_driver as it's no longer needed 2006-01-05 22:16:25 -08:00
clock.c [ARM] Convert SA1111 to use clock architecture 2006-03-21 22:05:53 +00:00
corgi.c IRQ: Use the new typedef for interrupt handler function pointers 2006-10-09 12:19:47 +01:00
corgi_lcd.c fix file specification in comments 2006-10-03 23:01:26 +02:00
corgi_pm.c [ARM] 3564/1: sharpsl_pm: Abstract some machine specific parameters 2006-06-19 19:58:52 +01:00
corgi_ssp.c [ARM] 3760/1: This patch adds timeouts while working with SSP registers. Such timeouts were en 2006-08-27 12:54:56 +01:00
dma.c Initial blind fixup for arm for irq changes 2006-10-06 10:59:54 -07:00
generic.c [ARM] 3848/1: pxafb: Add option of fixing video modes and spitz QVGA mode support 2006-10-02 13:33:37 +01:00
generic.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
idp.c IRQ: Use the new typedef for interrupt handler function pointers 2006-10-09 12:19:47 +01:00
irq.c [ARM] Remove compatibility layer for ARM irqs 2006-11-30 12:24:47 +00:00
Kconfig [ARM] 3881/4: xscale: clean up cp0/cp1 handling 2006-12-03 17:52:22 +00:00
leds-idp.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
leds-lubbock.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
leds-mainstone.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
leds-trizeps4.c Remove all inclusions of <linux/config.h> 2006-10-04 03:38:54 -04:00
leds.c [ARM] 3666/1: TRIZEPS4 [1/5] core 2006-06-29 16:25:37 +01:00
leds.h fix file specification in comments 2006-10-03 23:01:26 +02:00
lpd270.c [ARM] Remove compatibility layer for ARM irqs 2006-11-30 12:24:47 +00:00
lubbock.c [ARM] Remove compatibility layer for ARM irqs 2006-11-30 12:24:47 +00:00
mainstone.c [ARM] Remove compatibility layer for ARM irqs 2006-11-30 12:24:47 +00:00
Makefile [ARM] 3666/1: TRIZEPS4 [1/5] core 2006-06-29 16:25:37 +01:00
Makefile.boot Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
pm.c [ARM] 3881/4: xscale: clean up cp0/cp1 handling 2006-12-03 17:52:22 +00:00
poodle.c IRQ: Use the new typedef for interrupt handler function pointers 2006-10-09 12:19:47 +01:00
pxa25x.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
pxa27x.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
sharpsl.h [ARM] 3235/1: SharpSL PM: Fix a gcc4 build error 2006-01-07 11:12:26 +00:00
sharpsl_pm.c [PATCH] ARM: fixup irqflags breakage after ARM genirq merge 2006-07-02 17:29:22 -07:00
sleep.S Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
spitz.c IRQ: Use the new typedef for interrupt handler function pointers 2006-10-09 12:19:47 +01:00
spitz_pm.c [ARM] 3564/1: sharpsl_pm: Abstract some machine specific parameters 2006-06-19 19:58:52 +01:00
ssp.c Initial blind fixup for arm for irq changes 2006-10-06 10:59:54 -07:00
standby.S Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
time.c [ARM] 3940/1: don't reset PXA2xx clock counter 2006-11-30 12:52:45 +00:00
tosa.c IRQ: Use the new typedef for interrupt handler function pointers 2006-10-09 12:19:47 +01:00
trizeps4.c IRQ: Use the new typedef for interrupt handler function pointers 2006-10-09 12:19:47 +01:00