linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Lennert Buytenhek <buytenh@wantstofly.org>
To: linuxppc-dev@lists.ozlabs.org
Subject: [PATCH 27/28] powerpc: core irq_data conversion.
Date: Tue, 8 Mar 2011 01:00:20 +0100	[thread overview]
Message-ID: <20110308000020.GF16649@mail.wantstofly.org> (raw)
In-Reply-To: <cover.1299541392.git.buytenh@wantstofly.org>

Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca>
---
 arch/powerpc/kernel/irq.c           |   23 ++++++++++++++++-------
 arch/powerpc/kernel/machine_kexec.c |   21 ++++++++++++---------
 2 files changed, 28 insertions(+), 16 deletions(-)

diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index ce557f6..4a9fa84 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -237,6 +237,7 @@ int show_interrupts(struct seq_file *p, void *v)
 	int i = *(loff_t *) v, j, prec;
 	struct irqaction *action;
 	struct irq_desc *desc;
+	struct irq_chip *chip;
 
 	if (i > nr_irqs)
 		return 0;
@@ -270,8 +271,9 @@ int show_interrupts(struct seq_file *p, void *v)
 	for_each_online_cpu(j)
 		seq_printf(p, "%10u ", kstat_irqs_cpu(i, j));
 
-	if (desc->chip)
-		seq_printf(p, "  %-16s", desc->chip->name);
+	chip = get_irq_desc_chip(desc);
+	if (chip)
+		seq_printf(p, "  %-16s", chip->name);
 	else
 		seq_printf(p, "  %-16s", "None");
 	seq_printf(p, " %-8s", (desc->status & IRQ_LEVEL) ? "Level" : "Edge");
@@ -313,6 +315,8 @@ void fixup_irqs(const struct cpumask *map)
 	alloc_cpumask_var(&mask, GFP_KERNEL);
 
 	for_each_irq(irq) {
+		struct irq_chip *chip;
+
 		desc = irq_to_desc(irq);
 		if (!desc)
 			continue;
@@ -320,13 +324,15 @@ void fixup_irqs(const struct cpumask *map)
 		if (desc->status & IRQ_PER_CPU)
 			continue;
 
-		cpumask_and(mask, desc->affinity, map);
+		chip = get_irq_desc_chip(desc);
+
+		cpumask_and(mask, desc->irq_data.affinity, map);
 		if (cpumask_any(mask) >= nr_cpu_ids) {
 			printk("Breaking affinity for irq %i\n", irq);
 			cpumask_copy(mask, map);
 		}
-		if (desc->chip->set_affinity)
-			desc->chip->set_affinity(irq, mask);
+		if (chip->irq_set_affinity)
+			chip->irq_set_affinity(&desc->irq_data, mask, true);
 		else if (desc->action && !(warned++))
 			printk("Cannot set affinity for irq %i\n", irq);
 	}
