1. 29 Jan, 2008 6 commits
    • Maciej W. Rozycki's avatar
      [MIPS] R4000/R4400 daddiu erratum workaround · 619b6e18
      Maciej W. Rozycki authored
       This complements the generic R4000/R4400 errata workaround code and adds 
      bits for the daddiu problem.  In most places it just modifies handwritten 
      assembly code so that the assembler is allowed to use a temporary register 
      as daddiu may now be treated as a macro that expands to a sequence of li 
      and daddu.  It is the AT register or, where AT is unavailable or used 
      explicitly for another purpose, an explicitly-named register is selected, 
      using the .set at=<reg> feature added recently to gas.  This feature is 
      only used if CONFIG_CPU_DADDI_WORKAROUNDS has been set, so if the 
      workaround remains disabled, the required version of binutils stays 
      unchanged.
      
       Similarly, daddiu instructions put in branch delay slots in noreorder 
      fragments are now taken out of them and the assembler is allowed to 
      reorder them itself as possible (which it does making the whole idea of 
      scheduling them into delay slots manually questionable).
      
       Also in the very few places where such a simple conversion was not 
      possible, a handcoded longer sequence is implemented.
      
       Other than that there are changes to code responsible for building the 
      TLB fault and page clear/copy handlers to avoid daddiu as appropriate.  
      These are only effective if the erratum is verified to be present at the 
      run time.
      
       Finally there is a trivial update to __delay(), because it uses daddiu in 
      a branch delay slot.
      Signed-off-by: default avatarMaciej W. Rozycki <macro@linux-mips.org>
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      619b6e18
    • Maciej W. Rozycki's avatar
      [MIPS] R4000/R4400 errata workarounds · 20d60d99
      Maciej W. Rozycki authored
       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: default avatarMaciej W. Rozycki <macro@linux-mips.org>
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      20d60d99
    • Alejandro Martinez Ruiz's avatar
    • Ralf Baechle's avatar
    • Ralf Baechle's avatar
      [MIPS] Delete unused CONFIG_64BIT_CONTEXT · 6920df40
      Ralf Baechle authored
      The merge of the code to use this was never completed so delete it for the
      time being.
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      6920df40
    • Ralf Baechle's avatar
      [MIPS] Delete unused CONFIG_DMA_IP32. · e414004e
      Ralf Baechle authored
      The functionality of the former dma-ip32.c has been folded into
      dma-default.c.
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      e414004e
  2. 28 Jan, 2008 34 commits