Commit 8fac171f authored by Thomas Gleixner's avatar Thomas Gleixner

ia64: Convert iosapic to new irq_chip functions

Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 5c217b60
...@@ -257,7 +257,7 @@ set_rte (unsigned int gsi, unsigned int irq, unsigned int dest, int mask) ...@@ -257,7 +257,7 @@ set_rte (unsigned int gsi, unsigned int irq, unsigned int dest, int mask)
} }
static void static void
nop (unsigned int irq) nop (struct irq_data *data)
{ {
/* do nothing... */ /* do nothing... */
} }
...@@ -287,8 +287,9 @@ kexec_disable_iosapic(void) ...@@ -287,8 +287,9 @@ kexec_disable_iosapic(void)
#endif #endif
static void static void
mask_irq (unsigned int irq) mask_irq (struct irq_data *data)
{ {
unsigned int irq = data->irq;
u32 low32; u32 low32;
int rte_index; int rte_index;
struct iosapic_rte_info *rte; struct iosapic_rte_info *rte;
...@@ -305,8 +306,9 @@ mask_irq (unsigned int irq) ...@@ -305,8 +306,9 @@ mask_irq (unsigned int irq)
} }
static void static void
unmask_irq (unsigned int irq) unmask_irq (struct irq_data *data)
{ {
unsigned int irq = data->irq;
u32 low32; u32 low32;
int rte_index; int rte_index;
struct iosapic_rte_info *rte; struct iosapic_rte_info *rte;
...@@ -323,9 +325,11 @@ unmask_irq (unsigned int irq) ...@@ -323,9 +325,11 @@ unmask_irq (unsigned int irq)
static int static int
iosapic_set_affinity(unsigned int irq, const struct cpumask *mask) iosapic_set_affinity(struct irq_data *data, const struct cpumask *mask,
bool force)
{ {
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
unsigned int irq = data->irq;
u32 high32, low32; u32 high32, low32;
int cpu, dest, rte_index; int cpu, dest, rte_index;
int redir = (irq & IA64_IRQ_REDIRECTED) ? 1 : 0; int redir = (irq & IA64_IRQ_REDIRECTED) ? 1 : 0;
...@@ -379,15 +383,16 @@ iosapic_set_affinity(unsigned int irq, const struct cpumask *mask) ...@@ -379,15 +383,16 @@ iosapic_set_affinity(unsigned int irq, const struct cpumask *mask)
*/ */
static unsigned int static unsigned int
iosapic_startup_level_irq (unsigned int irq) iosapic_startup_level_irq (struct irq_data *data)
{ {
unmask_irq(irq); unmask_irq(data);
return 0; return 0;
} }
static void static void
iosapic_unmask_level_irq (unsigned int irq) iosapic_unmask_level_irq (struct irq_data *data)
{ {
unsigned int irq = data->irq;
ia64_vector vec = irq_to_vector(irq); ia64_vector vec = irq_to_vector(irq);
struct iosapic_rte_info *rte; struct iosapic_rte_info *rte;
int do_unmask_irq = 0; int do_unmask_irq = 0;
...@@ -395,16 +400,16 @@ iosapic_unmask_level_irq (unsigned int irq) ...@@ -395,16 +400,16 @@ iosapic_unmask_level_irq (unsigned int irq)
irq_complete_move(irq); irq_complete_move(irq);
if (unlikely(irq_desc[irq].status & IRQ_MOVE_PENDING)) { if (unlikely(irq_desc[irq].status & IRQ_MOVE_PENDING)) {
do_unmask_irq = 1; do_unmask_irq = 1;
mask_irq(irq); mask_irq(data);
} else } else
unmask_irq(irq); unmask_irq(data);
list_for_each_entry(rte, &iosapic_intr_info[irq].rtes, rte_list) list_for_each_entry(rte, &iosapic_intr_info[irq].rtes, rte_list)
iosapic_eoi(rte->iosapic->addr, vec); iosapic_eoi(rte->iosapic->addr, vec);
if (unlikely(do_unmask_irq)) { if (unlikely(do_unmask_irq)) {
move_masked_irq(irq); move_masked_irq(irq);
unmask_irq(irq); unmask_irq(data);
} }
} }
...@@ -415,14 +420,14 @@ iosapic_unmask_level_irq (unsigned int irq) ...@@ -415,14 +420,14 @@ iosapic_unmask_level_irq (unsigned int irq)
static struct irq_chip irq_type_iosapic_level = { static struct irq_chip irq_type_iosapic_level = {
.name = "IO-SAPIC-level", .name = "IO-SAPIC-level",
.startup = iosapic_startup_level_irq, .irq_startup = iosapic_startup_level_irq,
.shutdown = iosapic_shutdown_level_irq, .irq_shutdown = iosapic_shutdown_level_irq,
.enable = iosapic_enable_level_irq, .irq_enable = iosapic_enable_level_irq,
.disable = iosapic_disable_level_irq, .irq_disable = iosapic_disable_level_irq,
.ack = iosapic_ack_level_irq, .irq_ack = iosapic_ack_level_irq,
.mask = mask_irq, .irq_mask = mask_irq,
.unmask = iosapic_unmask_level_irq, .irq_unmask = iosapic_unmask_level_irq,
.set_affinity = iosapic_set_affinity .irq_set_affinity = iosapic_set_affinity
}; };
/* /*
...@@ -430,9 +435,9 @@ static struct irq_chip irq_type_iosapic_level = { ...@@ -430,9 +435,9 @@ static struct irq_chip irq_type_iosapic_level = {
*/ */
static unsigned int static unsigned int
iosapic_startup_edge_irq (unsigned int irq) iosapic_startup_edge_irq (struct irq_data *data)
{ {
unmask_irq(irq); unmask_irq(data);
/* /*
* IOSAPIC simply drops interrupts pended while the * IOSAPIC simply drops interrupts pended while the
* corresponding pin was masked, so we can't know if an * corresponding pin was masked, so we can't know if an
...@@ -442,8 +447,9 @@ iosapic_startup_edge_irq (unsigned int irq) ...@@ -442,8 +447,9 @@ iosapic_startup_edge_irq (unsigned int irq)
} }
static void static void
iosapic_ack_edge_irq (unsigned int irq) iosapic_ack_edge_irq (struct irq_data *data)
{ {
unsigned int irq = data->irq;
struct irq_desc *idesc = irq_desc + irq; struct irq_desc *idesc = irq_desc + irq;
irq_complete_move(irq); irq_complete_move(irq);
...@@ -455,7 +461,7 @@ iosapic_ack_edge_irq (unsigned int irq) ...@@ -455,7 +461,7 @@ iosapic_ack_edge_irq (unsigned int irq)
*/ */
if ((idesc->status & (IRQ_PENDING|IRQ_DISABLED)) == if ((idesc->status & (IRQ_PENDING|IRQ_DISABLED)) ==
(IRQ_PENDING|IRQ_DISABLED)) (IRQ_PENDING|IRQ_DISABLED))
mask_irq(irq); mask_irq(data);
} }
#define iosapic_enable_edge_irq unmask_irq #define iosapic_enable_edge_irq unmask_irq
...@@ -463,14 +469,14 @@ iosapic_ack_edge_irq (unsigned int irq) ...@@ -463,14 +469,14 @@ iosapic_ack_edge_irq (unsigned int irq)
static struct irq_chip irq_type_iosapic_edge = { static struct irq_chip irq_type_iosapic_edge = {
.name = "IO-SAPIC-edge", .name = "IO-SAPIC-edge",
.startup = iosapic_startup_edge_irq, .irq_startup = iosapic_startup_edge_irq,
.shutdown = iosapic_disable_edge_irq, .irq_shutdown = iosapic_disable_edge_irq,
.enable = iosapic_enable_edge_irq, .irq_enable = iosapic_enable_edge_irq,
.disable = iosapic_disable_edge_irq, .irq_disable = iosapic_disable_edge_irq,
.ack = iosapic_ack_edge_irq, .irq_ack = iosapic_ack_edge_irq,
.mask = mask_irq, .irq_mask = mask_irq,
.unmask = unmask_irq, .irq_unmask = unmask_irq,
.set_affinity = iosapic_set_affinity .irq_set_affinity = iosapic_set_affinity
}; };
static unsigned int static unsigned int
......
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