1. 03 12月, 2008 1 次提交
  2. 01 12月, 2008 1 次提交
    • A
      powerpc/mpic: Don't reset affinity for secondary MPIC on boot · cc353c30
      Arnd Bergmann 提交于
      Kexec/kdump currently fails on the IBM QS2x blades when the kexec happens
      on a CPU other than the initial boot CPU.  It turns out that this is the
      result of mpic_init trying to set affinity of each interrupt vector to the
      current boot CPU.
      
      As far as I can tell,  the same problem is likely to exist on any
      secondary MPIC, because they have to deliver interrupts to the first
      output all the time. There are two potential solutions for this: either
      not set up affinity at all for secondary MPICs, or assume that a single
      CPU output is connected to the upstream interrupt controller and hardcode
      affinity to that per architecture.
      
      This patch implements the second approach, defaulting to the first output.
      Currently, all known secondary MPICs are routed to their upstream port
      using the first destination, so we hardcode that.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      cc353c30
  3. 31 10月, 2008 1 次提交
  4. 26 6月, 2008 1 次提交
  5. 09 6月, 2008 2 次提交
  6. 23 5月, 2008 2 次提交
  7. 07 4月, 2008 1 次提交
  8. 26 2月, 2008 1 次提交
  9. 25 1月, 2008 1 次提交
  10. 24 1月, 2008 1 次提交
  11. 28 12月, 2007 2 次提交
    • O
      [POWERPC] pasemi: Distribute interrupts evenly across cpus · d87bf3be
      Olof Johansson 提交于
      By default the OpenPIC on PWRficient will bias to one core (since that
      will improve changes of the other core being able to stay idle/powered
      down). However, this conflicts with most irq load balancing schemes,
      since setting an interrupt to be delivered to either core doesn't really
      result in the load being shared. It also doesn't work well with the
      soft irq disable feature of PPC, since EE will stay on until the first
      interrupt is taken while soft disabled.
      
      Set the gconf0 config bit that enables even distribution of interrupts
      among the two cores.
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      d87bf3be
    • O
      [POWERPC] pasemi: Implement NMI support · f365355e
      Olof Johansson 提交于
      Some PWRficient-based boards have a NMI button that's wired up to a GPIO
      as interrupt source. By configuring the openpic accordingly, these get
      delivered as a machine check with high priority, instead of as an external
      interrupt.
      
      The device tree contains a property "nmi-source" in the openpic node
      for these systems, and it's the (hwirq) source for the input.
      
      Also, for these interrupts, the IACK is read from another register than
      the regular (MCACK instead), but they are EOI'd as usual. So implement
      said function for the mpic driver.
      
      Finally, move a couple of external function defines to include/ instead
      of local under sysdev. Being able to mask/unmask and eoi directly saves
      us from setting up a dummy irq handler that will never be called.
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      f365355e
  12. 20 12月, 2007 2 次提交
    • O
      [POWERPC] pasemi: Implement MSI support · 38958dd9
      Olof Johansson 提交于
      Implement MSI support for PA Semi PWRficient platforms. MSI is done
      through a special range of sources on the openpic controller, and they're
      unfortunately breaking the usual concepts of how sources are programmed:
      
      * The source is calculated as 512 + the value written into the MSI
        register
      * The vector for this source is added to the source and reported
        through IACK
      
      This means that for simplicity, it makes much more sense to just set the
      vector to 0 for the source, since that's really the vector we expect to
      see from IACK.
      
      Also, the affinity/priority registers will affect 16 sources at a
      time. To avoid most (simple) users from being limited by this, allocate
      16 sources per device but use only one. This means that there's a total
      of 32 sources.
      
      If we get usage scenarions that need more sources, the allocator should
      probably be revised to take an alignment argument and size, not just do
      natural alignment.
      
      Finally, since I'm already touching the MPIC names on pasemi, rename
      the base one from the somewhat odd " PAS-OPIC  " to "PASEMI-OPIC".
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      Acked-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      38958dd9
    • O
      [POWERPC] MPIC: Minor optimization of ipi handler · 194046a1
      Olof Johansson 提交于
      Optimize MPIC IPIs, by passing in the IPI number as the argument to the
      handler, since all we did was translate it back based on which mpic
      the interrupt came though on (and that was always the primary mpic).
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      194046a1
  13. 16 10月, 2007 1 次提交
    • M
      Add dcr_host_t.base in dcr_read()/dcr_write() · 83f34df4
      Michael Ellerman 提交于
      Now that all users of dcr_read()/dcr_write() add the dcr_host_t.base, we
      can save them the trouble and do it in dcr_read()/dcr_write().
      
      As some background to why we just went through all this jiggery-pokery,
      benh sayeth:
      
       Initially the goal of the dcr_read/dcr_write routines was to operate like
       mfdcr/mtdcr which take absolute DCR numbers. The reason is that on 4xx
       hardware, indirect DCR access is a pain (goes through a table of
       instructions) and it's useful to have the compiler resolve an absolute DCR
       inline.
      
       We decided that wasn't worth the API bastardisation since most places
       where absolute DCR values are used are low level 4xx-only code which may
       as well continue using mfdcr/mtdcr, while the new API is designed for
       device "instances" that can exist on 4xx and Axon type platforms and may
       be located at variable DCR offsets.
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      83f34df4
  14. 03 10月, 2007 1 次提交
  15. 22 9月, 2007 1 次提交
  16. 13 9月, 2007 2 次提交
  17. 22 7月, 2007 1 次提交
    • B
      [POWERPC] MPIC protected sources · 7fd72186
      Benjamin Herrenschmidt 提交于
      Some HW platforms, such as the new cell blades, requires some MPIC sources
      to be left alone by the operating system. This implements support for
      a "protected-sources" property in the mpic controller node containing a list
      of source numbers to be protected against operating system interference.
      
      For those interested in the gory details, the MPIC on the southbridge of
      those blades has some of the processor outputs routed to the cell, and
      at least one routed as a GPIO to the service processor. It will be used
      in the GA product for routing some of the southbridge error interrupts
      to the service processor which implements some of the RAS stuff, such
      as checkstopping when fatal errors occurs before they can propagate.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Acked-by: NArnd Bergmann <arnd.bergmann@de.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      7fd72186
  18. 17 5月, 2007 1 次提交
  19. 08 5月, 2007 3 次提交
  20. 07 5月, 2007 1 次提交
  21. 02 5月, 2007 1 次提交
  22. 24 4月, 2007 1 次提交
  23. 13 4月, 2007 1 次提交
  24. 16 2月, 2007 1 次提交
  25. 14 2月, 2007 1 次提交
  26. 07 2月, 2007 1 次提交
  27. 24 1月, 2007 1 次提交
  28. 21 12月, 2006 1 次提交
  29. 04 12月, 2006 2 次提交
    • B
      [POWERPC] Improve MPIC driver auto-configuration from DT · a959ff56
      Benjamin Herrenschmidt 提交于
      This patch applies on top of the MPIC DCR support. It makes the MPIC
      driver capable of a lot more auto-configuration based on the device-tree,
      for example, it can retreive it's own physical address if not passed as
      an argument, find out if it's DCR or MMIO mapped, and set the BIG_ENDIAN
      flag automatically in the presence of a "big-endian" property in the
      device-tree node.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      a959ff56
    • B
      [POWERPC] Support for DCR based MPIC · fbf0274e
      Benjamin Herrenschmidt 提交于
      This patch implements support for DCR based MPIC implementations. Such
      implementations have the MPIC_USES_DCR flag set and don't use the phys_addr
      argument of mpic_alloc (they require a valid dcr mapping in the device node)
      
      This version of the patch can use a little bif of cleanup still (I can
      probably consolidate rb->dbase/doff, at least once I'm sure on how the
      hardware is actually supposed to work vs. possible simulator issues) and
      it should be possible to build a DCR-only version of the driver. I need
      to cleanup a bit the CONFIG_* handling for that and probably introduce
      CONFIG_MPIC_MMIO and CONFIG_MPIC_DCR.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      fbf0274e
  30. 07 10月, 2006 1 次提交
  31. 05 10月, 2006 1 次提交
    • D
      IRQ: Maintain regs pointer globally rather than passing to IRQ handlers · 7d12e780
      David Howells 提交于
      Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
      of passing regs around manually through all ~1800 interrupt handlers in the
      Linux kernel.
      
      The regs pointer is used in few places, but it potentially costs both stack
      space and code to pass it around.  On the FRV arch, removing the regs parameter
      from all the genirq function results in a 20% speed up of the IRQ exit path
      (ie: from leaving timer_interrupt() to leaving do_IRQ()).
      
      Where appropriate, an arch may override the generic storage facility and do
      something different with the variable.  On FRV, for instance, the address is
      maintained in GR28 at all times inside the kernel as part of general exception
      handling.
      
      Having looked over the code, it appears that the parameter may be handed down
      through up to twenty or so layers of functions.  Consider a USB character
      device attached to a USB hub, attached to a USB controller that posts its
      interrupts through a cascaded auxiliary interrupt controller.  A character
      device driver may want to pass regs to the sysrq handler through the input
      layer which adds another few layers of parameter passing.
      
      I've build this code with allyesconfig for x86_64 and i386.  I've runtested the
      main part of the code on FRV and i386, though I can't test most of the drivers.
      I've also done partial conversion for powerpc and MIPS - these at least compile
      with minimal configurations.
      
      This will affect all archs.  Mostly the changes should be relatively easy.
      Take do_IRQ(), store the regs pointer at the beginning, saving the old one:
      
      	struct pt_regs *old_regs = set_irq_regs(regs);
      
      And put the old one back at the end:
      
      	set_irq_regs(old_regs);
      
      Don't pass regs through to generic_handle_irq() or __do_IRQ().
      
      In timer_interrupt(), this sort of change will be necessary:
      
      	-	update_process_times(user_mode(regs));
      	-	profile_tick(CPU_PROFILING, regs);
      	+	update_process_times(user_mode(get_irq_regs()));
      	+	profile_tick(CPU_PROFILING);
      
      I'd like to move update_process_times()'s use of get_irq_regs() into itself,
      except that i386, alone of the archs, uses something other than user_mode().
      
      Some notes on the interrupt handling in the drivers:
      
       (*) input_dev() is now gone entirely.  The regs pointer is no longer stored in
           the input_dev struct.
      
       (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking.  It does
           something different depending on whether it's been supplied with a regs
           pointer or not.
      
       (*) Various IRQ handler function pointers have been moved to type
           irq_handler_t.
      Signed-Off-By: NDavid Howells <dhowells@redhat.com>
      (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
      7d12e780
  32. 04 10月, 2006 1 次提交