1. 11 10月, 2013 1 次提交
  2. 24 9月, 2013 1 次提交
  3. 19 9月, 2013 3 次提交
  4. 18 9月, 2013 3 次提交
  5. 17 9月, 2013 1 次提交
  6. 13 9月, 2013 2 次提交
    • M
      MIPS: DECstation I/O ASIC DMA interrupt handling fix · 5359b938
      Maciej W. Rozycki 提交于
      This change complements commit d0da7c002f7b2a93582187a9e3f73891a01d8ee4
      and brings clear_ioasic_irq back, renaming it to clear_ioasic_dma_irq at
      the same time, to make I/O ASIC DMA interrupts functional.
      
      Unlike ordinary I/O ASIC interrupts DMA interrupts need to be deasserted
      by software by writing 0 to the respective bit in I/O ASIC's System
      Interrupt Register (SIR), similarly to how CP0.Cause.IP0 and CP0.Cause.IP1
      bits are handled in the CPU (the difference is SIR DMA interrupt bits are
      R/W0C so there's no need for an RMW cycle).  Otherwise the handler is
      reentered over and over again.
      
      The only current user is the DEC LANCE Ethernet driver and its extremely
      uncommon DMA memory error handler that does not care when exactly the
      interrupt is cleared.  Anticipating the use of DMA interrupts by the Zilog
      SCC driver this change however exports clear_ioasic_dma_irq for device
      drivers to choose the right application-specific sequence to clear the
      request explicitly rather than calling it implicitly in the .irq_eoi
      handler of `struct irq_chip'.  Previously these interrupts were cleared in
      the .end handler of the said structure, before it was removed.
      Signed-off-by: NMaciej W. Rozycki <macro@linux-mips.org>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/5826/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      5359b938
    • M
      MIPS: DECstation HRT initialization rearrangement · daed1285
      Maciej W. Rozycki 提交于
      Not all I/O ASIC versions have the free-running counter implemented, an
      early revision used in the 5000/1xx models aka 3MIN and 4MIN did not have
      it.  Therefore we cannot unconditionally use it as a clock source.
      Fortunately if not implemented its register slot has a fixed value so it
      is enough if we check for the value at the end of the calibration period
      being the same as at the beginning.
      
      This also means we need to look for another high-precision clock source on
      the systems affected.  The 5000/1xx can have an R4000SC processor
      installed where the CP0 Count register can be used as a clock source.
      Unfortunately all the R4k DECstations suffer from the missed timer
      interrupt on CP0 Count reads erratum, so we cannot use the CP0 timer as a
      clock source and a clock event both at a time.  However we never need an
      R4k clock event device because all DECstations have a DS1287A RTC chip
      whose periodic interrupt can be used as a clock source.
      
      This gives us the following four configuration possibilities for I/O ASIC
      DECstations:
      
      1. No I/O ASIC counter and no CP0 timer, e.g. R3k 5000/1xx (3MIN).
      
      2. No I/O ASIC counter but the CP0 timer, i.e. R4k 5000/150 (4MIN).
      
      3. The I/O ASIC counter but no CP0 timer, e.g. R3k 5000/240 (3MAX+).
      
      4. The I/O ASIC counter and the CP0 timer, e.g. R4k 5000/260 (4MAX+).
      
      For #1 and #2 this change stops the I/O ASIC free-running counter from
      being installed as a clock source of a 0Hz frequency.  For #2 it also
      arranges for the CP0 timer to be used as a clock source rather than a
      clock event device, because having an accurate wall clock is more
      important than a high-precision interval timer.  For #3 there is no
      change.  For #4 the change makes the I/O ASIC free-running counter
      installed as a clock source so that the CP0 timer can be used as a clock
      event device.
      
      Unfortunately the use of the CP0 timer as a clock event device relies on a
      succesful completion of c0_compare_interrupt.  That never happens, because
      while waiting for a CP0 Compare interrupt to happen the function spins in
      a loop reading the CP0 Count register.  This makes the CP0 Count erratum
      trigger reliably causing the interrupt waited for to be lost in all cases.
      As a result #4 resorts to using the CP0 timer as a clock source as well,
      just as #2.  However we want to keep this separate arrangement in case
      (hope) c0_compare_interrupt is eventually rewritten such that it avoids
      the erratum.
      Signed-off-by: NMaciej W. Rozycki <macro@linux-mips.org>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/5825/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      daed1285
  7. 04 9月, 2013 10 次提交
  8. 26 8月, 2013 4 次提交
  9. 12 8月, 2013 1 次提交
    • T
      PCI: use weak functions for MSI arch-specific functions · 4287d824
      Thomas Petazzoni 提交于
      Until now, the MSI architecture-specific functions could be overloaded
      using a fairly complex set of #define and compile-time
      conditionals. In order to prepare for the introduction of the msi_chip
      infrastructure, it is desirable to switch all those functions to use
      the 'weak' mechanism. This commit converts all the architectures that
      were overidding those MSI functions to use the new strategy.
      
      Note that we keep two separate, non-weak, functions
      default_teardown_msi_irqs() and default_restore_msi_irqs() for the
      default behavior of the arch_teardown_msi_irqs() and
      arch_restore_msi_irqs(), as the default behavior is needed by x86 PCI
      code.
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Acked-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Tested-by: NDaniel Price <daniel.price@gmail.com>
      Tested-by: NThierry Reding <thierry.reding@gmail.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: linux390@de.ibm.com
      Cc: linux-s390@vger.kernel.org
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: x86@kernel.org
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      Cc: linux-ia64@vger.kernel.org
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: linux-mips@linux-mips.org
      Cc: David S. Miller <davem@davemloft.net>
      Cc: sparclinux@vger.kernel.org
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Signed-off-by: NJason Cooper <jason@lakedaemon.net>
      4287d824
  10. 06 8月, 2013 1 次提交
  11. 05 8月, 2013 1 次提交
    • R
      MIPS: oprofile: Fix BUG due to smp_processor_id() in preemptible code. · cf5b2d23
      Ralf Baechle 提交于
      current_cpu_type() is not preemption-safe.
      If CONFIG_PREEMPT is enabled then mipsxx_reg_setup() can be called from preemptible state.
      Added get_cpu()/put_cpu() pair to make it preemption-safe.
      
      This was found while testing oprofile with CONFIG_DEBUG_PREEMPT enable.
      
      /usr/zntestsuite # opcontrol --init
      /usr/zntestsuite # opcontrol --setup --event=L2_CACHE_ACCESSES:500 --event=L2_CACHE_MISSES:500 --no-vmlinux
      /usr/zntestsuite # opcontrol --start
      Using 2.6+ OProfile kernel interface.
      BUG: using smp_processor_id() in preemptible [00000000] code: oprofiled/1362
      caller is mipsxx_reg_setup+0x11c/0x164
      CPU: 0 PID: 1362 Comm: oprofiled Not tainted 3.10.4 #18
      Stack : 00000006 70757465 00000000 00000000 00000000 00000000 80b173f6 00000037
                80b10000 00000000 80b21614 88f5a220 00000000 00000000 00000000 00000000
                00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
                00000000 00000000 00000000 89c49c00 89c49c2c 80721254 807b7927 8012c1d0
                80b10000 80721254 00000000 00000552 88f5a220 80b1335c 807b78e6 89c49ba8
                ...
      Call Trace:
      [<801099a4>] show_stack+0x64/0x7c
      [<80665520>] dump_stack+0x20/0x2c
      [<803a2250>] debug_smp_processor_id+0xe0/0xf0
      [<8052df24>] mipsxx_reg_setup+0x11c/0x164
      [<8052cd70>] op_mips_setup+0x24/0x4c
      [<80529cfc>] oprofile_setup+0x5c/0x12c
      [<8052b9f8>] event_buffer_open+0x78/0xf8
      [<801c3150>] do_dentry_open.isra.15+0x2b8/0x3b0
      [<801c3270>] finish_open+0x28/0x4c
      [<801d49b8>] do_last.isra.41+0x2cc/0xd00
      [<801d54a0>] path_openat+0xb4/0x4c4
      [<801d5c44>] do_filp_open+0x3c/0xac
      [<801c4744>] do_sys_open+0x110/0x1f4
      [<8010f47c>] stack_done+0x20/0x44
      
      Bug reported and original patch by Jerin Jacob <jerinjacobk@gmail.com>.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      Acked-by: NJerin Jacob <jerinjacobk@gmail.com>
      cf5b2d23
  12. 31 7月, 2013 2 次提交
  13. 15 7月, 2013 1 次提交
    • P
      MIPS: Delete __cpuinit/__CPUINIT usage from MIPS code · 078a55fc
      Paul Gortmaker 提交于
      commit 3747069b25e419f6b51395f48127e9812abc3596 upstream.
      
      The __cpuinit type of throwaway sections might have made sense
      some time ago when RAM was more constrained, but now the savings
      do not offset the cost and complications.  For example, the fix in
      commit 5e427ec2 ("x86: Fix bit corruption at CPU resume time")
      is a good example of the nasty type of bugs that can be created
      with improper use of the various __init prefixes.
      
      After a discussion on LKML[1] it was decided that cpuinit should go
      the way of devinit and be phased out.  Once all the users are gone,
      we can then finally remove the macros themselves from linux/init.h.
      
      Note that some harmless section mismatch warnings may result, since
      notify_cpu_starting() and cpu_up() are arch independent (kernel/cpu.c)
      and are flagged as __cpuinit  -- so if we remove the __cpuinit from
      the arch specific callers, we will also get section mismatch warnings.
      As an intermediate step, we intend to turn the linux/init.h cpuinit
      related content into no-ops as early as possible, since that will get
      rid of these warnings.  In any case, they are temporary and harmless.
      
      Here, we remove all the MIPS __cpuinit from C code and __CPUINIT
      from asm files.  MIPS is interesting in this respect, because there
      are also uasm users hiding behind their own renamed versions of the
      __cpuinit macros.
      
      [1] https://lkml.org/lkml/2013/5/20/589
      
      [ralf@linux-mips.org: Folded in Paul's followup fix.]
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/5494/
      Patchwork: https://patchwork.linux-mips.org/patch/5495/
      Patchwork: https://patchwork.linux-mips.org/patch/5509/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      078a55fc
  14. 11 7月, 2013 1 次提交
  15. 05 7月, 2013 2 次提交
  16. 01 7月, 2013 6 次提交