Commit 6a4a5b34 authored by Jiang Liu's avatar Jiang Liu Committed by Thomas Gleixner

sparc/irq: Use helper irq_data_get_irq_handler_data()

Use helper function irq_data_get_irq_handler_data() to hide irq_desc
implementation details. This allows to move irq_data->handler_data to
irq_data_common, once all usage sites are converted.
Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
Cc: David S. Miller <davem@davemloft.net>
Link: http://lkml.kernel.org/r/1433145945-789-9-git-send-email-jiang.liu@linux.intel.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent d2109a12
...@@ -210,21 +210,21 @@ struct irq_handler_data { ...@@ -210,21 +210,21 @@ struct irq_handler_data {
static inline unsigned int irq_data_to_handle(struct irq_data *data) static inline unsigned int irq_data_to_handle(struct irq_data *data)
{ {
struct irq_handler_data *ihd = data->handler_data; struct irq_handler_data *ihd = irq_data_get_irq_handler_data(data);
return ihd->dev_handle; return ihd->dev_handle;
} }
static inline unsigned int irq_data_to_ino(struct irq_data *data) static inline unsigned int irq_data_to_ino(struct irq_data *data)
{ {
struct irq_handler_data *ihd = data->handler_data; struct irq_handler_data *ihd = irq_data_get_irq_handler_data(data);
return ihd->dev_ino; return ihd->dev_ino;
} }
static inline unsigned long irq_data_to_sysino(struct irq_data *data) static inline unsigned long irq_data_to_sysino(struct irq_data *data)
{ {
struct irq_handler_data *ihd = data->handler_data; struct irq_handler_data *ihd = irq_data_get_irq_handler_data(data);
return ihd->sysino; return ihd->sysino;
} }
...@@ -370,8 +370,9 @@ static int irq_choose_cpu(unsigned int irq, const struct cpumask *affinity) ...@@ -370,8 +370,9 @@ static int irq_choose_cpu(unsigned int irq, const struct cpumask *affinity)
static void sun4u_irq_enable(struct irq_data *data) static void sun4u_irq_enable(struct irq_data *data)
{ {
struct irq_handler_data *handler_data = data->handler_data; struct irq_handler_data *handler_data;
handler_data = irq_data_get_irq_handler_data(data);
if (likely(handler_data)) { if (likely(handler_data)) {
unsigned long cpuid, imap, val; unsigned long cpuid, imap, val;
unsigned int tid; unsigned int tid;
...@@ -393,8 +394,9 @@ static void sun4u_irq_enable(struct irq_data *data) ...@@ -393,8 +394,9 @@ static void sun4u_irq_enable(struct irq_data *data)
static int sun4u_set_affinity(struct irq_data *data, static int sun4u_set_affinity(struct irq_data *data,
const struct cpumask *mask, bool force) const struct cpumask *mask, bool force)
{ {
struct irq_handler_data *handler_data = data->handler_data; struct irq_handler_data *handler_data;
handler_data = irq_data_get_irq_handler_data(data);
if (likely(handler_data)) { if (likely(handler_data)) {
unsigned long cpuid, imap, val; unsigned long cpuid, imap, val;
unsigned int tid; unsigned int tid;
...@@ -438,8 +440,9 @@ static void sun4u_irq_disable(struct irq_data *data) ...@@ -438,8 +440,9 @@ static void sun4u_irq_disable(struct irq_data *data)
static void sun4u_irq_eoi(struct irq_data *data) static void sun4u_irq_eoi(struct irq_data *data)
{ {
struct irq_handler_data *handler_data = data->handler_data; struct irq_handler_data *handler_data;
handler_data = irq_data_get_irq_handler_data(data);
if (likely(handler_data)) if (likely(handler_data))
upa_writeq(ICLR_IDLE, handler_data->iclr); upa_writeq(ICLR_IDLE, handler_data->iclr);
} }
......
...@@ -188,7 +188,7 @@ void sun4d_handler_irq(unsigned int pil, struct pt_regs *regs) ...@@ -188,7 +188,7 @@ void sun4d_handler_irq(unsigned int pil, struct pt_regs *regs)
static void sun4d_mask_irq(struct irq_data *data) static void sun4d_mask_irq(struct irq_data *data)
{ {
struct sun4d_handler_data *handler_data = data->handler_data; struct sun4d_handler_data *handler_data = irq_data_get_irq_handler_data(data);
unsigned int real_irq; unsigned int real_irq;
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
int cpuid = handler_data->cpuid; int cpuid = handler_data->cpuid;
...@@ -206,7 +206,7 @@ static void sun4d_mask_irq(struct irq_data *data) ...@@ -206,7 +206,7 @@ static void sun4d_mask_irq(struct irq_data *data)
static void sun4d_unmask_irq(struct irq_data *data) static void sun4d_unmask_irq(struct irq_data *data)
{ {
struct sun4d_handler_data *handler_data = data->handler_data; struct sun4d_handler_data *handler_data = irq_data_get_irq_handler_data(data);
unsigned int real_irq; unsigned int real_irq;
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
int cpuid = handler_data->cpuid; int cpuid = handler_data->cpuid;
......
...@@ -188,9 +188,10 @@ static unsigned long sun4m_imask[0x50] = { ...@@ -188,9 +188,10 @@ static unsigned long sun4m_imask[0x50] = {
static void sun4m_mask_irq(struct irq_data *data) static void sun4m_mask_irq(struct irq_data *data)
{ {
struct sun4m_handler_data *handler_data = data->handler_data; struct sun4m_handler_data *handler_data;
int cpu = smp_processor_id(); int cpu = smp_processor_id();
handler_data = irq_data_get_irq_handler_data(data);
if (handler_data->mask) { if (handler_data->mask) {
unsigned long flags; unsigned long flags;
...@@ -206,9 +207,10 @@ static void sun4m_mask_irq(struct irq_data *data) ...@@ -206,9 +207,10 @@ static void sun4m_mask_irq(struct irq_data *data)
static void sun4m_unmask_irq(struct irq_data *data) static void sun4m_unmask_irq(struct irq_data *data)
{ {
struct sun4m_handler_data *handler_data = data->handler_data; struct sun4m_handler_data *handler_data;
int cpu = smp_processor_id(); int cpu = smp_processor_id();
handler_data = irq_data_get_irq_handler_data(data);
if (handler_data->mask) { if (handler_data->mask) {
unsigned long flags; unsigned long flags;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment