1. 27 11月, 2007 7 次提交
    • 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
      [MIPS] Fix possible hang in LL/SC futex loops. · 0f67e90e
      Ralf Baechle 提交于
      The LL / SC loops in __futex_atomic_op() have the usual fixups necessary
      for memory acccesses to userspace from kernel space installed:
      
              __asm__ __volatile__(
              "       .set    push                            \n"
              "       .set    noat                            \n"
              "       .set    mips3                           \n"
              "1:     ll      %1, %4  # __futex_atomic_op     \n"
              "       .set    mips0                           \n"
              "       " insn  "                               \n"
              "       .set    mips3                           \n"
              "2:     sc      $1, %2                          \n"
              "       beqz    $1, 1b                          \n"
              __WEAK_LLSC_MB
              "3:                                             \n"
              "       .set    pop                             \n"
              "       .set    mips0                           \n"
              "       .section .fixup,\"ax\"                  \n"
              "4:     li      %0, %6                          \n"
              "       j       2b                              \n"	<-----
              "       .previous                               \n"
              "       .section __ex_table,\"a\"               \n"
              "       "__UA_ADDR "\t1b, 4b                    \n"
              "       "__UA_ADDR "\t2b, 4b                    \n"
              "       .previous                               \n"
              : "=r" (ret), "=&r" (oldval), "=R" (*uaddr)
              : "0" (0), "R" (*uaddr), "Jr" (oparg), "i" (-EFAULT)
              : "memory");
      
      The branch at the end of the fixup code, it goes back to the SC
      instruction, no matter if the fault was first taken by the LL or SC
      instruction resulting in an endless loop which will only terminate if
      the address become valid again due to another thread setting up an
      accessible mapping and the CPU happens to execute the SC instruction
      successfully which due to the preceeding ERET instruction of the fault
      handler would only happen if UNPREDICTABLE instruction behaviour of the
      SC instruction without a preceeding LL happens to favor that outcome.
      But normally processes are nice, pass valid arguments and we were just
      getting away with this.
      
      Thanks to Kaz Kylheku <kaz@zeugmasystems.com> for providing the original
      report and a test case.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      0f67e90e
    • R
      [MIPS] Fix context DSP context / TLS pointer switching bug for new threads. · 07500b0d
      Ralf Baechle 提交于
      A new born thread starts execution not in schedule but rather in
      ret_from_fork which results in it bypassing the part of the code to
      load a new context written in C which are the DSP context and the
      userlocal register which Linux uses for the TLS pointer.  Frequently
      we were just getting away with this bug for a number of reasons:
      
       o Real world application scenarios are very unlikely to use clone or fork
         in blocks of DSP code.
       o Linux by default runs the child process right after the fork, so the
         child by luck will find all the right context in the DSP and userlocal
         registers.
       o So far the rdhwr instruction was emulated on all hardware so userlocal
         wasn't getting referenced at all and the emulation wasn't suffering
         from the issue since it gets it's value straight from the thread's
         thread_info.
      
      Fixed by moving the code to load the context from switch_to() to
      finish_arch_switch which will be called by newborn and old threads.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      07500b0d
    • R
      [MIPS] IP32: More interrupt renumbering fixes. · 98ce4721
      Ralf Baechle 提交于
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      98ce4721
    • R
      [MIPS] Fix pcspeaker build. · cfb6f260
      Ralf Baechle 提交于
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      cfb6f260
  2. 21 11月, 2007 12 次提交
  3. 20 11月, 2007 8 次提交
  4. 19 11月, 2007 4 次提交
  5. 18 11月, 2007 1 次提交
  6. 17 11月, 2007 4 次提交
  7. 18 11月, 2007 1 次提交
  8. 17 11月, 2007 1 次提交
  9. 16 11月, 2007 2 次提交