All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 0/8] parisc: Convert to new irq_chip functions
@ 2011-02-06 20:45 Thomas Gleixner
  2011-02-06 20:45 ` [patch 1/8] parisc: Convert cpu irq_chip to new functions Thomas Gleixner
                   ` (8 more replies)
  0 siblings, 9 replies; 21+ messages in thread
From: Thomas Gleixner @ 2011-02-06 20:45 UTC (permalink / raw)
  To: linux-parisc; +Cc: Kyle McMartin, James E.J. Bottomley

The following series converts parisc to the new irq_chip functions and
sets GENERIC_HARDIRQS_NO_DEPRECATED. Compile tested only.

Thanks,

	tglx


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [patch 1/8] parisc: Convert cpu irq_chip to new functions
  2011-02-06 20:45 [patch 0/8] parisc: Convert to new irq_chip functions Thomas Gleixner
@ 2011-02-06 20:45 ` Thomas Gleixner
  2011-02-06 20:45 ` [patch 2/8] parisc: Convert dino " Thomas Gleixner
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 21+ messages in thread
From: Thomas Gleixner @ 2011-02-06 20:45 UTC (permalink / raw)
  To: linux-parisc; +Cc: Kyle McMartin, James E.J. Bottomley

Fixup temporarily ioasapic, which shares functions with the cpu chip.
Remove unused no_*_irq function declarations.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 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(-)

Index: linux-next/arch/parisc/include/asm/irq.h
===================================================================
--- linux-next.orig/arch/parisc/include/asm/irq.h
+++ linux-next/arch/parisc/include/asm/irq.h
@@ -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(unsi
 extern 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;
Index: linux-next/arch/parisc/kernel/irq.c
===================================================================
--- linux-next.orig/arch/parisc/kernel/irq.c
+++ linux-next/arch/parisc/kernel/irq.c
@@ -52,9 +52,9 @@ static volatile unsigned long cpu_eiem =
 */
 static DEFINE_PER_CPU(unsigned long, local_ack_eiem) = ~0UL;
 
-static void cpu_mask_irq(unsigned int irq)
+static void cpu_mask_irq(struct irq_data *d)
 {
-	unsigned long eirr_bit = EIEM_MASK(irq);
+	unsigned long eirr_bit = EIEM_MASK(d->irq);
 
 	cpu_eiem &= ~eirr_bit;
 	/* Do nothing on the other CPUs.  If they get this interrupt,
@@ -63,7 +63,7 @@ static void cpu_mask_irq(unsigned int ir
 	 * then gets disabled */
 }
 
-static void cpu_unmask_irq(unsigned int irq)
+static void __cpu_unmask_irq(unsigned int irq)
 {
 	unsigned long eirr_bit = EIEM_MASK(irq);
 
@@ -75,9 +75,14 @@ static void cpu_unmask_irq(unsigned int 
 	smp_send_all_nop();
 }
 
-void cpu_ack_irq(unsigned int irq)
+static void cpu_unmask_irq(struct irq_data *d)
+{
+	__cpu_unmask_irq(d->irq);
+}
+
+void cpu_ack_irq(struct irq_data *d)
 {
-	unsigned long mask = EIEM_MASK(irq);
+	unsigned long mask = EIEM_MASK(d->irq);
 	int cpu = smp_processor_id();
 
 	/* Clear in EIEM so we can no longer process */
@@ -90,9 +95,9 @@ void cpu_ack_irq(unsigned int irq)
 	mtctl(mask, 23);
 }
 
-void cpu_eoi_irq(unsigned int irq)
+void cpu_eoi_irq(struct irq_data *d)
 {
-	unsigned long mask = EIEM_MASK(irq);
+	unsigned long mask = EIEM_MASK(d->irq);
 	int cpu = smp_processor_id();
 
 	/* set it in the eiems---it's no longer in process */
@@ -103,15 +108,16 @@ void cpu_eoi_irq(unsigned int irq)
 }
 
 #ifdef CONFIG_SMP
-int cpu_check_affinity(unsigned int irq, const struct cpumask *dest)
+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)) {
 		/* Bad linux design decision.  The mask has already
-		 * been set; we must reset it */
-		cpumask_setall(irq_desc[irq].affinity);
+		 * been set; we must reset it. Will fix - tglx
+		 */
+		cpumask_setall(d->affinity);
 		return -EINVAL;
 	}
 
