Skip to contentSkip to conversation

parisc: Final irq bits

PATCH New Thomas Gleixner 1 participant 3 messages Mar 25, 2011 PA-RISC architecture

lore
Share & tools
lore
#0 lore raw

cover parisc: Final irq bits

James,

the following two patches cleanup the remaining oddbits and convert parisc to the new irq function names.

Thanks,

tglx

#1 lore raw

PATCH 1/2 parisc: Convert the final irq bits

1) As promised in the comment, the core does not copy cpumask anymore when the arch code returns -EINVAL

2) Get the per cpu information from irq_data

---
 arch/parisc/kernel/irq.c |    9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
arch/parisc/kernel/irq.c +2 -7
Index: linux-2.6-tip/arch/parisc/kernel/irq.c
===================================================================
@@ -113,13 +113,8 @@ 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(d->irq)->status)) {
-		/* Bad linux design decision.  The mask has already
-		 * been set; we must reset it. Will fix - tglx
-		 */
-		cpumask_setall(d->affinity);
+	if (irqd_is_per_cpu(d))
 		return -EINVAL;
-	}
 
 	/* whatever mask they set, we just allow one CPU */
 	cpu_dest = first_cpu(*dest);
@@ -357,7 +352,7 @@ void do_cpu_irq_mask(struct pt_regs *reg
 #ifdef CONFIG_SMP
 	desc = irq_to_desc(irq);
 	cpumask_copy(&dest, desc->irq_data.affinity);
-	if (CHECK_IRQ_PER_CPU(desc->status) &&
+	if (irqd_is_per_cpu(&desc->irq_data) &&
 	    !cpu_isset(smp_processor_id(), dest)) {
 		int cpu = first_cpu(dest);
 
#2 lore raw

PATCH 2/2 parisc: Convert irq namespace

In reply to Thomas Gleixner

Convert to the new function names. Scripted with coccinelle.

---
 arch/parisc/kernel/irq.c |   12 ++++++------
 drivers/parisc/eisa.c    |    2 +-
 drivers/parisc/gsc.c     |    4 ++--
 drivers/parisc/superio.c |    3 ++-
 4 files changed, 11 insertions(+), 10 deletions(-)
arch/parisc/kernel/irq.c +6 -6
Index: linux-2.6-tip/arch/parisc/kernel/irq.c
===================================================================
@@ -235,13 +235,13 @@ int cpu_claim_irq(unsigned int irq, stru
 {
 	if (irq_desc[irq].action)
 		return -EBUSY;
-	if (get_irq_chip(irq) != &cpu_interrupt_type)
+	if (irq_get_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);
+		irq_set_chip_and_handler(irq, type, handle_percpu_irq);
+		irq_set_chip_data(irq, data);
 		__cpu_unmask_irq(irq);
 	}
 	return 0;
@@ -393,14 +393,14 @@ static void claim_cpu_irqs(void)
 {
 	int i;
 	for (i = CPU_IRQ_BASE; i <= CPU_IRQ_MAX; i++) {
-		set_irq_chip_and_handler(i, &cpu_interrupt_type,
+		irq_set_chip_and_handler(i, &cpu_interrupt_type,
 					 handle_percpu_irq);
 	}
 
-	set_irq_handler(TIMER_IRQ, handle_percpu_irq);
+	irq_set_handler(TIMER_IRQ, handle_percpu_irq);
 	setup_irq(TIMER_IRQ, &timer_action);
 #ifdef CONFIG_SMP
-	set_irq_handler(IPI_IRQ, handle_percpu_irq);
+	irq_set_handler(IPI_IRQ, handle_percpu_irq);
 	setup_irq(IPI_IRQ, &ipi_action);
 #endif
 }
drivers/parisc/eisa.c +1 -1
Index: linux-2.6-tip/drivers/parisc/eisa.c
===================================================================
@@ -340,7 +340,7 @@ static int __init eisa_probe(struct pari
 	/* Reserve IRQ2 */
 	setup_irq(2, &irq2_action);
 	for (i = 0; i < 16; i++) {
-		set_irq_chip_and_handler(i, &eisa_interrupt_type,
+		irq_set_chip_and_handler(i, &eisa_interrupt_type,
 					 handle_simple_irq);
 	}
 	
drivers/parisc/gsc.c +2 -2
Index: linux-2.6-tip/drivers/parisc/gsc.c
===================================================================
@@ -152,8 +152,8 @@ int gsc_assign_irq(struct irq_chip *type
 	if (irq > GSC_IRQ_MAX)
 		return NO_IRQ;
 
-	set_irq_chip_and_handler(irq, type, handle_simple_irq);
-	set_irq_chip_data(irq, data);
+	irq_set_chip_and_handler(irq, type, handle_simple_irq);
+	irq_set_chip_data(irq, data);
 
 	return irq++;
 }
drivers/parisc/superio.c +2 -1
Index: linux-2.6-tip/drivers/parisc/superio.c
===================================================================
@@ -355,7 +355,8 @@ int superio_fixup_irq(struct pci_dev *pc
 #endif
 
 	for (i = 0; i < 16; i++) {
-		set_irq_chip_and_handler(i, &superio_interrupt_type, handle_simple_irq);
+		irq_set_chip_and_handler(i, &superio_interrupt_type,
+					 handle_simple_irq);
 	}
 
 	/*