[PATCH 16/54] ARM: footbridge: irq_data conversion.
Russell King - ARM Linux
linux at arm.linux.org.uk
Fri Dec 3 12:24:36 EST 2010
On Tue, Nov 30, 2010 at 02:36:41PM +0100, Lennert Buytenhek wrote:
> Signed-off-by: Lennert Buytenhek <buytenh at secretlab.ca>
Acked-by: Russell King <rmk+kernel at arm.linux.org.uk>
Note that there's a big with the isa-irq code - it assumes that we still
have the ARM implementation of IRQ support, where there was a global lock.
As this is no longer the case, the read-modify-writes there are no longer
safe and need fixing.
> ---
> arch/arm/mach-footbridge/common.c | 14 +++++++-------
> arch/arm/mach-footbridge/isa-irq.c | 36 ++++++++++++++++++------------------
> 2 files changed, 25 insertions(+), 25 deletions(-)
>
> diff --git a/arch/arm/mach-footbridge/common.c b/arch/arm/mach-footbridge/common.c
> index 88b3dd8..84c5f25 100644
> --- a/arch/arm/mach-footbridge/common.c
> +++ b/arch/arm/mach-footbridge/common.c
> @@ -75,20 +75,20 @@ static const int fb_irq_mask[] = {
> IRQ_MASK_PCI_PERR, /* 19 */
> };
>
> -static void fb_mask_irq(unsigned int irq)
> +static void fb_mask_irq(struct irq_data *d)
> {
> - *CSR_IRQ_DISABLE = fb_irq_mask[_DC21285_INR(irq)];
> + *CSR_IRQ_DISABLE = fb_irq_mask[_DC21285_INR(d->irq)];
> }
>
> -static void fb_unmask_irq(unsigned int irq)
> +static void fb_unmask_irq(struct irq_data *d)
> {
> - *CSR_IRQ_ENABLE = fb_irq_mask[_DC21285_INR(irq)];
> + *CSR_IRQ_ENABLE = fb_irq_mask[_DC21285_INR(d->irq)];
> }
>
> static struct irq_chip fb_chip = {
> - .ack = fb_mask_irq,
> - .mask = fb_mask_irq,
> - .unmask = fb_unmask_irq,
> + .irq_ack = fb_mask_irq,
> + .irq_mask = fb_mask_irq,
> + .irq_unmask = fb_unmask_irq,
> };
>
> static void __init __fb_init_irq(void)
> diff --git a/arch/arm/mach-footbridge/isa-irq.c b/arch/arm/mach-footbridge/isa-irq.c
> index 8bfd06a..de7a5cb 100644
> --- a/arch/arm/mach-footbridge/isa-irq.c
> +++ b/arch/arm/mach-footbridge/isa-irq.c
> @@ -30,61 +30,61 @@
>
> #include "common.h"
>
> -static void isa_mask_pic_lo_irq(unsigned int irq)
> +static void isa_mask_pic_lo_irq(struct irq_data *d)
> {
> - unsigned int mask = 1 << (irq & 7);
> + unsigned int mask = 1 << (d->irq & 7);
>
> outb(inb(PIC_MASK_LO) | mask, PIC_MASK_LO);
> }
>
> -static void isa_ack_pic_lo_irq(unsigned int irq)
> +static void isa_ack_pic_lo_irq(struct irq_data *d)
> {
> - unsigned int mask = 1 << (irq & 7);
> + unsigned int mask = 1 << (d->irq & 7);
>
> outb(inb(PIC_MASK_LO) | mask, PIC_MASK_LO);
> outb(0x20, PIC_LO);
> }
>
> -static void isa_unmask_pic_lo_irq(unsigned int irq)
> +static void isa_unmask_pic_lo_irq(struct irq_data *d)
> {
> - unsigned int mask = 1 << (irq & 7);
> + unsigned int mask = 1 << (d->irq & 7);
>
> outb(inb(PIC_MASK_LO) & ~mask, PIC_MASK_LO);
> }
>
> static struct irq_chip isa_lo_chip = {
> - .ack = isa_ack_pic_lo_irq,
> - .mask = isa_mask_pic_lo_irq,
> - .unmask = isa_unmask_pic_lo_irq,
> + .irq_ack = isa_ack_pic_lo_irq,
> + .irq_mask = isa_mask_pic_lo_irq,
> + .irq_unmask = isa_unmask_pic_lo_irq,
> };
>
> -static void isa_mask_pic_hi_irq(unsigned int irq)
> +static void isa_mask_pic_hi_irq(struct irq_data *d)
> {
> - unsigned int mask = 1 << (irq & 7);
> + unsigned int mask = 1 << (d->irq & 7);
>
> outb(inb(PIC_MASK_HI) | mask, PIC_MASK_HI);
> }
>
> -static void isa_ack_pic_hi_irq(unsigned int irq)
> +static void isa_ack_pic_hi_irq(struct irq_data *d)
> {
> - unsigned int mask = 1 << (irq & 7);
> + unsigned int mask = 1 << (d->irq & 7);
>
> outb(inb(PIC_MASK_HI) | mask, PIC_MASK_HI);
> outb(0x62, PIC_LO);
> outb(0x20, PIC_HI);
> }
>
> -static void isa_unmask_pic_hi_irq(unsigned int irq)
> +static void isa_unmask_pic_hi_irq(struct irq_data *d)
> {
> - unsigned int mask = 1 << (irq & 7);
> + unsigned int mask = 1 << (d->irq & 7);
>
> outb(inb(PIC_MASK_HI) & ~mask, PIC_MASK_HI);
> }
>
> static struct irq_chip isa_hi_chip = {
> - .ack = isa_ack_pic_hi_irq,
> - .mask = isa_mask_pic_hi_irq,
> - .unmask = isa_unmask_pic_hi_irq,
> + .irq_ack = isa_ack_pic_hi_irq,
> + .irq_mask = isa_mask_pic_hi_irq,
> + .irq_unmask = isa_unmask_pic_hi_irq,
> };
>
> static void
> --
> 1.7.1
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
More information about the linux-arm-kernel
mailing list