diff options
author | Maciej W. Rozycki <macro@linux-mips.org> | 2007-10-23 07:43:11 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2008-01-29 05:14:54 -0500 |
commit | 20d60d9973c3b441902b0a3f4f6f7e7ade08f77d (patch) | |
tree | 2dbadcb5600fcb486612ec30d972e6c29195ee1d /arch/mips/Kconfig | |
parent | 2b22c034d04d3632a339d14d5803c8f94e412608 (diff) |
[MIPS] R4000/R4400 errata workarounds
This is the gereric part of R4000/R4400 errata workarounds. They include
compiler and assembler support as well as some source code modifications
to address the problems with some combinations of multiply/divide+shift
instructions as well as the daddi and daddiu instructions.
Changes included are as follows:
1. New Kconfig options to select workarounds by platforms as necessary.
2. Arch top-level Makefile to pass necessary options to the compiler; also
incompatible configurations are detected (-mno-sym32 unsupported as
horribly intrusive for little gain).
3. Bug detection updated and shuffled -- the multiply/divide+shift problem
is lethal enough that if not worked around it makes the kernel crash in
time_init() because of a division by zero; the daddiu erratum might
also trigger early potentially, though I have not observed it. On the
other hand the daddi detection code requires the exception subsystem to
have been initialised (and is there mainly for information).
4. r4k_daddiu_bug() added so that the existence of the erratum can be
queried by code at the run time as necessary; useful for generated code
like TLB fault and copy/clear page handlers.
5. __udelay() updated as it uses multiplication in inline assembly.
Note that -mdaddi requires modified toolchain (which has been maintained
by myself and available from my site for ~4years now -- versions covered
are GCC 2.95.4 - 4.1.2 and binutils from 2.13 onwards). The -mfix-r4000
and -mfix-r4400 have been standard for a while though.
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/Kconfig')
-rw-r--r-- | arch/mips/Kconfig | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 12bf96334174..11bc17ce0ebf 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -91,6 +91,9 @@ config MACH_DECSTATION | |||
91 | select BOOT_ELF32 | 91 | select BOOT_ELF32 |
92 | select CEVT_R4K | 92 | select CEVT_R4K |
93 | select CSRC_R4K | 93 | select CSRC_R4K |
94 | select CPU_DADDI_WORKAROUNDS if 64BIT | ||
95 | select CPU_R4000_WORKAROUNDS if 64BIT | ||
96 | select CPU_R4400_WORKAROUNDS if 64BIT | ||
94 | select DMA_NONCOHERENT | 97 | select DMA_NONCOHERENT |
95 | select NO_IOPORT | 98 | select NO_IOPORT |
96 | select IRQ_CPU | 99 | select IRQ_CPU |
@@ -1606,6 +1609,19 @@ config GENERIC_CLOCKEVENTS_BROADCAST | |||
1606 | bool | 1609 | bool |
1607 | 1610 | ||
1608 | # | 1611 | # |
1612 | # CPU non-features | ||
1613 | # | ||
1614 | config CPU_DADDI_WORKAROUNDS | ||
1615 | bool | ||
1616 | |||
1617 | config CPU_R4000_WORKAROUNDS | ||
1618 | bool | ||
1619 | select CPU_R4400_WORKAROUNDS | ||
1620 | |||
1621 | config CPU_R4400_WORKAROUNDS | ||
1622 | bool | ||
1623 | |||
1624 | # | ||
1609 | # Use the generic interrupt handling code in kernel/irq/: | 1625 | # Use the generic interrupt handling code in kernel/irq/: |
1610 | # | 1626 | # |
1611 | config GENERIC_HARDIRQS | 1627 | config GENERIC_HARDIRQS |