1. 03 10月, 2007 1 次提交
  2. 19 9月, 2007 1 次提交
  3. 11 9月, 2007 1 次提交
  4. 13 4月, 2007 2 次提交
  5. 16 3月, 2007 2 次提交
    • J
      [POWERPC] ibmebus: dynamic addition/removal of adapters, some code cleanup · 6bccf755
      Joachim Fenkes 提交于
      This adds two sysfs attributes to /sys/bus/ibmebus which can be used to
      notify the ebus driver of added / removed ebus devices in the OF device
      tree.
      
      Echoing the device's location code (as found in the OFDT "ibm,loc-code"
      property) into the "probe" attribute will notify ebus of addition of the
      device and cause the appropriate device driver's probe function to be called
      on the device.
      
      Likewise, echoing the location code into the "remove" attribute will cause
      the device to be removed from the system.
      
      The writes will block until the respective operation has finished and return
      an error code if the operation failed.
      
      In addition, two minor tidbits are fixed:
      
      - The fake root device used to provide a common parent for all ebus devices
        is now based on device instead of of_device - it had no associated devtree
        node. This saves several checks throughout the ebus driver.
      
      - The sysfs attributes are now generated automagically by device_register()
        instead of by the ibmebus code, which saves a few compiler warnings about
        unused return codes.
      Signed-off-by: NJoachim Fenkes <fenkes@de.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      6bccf755
    • J
      [POWERPC] ibmebus: whitespace fixes · a8308800
      Joachim Fenkes 提交于
      This fixes a lot of whitespace in ibmebus.[ch]
      Signed-off-by: NJoachim Fenkes <fenkes@de.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      a8308800
  6. 04 12月, 2006 2 次提交
  7. 09 10月, 2006 1 次提交
    • D
      IRQ: Use the new typedef for interrupt handler function pointers · 40220c1a
      David Howells 提交于
      Use the new typedef for interrupt handler function pointers rather than
      actually spelling out the full thing each time.  This was scripted with the
      following small shell script:
      
      #!/bin/sh
      egrep -nHrl -e 'irqreturn_t[ 	]*[(][*]' $* |
      while read i
      do
          echo $i
          perl -pi -e 's/irqreturn_t\s*[(]\s*[*]\s*([_a-zA-Z0-9]*)\s*[)]\s*[(]\s*int\s*,\s*void\s*[*]\s*[)]/irq_handler_t \1/g' $i || exit $?
      done
      Signed-Off-By: NDavid Howells <dhowells@redhat.com>
      40220c1a
  8. 07 10月, 2006 1 次提交
  9. 31 7月, 2006 1 次提交
  10. 11 7月, 2006 1 次提交
    • 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
  11. 03 7月, 2006 1 次提交
    • 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
  12. 09 1月, 2006 1 次提交