linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Lennert Buytenhek <buytenh@wantstofly.org>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Thomas Gleixner <tglx@linutronix.de>, linuxppc-dev@lists.ozlabs.org
Subject: [PATCH v2 23/28] powerpc: sysdev/qe_lib/qe_ic irq_data conversion.
Date: Wed, 9 Mar 2011 09:27:00 +0100	[thread overview]
Message-ID: <20110309082700.GS16649@mail.wantstofly.org> (raw)
In-Reply-To: <20110308000010.GB16649@mail.wantstofly.org>

Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca>
---
v2: get_irq_chip_data(d->irq) => irq_data_get_irq_chip_data(d)

 arch/powerpc/include/asm/qe_ic.h   |   19 +++++++++++--------
 arch/powerpc/sysdev/qe_lib/qe_ic.c |   25 +++++++++++++++----------
 2 files changed, 26 insertions(+), 18 deletions(-)

diff --git a/arch/powerpc/include/asm/qe_ic.h b/arch/powerpc/include/asm/qe_ic.h
index cf51966..9e2cb20 100644
--- a/arch/powerpc/include/asm/qe_ic.h
+++ b/arch/powerpc/include/asm/qe_ic.h
@@ -81,7 +81,7 @@ int qe_ic_set_high_priority(unsigned int virq, unsigned int priority, int high);
 static inline void qe_ic_cascade_low_ipic(unsigned int irq,
 					  struct irq_desc *desc)
 {
-	struct qe_ic *qe_ic = desc->handler_data;
+	struct qe_ic *qe_ic = get_irq_desc_data(desc);
 	unsigned int cascade_irq = qe_ic_get_low_irq(qe_ic);
 
 	if (cascade_irq != NO_IRQ)
@@ -91,7 +91,7 @@ static inline void qe_ic_cascade_low_ipic(unsigned int irq,
 static inline void qe_ic_cascade_high_ipic(unsigned int irq,
 					   struct irq_desc *desc)
 {
-	struct qe_ic *qe_ic = desc->handler_data;
+	struct qe_ic *qe_ic = get_irq_desc_data(desc);
 	unsigned int cascade_irq = qe_ic_get_high_irq(qe_ic);
 
 	if (cascade_irq != NO_IRQ)
@@ -101,32 +101,35 @@ static inline void qe_ic_cascade_high_ipic(unsigned int irq,
 static inline void qe_ic_cascade_low_mpic(unsigned int irq,
 					  struct irq_desc *desc)
 {
-	struct qe_ic *qe_ic = desc->handler_data;
+	struct qe_ic *qe_ic = get_irq_desc_data(desc);
 	unsigned int cascade_irq = qe_ic_get_low_irq(qe_ic);
+	struct irq_chip *chip = get_irq_desc_chip(desc);
 
 	if (cascade_irq != NO_IRQ)
 		generic_handle_irq(cascade_irq);
 
-	desc->chip->eoi(irq);
+	chip->irq_eoi(&desc->irq_data);
 }
 
 static inline void qe_ic_cascade_high_mpic(unsigned int irq,
 					   struct irq_desc *desc)
 {
-	struct qe_ic *qe_ic = desc->handler_data;
+	struct qe_ic *qe_ic = get_irq_desc_data(desc);
 	unsigned int cascade_irq = qe_ic_get_high_irq(qe_ic);
+	struct irq_chip *chip = get_irq_desc_chip(desc);
 
 	if (cascade_irq != NO_IRQ)
 		generic_handle_irq(cascade_irq);
 
-	desc->chip->eoi(irq);
+	chip->irq_eoi(&desc->irq_data);
 }
 
 static inline void qe_ic_cascade_muxed_mpic(unsigned int irq,
 					    struct irq_desc *desc)
 {
-	struct qe_ic *qe_ic = desc->handler_data;
+	struct qe_ic *qe_ic = get_irq_desc_data(desc);
 	unsigned int cascade_irq;
+	struct irq_chip *chip = get_irq_desc_chip(desc);
 
 	cascade_irq = qe_ic_get_high_irq(qe_ic);
 	if (cascade_irq == NO_IRQ)
@@ -135,7 +138,7 @@ static inline void qe_ic_cascade_muxed_mpic(unsigned int irq,
 	if (cascade_irq != NO_IRQ)
 		generic_handle_irq(cascade_irq);
 
-	desc->chip->eoi(irq);
+	chip->irq_eoi(&desc->irq_data);
 }
 
 #endif /* _ASM_POWERPC_QE_IC_H */
diff --git a/arch/powerpc/sysdev/qe_lib/qe_ic.c b/arch/powerpc/sysdev/qe_lib/qe_ic.c
index 541ba98..8c9ded8 100644
--- a/arch/powerpc/sysdev/qe_lib/qe_ic.c
+++ b/arch/powerpc/sysdev/qe_lib/qe_ic.c
@@ -189,15 +189,20 @@ static inline void qe_ic_write(volatile __be32  __iomem * base, unsigned int reg
 
 static inline struct qe_ic *qe_ic_from_irq(unsigned int virq)
 {
-	return irq_to_desc(virq)->chip_data;
+	return get_irq_chip_data(virq);
+}
+
+static inline struct qe_ic *qe_ic_from_irq_data(struct irq_data *d)
+{
+	return irq_data_get_irq_chip_data(d);
 }
 
 #define virq_to_hw(virq)	((unsigned int)irq_map[virq].hwirq)
 
-static void qe_ic_unmask_irq(unsigned int virq)
+static void qe_ic_unmask_irq(struct irq_data *d)
 {
-	struct qe_ic *qe_ic = qe_ic_from_irq(virq);
-	unsigned int src = virq_to_hw(virq);
+	struct qe_ic *qe_ic = qe_ic_from_irq_data(d);
+	unsigned int src = virq_to_hw(d->irq);
 	unsigned long flags;
 	u32 temp;
 
@@ -210,10 +215,10 @@ static void qe_ic_unmask_irq(unsigned int virq)
 	raw_spin_unlock_irqrestore(&qe_ic_lock, flags);
 }
 
-static void qe_ic_mask_irq(unsigned int virq)
+static void qe_ic_mask_irq(struct irq_data *d)
 {
-	struct qe_ic *qe_ic = qe_ic_from_irq(virq);
-	unsigned int src = virq_to_hw(virq);
+	struct qe_ic *qe_ic = qe_ic_from_irq_data(d);
+	unsigned int src = virq_to_hw(d->irq);
 	unsigned long flags;
 	u32 temp;
 
@@ -238,9 +243,9 @@ static void qe_ic_mask_irq(unsigned int virq)
 
 static struct irq_chip qe_ic_irq_chip = {
 	.name = "QEIC",
-	.unmask = qe_ic_unmask_irq,
-	.mask = qe_ic_mask_irq,
-	.mask_ack = qe_ic_mask_irq,
+	.irq_unmask = qe_ic_unmask_irq,
+	.irq_mask = qe_ic_mask_irq,
+	.irq_mask_ack = qe_ic_mask_irq,
 };
 
 static int qe_ic_host_match(struct irq_host *h, struct device_node *node)
-- 
1.7.4

  reply	other threads:[~2011-03-09  8:27 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   ` Lennert Buytenhek [this message]
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 ` [PATCH 27/28] powerpc: core " Lennert Buytenhek
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=20110309082700.GS16649@mail.wantstofly.org \
    --to=buytenh@wantstofly.org \
    --cc=benh@kernel.crashing.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=tglx@linutronix.de \
    /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).