mn10300: Convert to new irq_chip functions
cover mn10300: Convert to new irq_chip functions
Convert to new irq_chip functions and select GENERIC_HARDIRQS_NO_DEPRECATED
Untested due to lack of hardware and compiler.
Thanks,
tglx
PATCH 1/7 mn10300: Remove stale irq_chip.end - V2
irq_chip.end got obsolete with the remnoval of __do_IRQ().
Might compiles this time, if i had a compiler ...
Signed-off-by Thomas Gleixner <[email protected]>
--- arch/mn10300/kernel/mn10300-serial.c | 1 - 1 file changed, 1 deletion(-)
arch/mn10300/kernel/mn10300-serial.c +0 -1
@@ -394,7 +394,6 @@ static struct irq_chip mn10300_serial_pi .mask = mn10300_serial_mask_ack, .mask_ack = mn10300_serial_mask_ack, .unmask = mn10300_serial_nop, - .end = mn10300_serial_nop, };
PATCH 2/7 mn10300: Remove unused mn10300_intc_* functions
In reply to Thomas GleixnerNo users.
Signed-off-by Thomas Gleixner <[email protected]>
--- arch/mn10300/include/asm/intctl-regs.h | 5 ----- arch/mn10300/kernel/irq.c | 25 ------------------------- 2 files changed, 30 deletions(-)
arch/mn10300/include/asm/intctl-regs.h +0 -5
@@ -60,11 +60,6 @@#ifndef __ASSEMBLY__extern void set_intr_level (int irq,u16 level); -extern void mn10300_intc_set_level (unsigned int irq,unsigned int level); -extern void mn10300_intc_clear (unsigned int irq); -extern void mn10300_intc_set (unsigned int irq); -extern void mn10300_intc_enable (unsigned int irq); -extern void mn10300_intc_disable (unsigned int irq);extern void mn10300_set_lateack_irq_type (int irq);#endif
arch/mn10300/kernel/irq.c +0 -25
@@ -252,31 +252,6 @@ void set_intr_level(int irq, u16 level)__mask_and_set_icr (irq, GxICR_ENABLE, level); } -void mn10300_intc_set_level (unsigned int irq,unsigned int level) -{ -set_intr_level (irq,NUM2GxICR_LEVEL (level) & GxICR_LEVEL); -} - -void mn10300_intc_clear (unsigned int irq) -{ -__mask_and_set_icr (irq, GxICR_LEVEL | GxICR_ENABLE, GxICR_DETECT); -} - -void mn10300_intc_set (unsigned int irq) -{ -__mask_and_set_icr (irq,0 , GxICR_REQUEST | GxICR_DETECT); -} - -void mn10300_intc_enable (unsigned int irq) -{ -mn10300_cpupic_unmask (irq); -} - -void mn10300_intc_disable (unsigned int irq) -{ -mn10300_cpupic_mask (irq); -} -/* * mark an interrupt to be ACK'd after interrupt handlers have been run rather * than before
PATCH 3/7 mn10300: Convert cpu irq_chips to new functions
In reply to Thomas GleixnerSigned-off-by Thomas Gleixner <[email protected]>
--- arch/mn10300/kernel/irq.c | 62 ++++++++++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 29 deletions(-)
arch/mn10300/kernel/irq.c +33 -29
@@ -37,8 +37,9 @@ atomic_t irq_err_count;/* * MN10300 interrupt controller operations */ -static void mn10300_cpupic_ack (unsigned int irq) +static void mn10300_cpupic_ack (struct irq_chip *d) { +unsigned int irq = d->irq;unsigned long flags;u16 tmp;
@@ -61,13 +62,14 @@ static void __mask_and_set_icr(unsignedarch_local_irq_restore (flags); } -static void mn10300_cpupic_mask (unsigned int irq) +static void mn10300_cpupic_mask (struct irq_chip *d) { -__mask_and_set_icr (irq, GxICR_LEVEL,0 ); +__mask_and_set_icr (d->irq, GxICR_LEVEL,0 ); } -static void mn10300_cpupic_mask_ack (unsigned int irq) +static void mn10300_cpupic_mask_ack (struct irq_chip *d) { +unsigned int irq = d->irq;#ifdef CONFIG_SMP unsigned long flags;u16 tmp;
@@ -85,7 +87,7 @@ static void mn10300_cpupic_mask_ack(unsi tmp2 =GxICR (irq); irq_affinity_online[irq] = -any_online_cpu (*irq_desc[irq].affinity); +any_online_cpu (*d->affinity);CROSS_GxICR (irq, irq_affinity_online[irq]) = (tmp & (GxICR_LEVEL | GxICR_ENABLE)) | GxICR_DETECT; tmp =CROSS_GxICR (irq, irq_affinity_online[irq]);
@@ -97,13 +99,14 @@ static void mn10300_cpupic_mask_ack(unsi#endif /* CONFIG_SMP */ } -static void mn10300_cpupic_unmask (unsigned int irq) +static void mn10300_cpupic_unmask (struct irq_chip *d) { -__mask_and_set_icr (irq, GxICR_LEVEL, GxICR_ENABLE); +__mask_and_set_icr (d->irq, GxICR_LEVEL, GxICR_ENABLE); } -static void mn10300_cpupic_unmask_clear (unsigned int irq) +static void mn10300_cpupic_unmask_clear (struct irq_chip *d) { +unsigned int irq = d->irq;/* the MN10300 PIC latches its interrupt request bit, even after the * device has ceased to assert its interrupt line and the interrupt * channel has been disabled in the PIC, so for level-triggered
@@ -121,7 +124,7 @@ static void mn10300_cpupic_unmask_clear( }else { tmp =GxICR (irq); - irq_affinity_online[irq] =any_online_cpu (*irq_desc[irq].affinity); + irq_affinity_online[irq] =any_online_cpu (*d->affinity);CROSS_GxICR (irq, irq_affinity_online[irq]) = (tmp & GxICR_LEVEL) | GxICR_ENABLE | GxICR_DETECT; tmp =CROSS_GxICR (irq, irq_affinity_online[irq]); }
@@ -134,7 +137,8 @@ static void mn10300_cpupic_unmask_clear(#ifdef CONFIG_SMP static int -mn10300_cpupic_setaffinity (unsigned int irq,const struct cpumask *mask) +mn10300_cpupic_setaffinity (struct irq_chip *d,const struct cpumask *mask, +bool force) {unsigned long flags;int err;
@@ -142,7 +146,7 @@ mn10300_cpupic_setaffinity(unsigned int flags =arch_local_cli_save ();/* check irq no */ -switch (irq) { +switch (d->irq) {case TMJCIRQ :case RESCHEDULE_IPI :case CALL_FUNC_SINGLE_IPI :
@@ -181,7 +185,7 @@ mn10300_cpupic_setaffinity(unsigned intbreak ;default : -set_bit (irq, irq_affinity_request); +set_bit (d->irq, irq_affinity_request); err =0 ;break ; }
@@ -202,15 +206,15 @@ mn10300_cpupic_setaffinity(unsigned int* mask_ack() is provided), and mask_ack() just masks. */ static struct irq_chip mn10300_cpu_pic_level = { - .name ="cpu_l" , - .disable = mn10300_cpupic_mask, - .enable = mn10300_cpupic_unmask_clear, - .ack =NULL , - .mask = mn10300_cpupic_mask, - .mask_ack = mn10300_cpupic_mask, - .unmask = mn10300_cpupic_unmask_clear, + .name ="cpu_l" , + .irq_disable = mn10300_cpupic_mask, + .irq_enable = mn10300_cpupic_unmask_clear, + .irq_ack =NULL , + .irq_mask = mn10300_cpupic_mask, + .irq_mask_ack = mn10300_cpupic_mask, + .irq_unmask = mn10300_cpupic_unmask_clear, #ifdef CONFIG_SMP - .set_affinity = mn10300_cpupic_setaffinity, + .irq_set_affinity = mn10300_cpupic_setaffinity, #endif };
@@ -220,15 +224,15 @@ static struct irq_chip mn10300_cpu_pic_l* We use the latch clearing function of the PIC as the 'ACK' function. */ static struct irq_chip mn10300_cpu_pic_edge = { - .name ="cpu_e" , - .disable = mn10300_cpupic_mask, - .enable = mn10300_cpupic_unmask, - .ack = mn10300_cpupic_ack, - .mask = mn10300_cpupic_mask, - .mask_ack = mn10300_cpupic_mask_ack, - .unmask = mn10300_cpupic_unmask, + .name ="cpu_e" , + .irq_disable = mn10300_cpupic_mask, + .irq_enable = mn10300_cpupic_unmask, + .irq_ack = mn10300_cpupic_ack, + .irq_mask = mn10300_cpupic_mask, + .irq_mask_ack = mn10300_cpupic_mask_ack, + .irq_unmask = mn10300_cpupic_unmask, #ifdef CONFIG_SMP - .set_affinity = mn10300_cpupic_setaffinity, + .irq_set_affinity = mn10300_cpupic_setaffinity, #endif };
@@ -271,7 +275,7 @@ void __init init_IRQ(void)int irq;for (irq =0 ; irq <NR_IRQS ; irq++) -if (irq_desc[irq].chip == &no_irq_chip) +if (get_irq_chip (irq) == &no_irq_chip)/* due to the PIC latching interrupt requests, even * when the IRQ is disabled, IRQ_PENDING is superfluous * and we can use handle_level_irq() for edge-triggered
PATCH 4/7 mn10300: Convert serial irq_chip to new functions
In reply to Thomas GleixnerSigned-off-by Thomas Gleixner <[email protected]>
--- arch/mn10300/kernel/mn10300-serial.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)
arch/mn10300/kernel/mn10300-serial.c +10 -5
@@ -384,16 +384,21 @@ static void mn10300_serial_mask_ack(unsiarch_local_irq_restore (flags); } -static void mn10300_serial_nop (unsigned int irq) +static void mn10300_serial_chip_mask_ack (struct irq_data *d) +{ +mn10300_serial_mask_ack (d->irq); +} + +static void mn10300_serial_nop(struct irq_data *d { }static struct irq_chip mn10300_serial_pic = { .name ="mnserial" , - .ack = mn10300_serial_mask_ack, - .mask = mn10300_serial_mask_ack, - .mask_ack = mn10300_serial_mask_ack, - .unmask = mn10300_serial_nop, + .irq_ack = mn10300_serial_chip_mask_ack, + .irq_mask = mn10300_serial_chip_mask_ack, + .irq_mask_ack = mn10300_serial_chip_mask_ack, + .irq_unmask = mn10300_serial_nop, };
PATCH 5/7 mn10300: Convert ipi irq_chip to new functions
In reply to Thomas GleixnerSigned-off-by Thomas Gleixner <[email protected]>
--- arch/mn10300/kernel/smp.c | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-)
arch/mn10300/kernel/smp.c +22 -8
@@ -113,15 +113,17 @@ static void init_ipi(void);*/ static void mn10300_ipi_disable (unsigned int irq);static void mn10300_ipi_enable (unsigned int irq); -static void mn10300_ipi_ack (unsigned int irq); -static void mn10300_ipi_nop (unsigned int irq); +static void mn10300_ipi_chip_disable (struct irq_data *d); +static void mn10300_ipi_chip_enable (struct irq_data *d); +static void mn10300_ipi_ack (struct irq_data *d); +static void mn10300_ipi_nop (struct irq_data *d);static struct irq_chip mn10300_ipi_type = { .name ="cpu_ipi" , - .disable = mn10300_ipi_disable, - .enable = mn10300_ipi_enable, - .ack = mn10300_ipi_ack, - .eoi = mn10300_ipi_nop + .irq_disable = mn10300_ipi_chip_disable, + .irq_enable = mn10300_ipi_chip_enable, + .irq_ack = mn10300_ipi_ack, + .irq_eoi = mn10300_ipi_nop };static irqreturn_t smp_reschedule_interrupt (int irq,void *dev_id);
@@ -236,6 +238,11 @@ static void mn10300_ipi_enable(unsignedarch_local_irq_restore (flags); } +static void mn10300_ipi_chip_enable (struct irq_data *d) +{ +mn10300_ipi_enable (d->irq); +} +/** * mn10300_ipi_disable - Disable an IPI * @irq: The IPI to be disabled.
@@ -254,6 +261,12 @@ static void mn10300_ipi_disable(unsignedarch_local_irq_restore (flags); } +static void mn10300_ipi_chip_disable (struct irq_data *d) +{ +mn10300_ipi_disable (d->irq); +} + +/** * mn10300_ipi_ack - Acknowledge an IPI interrupt in the PIC * @irq: The IPI to be acknowledged.
@@ -261,8 +274,9 @@ static void mn10300_ipi_disable(unsigned* Clear the interrupt detection flag for the IPI on the appropriate interrupt * channel in the PIC. */ -static void mn10300_ipi_ack (unsigned int irq) +static void mn10300_ipi_ack (struct irq_data *d) { +unsigned int irq = d->irq;unsigned long flags;u16 tmp;
@@ -276,7 +290,7 @@ static void mn10300_ipi_ack(unsigned int* mn10300_ipi_nop - Dummy IPI action * @irq: The IPI to be acted upon. */ -static void mn10300_ipi_nop (unsigned int irq) +static void mn10300_ipi_nop (struct irq_data *d) { }
PATCH 6/7 mn103000: asb2364: Convert FPGA irq_chip to new functions
In reply to Thomas GleixnerSigned-off-by Thomas Gleixner <[email protected]>
--- arch/mn10300/unit-asb2364/irq-fpga.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-)
arch/mn10300/unit-asb2364/irq-fpga.c +13 -13
@@ -17,38 +17,38 @@/* * FPGA PIC operations */ -static void asb2364_fpga_mask (unsigned int irq) +static void asb2364_fpga_mask (struct irq_data *d) { -ASB2364_FPGA_REG_MASK (irq -NR_CPU_IRQS ) =0x0001 ; +ASB2364_FPGA_REG_MASK (d->irq -NR_CPU_IRQS ) =0x0001 ;SyncExBus (); } -static void asb2364_fpga_ack (unsigned int irq) +static void asb2364_fpga_ack (struct irq_data *d) { -ASB2364_FPGA_REG_IRQ (irq -NR_CPU_IRQS ) =0x0001 ; +ASB2364_FPGA_REG_IRQ (d->irq -NR_CPU_IRQS ) =0x0001 ;SyncExBus (); } -static void asb2364_fpga_mask_ack (unsigned int irq) +static void asb2364_fpga_mask_ack (struct irq_data *d) { -ASB2364_FPGA_REG_MASK (irq -NR_CPU_IRQS ) =0x0001 ; +ASB2364_FPGA_REG_MASK (d->irq -NR_CPU_IRQS ) =0x0001 ;SyncExBus (); -ASB2364_FPGA_REG_IRQ (irq -NR_CPU_IRQS ) =0x0001 ; +ASB2364_FPGA_REG_IRQ (d->irq -NR_CPU_IRQS ) =0x0001 ;SyncExBus (); } -static void asb2364_fpga_unmask (unsigned int irq) +static void asb2364_fpga_unmask (struct irq_data *d) { -ASB2364_FPGA_REG_MASK (irq -NR_CPU_IRQS ) =0x0000 ; +ASB2364_FPGA_REG_MASK (d->irq -NR_CPU_IRQS ) =0x0000 ;SyncExBus (); }static struct irq_chip asb2364_fpga_pic = { .name ="fpga" , - .ack = asb2364_fpga_ack, - .mask = asb2364_fpga_mask, - .mask_ack = asb2364_fpga_mask_ack, - .unmask = asb2364_fpga_unmask, + .irq_ack = asb2364_fpga_ack, + .irq_mask = asb2364_fpga_mask, + .irq_mask_ack = asb2364_fpga_mask_ack, + .irq_unmask = asb2364_fpga_unmask, };/*
PATCH 7/7 mn10300: Select GENERIC_HARDIRQS_NO_DEPRECATED
In reply to Thomas GleixnerAll chips converted.
Signed-off-by Thomas Gleixner <[email protected]>
--- arch/mn10300/Kconfig | 1 + 1 file changed, 1 insertion(+)
arch/mn10300/Kconfig +1 -0
@@ -2,6 +2,7 @@ config MN10300 def_bool y select HAVE_OPROFILE select GENERIC_HARDIRQS + select GENERIC_HARDIRQS_NO_DEPRECATED config AM33_2 def_bool n