Commit 589d03e9 authored by Thomas Gleixner's avatar Thomas Gleixner

xen: Use the proper irq functions

generic_handler_irq() already tests for !desc so use this instead of
generic_handle_irq_desc().

Use irq_get_irq_data() instead of desc->irq_data.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Reviewed-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Xen <xen-devel@lists.xenproject.org>
Link: http://lkml.kernel.org/r/20140223212738.222412125@linutronix.deSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 49f3fbc7
...@@ -166,7 +166,6 @@ static void evtchn_2l_handle_events(unsigned cpu) ...@@ -166,7 +166,6 @@ static void evtchn_2l_handle_events(unsigned cpu)
int start_word_idx, start_bit_idx; int start_word_idx, start_bit_idx;
int word_idx, bit_idx; int word_idx, bit_idx;
int i; int i;
struct irq_desc *desc;
struct shared_info *s = HYPERVISOR_shared_info; struct shared_info *s = HYPERVISOR_shared_info;
struct vcpu_info *vcpu_info = __this_cpu_read(xen_vcpu); struct vcpu_info *vcpu_info = __this_cpu_read(xen_vcpu);
...@@ -176,11 +175,8 @@ static void evtchn_2l_handle_events(unsigned cpu) ...@@ -176,11 +175,8 @@ static void evtchn_2l_handle_events(unsigned cpu)
unsigned int evtchn = evtchn_from_irq(irq); unsigned int evtchn = evtchn_from_irq(irq);
word_idx = evtchn / BITS_PER_LONG; word_idx = evtchn / BITS_PER_LONG;
bit_idx = evtchn % BITS_PER_LONG; bit_idx = evtchn % BITS_PER_LONG;
if (active_evtchns(cpu, s, word_idx) & (1ULL << bit_idx)) { if (active_evtchns(cpu, s, word_idx) & (1ULL << bit_idx))
desc = irq_to_desc(irq); generic_handle_irq(irq);
if (desc)
generic_handle_irq_desc(irq, desc);
}
} }
/* /*
...@@ -245,11 +241,8 @@ static void evtchn_2l_handle_events(unsigned cpu) ...@@ -245,11 +241,8 @@ static void evtchn_2l_handle_events(unsigned cpu)
port = (word_idx * BITS_PER_EVTCHN_WORD) + bit_idx; port = (word_idx * BITS_PER_EVTCHN_WORD) + bit_idx;
irq = get_evtchn_to_irq(port); irq = get_evtchn_to_irq(port);
if (irq != -1) { if (irq != -1)
desc = irq_to_desc(irq); generic_handle_irq(irq);
if (desc)
generic_handle_irq_desc(irq, desc);
}
bit_idx = (bit_idx + 1) % BITS_PER_EVTCHN_WORD; bit_idx = (bit_idx + 1) % BITS_PER_EVTCHN_WORD;
......
...@@ -336,9 +336,8 @@ static void bind_evtchn_to_cpu(unsigned int chn, unsigned int cpu) ...@@ -336,9 +336,8 @@ static void bind_evtchn_to_cpu(unsigned int chn, unsigned int cpu)
BUG_ON(irq == -1); BUG_ON(irq == -1);
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
cpumask_copy(irq_to_desc(irq)->irq_data.affinity, cpumask_of(cpu)); cpumask_copy(irq_get_irq_data(irq)->affinity, cpumask_of(cpu));
#endif #endif
xen_evtchn_port_bind_to_cpu(info, cpu); xen_evtchn_port_bind_to_cpu(info, cpu);
info->cpu = cpu; info->cpu = cpu;
...@@ -373,10 +372,8 @@ static void xen_irq_init(unsigned irq) ...@@ -373,10 +372,8 @@ static void xen_irq_init(unsigned irq)
{ {
struct irq_info *info; struct irq_info *info;
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
struct irq_desc *desc = irq_to_desc(irq);
/* By default all event channels notify CPU#0. */ /* By default all event channels notify CPU#0. */
cpumask_copy(desc->irq_data.affinity, cpumask_of(0)); cpumask_copy(irq_get_irq_data(irq)->affinity, cpumask_of(0));
#endif #endif
info = kzalloc(sizeof(*info), GFP_KERNEL); info = kzalloc(sizeof(*info), GFP_KERNEL);
......
...@@ -235,14 +235,10 @@ static uint32_t clear_linked(volatile event_word_t *word) ...@@ -235,14 +235,10 @@ static uint32_t clear_linked(volatile event_word_t *word)
static void handle_irq_for_port(unsigned port) static void handle_irq_for_port(unsigned port)
{ {
int irq; int irq;
struct irq_desc *desc;
irq = get_evtchn_to_irq(port); irq = get_evtchn_to_irq(port);
if (irq != -1) { if (irq != -1)
desc = irq_to_desc(irq); generic_handle_irq(irq);
if (desc)
generic_handle_irq_desc(irq, desc);
}
} }
static void consume_one_event(unsigned cpu, static void consume_one_event(unsigned cpu,
......
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