@@ -1159,11 +1165,14 @@ static int virq_debug_show(struct seq_file *m, void *private)
 		raw_spin_lock_irqsave(&desc->lock, flags);
 
 		if (desc->action && desc->action->handler) {
+			struct irq_chip *chip;
+
 			seq_printf(m, "%5d  ", i);
 			seq_printf(m, "0x%05lx  ", virq_to_hw(i));
 
-			if (desc->chip && desc->chip->name)
-				p = desc->chip->name;
+			chip = get_irq_desc_chip(desc);
+			if (chip && chip->name)
+				p = chip->name;
 			else
 				p = none;
 			seq_printf(m, "%-15s  ", p);
diff --git a/arch/powerpc/kernel/machine_kexec.c b/arch/powerpc/kernel/machine_kexec.c
index a5f8672..bd1e1ff 100644
--- a/arch/powerpc/kernel/machine_kexec.c
+++ b/arch/powerpc/kernel/machine_kexec.c
@@ -26,20 +26,23 @@ void machine_kexec_mask_interrupts(void) {
 
 	for_each_irq(i) {
 		struct irq_desc *desc = irq_to_desc(i);
+		struct irq_chip *chip;
 
-		if (!desc || !desc->chip)
+		if (!desc)
 			continue;
 
-		if (desc->chip->eoi &&
-		    desc->status & IRQ_INPROGRESS)
-			desc->chip->eoi(i);
+		chip = get_irq_desc_chip(desc);
+		if (!chip)
+			continue;
+
+		if (chip->irq_eoi && desc->status & IRQ_INPROGRESS)
+			chip->irq_eoi(&desc->irq_data);
 
-		if (desc->chip->mask)
-			desc->chip->mask(i);
+		if (chip->irq_mask)
+			chip->irq_mask(&desc->irq_data);
 
-		if (desc->chip->disable &&
-		    !(desc->status & IRQ_DISABLED))
-			desc->chip->disable(i);
+		if (chip->irq_disable && !(desc->status & IRQ_DISABLED))
+			chip->irq_disable(&desc->irq_data);
 	}
 }
 
-- 
1.7.4

  parent reply	other threads:[~2011-03-08  0:00 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1299541392.git.buytenh@wantstofly.org>
2011-03-07 23:59 ` [PATCH 01/28] powerpc: mpic irq_data conversion Lennert Buytenhek
2011-03-08  4:13   ` Grant Likely
2011-03-08  4:51     ` Benjamin Herrenschmidt
2011-03-09  3:22   ` Benjamin Herrenschmidt
2011-03-09  7:33     ` Lennert Buytenhek
2011-03-09  7:51       ` Benjamin Herrenschmidt
2011-03-09  8:26         ` Lennert Buytenhek
2011-03-09  8:26   ` [PATCH v2 " Lennert Buytenhek
2011-03-07 23:59 ` [PATCH 02/28] powerpc: platforms/512x " Lennert Buytenhek
2011-03-07 23:59 ` [PATCH 03/28] powerpc: platforms/52xx " Lennert Buytenhek
2011-03-09  8:26   ` [PATCH v2 " Lennert Buytenhek
2011-03-07 23:59 ` [PATCH 04/28] powerpc: platforms/82xx " Lennert Buytenhek
2011-03-09  8:26   ` [PATCH v2 " Lennert Buytenhek
2011-03-07 23:59 ` [PATCH 05/28] powerpc: platforms/85xx " Lennert Buytenhek
2011-03-07 23:59 ` [PATCH 06/28] powerpc: platforms/86xx " Lennert Buytenhek
2011-03-07 23:59 ` [PATCH 07/28] powerpc: platforms/8xx " Lennert Buytenhek
2011-03-07 23:59 ` [PATCH 08/28] powerpc: platforms/cell " Lennert Buytenhek
2011-03-07 23:59 ` [PATCH 09/28] powerpc: platforms/chrp " Lennert Buytenhek
2011-03-07 23:59 ` [PATCH 10/28] powerpc: platforms/embedded6xx " Lennert Buytenhek
2011-03-09  8:26   ` [PATCH v2 " Lennert Buytenhek
2011-03-07 23:59 ` [PATCH 11/28] powerpc: platforms/iseries " Lennert Buytenhek
2011-03-07 23:59 ` [PATCH 12/28] powerpc: platforms/powermac " Lennert Buytenhek
2011-03-07 23:59 ` [PATCH 13/28] powerpc: platforms/ps3 " Lennert Buytenhek
2011-03-09  8:26   ` [PATCH v2 " Lennert Buytenhek
2011-03-07 23:59 ` [PATCH 14/28] powerpc: platforms/pseries " Lennert Buytenhek
2011-03-07 23:59 ` [PATCH 15/28] powerpc: sysdev/cpm1 " Lennert Buytenhek
2011-03-07 23:59 ` [PATCH 16/28] powerpc: sysdev/cpm2_pic " Lennert Buytenhek
2011-03-07 23:59 ` [PATCH 17/28] powerpc: sysdev/fsl_msi " Lennert Buytenhek
2011-03-07 23:59 ` [PATCH 18/28] powerpc: sysdev/i8259 " Lennert Buytenhek
2011-03-07 23:59 ` [PATCH 19/28] powerpc: sysdev/ipic " Lennert Buytenhek
2011-03-08  0:00 ` [PATCH 20/28] powerpc: sysdev/mpc8xx_pic " Lennert Buytenhek
2011-03-08  0:00 ` [PATCH 21/28] powerpc: sysdev/mpc8xxx_gpio " Lennert Buytenhek
2011-03-09  8:26   ` [PATCH v2 " Lennert Buytenhek
2011-03-16 21:25     ` Peter Korsgaard
2011-03-08  0:00 ` [PATCH 22/28] powerpc: sysdev/mv64x60_pic " Lennert Buytenhek
2011-03-08  0:00 ` [PATCH 23/28] powerpc: sysdev/qe_lib/qe_ic " Lennert Buytenhek
2011-03-09  8:27   ` [PATCH v2 " Lennert Buytenhek
2011-03-08  0:00 ` [PATCH 24/28] powerpc: sysdev/tsi108_pci " Lennert Buytenhek
2011-03-08  0:00 ` [PATCH 25/28] powerpc: sysdev/uic " Lennert Buytenhek
2011-03-09  8:27   ` [PATCH v2 " Lennert Buytenhek
2011-03-08  0:00 ` [PATCH 26/28] powerpc: sysdev/xilinx_intc " Lennert Buytenhek
2011-03-09  8:27   ` [PATCH v2 " Lennert Buytenhek
2011-03-08  0:00 ` Lennert Buytenhek [this message]
2011-03-08  0:00 ` [PATCH 28/28] powerpc: Enable GENERIC_HARDIRQS_NO_DEPRECATED Lennert Buytenhek
2011-03-08  4:38   ` Grant Likely
2011-03-08  4:48     ` Benjamin Herrenschmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110308000020.GF16649@mail.wantstofly.org \
    --to=buytenh@wantstofly.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).