Re: [PATCH/WIP] Remove 'irq' argument from all IRQ handlers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff Garzik <[email protected]> writes:

> Attached is the patch and description that represents a current
> work-in-progress, removal of the 'irq' argument passed to all driver IRQ
> handlers.
>
> As this patch demonstrates, the 'irq' argument is useless and practically
> unused.  The vast majority of drivers have this information elsewhere (struct
> pci_dev or private struct).  The cases where it is actually used are as follows:
>
> * a couple Mac drivers have multiple IRQs, and use the irq argument for
> disambiguation purposes.  This can easily be remedied by moving that information
> into the info passed in the normal void* pointer.
>
> * Several ancient ISA drivers, which mainly use it for printk-in-irq-handler
> purposes.  A couple use the irq argument as an index into a structure, which is
> a buggy approach.  I fixed up these.
>
> This can be found in the 'hacking-irq-remove' branch of
> git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/misc-2.6.git
>
>
> Before I will even consider submitting this upstream, this patchset needs
>
> * non-x86[-64] build fixes, and testing
> * update the Mac drivers
> * one more review pass, to make sure everything is kosher
>
> so IOW, not anytime soon :)
>
> Jeff Garzik (12):
>       [irq-remove] Update core irq handling code to omit 'irq' parameter
>       [irq-remove] update sound drivers for new irq handler function sig
>       [irq-remove] update SCSI, ATA, IDE drivers for new irq handler function
> sig
>       [irq-remove] update net drivers for new irq handler function sig
>       driver irq handler arg removal: acorn, atm, block, bluetooth, cdrom
>       driver irq handler arg removal: arch-specific code
>       driver irq handler arg removal: acpi, char, dma, fc4
>       driver irq handler arg removal: i2c, ieee1394, infiniband, input, isdn
>       driver irq handler arg removal: macintosh, media, message, mfd, misc, mmc
>       driver irq handler arg removal: serial, video
>       driver irq handler arg removal: the rest
>       irq-remove: build and warning fixes for 2.6.21

Looks reasonable to me.  In my nefarious plans to make everything use
a struct irq pointer this would certainly help.

The get_irqfunc_irq() function to get the irq for the functions that
still need it looks like a very useful migration path.

Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux