1. 25 1月, 2008 1 次提交
  2. 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
  3. 03 10月, 2007 1 次提交
  4. 22 9月, 2007 1 次提交
  5. 13 9月, 2007 2 次提交
  6. 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
  7. 17 5月, 2007 1 次提交
  8. 08 5月, 2007 3 次提交
  9. 07 5月, 2007 1 次提交
  10. 02 5月, 2007 1 次提交
  11. 24 4月, 2007 1 次提交
  12. 13 4月, 2007 1 次提交
  13. 16 2月, 2007 1 次提交
  14. 14 2月, 2007 1 次提交
  15. 07 2月, 2007 1 次提交
  16. 24 1月, 2007 1 次提交
  17. 21 12月, 2006 1 次提交
  18. 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
  19. 07 10月, 2006 1 次提交
  20. 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
  21. 04 10月, 2006 1 次提交
  22. 27 9月, 2006 1 次提交
  23. 30 8月, 2006 1 次提交
    • Z
      [POWERPC] Support for "weird" MPICs and fixup mpc7448_hpc2 · 7233593b
      Zang Roy-r61911 提交于
      This adds a new hardware information table for mpic. This enables
      the mpic code to deal with mpic controllers with different register
      layouts and hardware behaviours.
      
      This introduces CONFIG_MPIC_WEIRD.  For boards with non standard mpic
      controllers, select CONFIG_MPIC_WEIRD and add its hardware information
      in the mpic_infos[] array.
      
      TSI108/109 PIC takes the first index of weird hardware information
      table.  :)  The table can be extended. The Tsi108/109 PIC looks like
      standard OpenPIC but, in fact, is different in register mapping and
      behavior.
      
      The patch does not affect the behavior of standard mpic.  If
      CONFIG_MPIC_WEIRD is not defined, the code is essentially identical to
      the current code.
      
      [benh@kernel.crashing.org:
      This patch is a slightly cleaned up version of Zang Roy's support for
      the TSI108 MPIC variant. It also fixes up MPC7448_hpc2 to use the new
      version of the type macros and changes the way MPIC is selected in
      Kconfig to better match what is done for other system devices.
      ]
      Signed-off-by: NRoy Zang <tie-fei.zang@freescale.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      7233593b
  24. 11 7月, 2006 2 次提交
    • B
      [PATCH] powerpc: fix MPIC OF tree parsing on Apple quad g5 · 06fe98e6
      Benjamin Herrenschmidt 提交于
      The quad g5 currently doesn't boot due to two problems.  This patch fixes the
      first one: Apple new way of doing interrupt specifiers in OF for devices using
      the HT APIC isn't properly parsed by the new MPIC driver code.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      06fe98e6
    • B
      [PATCH] powerpc: fix trigger handling in the new irq code · 6e99e458
      Benjamin Herrenschmidt 提交于
      This patch slightly reworks the new irq code to fix a small design error.  I
      removed the passing of the trigger to the map() calls entirely, it was not a
      good idea to have one call do two different things.  It also fixes a couple of
      corner cases.
      
      Mapping a linux virtual irq to a physical irq now does only that.  Setting the
      trigger is a different action which has a different call.
      
      The main changes are:
      
      - I no longer call host->ops->map() for an already mapped irq, I just return
        the virtual number that was already mapped.  It was called before to give an
        opportunity to change the trigger, but that was causing issues as that could
        happen while the interrupt was in use by a device, and because of the
        trigger change, map would potentially muck around with things in a racy way.
         That was causing much burden on a given's controller implementation of
        map() to get it right.  This is much simpler now.  map() is only called on
        the initial mapping of an irq, meaning that you know that this irq is _not_
        being used.  You can initialize the hardware if you want (though you don't
        have to).
      
      - Controllers that can handle different type of triggers (level/edge/etc...)
        now implement the standard irq_chip->set_type() call as defined by the
        generic code.  That means that you can use the standard set_irq_type() to
        configure an irq line manually if you wish or (though I don't like that
        interface), pass explicit trigger flags to request_irq() as defined by the
        generic kernel interfaces.  Also, using those interfaces guarantees that
        your controller set_type callback is called with the descriptor lock held,
        thus providing locking against activity on the same interrupt (including
        mask/unmask/etc...) automatically.  A result is that, for example, MPIC's
        own map() implementation calls irq_set_type(NONE) to configure the hardware
        to the default triggers.
      
      - To allow the above, the irq_map array entry for the new mapped interrupt
        is now set before map() callback is called for the controller.
      
      - The irq_create_of_mapping() (also used by irq_of_parse_and_map()) function
        for mapping interrupts from the device-tree now also call the separate
        set_irq_type(), and only does so if there is a change in the trigger type.
      
      - While I was at it, I changed pci_read_irq_line() (which is the helper I
        would expect most archs to use in their pcibios_fixup() to get the PCI
        interrupt routing from the device tree) to also handle a fallback when the
        DT mapping fails consisting of reading the PCI_INTERRUPT_PIN to know wether
        the device has an interrupt at all, and the the PCI_INTERRUPT_LINE to get an
        interrupt number from the device.  That number is then mapped using the
        default controller, and the trigger is set to level low.  That default
        behaviour works for several platforms that don't have a proper interrupt
        tree like Pegasos.  If it doesn't work for your platform, then either
        provide a proper interrupt tree from the firmware so that fallback isn't
        needed, or don't call pci_read_irq_line()
      
      - Add back a bit that got dropped by my main rework patch for properly
        clearing pending IPIs on pSeries when using a kexec
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      6e99e458
  25. 06 7月, 2006 1 次提交
    • B
      [PATCH] powerpc: Fix loss of interrupts with MPIC · ba1826e5
      Benjamin Herrenschmidt 提交于
      With the new interrupt rework, an interrupt "host" map() callback can be
      called after the interrupt is already active.
      
      It's called again for an already mapped interrupt to allow changing the
      trigger setup, and currently this is not guarded with a test of wether
      the interrupt is requested or not.
      
      I plan to change some of this logic to be a bit less lenient against
      random reconfiguring of live interrupts but just not yet.
      
      The ported MPIC driver has a bug where when that happens, it will mask
      the interrupt.  This changes it to preserve the previous masking of the
      interrupt instead.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      ba1826e5
  26. 03 7月, 2006 3 次提交
    • B
      [POWERPC] Add new interrupt mapping core and change platforms to use it · 0ebfff14
      Benjamin Herrenschmidt 提交于
      This adds the new irq remapper core and removes the old one.  Because
      there are some fundamental conflicts with the old code, like the value
      of NO_IRQ which I'm now setting to 0 (as per discussions with Linus),
      etc..., this commit also changes the relevant platform and driver code
      over to use the new remapper (so as not to cause difficulties later
      in bisecting).
      
      This patch removes the old pre-parsing of the open firmware interrupt
      tree along with all the bogus assumptions it made to try to renumber
      interrupts according to the platform. This is all to be handled by the
      new code now.
      
      For the pSeries XICS interrupt controller, a single remapper host is
      created for the whole machine regardless of how many interrupt
      presentation and source controllers are found, and it's set to match
      any device node that isn't a 8259.  That works fine on pSeries and
      avoids having to deal with some of the complexities of split source
      controllers vs. presentation controllers in the pSeries device trees.
      
      The powerpc i8259 PIC driver now always requests the legacy interrupt
      range. It also has the feature of being able to match any device node
      (including NULL) if passed no device node as an input. That will help
      porting over platforms with broken device-trees like Pegasos who don't
      have a proper interrupt tree.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      0ebfff14
    • B
      [POWERPC] Use the genirq framework · b9e5b4e6
      Benjamin Herrenschmidt 提交于
      This adapts the generic powerpc interrupt handling code, and all of
      the platforms except for the embedded 6xx machines, to use the new
      genirq framework.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      b9e5b4e6
    • T
      [PATCH] irq-flags: POWERPC: Use the new IRQF_ constants · 6714465e
      Thomas Gleixner 提交于
      Use the new IRQF_ constants and remove the SA_INTERRUPT define
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      6714465e
  27. 01 7月, 2006 1 次提交
  28. 30 6月, 2006 2 次提交
    • I
      [PATCH] genirq: cleanup: merge irq_affinity[] into irq_desc[] · a53da52f
      Ingo Molnar 提交于
      Consolidation: remove the irq_affinity[NR_IRQS] array and move it into the
      irq_desc[NR_IRQS].affinity field.
      
      [akpm@osdl.org: sparc64 build fix]
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      a53da52f
    • I
      [PATCH] genirq: rename desc->handler to desc->chip · d1bef4ed
      Ingo Molnar 提交于
      This patch-queue improves the generic IRQ layer to be truly generic, by adding
      various abstractions and features to it, without impacting existing
      functionality.
      
      While the queue can be best described as "fix and improve everything in the
      generic IRQ layer that we could think of", and thus it consists of many
      smaller features and lots of cleanups, the one feature that stands out most is
      the new 'irq chip' abstraction.
      
      The irq-chip abstraction is about describing and coding and IRQ controller
      driver by mapping its raw hardware capabilities [and quirks, if needed] in a
      straightforward way, without having to think about "IRQ flow"
      (level/edge/etc.) type of details.
      
      This stands in contrast with the current 'irq-type' model of genirq
      architectures, which 'mixes' raw hardware capabilities with 'flow' details.
      The patchset supports both types of irq controller designs at once, and
      converts i386 and x86_64 to the new irq-chip design.
      
      As a bonus side-effect of the irq-chip approach, chained interrupt controllers
      (master/slave PIC constructs, etc.) are now supported by design as well.
      
      The end result of this patchset intends to be simpler architecture-level code
      and more consolidation between architectures.
      
      We reused many bits of code and many concepts from Russell King's ARM IRQ
      layer, the merging of which was one of the motivations for this patchset.
      
      This patch:
      
      rename desc->handler to desc->chip.
      
      Originally i did not want to do this, because it's a big patch.  But having
      both "desc->handler", "desc->handle_irq" and "action->handler" caused a
      large degree of confusion and made the code appear alot less clean than it
      truly is.
      
      I have also attempted a dual approach as well by introducing a
      desc->chip alias - but that just wasnt robust enough and broke
      frequently.
      
      So lets get over with this quickly.  The conversion was done automatically
      via scripts and converts all the code in the kernel.
      
      This renaming patch is the first one amongst the patches, so that the
      remaining patches can stay flexible and can be merged and split up
      without having some big monolithic patch act as a merge barrier.
      
      [akpm@osdl.org: build fix]
      [akpm@osdl.org: another build fix]
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      d1bef4ed
  29. 21 6月, 2006 1 次提交
    • M
      [POWERPC] mpic: add support for serial mode interrupts · 868ea0c9
      Mark A. Greer 提交于
      On Tue, Jun 20, 2006 at 02:01:26PM +1000, Benjamin Herrenschmidt wrote:
      > On Mon, 2006-06-19 at 13:08 -0700, Mark A. Greer wrote:
      > > MPC10x-style interrupt controllers have a serial mode that allows
      > > several interrupts to be clocked in through one INT signal.
      > >
      > > This patch adds the software support for that mode.
      >
      > You hard code the clock ratio... why not add a separate call to be
      > called after mpic_init,
      > something like mpic_set_serial_int(int mpic, int enable, int
      > clock_ratio) ?
      
      How's this?
      --
      
      MPC10x-style interrupt controllers have a serial mode that allows
      several interrupts to be clocked in through one INT signal.
      
      This patch adds the software support for that mode.
      Signed-off-by: NMark A. Greer <mgreer@mvista.com>
      --
      
       arch/powerpc/sysdev/mpic.c |   20 ++++++++++++++++++++
       include/asm-powerpc/mpic.h |   10 ++++++++++
       2 files changed, 30 insertions(+)
      --
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      868ea0c9
  30. 24 2月, 2006 1 次提交
  31. 09 1月, 2006 2 次提交