parisc: Convert to new irq_chip functions
cover parisc: Convert to new irq_chip functions
The following series converts parisc to the new irq_chip functions and sets GENERIC_HARDIRQS_NO_DEPRECATED. Compile tested only.
Thanks,
tglx
PATCH 1/8 parisc: Convert cpu irq_chip to new functions
Fixup temporarily ioasapic, which shares functions with the cpu chip. Remove unused no_*_irq function declarations.
--- arch/parisc/include/asm/irq.h | 13 ++------- arch/parisc/kernel/irq.c | 60 ++++++++++++++++++++++++------------------ drivers/parisc/iosapic.c | 7 ++-- 3 files changed, 43 insertions(+), 37 deletions(-)
arch/parisc/include/asm/irq.h +4 -9
@@ -32,15 +32,10 @@ static __inline__ int irq_canonicalize(i }struct irq_chip ; +struct irq_data ; -/* -* Some useful "we don't have to do anything here" handlers. Should -* probably be provided by the generic code. -*/ -void no_ack_irq (unsigned int irq); -void no_end_irq (unsigned int irq); -void cpu_ack_irq (unsigned int irq); -void cpu_eoi_irq (unsigned int irq); +void cpu_ack_irq (struct irq_data *d); +void cpu_eoi_irq (struct irq_data *d);extern int txn_alloc_irq (unsigned int nbits);extern int txn_claim_irq (int );
@@ -49,7 +44,7 @@ extern unsigned long txn_alloc_addr(unsiextern unsigned long txn_affinity_addr (unsigned int irq,int cpu);extern int cpu_claim_irq (unsigned int irq,struct irq_chip *,void *); -extern int cpu_check_affinity (unsigned int irq,const struct cpumask *dest); +extern int cpu_check_affinity (struct irq_data *d,const struct cpumask *dest);/* soft power switch support (power.c) */ extern struct tasklet_struct power_tasklet;
arch/parisc/kernel/irq.c +35 -25
152 lines not on this page · raw message
drivers/parisc/iosapic.c +4 -3
@@ -676,7 +676,7 @@ static void iosapic_eoi_irq(unsigned intstruct vector_info *vi =get_irq_chip_data (irq);iosapic_eoi (vi->eoi_addr, vi->eoi_data); -cpu_eoi_irq (irq); +cpu_eoi_irq (&irq_desc[irq].irq_data); }#ifdef CONFIG_SMP
@@ -688,7 +688,8 @@ static int iosapic_set_affinity_irq(unsiunsigned long flags;int dest_cpu; - dest_cpu =cpu_check_affinity (irq, dest); +/* Temporary irq_desc hack */ + dest_cpu =cpu_check_affinity (&irq_desc[irq].irq_data, dest);if (dest_cpu <0 )return -1 ;
@@ -711,7 +712,7 @@ static struct irq_chip iosapic_interrupt .name = "IO-SAPIC-level", .unmask = iosapic_unmask_irq, .mask = iosapic_mask_irq, - .ack = cpu_ack_irq, + .irq_ack = cpu_ack_irq, .eoi = iosapic_eoi_irq, #ifdef CONFIG_SMP .set_affinity = iosapic_set_affinity_irq,
PATCH 2/8 parisc: Convert dino irq_chip to new functions
In reply to Thomas Gleixner--- drivers/parisc/dino.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
drivers/parisc/dino.c +11 -11
@@ -296,25 +296,25 @@ static struct pci_port_ops dino_port_ops .outl = dino_out32 }; -static void dino_mask_irq (unsigned int irq) +static void dino_mask_irq (struct irq_data *d) { -struct dino_device *dino_dev =get_irq_chip_data (irq); -int local_irq =gsc_find_local_irq (irq, dino_dev->global_irq,DINO_LOCAL_IRQS ); +struct dino_device *dino_dev =irq_data_get_irq_chip_data (d); +int local_irq =gsc_find_local_irq (d->irq, dino_dev->global_irq,DINO_LOCAL_IRQS ); -DBG (KERN_WARNING "%s(0x%p, %d)\n" , __func__, dino_dev, irq); +DBG (KERN_WARNING "%s(0x%p, %d)\n" , __func__, dino_dev, d->irq);/* Clear the matching bit in the IMR register */ dino_dev->imr &= ~(DINO_MASK_IRQ (local_irq));__raw_writel (dino_dev->imr, dino_dev->hba.base_addr+DINO_IMR ); } -static void dino_unmask_irq (unsigned int irq) +static void dino_unmask_irq (struct irq_data *d) { -struct dino_device *dino_dev =get_irq_chip_data (irq); -int local_irq =gsc_find_local_irq (irq, dino_dev->global_irq,DINO_LOCAL_IRQS ); +struct dino_device *dino_dev =irq_data_get_irq_chip_data (d); +int local_irq =gsc_find_local_irq (d->irq, dino_dev->global_irq,DINO_LOCAL_IRQS );u32 tmp; -DBG (KERN_WARNING "%s(0x%p, %d)\n" , __func__, dino_dev, irq); +DBG (KERN_WARNING "%s(0x%p, %d)\n" , __func__, dino_dev, d->irq);/* ** clear pending IRQ bits
@@ -346,9 +346,9 @@ static void dino_unmask_irq(unsigned int }static struct irq_chip dino_interrupt_type = { - .name ="GSC-PCI" , - .unmask = dino_unmask_irq, - .mask = dino_mask_irq, + .name ="GSC-PCI" , + .irq_unmask = dino_unmask_irq, + .irq_mask = dino_mask_irq, };
PATCH 3/8 parisc: Convert eisa irq_chip to new functions
In reply to Thomas Gleixner--- drivers/parisc/eisa.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
drivers/parisc/eisa.c +7 -5
@@ -144,8 +144,9 @@ static unsigned int eisa_irq_level __rea/* called by free irq */ -static void eisa_mask_irq (unsigned int irq) +static void eisa_mask_irq (struct irq_data *d) { +unsigned int irq = d->irq;unsigned long flags;EISA_DBG ("disable irq %d\n" , irq);
@@ -164,8 +165,9 @@ static void eisa_mask_irq(unsigned int i }/* called by request irq */ -static void eisa_unmask_irq (unsigned int irq) +static void eisa_unmask_irq (struct irq_data *d) { +unsigned int irq = d->irq;unsigned long flags;EISA_DBG ("enable irq %d\n" , irq);
@@ -183,9 +185,9 @@ static void eisa_unmask_irq(unsigned int }static struct irq_chip eisa_interrupt_type = { - .name ="EISA" , - .unmask = eisa_unmask_irq, - .mask = eisa_mask_irq, + .name ="EISA" , + .irq_unmask = eisa_unmask_irq, + .irq_mask = eisa_mask_irq, };static irqreturn_t eisa_irq (int wax_irq,void *intr_dev)
PATCH 4/8 parisc: Convert gsc irq_chip to new functions
In reply to Thomas Gleixner--- drivers/parisc/gsc.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
drivers/parisc/gsc.c +11 -11
@@ -105,13 +105,13 @@ int gsc_find_local_irq(unsigned int irq,return NO_IRQ ; } -static void gsc_asic_mask_irq (unsigned int irq) +static void gsc_asic_mask_irq (struct irq_data *d) { -struct gsc_asic *irq_dev =get_irq_chip_data (irq); -int local_irq =gsc_find_local_irq (irq, irq_dev->global_irq,32 ); +struct gsc_asic *irq_dev =irq_data_get_irq_chip_data (d); +int local_irq =gsc_find_local_irq (d->irq, irq_dev->global_irq,32 );u32 imr; -DEBPRINTK (KERN_DEBUG "%s(%d) %s: IMR 0x%x\n" , __func__, irq, +DEBPRINTK (KERN_DEBUG "%s(%d) %s: IMR 0x%x\n" , __func__, d->irq, irq_dev->name, imr);/* Disable the IRQ line by clearing the bit in the IMR */
@@ -120,13 +120,13 @@ static void gsc_asic_mask_irq(unsigned igsc_writel (imr, irq_dev->hpa +OFFSET_IMR ); } -static void gsc_asic_unmask_irq (unsigned int irq) +static void gsc_asic_unmask_irq (struct irq_data *d) { -struct gsc_asic *irq_dev =get_irq_chip_data (irq); -int local_irq =gsc_find_local_irq (irq, irq_dev->global_irq,32 ); +struct gsc_asic *irq_dev =irq_data_get_irq_chip_data (d); +int local_irq =gsc_find_local_irq (d->irq, irq_dev->global_irq,32 );u32 imr; -DEBPRINTK (KERN_DEBUG "%s(%d) %s: IMR 0x%x\n" , __func__, irq, +DEBPRINTK (KERN_DEBUG "%s(%d) %s: IMR 0x%x\n" , __func__, d->irq, irq_dev->name, imr);/* Enable the IRQ line by setting the bit in the IMR */
@@ -140,9 +140,9 @@ static void gsc_asic_unmask_irq(unsigned }static struct irq_chip gsc_asic_interrupt_type = { - .name ="GSC-ASIC" , - .unmask = gsc_asic_unmask_irq, - .mask = gsc_asic_mask_irq, + .name ="GSC-ASIC" , + .irq_unmask = gsc_asic_unmask_irq, + .irq_mask = gsc_asic_mask_irq, };int gsc_assign_irq (struct irq_chip *type,void *data)
PATCH 5/8 parisc: Convert iosapic irq_chip to new functions
In reply to Thomas Gleixner--- drivers/parisc/iosapic.c | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-)
drivers/parisc/iosapic.c +18 -19
@@ -615,10 +615,10 @@ iosapic_set_irt_data( struct vector_info } -static void iosapic_mask_irq (unsigned int irq) +static void iosapic_mask_irq (struct irq_data *d) {unsigned long flags; -struct vector_info *vi =get_irq_chip_data (irq); +struct vector_info *vi =irq_data_get_irq_chip_data (d);u32 d0, d1;spin_lock_irqsave (&iosapic_lock, flags);
@@ -628,9 +628,9 @@ static void iosapic_mask_irq(unsigned inspin_unlock_irqrestore (&iosapic_lock, flags); } -static void iosapic_unmask_irq (unsigned int irq) +static void iosapic_unmask_irq (struct irq_data *d) { -struct vector_info *vi =get_irq_chip_data (irq); +struct vector_info *vi =irq_data_get_irq_chip_data (d);u32 d0, d1;/* data is initialized by fixup_irq */
@@ -666,34 +666,33 @@ printk("\n");* enables their IRQ. It can lead to "interesting" race conditions * in the driver initialization sequence. */ -DBG (KERN_DEBUG "enable_irq(%d): eoi(%p, 0x%x)\n" , irq, +DBG (KERN_DEBUG "enable_irq(%d): eoi(%p, 0x%x)\n" , d->irq, vi->eoi_addr, vi->eoi_data);iosapic_eoi (vi->eoi_addr, vi->eoi_data); } -static void iosapic_eoi_irq (unsigned int irq) +static void iosapic_eoi_irq (struct irq_data *d) { -struct vector_info *vi =get_irq_chip_data (irq); +struct vector_info *vi =irq_data_get_irq_chip_data (d);iosapic_eoi (vi->eoi_addr, vi->eoi_data); -cpu_eoi_irq (&irq_desc[irq].irq_data); +cpu_eoi_irq (d); }#ifdef CONFIG_SMP -static int iosapic_set_affinity_irq (unsigned int irq, -const struct cpumask *dest) +static int iosapic_set_affinity_irq (struct irq_data *d, +const struct cpumask *dest,bool force) { -struct vector_info *vi =get_irq_chip_data (irq); +struct vector_info *vi =irq_data_get_irq_chip_data (d);u32 d0, d1, dummy_d0;unsigned long flags;int dest_cpu; -/* Temporary irq_desc hack */ - dest_cpu =cpu_check_affinity (&irq_desc[irq].irq_data, dest); + dest_cpu =cpu_check_affinity (d, dest);if (dest_cpu <0 )return -1 ; -cpumask_copy (irq_desc[irq].affinity,cpumask_of (dest_cpu)); +cpumask_copy (d->affinity,cpumask_of (dest_cpu)); vi->txn_addr =txn_affinity_addr (irq, dest_cpu);spin_lock_irqsave (&iosapic_lock, flags);
@@ -709,13 +708,13 @@ static int iosapic_set_affinity_irq(unsi#endif static struct irq_chip iosapic_interrupt_type = { - .name ="IO-SAPIC-level" , - .unmask = iosapic_unmask_irq, - .mask = iosapic_mask_irq, + .name ="IO-SAPIC-level" , + .irq_unmask = iosapic_unmask_irq, + .irq_mask = iosapic_mask_irq, .irq_ack = cpu_ack_irq, - .eoi = iosapic_eoi_irq, + .irq_eoi = iosapic_eoi_irq, #ifdef CONFIG_SMP - .set_affinity = iosapic_set_affinity_irq, + .irq_set_affinity = iosapic_set_affinity_irq, #endif };
PATCH 6/8 parisc: Convert superio irq_chip to new functions
In reply to Thomas Gleixner--- drivers/parisc/superio.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
drivers/parisc/superio.c +7 -5
@@ -286,8 +286,9 @@ superio_init(struct pci_dev *pcidev) }DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_NS ,PCI_DEVICE_ID_NS_87560_LIO , superio_init); -static void superio_mask_irq (unsigned int irq) +static void superio_mask_irq (struct irq_data *d) { +unsigned int irq = d->irq;u8 r8;if ((irq <1 ) || (irq ==2 ) || (irq >7 )) {
@@ -303,8 +304,9 @@ static void superio_mask_irq(unsigned inoutb (r8,IC_PIC1 +1 ); } -static void superio_unmask_irq (unsigned int irq) +static void superio_unmask_irq (struct irq_data *d) { +unsigned int irq = d->irq;u8 r8;if ((irq <1 ) || (irq ==2 ) || (irq >7 )) {
@@ -320,9 +322,9 @@ static void superio_unmask_irq(unsigned }static struct irq_chip superio_interrupt_type = { - .name =SUPERIO , - .unmask = superio_unmask_irq, - .mask = superio_mask_irq, + .name =SUPERIO , + .irq_unmask = superio_unmask_irq, + .irq_mask = superio_mask_irq, };#ifdef DEBUG_SUPERIO_INIT
PATCH 7/8 parisc: Prepare show_interrupts for GENERIC_HARDIRQS_NO_DEPRECATED
In reply to Thomas Gleixnerchip moves to irq_data
--- arch/parisc/kernel/irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/parisc/kernel/irq.c +1 -1
@@ -188,7 +188,7 @@ int show_interrupts(struct seq_file *p,seq_printf (p,"%10u " ,kstat_irqs (i));#endif -seq_printf (p," %14s" , irq_desc[i].chip->name); +seq_printf (p," %14s" , irq_desc[i].irq_data.chip->name);#ifndef PARISC_IRQ_CR16_COUNTS seq_printf (p," %s" , action->name);
PATCH 8/8 parisc: Select GENERIC_HARDIRQS_NO_DEPRECATED
In reply to Thomas GleixnerAll chips converted.
--- arch/parisc/Kconfig | 1 + 1 file changed, 1 insertion(+)
arch/parisc/Kconfig +1 -0
@@ -15,6 +15,7 @@ config PARISC select HAVE_GENERIC_HARDIRQS select GENERIC_IRQ_PROBE select IRQ_PER_CPU + select GENERIC_HARDIRQS_NO_DEPRECATED help The PA-RISC microprocessor is designed by Hewlett-Packard and used
James Bottomley
maintainerQuoted 2 lines · Thomas Gleixner
The following series converts parisc to the new
irq_chipfunctions and setsGENERIC_HARDIRQS_NO_DEPRECATED. Compile tested only.
You don't really need one patch per file in the irq function changes do you? ... unless you're being rechristened Joe Perches ...
I can't get the last patch to apply ... it looks like there are lots of other Kconfig changes besides the one liner it does; what's missing?
Thanks,
James
Quoted 6 lines · James Bottomley
Quoted 2 lines · Thomas Gleixner
The following series converts parisc to the new
irq_chipfunctions and setsGENERIC_HARDIRQS_NO_DEPRECATED. Compile tested only.You don't really need one patch per file in the irq function changes do you? ... unless you're being rechristened Joe Perches ...
WTF ? It's damn easier to review and make sure that you did not miss anything that way. That's not a 100 patches series doing spelling fixes or other trivial shite.
Feel free to bulk apply them, I don't care. Next time I'm going to ignore parisc and just mark it broken, then you can fix it up yourself as you like.
Quoted 2 lines
I can't get the last patch to apply ... it looks like there are lots of other
Kconfigchanges besides the one liner it does; what's missing?
Tested it against -next as well, had to fix up crap there and sent out that queue instead the one against linus.
Yours grumpy,
tglx
James Bottomley
maintainerQuoted 9 lines · Thomas Gleixner
Quoted 6 lines · James Bottomley
Quoted 2 lines · Thomas Gleixner
The following series converts parisc to the new
irq_chipfunctions and setsGENERIC_HARDIRQS_NO_DEPRECATED. Compile tested only.You don't really need one patch per file in the irq function changes do you? ... unless you're being rechristened Joe Perches ...
Quoted 7 lines
WTF ? It's damn easier to review and make sure that you did not miss anything that way. That's not a 100 patches series doing spelling fixes or other trivial shite.
Feel free to bulk apply them, I don't care. Next time I'm going to ignore parisc and just mark it broken, then you can fix it up yourself as you like.
sorry, outgoing humour filter stopped picking up .de addresses for some reason ... I've fixed it ...
Quoted 5 lines
Quoted 2 lines
I can't get the last patch to apply ... it looks like there are lots of other
Kconfigchanges besides the one liner it does; what's missing?Tested it against -next as well, had to fix up crap there and sent out that queue instead the one against linus.
Actually, you'll be pleased to hear this was entirely my fault: The irq branch of the parisc tree wasn't where I thought it was (it was about a month behind.
There's some problem in arch/parisc/kernel.c it's giving me undefined references to irq (oh and some easily fixed compile issues). I'll see if I can sort it out and get back to you.
Quoted 1 line
Yours grumpy,
Well, I'd like to be happy ... but I guess after the git cockup I'll have to settle for dopey.
James
Quoted 11 lines · James Bottomley
Quoted 6 lines · Thomas Gleixner
Quoted 2 lines · James Bottomley
I can't get the last patch to apply ... it looks like there are lots of other
Kconfigchanges besides the one liner it does; what's missing?Tested it against -next as well, had to fix up crap there and sent out that queue instead the one against linus.
Actually, you'll be pleased to hear this was entirely my fault: The irq branch of the parisc tree wasn't where I thought it was (it was about a month behind.
:)
Quoted 3 lines
There's some problem in
arch/parisc/kernel.cit's giving me undefined references to irq (oh and some easily fixed compile issues). I'll see if I can sort it out and get back to you.
That's a bug which is already in the current tree:
arch/parisc/kernel/irq.c +1 -1
@@ -108,7 +108,7 @@ int cpu_check_affinity(unsigned int irq,int cpu_dest;/* timer and ipi have to always be received on all CPUs */ -if (CHECK_IRQ_PER_CPU (irq)) { +if (CHECK_IRQ_PER_CPU (irq_to_desc (irq)->status)) {/* Bad linux design decision. The mask has already * been set; we must reset it */ cpumask_setall (irq_desc[irq].affinity);
That's looking at the wrong thing.
So after the irq_chip conversion you need:
-- linux-next.orig/arch/parisc/kernel/irq.c
+++ linux-next/arch/parisc/kernel/irq.c
@@ -113,7 +113,7 @@ int cpu_check_affinity(struct irq_data *
int cpu_dest;
/* timer and ipi have to always be received on all CPUs */
- if (CHECK_IRQ_PER_CPU(irq_to_desc(irq))) {
+ if (CHECK_IRQ_PER_CPU(irq_to_desc(d->irq)->status)) {
/* Bad linux design decision. The mask has already
* been set; we must reset it. Will fix - tglx */
Quoted 2 lines
Well, I'd like to be happy ... but I guess after the git cockup I'll have to settle for dopey.
:)
Thanks,
tglx
James Bottomley
maintainerQuoted 7 lines · Thomas Gleixner
Quoted 3 lines · James Bottomley
There's some problem in
arch/parisc/kernel.cit's giving me undefined references to irq (oh and some easily fixed compile issues). I'll see if I can sort it out and get back to you.That's a bug which is already in the current tree:
[...]
Actually, it's more than this. Just to get it to compile, I needed the patch below (I folded in your fix for our longstanding affinity bug).
Unfortunately, it's panicing on boot in txn_alloc (that's a CPU interrupt allocation in the iosapic), so I'm going to debug further.
James
---
arch/parisc/kernel/irq.c +3 -3
@@ -113,7 +113,7 @@ int cpu_check_affinity(struct irq_data *d, const struct cpumask *dest)int cpu_dest;/* timer and ipi have to always be received on all CPUs */ -if (CHECK_IRQ_PER_CPU (irq)) { +if (CHECK_IRQ_PER_CPU (irq_to_desc (d->irq)->status)) {/* Bad linux design decision. The mask has already * been set; we must reset it. Will fix - tglx */
@@ -128,11 +128,11 @@ int cpu_check_affinity(struct irq_data *d, const struct cpumask *dest) }static int cpu_set_affinity_irq (struct irq_data *d,const struct cpumask *dest, - bool force)) +bool force) {int cpu_dest; - cpu_dest =cpu_check_affinity (d->irq, dest); + cpu_dest =cpu_check_affinity (d, dest);if (cpu_dest <0 )return -1 ;
drivers/parisc/iosapic.c +1 -1
@@ -693,7 +693,7 @@ static int iosapic_set_affinity_irq(struct irq_data *d,return -1 ;cpumask_copy (d->affinity,cpumask_of (dest_cpu)); - vi->txn_addr =txn_affinity_addr (irq, dest_cpu); + vi->txn_addr =txn_affinity_addr (d->irq, dest_cpu);spin_lock_irqsave (&iosapic_lock, flags);/* d1 contains the destination CPU, so only want to set that
James Bottomley
maintainerQuoted 2 lines · James Bottomley
Unfortunately, it's panicing on boot in
txn_alloc(that's a CPU interrupt allocation in the iosapic), so I'm going to debug further.
Following up with Thomas over IRC, the attached is the finally final patch he came up with to fix the panic and sort out the compile issues. I've verified this on an iosapic system (pa8800) and on dino/gsc (C360) could someone try it on an astro system?
Thanks,
James
arch/parisc/kernel/irq.c +4 -4
@@ -113,7 +113,7 @@ int cpu_check_affinity(struct irq_data *d, const struct cpumask *dest)int cpu_dest;/* timer and ipi have to always be received on all CPUs */ -if (CHECK_IRQ_PER_CPU (irq)) { +if (CHECK_IRQ_PER_CPU (irq_to_desc (d->irq)->status)) {/* Bad linux design decision. The mask has already * been set; we must reset it. Will fix - tglx */
@@ -128,11 +128,11 @@ int cpu_check_affinity(struct irq_data *d, const struct cpumask *dest) }static int cpu_set_affinity_irq (struct irq_data *d,const struct cpumask *dest, - bool force)) +bool force) {int cpu_dest; - cpu_dest =cpu_check_affinity (d->irq, dest); + cpu_dest =cpu_check_affinity (d, dest);if (cpu_dest <0 )return -1 ;
@@ -296,7 +296,7 @@ int txn_alloc_irq(unsigned int bits_wide)unsigned long txn_affinity_addr (unsigned int irq,int cpu) {#ifdef CONFIG_SMP -struct irq_data *d =get_irq_data (irq); +struct irq_data *d =irq_get_irq_data (irq);cpumask_copy (d->affinity,cpumask_of (cpu));#endif
drivers/parisc/iosapic.c +1 -1
@@ -693,7 +693,7 @@ static int iosapic_set_affinity_irq(struct irq_data *d,return -1 ;cpumask_copy (d->affinity,cpumask_of (dest_cpu)); - vi->txn_addr =txn_affinity_addr (irq, dest_cpu); + vi->txn_addr =txn_affinity_addr (d->irq, dest_cpu);spin_lock_irqsave (&iosapic_lock, flags);/* d1 contains the destination CPU, so only want to set that
Quoted 18 lines · James Bottomley
Quoted 2 lines · James Bottomley
Unfortunately, it's panicing on boot in
txn_alloc(that's a CPU interrupt allocation in the iosapic), so I'm going to debug further.Following up with Thomas over IRC, the attached is the finally final patch he came up with to fix the panic and sort out the compile issues. I've verified this on an iosapic system (pa8800) and on dino/gsc (C360) could someone try it on an astro system?
Thanks,
James
arch/parisc/kernel/irq.c +0
-0
arch/parisc/kernel/irq.c int cpu_check_affinity(struct irq_data *d, const struct cpumask *dest) · line 116
Quoted 5 lines
arch/parisc/kernel/irq.c +1
-1@@ -113,7 +113,7 @@ int cpu_check_affinity(struct irq_data *d, const struct cpumask *dest)int cpu_dest;/* timer and ipi have to always be received on all CPUs */ -if (CHECK_IRQ_PER_CPU (irq)) { +if (CHECK_IRQ_PER_CPU (irq_to_desc (d->irq)->status)) {
For extended fun I just noticed, that nothing ever sets IRQ_PER_CPU in desc->status for all of parisc.
This check (using irq) never evaluated to true due to:
#define IRQ_PER_CPU 0x00010000 /* IRQ is per CPU */
I doubt that irq can be that large on parisc :)
The other place evaluates to false as well, because nothing ever sets the damn flag.
If you want to set it please use: set_irq_status_flags(irq, IRQ_PER_CPU); otherwise just kill that PER_CPU thingy :)
Thanks,
tglx
Quoted 33 lines · Thomas Gleixner
Quoted 18 lines · James Bottomley
Quoted 2 lines · James Bottomley
Unfortunately, it's panicing on boot in
txn_alloc(that's a CPU interrupt allocation in the iosapic), so I'm going to debug further.Following up with Thomas over IRC, the attached is the finally final patch he came up with to fix the panic and sort out the compile issues. I've verified this on an iosapic system (pa8800) and on dino/gsc (C360) could someone try it on an astro system?
Thanks,
James
arch/parisc/kernel/irq.c +0
-0arch/parisc/kernel/irq.c int cpu_check_affinity(struct irq_data *d, const struct cpumask *dest) · line 116
Quoted 5 lines
arch/parisc/kernel/irq.c +1
-1@@ -113,7 +113,7 @@ int cpu_check_affinity(struct irq_data *d, const struct cpumask *dest)int cpu_dest;/* timer and ipi have to always be received on all CPUs */ -if (CHECK_IRQ_PER_CPU (irq)) { +if (CHECK_IRQ_PER_CPU (irq_to_desc (d->irq)->status)) {For extended fun I just noticed, that nothing ever sets
IRQ_PER_CPUindesc->statusfor all of parisc.This check (using irq) never evaluated to true due to:
#define IRQ_PER_CPU 0x00010000 /* IRQ is per CPU */
Quoted 7 lines
I doubt that irq can be that large on parisc :)
The other place evaluates to false as well, because nothing ever sets the damn flag.
If you want to set it please use:
set_irq_status_flags(irq, IRQ_PER_CPU); otherwise just kill thatPER_CPUthingy :)
Gah. You set it indirect via IRQF_PERCPU with setup/request_irq.
Staring too long into that code makes my brain fuzzy.
Thanks,
tglx
James Bottomley
maintainerQuoted 40 lines · Thomas Gleixner
Quoted 38 lines · Thomas Gleixner
Quoted 18 lines · James Bottomley
Quoted 2 lines · James Bottomley
Unfortunately, it's panicing on boot in
txn_alloc(that's a CPU interrupt allocation in the iosapic), so I'm going to debug further.Following up with Thomas over IRC, the attached is the finally final patch he came up with to fix the panic and sort out the compile issues. I've verified this on an iosapic system (pa8800) and on dino/gsc (C360) could someone try it on an astro system?
Thanks,
James
arch/parisc/kernel/irq.c +0
-0arch/parisc/kernel/irq.c int cpu_check_affinity(struct irq_data *d, const struct cpumask *dest) · line 116
Quoted 5 lines
arch/parisc/kernel/irq.c +1
-1@@ -113,7 +113,7 @@ int cpu_check_affinity(struct irq_data *d, const struct cpumask *dest)int cpu_dest;/* timer and ipi have to always be received on all CPUs */ -if (CHECK_IRQ_PER_CPU (irq)) { +if (CHECK_IRQ_PER_CPU (irq_to_desc (d->irq)->status)) {For extended fun I just noticed, that nothing ever sets
IRQ_PER_CPUindesc->statusfor all of parisc.This check (using irq) never evaluated to true due to:
#define IRQ_PER_CPU 0x00010000 /* IRQ is per CPU */I doubt that irq can be that large on parisc :)
The other place evaluates to false as well, because nothing ever sets the damn flag.
Quoted 6 lines
Quoted 2 lines
If you want to set it please use:
set_irq_status_flags(irq, IRQ_PER_CPU); otherwise just kill thatPER_CPUthingy :)Gah. You set it indirect via
IRQF_PERCPUwith setup/request_irq.Staring too long into that code makes my brain fuzzy.
Yes ... know the feeling over the years trying to keep up with the various irq schemes. Got to say, it's a lot easier now: The way parisc chips accept interrupts is essentially MSI. Trying to live in the old world modelled on the x86 PIC wasn't fun.
So did you want me to roll all the fixes together and apply them, or is there something else that needs to happen?
James
Quoted 5 lines · James Bottomley
Quoted 3 lines · Thomas Gleixner
Gah. You set it indirect via
IRQF_PERCPUwith setup/request_irq.Staring too long into that code makes my brain fuzzy.
Quoted 7 lines
Yes ... know the feeling over the years trying to keep up with the various irq schemes. Got to say, it's a lot easier now: The way parisc chips accept interrupts is essentially MSI. Trying to live in the old world modelled on the x86 PIC wasn't fun.
So did you want me to roll all the fixes together and apply them, or is there something else that needs to happen?
All yours. You might want to split out the CHECK... bugfix first.
There will be some minor follow up changes, but they depend on code which I'm going to push soon.
Thanks,
tglx
James Bottomley
maintainerQuoted 11 lines · Thomas Gleixner
Quoted 10 lines · James Bottomley
Quoted 3 lines · Thomas Gleixner
Gah. You set it indirect via
IRQF_PERCPUwith setup/request_irq.Staring too long into that code makes my brain fuzzy.
Yes ... know the feeling over the years trying to keep up with the various irq schemes. Got to say, it's a lot easier now: The way parisc chips accept interrupts is essentially MSI. Trying to live in the old world modelled on the x86 PIC wasn't fun.
Quoted 4 lines
Quoted 2 lines
So did you want me to roll all the fixes together and apply them, or is there something else that needs to happen?
All yours. You might want to split out the CHECK... bugfix first.
Good idea ... you authorise me to do the split and add your signed-off-by?
Quoted 2 lines
There will be some minor follow up changes, but they depend on code which I'm going to push soon.
OK ... we'll wait for those. I'll plan this for the next merge window.
James
Quoted 12 lines · James Bottomley
Quoted 11 lines · Thomas Gleixner
Quoted 10 lines · James Bottomley
Quoted 3 lines · Thomas Gleixner
Gah. You set it indirect via
IRQF_PERCPUwith setup/request_irq.Staring too long into that code makes my brain fuzzy.
Yes ... know the feeling over the years trying to keep up with the various irq schemes. Got to say, it's a lot easier now: The way parisc chips accept interrupts is essentially MSI. Trying to live in the old world modelled on the x86 PIC wasn't fun.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
So did you want me to roll all the fixes together and apply them, or is there something else that needs to happen?
All yours. You might want to split out the CHECK... bugfix first.
Good idea ... you authorise me to do the split and add your signed-off-by?
Yup.
Quoted 4 lines
Quoted 2 lines
There will be some minor follow up changes, but they depend on code which I'm going to push soon.
OK ... we'll wait for those. I'll plan this for the next merge window.
Push the current lot out. The minor changes will probably come after all the stuff hit linus tree in the 39 merge window.
Thanks,
tglx