[lkml]   [2003]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [RFC] irq handling code consolidation, second try (ppc part)
    On Sat, 2003-01-04 at 12:59, Andrey Panin wrote:
    > Hi all,
    > attached patch is a second try of IRQ handling code consolidation.
    > This is a ppc specific patch (compiled successfuly).
    > Beware, this patch removes some old(?) and crappy code:
    > - irq_kmalloc(), irq_kfree() removed. If ppc need to register
    > irqs early, it should use setup_irq() as all decent people do :))
    > - request_irq() with NULL handler argument == free_irq(), does
    > anyone use this kludge ?

    After a quick look, things look fine some of this old PPC crap should indeed
    be killed now.

    There's something else I would like to implement one of these days, and your
    consolidation work makes it easier (except for archs that won't use it...).
    Basically, I want some (few and rare enough though) drivers to be able
    to define interrupt controllers and thus create their own IRQs.

    The typical example for which I need that is cardbus. I need the cardbus
    controller on PCI to be seen as a real cascaded controller, that is I want
    devices below it (either PCI or PCMCIA) calls to request/free/enable/disable_irq
    for their to be caught by the cardbus driver.
    This is the only sane way to properly enable/disable bridging of the
    interrupt upon request from the driver. Without that, I still can frequent
    lockups with various pcmcia cards when inserted/removed due to IRQ line
    beeing stuck down on slot shutdown or other crappy things happening
    typically with legacy PCMCIA stuffs (ATA is a good example of crappy behaviour).

    The "easy" way here to implement that is to make the irq_desc array larger than
    NR_IRQs (or rather split NR_IRQs into NR_SYS_IRQS + NR_DYNAMIC_IRQS). The
    additional "slots" could then easily be allocated/freed. Thus, keeping my
    cardbus example, the cardbus driver can allocate a couple of slots (that is IRQ
    numbers) dynamically, and use it's own startup/shutdown/enable/disable/...
    hooks for them, dealing itself with the cascade from the PCI irq. (Of course,
    this is not for systems using cardbus routed to legacy IRQs, but for systems
    like PPC where the PCI irq is mux'ing both the device IRQs and the controller
    own IRQ).


    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:32    [W:0.033 / U:0.048 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site