@@ -121,33 +127,34 @@ int cpu_check_affinity(unsigned int irq,
 	return cpu_dest;
 }
 
-static int cpu_set_affinity_irq(unsigned int irq, const struct cpumask *dest)
+static int cpu_set_affinity_irq(struct irq_data *d, const struct cpumask *dest,
+				bool force))
 {
 	int cpu_dest;
 
-	cpu_dest = cpu_check_affinity(irq, dest);
+	cpu_dest = cpu_check_affinity(d->irq, dest);
 	if (cpu_dest < 0)
 		return -1;
 
-	cpumask_copy(irq_desc[irq].affinity, dest);
+	cpumask_copy(d->affinity, dest);
 
 	return 0;
 }
 #endif
 
 static struct irq_chip cpu_interrupt_type = {
-	.name		= "CPU",
-	.mask		= cpu_mask_irq,
-	.unmask		= cpu_unmask_irq,
-	.ack		= cpu_ack_irq,
-	.eoi		= cpu_eoi_irq,
+	.name			= "CPU",
+	.irq_mask		= cpu_mask_irq,
+	.irq_unmask		= cpu_unmask_irq,
+	.irq_ack		= cpu_ack_irq,
+	.irq_eoi		= cpu_eoi_irq,
 #ifdef CONFIG_SMP
-	.set_affinity	= cpu_set_affinity_irq,
+	.irq_set_affinity	= cpu_set_affinity_irq,
 #endif
 	/* XXX: Needs to be written.  We managed without it so far, but
 	 * we really ought to write it.
 	 */
-	.retrigger	= NULL,
+	.irq_retrigger	= NULL,
 };
 
 int show_interrupts(struct seq_file *p, void *v)
