1. 21 1月, 2010 1 次提交
  2. 15 12月, 2009 1 次提交
  3. 18 11月, 2009 1 次提交
  4. 21 9月, 2009 1 次提交
  5. 04 9月, 2009 1 次提交
    • D
      sparc64: Fix bootup with mcount in some configs. · bd4352ca
      David S. Miller 提交于
      Functions invoked early when booting up a cpu can't use
      tracing because mcount requires a valid 'current_thread_info()'
      and TLB mappings to be setup.
      
      The code path of sun4v_register_mondo_queues --> register_one_mondo
      is one such case.  sun4v_register_mondo_queues already has the
      necessary 'notrace' annotation, but register_one_mondo does not.
      
      Normally register_one_mondo is inlined so the bug doesn't trigger,
      but with some config/compiler combinations, it won't be so we
      must properly mark it notrace.
      
      While we're here, add 'notrace' annoations to prom_printf and
      prom_halt so that early error handling won't have the same problem.
      Reported-by: NAlexander Beregalov <a.beregalov@gmail.com>
      Reported-by: NLeif Sawyer <lsawyer@gci.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bd4352ca
  6. 26 6月, 2009 1 次提交
  7. 16 6月, 2009 1 次提交
    • H
      sparc64: fix and optimize irq distribution · 280ff974
      Hong H. Pham 提交于
      irq_choose_cpu() should compare the affinity mask against cpu_online_map
      rather than CPU_MASK_ALL, since irq_select_affinity() sets the interrupt's
      affinity mask to cpu_online_map "and" CPU_MASK_ALL (which ends up being
      just cpu_online_map).  The mask comparison in irq_choose_cpu() will always
      fail since the two masks are not the same.  So the CPU chosen is the first CPU
      in the intersection of cpu_online_map and CPU_MASK_ALL, which is always CPU0.
      That means all interrupts are reassigned to CPU0...
      
      Distributing interrupts to CPUs in a linearly increasing round robin fashion
      is not optimal for the UltraSPARC T1/T2.  Also, the irq_rover in
      irq_choose_cpu() causes an interrupt to be assigned to a different
      processor each time the interrupt is allocated and released.  This may lead
      to an unbalanced distribution over time.
      
      A static mapping of interrupts to processors is done to optimize and balance
      interrupt distribution.  For the T1/T2, interrupts are spread to different
      cores first, and then to strands within a core.
      
      The following is some benchmarks showing the effects of interrupt
      distribution on a T2.  The test was done with iperf using a pair of T5220
      boxes, each with a 10GBe NIU (XAUI) connected back to back.
      
        TCP     | Stock       Linear RR IRQ  Optimized IRQ
        Streams | 2.6.30-rc5  Distribution   Distribution
                | GBits/sec   GBits/sec      GBits/sec
        --------+-----------------------------------------
          1       0.839       0.862          0.868
          8       1.16        4.96           5.88
         16       1.15        6.40           8.04
        100       1.09        7.28           8.68
      Signed-off-by: NHong H. Pham <hong.pham@windriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      280ff974
  8. 28 4月, 2009 1 次提交
    • Y
      irq: change ->set_affinity() to return status · d5dedd45
      Yinghai Lu 提交于
      according to Ingo, change set_affinity() in irq_chip should return int,
      because that way we can handle failure cases in a much cleaner way, in
      the genirq layer.
      
      v2: fix two typos
      
      [ Impact: extend API ]
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Suresh Siddha <suresh.b.siddha@intel.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: linux-arch@vger.kernel.org
      LKML-Reference: <49F654E9.4070809@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      d5dedd45
  9. 16 3月, 2009 1 次提交
  10. 05 3月, 2009 1 次提交
    • D
      sparc64: Fix lost interrupts on sun4u. · d0cac39e
      David S. Miller 提交于
      Based upon a report by Meelis Roos.
      
      Sparc64 SBUS and PCI controllers use a combination of IMAP and ICLR
      registers to manage device interrupts.
      
      The IMAP register contains the "valid" enable bit as well as CPU
      targetting information.  Whereas the ICLR register is written with
      zero at the end of handling an interrupt to reset the state machine
      for that interrupt to IDLE so it can be sent again.
      
      For PCI slot and SBUS slot devices we can have multiple interrupts
      sharing the same IMAP register.  There are individual ICLR registers
      but only one IMAP register for managing those.
      
      We represent each shared case with individual virtual IRQs so the
      generic IRQ layer thinks there is only one user of the IRQ instance.
      
      In such shared IMAP cases this is wrong, so if there are multiple
      active users then a free_irq() call will prematurely turn off the
      interrupt by clearing the Valid bit in the IMAP register even though
      there are other active users.
      
      Fix this by simply doing nothing in sun4u_disable_irq() and checking
      IRQF_DISABLED during IRQ dispatch.
      
      This situation doesn't exist in the hypervisor sun4v cases, so I left
      those alone.
      Tested-by: NMeelis Roos <mroos@linux.ee>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d0cac39e
  11. 30 1月, 2009 1 次提交
  12. 22 1月, 2009 1 次提交
  13. 13 1月, 2009 1 次提交
  14. 05 12月, 2008 2 次提交
  15. 17 9月, 2008 1 次提交
    • D
      sparc64: Fix SMP bootup with CONFIG_STACK_DEBUG or ftrace. · 9843099f
      David S. Miller 提交于
      Based upon a report by Meelis Roos.
      
      Any function call can try to access the current
      thread register via the _mcount hooks when the kernel
      is built with -pg (via ftrace or STACK_DEBUG).
      
      That can't be setup properly very early on during
      the bootup of other cpus for sun4u and some early
      sun4v systems.
      
      So add notrace markers to these specific functions, so
      that _mcount doesn't get invoked too early.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9843099f
  16. 09 9月, 2008 1 次提交
  17. 29 8月, 2008 1 次提交
  18. 13 8月, 2008 1 次提交
  19. 05 8月, 2008 1 次提交
  20. 23 7月, 2008 1 次提交
    • D
      sparc64: Fix lockdep issues in LDC protocol layer. · b7c2a757
      David S. Miller 提交于
      We're calling request_irq() with a IRQs disabled.
      
      No straightforward fix exists because we want to
      enable these IRQs and setup state atomically before
      getting into the IRQ handler the first time.
      
      What happens now is that we mark the VIRQ to not be
      automatically enabled by request_irq().  Then we
      make explicit enable_irq() calls when we grab the
      LDC channel.
      
      This way we don't need to call request_irq() illegally
      under the LDC channel lock any more.
      
      Bump LDC version and release date.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b7c2a757
  21. 27 4月, 2008 1 次提交
    • D
      sparc64: Fix wedged irq regression. · 227c3311
      David S. Miller 提交于
      Kernel bugzilla 10273
      
      As reported by Jos van der Ende, ever since commit
      5a606b72 ("[SPARC64]: Do not ACK an
      INO if it is disabled or inprogress.") sun4u interrupts
      can get stuck.
      
      What this changset did was add the following conditional to
      the various IRQ chip ->enable() handlers on sparc64:
      
      	if (unlikely(desc->status & (IRQ_DISABLED|IRQ_INPROGRESS)))
      		return;
      
      which is correct, however it means that special care is needed
      in the ->enable() method.
      
      Specifically we must put the interrupt into IDLE state during
      an enable, or else it might never be sent out again.
      
      Setting the INO interrupt state to IDLE resets the state machine,
      the interrupt input to the INO is retested by the hardware, and
      if an interrupt is being signalled by the device, the INO
      moves back into TRANSMIT state, and an interrupt vector is sent
      to the cpu.
      
      The two sun4v IRQ chip handlers were already doing this properly,
      only sun4u got it wrong.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      227c3311
  22. 26 3月, 2008 1 次提交
  23. 09 2月, 2008 1 次提交
  24. 22 10月, 2007 1 次提交
  25. 18 10月, 2007 1 次提交
  26. 14 10月, 2007 11 次提交
  27. 31 8月, 2007 2 次提交
    • D
      [SPARC64]: Fix several bugs in MSI handling. · 5f92c329
      David S. Miller 提交于
      1) sun4{u,v}_build_msi() have improper return value handling.
      
         We should always return negative error codes, instead of
         using the magic value "0" which could in fact be a valid
         MSI number.
      
      2) sun4{u,v}_build_msi() should return -ENOMEM instead of
         calling prom_prom() halt with kzalloc() of the interrupt
         data fails.
      
      3) We 'remembered' the MSI number using a singleton in the
         struct device archdata area, this doesn't work for MSI-X
         which can cause multiple MSIs assosciated with one device.
      
         Delete that archdata member, and instead store the MSI
         number in the IRQ chip data area.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5f92c329
    • D
      [SPARC64]: Fix type and constant sizes wrt. sun4u IMAP/ICLR handling. · 6e69d606
      David S. Miller 提交于
      Sometimes we were using 32-bit values and the top bits were
      getting inadvertantly chopped off.  This will matter for the
      forthcoming Fire controller MSI support.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6e69d606
  28. 09 8月, 2007 1 次提交