1. 29 1月, 2008 4 次提交
    • L
      [MIPS] Remove duplicate includes. · adfb8998
      Lucas Woods 提交于
      Signed-off-by: NLucas Woods <woodzy@gmail.com>
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      adfb8998
    • M
      [MIPS] R4000/R4400 daddiu erratum workaround · 619b6e18
      Maciej W. Rozycki 提交于
       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: NMaciej W. Rozycki <macro@linux-mips.org>
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      619b6e18
    • M
      [MIPS] R4000/R4400 errata workarounds · 20d60d99
      Maciej W. Rozycki 提交于
       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: NMaciej W. Rozycki <macro@linux-mips.org>
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      20d60d99
    • A
  2. 26 1月, 2008 1 次提交
    • G
      cpu-hotplug: replace lock_cpu_hotplug() with get_online_cpus() · 86ef5c9a
      Gautham R Shenoy 提交于
      Replace all lock_cpu_hotplug/unlock_cpu_hotplug from the kernel and use
      get_online_cpus and put_online_cpus instead as it highlights the
      refcount semantics in these operations.
      
      The new API guarantees protection against the cpu-hotplug operation, but
      it doesn't guarantee serialized access to any of the local data
      structures. Hence the changes needs to be reviewed.
      
      In case of pseries_add_processor/pseries_remove_processor, use
      cpu_maps_update_begin()/cpu_maps_update_done() as we're modifying the
      cpu_present_map there.
      Signed-off-by: NGautham R Shenoy <ego@in.ibm.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      86ef5c9a
  3. 25 1月, 2008 1 次提交
  4. 12 1月, 2008 1 次提交
  5. 07 1月, 2008 2 次提交
  6. 15 12月, 2007 2 次提交
    • C
      bbaf238b
    • R
      [MIPS] time: Delete weak definition of plat_time_init() due to gcc bug. · 4037500e
      Ralf Baechle 提交于
      Frank Rowand <frank.rowand@am.sony.com> reports:
      
      > In linux-2.6.24-rc4 the Toshiba RBTX4927 hangs on boot.
      >
      > The cause is that plat_time_init() from arch/mips/tx4927/common/
      > tx4927_setup.c does not override the __weak plat_time_init() from
      > arch/mips/kernel/time.c.  This is due to a compiler bug in gcc 4.1.1.  The
      > bug is reported to not exist in earlier versions of gcc, and to be fixed in
      > 4.1.2.  The problem is that the __weak plat_time_init() is empty and thus
      > gets optimized out of existence (thus the linker is never given the option
      > to replace the __weak function).
      
      [ He meant the call to plat_time_init() from time_init() gets optimized away ]
      
      > For more info on the gcc bug see
      >
      >    http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27781
      >
      > The attached patch is one workaround.  Another possible workaround
      
      [ His patch adds -fno-unit-at-a-time for time.c ]
      
      > would be to change the __weak plat_time_init() to be a non-empty
      > function.
      
      The __weak definition of plat_time_init was only ever meant to be a
      migration helper to keep platforms that don't have a plat_time_init
      compiling.  A few greps says that all platforms now supply their own
      plat_time_init() so the weak definition is no longer needed.  So I
      instead delete it.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      4037500e
  7. 01 12月, 2007 1 次提交
  8. 27 11月, 2007 5 次提交
    • J
      [MIPS] vpe: Add missing "space" · b1e3afa0
      Joe Perches 提交于
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      b1e3afa0
    • R
      [MIPS] 64-bit Sibyte kernels need DMA32. · cce335ae
      Ralf Baechle 提交于
      Sibyte SOCs only have 32-bit PCI.  Due to the sparse use of the address
      space only the first 1GB of memory is mapped at physical addresses
      below 1GB.  If a system has more than 1GB of memory 32-bit DMA will
      not be able to reach all of it.
      
      For now this patch is good enough to keep Sibyte users happy but it seems
      eventually something like swiotlb will be needed for Sibyte.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      cce335ae
    • R
      [MIPS] Only build r4k clocksource for systems that work ok with it. · 940f6b48
      Ralf Baechle 提交于
      In particular as-is it's not suited for multicore and mutiprocessors
      systems where there is on guarantee that the counter are synchronized
      or running from the same clock at all.  This broke Sibyte and probably
      others since the "[MIPS] Handle R4000/R4400 mfc0 from count register."
      commit.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      940f6b48
    • R
      [MIPS] Handle R4000/R4400 mfc0 from count register. · 5aa85c9f
      Ralf Baechle 提交于
      The R4000 and R4400 have an errata where if the cp0 count register is read
      in the exact moment when it matches the compare register no interrupt will
      be generated.
      
      This bug may be triggered if the cp0 count register is being used as
      clocksource and the compare interrupt as clockevent.  So a simple
      workaround is to avoid using the compare for both facilities on the
      affected CPUs.
      
      This is different from the workaround suggested in the old errata documents;
      at some opportunity probably the official version should be implemented
      and tested.  Another thing to find out is which processor versions
      exactly are affected.  I only have errata documents upto R4400 V3.0
      available so for the moment the code treats all R4000 and R4400 as broken.
      
      This is potencially a problem for some machines that have no other decent
      clocksource available; this workaround will cause them to fall back to
      another clocksource, worst case the "jiffies" source.
      5aa85c9f
    • R
      aea68639
  9. 16 11月, 2007 9 次提交
  10. 15 11月, 2007 1 次提交
  11. 03 11月, 2007 5 次提交
  12. 30 10月, 2007 8 次提交