@@ -233,14 +240,14 @@ int cpu_claim_irq(unsigned int irq, stru
 {
 	if (irq_desc[irq].action)
 		return -EBUSY;
-	if (irq_desc[irq].chip != &cpu_interrupt_type)
+	if (get_irq_chip(irq) != &cpu_interrupt_type)
 		return -EBUSY;
 
 	/* for iosapic interrupts */
 	if (type) {
 		set_irq_chip_and_handler(irq, type, handle_percpu_irq);
 		set_irq_chip_data(irq, data);
-		cpu_unmask_irq(irq);
+		__cpu_unmask_irq(irq);
 	}
 	return 0;
 }
@@ -289,7 +296,8 @@ int txn_alloc_irq(unsigned int bits_wide
 unsigned long txn_affinity_addr(unsigned int irq, int cpu)
 {
 #ifdef CONFIG_SMP
-	cpumask_copy(irq_desc[irq].affinity, cpumask_of(cpu));
+	struct irq_data *d = get_irq_data(irq);
+	cpumask_copy(d->affinity, cpumask_of(cpu));
 #endif
 
 	return per_cpu(cpu_data, cpu).txn_addr;
@@ -333,6 +341,7 @@ void do_cpu_irq_mask(struct pt_regs *reg
 	unsigned long eirr_val;
 	int irq, cpu = smp_processor_id();
 #ifdef CONFIG_SMP
+	struct irq_desc *desc;
 	cpumask_t dest;
 #endif
 
@@ -346,8 +355,9 @@ void do_cpu_irq_mask(struct pt_regs *reg
 	irq = eirr_to_irq(eirr_val);
 
 #ifdef CONFIG_SMP
-	cpumask_copy(&dest, irq_desc[irq].affinity);
-	if (CHECK_IRQ_PER_CPU(irq_desc[irq].status) &&
+	desc = irq_to_desc(irq);
+	cpumask_copy(&dest, desc->irq_data.affinity);
+	if (CHECK_IRQ_PER_CPU(desc->status) &&
 	    !cpu_isset(smp_processor_id(), dest)) {
 		int cpu = first_cpu(dest);
 
Index: linux-next/drivers/parisc/iosapic.c
===================================================================
--- linux-next.orig/drivers/parisc/iosapic.c
+++ linux-next/drivers/parisc/iosapic.c
@@ -676,7 +676,7 @@ static void iosapic_eoi_irq(unsigned int
 	struct 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(unsi
 	unsigned 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,



^ permalink raw reply	[flat|nested] 21+ messages in thread

* [patch 2/8] parisc: Convert dino irq_chip to new functions
  2011-02-06 20:45 [patch 0/8] parisc: Convert to new irq_chip functions Thomas Gleixner
  2011-02-06 20:45 ` [patch 1/8] parisc: Convert cpu irq_chip to new functions Thomas Gleixner
@ 2011-02-06 20:45 ` Thomas Gleixner
  2011-02-06 20:45 ` [patch 3/8] parisc: Convert eisa " Thomas Gleixner
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 21+ messages in thread
From: Thomas Gleixner @ 2011-02-06 20:45 UTC (permalink / raw)
  To: linux-parisc; +Cc: Kyle McMartin, James E.J. Bottomley

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 drivers/parisc/dino.c |   22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

Index: linux-next/drivers/parisc/dino.c
===================================================================
--- linux-next.orig/drivers/parisc/dino.c
+++ linux-next/drivers/parisc/dino.c
@@ -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,
 };
 
 



^ permalink raw reply	[flat|nested] 21+ messages in thread

* [patch 3/8] parisc: Convert eisa irq_chip to new functions
  2011-02-06 20:45 [patch 0/8] parisc: Convert to new irq_chip functions Thomas Gleixner
  2011-02-06 20:45 ` [patch 1/8] parisc: Convert cpu irq_chip to new functions Thomas Gleixner
  2011-02-06 20:45 ` [patch 2/8] parisc: Convert dino " Thomas Gleixner
@ 2011-02-06 20:45 ` Thomas Gleixner
  2011-02-06 20:45 ` [patch 4/8] parisc: Convert gsc " Thomas Gleixner
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 21+ messages in thread
From: Thomas Gleixner @ 2011-02-06 20:45 UTC (permalink / raw)
  To: linux-parisc; +Cc: Kyle McMartin, James E.J. Bottomley

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 drivers/parisc/eisa.c |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

Index: linux-next/drivers/parisc/eisa.c
===================================================================
--- linux-next.orig/drivers/parisc/eisa.c
+++ linux-next/drivers/parisc/eisa.c
@@ -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)



^ permalink raw reply	[flat|nested] 21+ messages in thread

* [patch 4/8] parisc: Convert gsc irq_chip to new functions
  2011-02-06 20:45 [patch 0/8] parisc: Convert to new irq_chip functions Thomas Gleixner
                   ` (2 preceding siblings ...)
  2011-02-06 20:45 ` [patch 3/8] parisc: Convert eisa " Thomas Gleixner
@ 2011-02-06 20:45 ` Thomas Gleixner
  2011-02-06 20:46 ` [patch 5/8] parisc: Convert iosapic " Thomas Gleixner
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 21+ messages in thread
From: Thomas Gleixner @ 2011-02-06 20:45 UTC (permalink / raw)
  To: linux-parisc; +Cc: Kyle McMartin, James E.J. Bottomley

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 drivers/parisc/gsc.c |   22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

Index: linux-next/drivers/parisc/gsc.c
===================================================================
--- linux-next.orig/drivers/parisc/gsc.c
+++ linux-next/drivers/parisc/gsc.c
@@ -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 i
 	gsc_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)



^ permalink raw reply	[flat|nested] 21+ messages in thread

* [patch 5/8] parisc: Convert iosapic irq_chip to new functions
  2011-02-06 20:45 [patch 0/8] parisc: Convert to new irq_chip functions Thomas Gleixner
                   ` (3 preceding siblings ...)
  2011-02-06 20:45 ` [patch 4/8] parisc: Convert gsc " Thomas Gleixner
@ 2011-02-06 20:46 ` Thomas Gleixner
  2011-02-06 20:46 ` [patch 6/8] parisc: Convert superio " Thomas Gleixner
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 21+ messages in thread
From: Thomas Gleixner @ 2011-02-06 20:46 UTC (permalink / raw)
  To: linux-parisc; +Cc: Kyle McMartin, James E.J. Bottomley

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 drivers/parisc/iosapic.c |   37 ++++++++++++++++++-------------------
 1 file changed, 18 insertions(+), 19 deletions(-)

Index: linux-next/drivers/parisc/iosapic.c
===================================================================
--- linux-next.orig/drivers/parisc/iosapic.c
+++ linux-next/drivers/parisc/iosapic.c
@@ -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 in
 	spin_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
 };
 



^ permalink raw reply	[flat|nested] 21+ messages in thread

* [patch 6/8] parisc: Convert superio irq_chip to new functions
  2011-02-06 20:45 [patch 0/8] parisc: Convert to new irq_chip functions Thomas Gleixner
                   ` (4 preceding siblings ...)
  2011-02-06 20:46 ` [patch 5/8] parisc: Convert iosapic " Thomas Gleixner
@ 2011-02-06 20:46 ` Thomas Gleixner
  2011-02-06 20:46 ` [patch 7/8] parisc: Prepare show_interrupts for GENERIC_HARDIRQS_NO_DEPRECATED Thomas Gleixner
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 21+ messages in thread
From: Thomas Gleixner @ 2011-02-06 20:46 UTC (permalink / raw)
  To: linux-parisc; +Cc: Kyle McMartin, James E.J. Bottomley

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 drivers/parisc/superio.c |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

Index: linux-next/drivers/parisc/superio.c
===================================================================
--- linux-next.orig/drivers/parisc/superio.c
+++ linux-next/drivers/parisc/superio.c
@@ -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 in
 	outb (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



^ permalink raw reply	[flat|nested] 21+ messages in thread

* [patch 7/8] parisc: Prepare show_interrupts for GENERIC_HARDIRQS_NO_DEPRECATED
  2011-02-06 20:45 [patch 0/8] parisc: Convert to new irq_chip functions Thomas Gleixner
                   ` (5 preceding siblings ...)
  2011-02-06 20:46 ` [patch 6/8] parisc: Convert superio " Thomas Gleixner
@ 2011-02-06 20:46 ` Thomas Gleixner
  2011-02-06 20:46 ` [patch 8/8] parisc: Select GENERIC_HARDIRQS_NO_DEPRECATED Thomas Gleixner
  2011-02-07 16:02 ` [patch 0/8] parisc: Convert to new irq_chip functions James Bottomley
  8 siblings, 0 replies; 21+ messages in thread
From: Thomas Gleixner @ 2011-02-06 20:46 UTC (permalink / raw)
  To: linux-parisc; +Cc: Kyle McMartin, James E.J. Bottomley

chip moves to irq_data

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/parisc/kernel/irq.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-next/arch/parisc/kernel/irq.c
===================================================================
--- linux-next.orig/arch/parisc/kernel/irq.c
+++ linux-next/arch/parisc/kernel/irq.c
@@ -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);
 



^ permalink raw reply	[flat|nested] 21+ messages in thread

* [patch 8/8] parisc: Select GENERIC_HARDIRQS_NO_DEPRECATED
  2011-02-06 20:45 [patch 0/8] parisc: Convert to new irq_chip functions Thomas Gleixner
                   ` (6 preceding siblings ...)
  2011-02-06 20:46 ` [patch 7/8] parisc: Prepare show_interrupts for GENERIC_HARDIRQS_NO_DEPRECATED Thomas Gleixner
@ 2011-02-06 20:46 ` Thomas Gleixner
  2011-02-07 16:02 ` [patch 0/8] parisc: Convert to new irq_chip functions James Bottomley
  8 siblings, 0 replies; 21+ messages in thread
From: Thomas Gleixner @ 2011-02-06 20:46 UTC (permalink / raw)
  To: linux-parisc; +Cc: Kyle McMartin, James E.J. Bottomley

All chips converted.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/parisc/Kconfig |    1 +
 1 file changed, 1 insertion(+)

Index: linux-next/arch/parisc/Kconfig
===================================================================
--- linux-next.orig/arch/parisc/Kconfig
+++ linux-next/arch/parisc/Kconfig
@@ -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



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [patch 0/8] parisc: Convert to new irq_chip functions
  2011-02-06 20:45 [patch 0/8] parisc: Convert to new irq_chip functions Thomas Gleixner
                   ` (7 preceding siblings ...)
  2011-02-06 20:46 ` [patch 8/8] parisc: Select GENERIC_HARDIRQS_NO_DEPRECATED Thomas Gleixner
@ 2011-02-07 16:02 ` James Bottomley
  2011-02-07 16:53   ` Thomas Gleixner
  8 siblings, 1 reply; 21+ messages in thread
From: James Bottomley @ 2011-02-07 16:02 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: linux-parisc, Kyle McMartin, James E.J. Bottomley

On Sun, 2011-02-06 at 20:45 +0000, Thomas Gleixner wrote:
> The following series converts parisc to the new irq_chip functions and
> sets GENERIC_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



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [patch 0/8] parisc: Convert to new irq_chip functions
  2011-02-07 16:02 ` [patch 0/8] parisc: Convert to new irq_chip functions James Bottomley
@ 2011-02-07 16:53   ` Thomas Gleixner
  2011-02-07 17:36     ` James Bottomley
  0 siblings, 1 reply; 21+ messages in thread
From: Thomas Gleixner @ 2011-02-07 16:53 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-parisc, Kyle McMartin, James E.J. Bottomley

On Mon, 7 Feb 2011, James Bottomley wrote:

> On Sun, 2011-02-06 at 20:45 +0000, Thomas Gleixner wrote:
> > The following series converts parisc to the new irq_chip functions and
> > sets GENERIC_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.

> 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?

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

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [patch 0/8] parisc: Convert to new irq_chip functions
  2011-02-07 16:53   ` Thomas Gleixner
@ 2011-02-07 17:36     ` James Bottomley
  2011-02-07 18:28       ` Thomas Gleixner
  0 siblings, 1 reply; 21+ messages in thread
From: James Bottomley @ 2011-02-07 17:36 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: linux-parisc, Kyle McMartin, James E.J. Bottomley

On Mon, 2011-02-07 at 17:53 +0100, Thomas Gleixner wrote:
> On Mon, 7 Feb 2011, James Bottomley wrote:
> 
> > On Sun, 2011-02-06 at 20:45 +0000, Thomas Gleixner wrote:
> > > The following series converts parisc to the new irq_chip functions and
> > > sets GENERIC_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.

sorry, outgoing humour filter stopped picking up .de addresses for some
reason ... I've fixed it ...

> > 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?
> 
> 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.

> Yours grumpy,

Well, I'd like to be happy ... but I guess after the git cockup I'll
have to settle for dopey.

James



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [patch 0/8] parisc: Convert to new irq_chip functions
  2011-02-07 17:36     ` James Bottomley
@ 2011-02-07 18:28       ` Thomas Gleixner
  2011-02-07 21:26         ` James Bottomley
  0 siblings, 1 reply; 21+ messages in thread
From: Thomas Gleixner @ 2011-02-07 18:28 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-parisc, Kyle McMartin, James E.J. Bottomley

On Mon, 7 Feb 2011, James Bottomley wrote:
> On Mon, 2011-02-07 at 17:53 +0100, Thomas Gleixner wrote:
> > On Mon, 7 Feb 2011, James Bottomley wrote:
> > > 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?
> > 
> > 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.

That's a bug which is already in the current tree:

--- linux-next.orig/arch/parisc/kernel/irq.c
+++ linux-next/arch/parisc/kernel/irq.c
@@ -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
 		 */

> Well, I'd like to be happy ... but I guess after the git cockup I'll
> have to settle for dopey.

:)

Thanks,

	tglx

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [patch 0/8] parisc: Convert to new irq_chip functions
  2011-02-07 18:28       ` Thomas Gleixner
@ 2011-02-07 21:26         ` James Bottomley
  2011-02-08  0:32           ` James Bottomley
  0 siblings, 1 reply; 21+ messages in thread
From: James Bottomley @ 2011-02-07 21:26 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: linux-parisc, Kyle McMartin

On Mon, 2011-02-07 at 19:28 +0100, Thomas Gleixner wrote:
> On Mon, 7 Feb 2011, James Bottomley wrote:
>  
> > 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.
> 
> 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

---

diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c
index 9eea164..f2e7154 100644
--- a/arch/parisc/kernel/irq.c
+++ b/arch/parisc/kernel/irq.c
@@ -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;
 
diff --git a/drivers/parisc/iosapic.c b/drivers/parisc/iosapic.c
index a015c12..95930d0 100644
--- a/drivers/parisc/iosapic.c
+++ b/drivers/parisc/iosapic.c
@@ -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



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: [patch 0/8] parisc: Convert to new irq_chip functions
  2011-02-07 21:26         ` James Bottomley
@ 2011-02-08  0:32           ` James Bottomley
  2011-02-08 14:25             ` Thomas Gleixner
  0 siblings, 1 reply; 21+ messages in thread
From: James Bottomley @ 2011-02-08  0:32 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: linux-parisc, Kyle McMartin

On Mon, 2011-02-07 at 15:26 -0600, James Bottomley wrote:
> 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

diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c
index 9eea164..cb450e1 100644
--- a/arch/parisc/kernel/irq.c
+++ b/arch/parisc/kernel/irq.c
@@ -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
 
diff --git a/drivers/parisc/iosapic.c b/drivers/parisc/iosapic.c
index a015c12..95930d0 100644
--- a/drivers/parisc/iosapic.c
+++ b/drivers/parisc/iosapic.c
@@ -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



^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: [patch 0/8] parisc: Convert to new irq_chip functions
  2011-02-08  0:32           ` James Bottomley
@ 2011-02-08 14:25             ` Thomas Gleixner
  2011-02-08 14:37               ` Thomas Gleixner
  0 siblings, 1 reply; 21+ messages in thread
From: Thomas Gleixner @ 2011-02-08 14:25 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-parisc, Kyle McMartin

On Mon, 7 Feb 2011, James Bottomley wrote:

> On Mon, 2011-02-07 at 15:26 -0600, James Bottomley wrote:
> > 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
> 
> diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c
> index 9eea164..cb450e1 100644
> --- a/arch/parisc/kernel/irq.c
> +++ b/arch/parisc/kernel/irq.c
> @@ -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

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [patch 0/8] parisc: Convert to new irq_chip functions
  2011-02-08 14:25             ` Thomas Gleixner
@ 2011-02-08 14:37               ` Thomas Gleixner
  2011-02-08 16:53                 ` James Bottomley
  0 siblings, 1 reply; 21+ messages in thread
From: Thomas Gleixner @ 2011-02-08 14:37 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-parisc, Kyle McMartin

On Tue, 8 Feb 2011, Thomas Gleixner wrote:

> On Mon, 7 Feb 2011, James Bottomley wrote:
> 
> > On Mon, 2011-02-07 at 15:26 -0600, James Bottomley wrote:
> > > 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
> > 
> > diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c
> > index 9eea164..cb450e1 100644
> > --- a/arch/parisc/kernel/irq.c
> > +++ b/arch/parisc/kernel/irq.c
> > @@ -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 :)

Gah. You set it indirect via IRQF_PERCPU with setup/request_irq.

Staring too long into that code makes my brain fuzzy.

Thanks,

	tglx

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [patch 0/8] parisc: Convert to new irq_chip functions
  2011-02-08 14:37               ` Thomas Gleixner
@ 2011-02-08 16:53                 ` James Bottomley
  2011-02-08 17:42                   ` Thomas Gleixner
  0 siblings, 1 reply; 21+ messages in thread
From: James Bottomley @ 2011-02-08 16:53 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: linux-parisc, Kyle McMartin

On Tue, 2011-02-08 at 15:37 +0100, Thomas Gleixner wrote:
> On Tue, 8 Feb 2011, Thomas Gleixner wrote:
> 
> > On Mon, 7 Feb 2011, James Bottomley wrote:
> > 
> > > On Mon, 2011-02-07 at 15:26 -0600, James Bottomley wrote:
> > > > 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
> > > 
> > > diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c
> > > index 9eea164..cb450e1 100644
> > > --- a/arch/parisc/kernel/irq.c
> > > +++ b/arch/parisc/kernel/irq.c
> > > @@ -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 :)
> 
> Gah. You set it indirect via IRQF_PERCPU with 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





^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [patch 0/8] parisc: Convert to new irq_chip functions
  2011-02-08 16:53                 ` James Bottomley
@ 2011-02-08 17:42                   ` Thomas Gleixner
  2011-02-08 17:45                     ` James Bottomley
  0 siblings, 1 reply; 21+ messages in thread
From: Thomas Gleixner @ 2011-02-08 17:42 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-parisc, Kyle McMartin

On Tue, 8 Feb 2011, James Bottomley wrote:
> On Tue, 2011-02-08 at 15:37 +0100, Thomas Gleixner wrote:
> > Gah. You set it indirect via IRQF_PERCPU with 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?

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

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [patch 0/8] parisc: Convert to new irq_chip functions
  2011-02-08 17:42                   ` Thomas Gleixner
@ 2011-02-08 17:45                     ` James Bottomley
  2011-02-08 21:59                       ` Thomas Gleixner
  0 siblings, 1 reply; 21+ messages in thread
From: James Bottomley @ 2011-02-08 17:45 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: linux-parisc, Kyle McMartin

On Tue, 2011-02-08 at 18:42 +0100, Thomas Gleixner wrote:
> On Tue, 8 Feb 2011, James Bottomley wrote:
> > On Tue, 2011-02-08 at 15:37 +0100, Thomas Gleixner wrote:
> > > Gah. You set it indirect via IRQF_PERCPU with 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?
> 
> 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?

> 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



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [patch 0/8] parisc: Convert to new irq_chip functions
  2011-02-08 17:45                     ` James Bottomley
@ 2011-02-08 21:59                       ` Thomas Gleixner
  0 siblings, 0 replies; 21+ messages in thread
From: Thomas Gleixner @ 2011-02-08 21:59 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-parisc, Kyle McMartin

On Tue, 8 Feb 2011, James Bottomley wrote:

> On Tue, 2011-02-08 at 18:42 +0100, Thomas Gleixner wrote:
> > On Tue, 8 Feb 2011, James Bottomley wrote:
> > > On Tue, 2011-02-08 at 15:37 +0100, Thomas Gleixner wrote:
> > > > Gah. You set it indirect via IRQF_PERCPU with 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?
> > 
> > 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.
 
> > 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

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2011-02-08 21:59 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-06 20:45 [patch 0/8] parisc: Convert to new irq_chip functions Thomas Gleixner
2011-02-06 20:45 ` [patch 1/8] parisc: Convert cpu irq_chip to new functions Thomas Gleixner
2011-02-06 20:45 ` [patch 2/8] parisc: Convert dino " Thomas Gleixner
2011-02-06 20:45 ` [patch 3/8] parisc: Convert eisa " Thomas Gleixner
2011-02-06 20:45 ` [patch 4/8] parisc: Convert gsc " Thomas Gleixner
2011-02-06 20:46 ` [patch 5/8] parisc: Convert iosapic " Thomas Gleixner
2011-02-06 20:46 ` [patch 6/8] parisc: Convert superio " Thomas Gleixner
2011-02-06 20:46 ` [patch 7/8] parisc: Prepare show_interrupts for GENERIC_HARDIRQS_NO_DEPRECATED Thomas Gleixner
2011-02-06 20:46 ` [patch 8/8] parisc: Select GENERIC_HARDIRQS_NO_DEPRECATED Thomas Gleixner
2011-02-07 16:02 ` [patch 0/8] parisc: Convert to new irq_chip functions James Bottomley
2011-02-07 16:53   ` Thomas Gleixner
2011-02-07 17:36     ` James Bottomley
2011-02-07 18:28       ` Thomas Gleixner
2011-02-07 21:26         ` James Bottomley
2011-02-08  0:32           ` James Bottomley
2011-02-08 14:25             ` Thomas Gleixner
2011-02-08 14:37               ` Thomas Gleixner
2011-02-08 16:53                 ` James Bottomley
2011-02-08 17:42                   ` Thomas Gleixner
2011-02-08 17:45                     ` James Bottomley
2011-02-08 21:59                       ` Thomas Gleixner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.