diff options
Diffstat (limited to 'arch/ia64/kernel/msi_ia64.c')
-rw-r--r-- | arch/ia64/kernel/msi_ia64.c | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/arch/ia64/kernel/msi_ia64.c b/arch/ia64/kernel/msi_ia64.c index 00b19a416eab..b39702d1a9ca 100644 --- a/arch/ia64/kernel/msi_ia64.c +++ b/arch/ia64/kernel/msi_ia64.c | |||
@@ -12,12 +12,13 @@ | |||
12 | static struct irq_chip ia64_msi_chip; | 12 | static struct irq_chip ia64_msi_chip; |
13 | 13 | ||
14 | #ifdef CONFIG_SMP | 14 | #ifdef CONFIG_SMP |
15 | static int ia64_set_msi_irq_affinity(unsigned int irq, | 15 | static int ia64_set_msi_irq_affinity(struct irq_data *idata, |
16 | const cpumask_t *cpu_mask) | 16 | const cpumask_t *cpu_mask, bool force) |
17 | { | 17 | { |
18 | struct msi_msg msg; | 18 | struct msi_msg msg; |
19 | u32 addr, data; | 19 | u32 addr, data; |
20 | int cpu = first_cpu(*cpu_mask); | 20 | int cpu = first_cpu(*cpu_mask); |
21 | unsigned int irq = idata->irq; | ||
21 | 22 | ||
22 | if (!cpu_online(cpu)) | 23 | if (!cpu_online(cpu)) |
23 | return -1; | 24 | return -1; |
@@ -38,7 +39,7 @@ static int ia64_set_msi_irq_affinity(unsigned int irq, | |||
38 | msg.data = data; | 39 | msg.data = data; |
39 | 40 | ||
40 | write_msi_msg(irq, &msg); | 41 | write_msi_msg(irq, &msg); |
41 | cpumask_copy(irq_desc[irq].affinity, cpumask_of(cpu)); | 42 | cpumask_copy(idata->affinity, cpumask_of(cpu)); |
42 | 43 | ||
43 | return 0; | 44 | return 0; |
44 | } | 45 | } |
@@ -84,16 +85,16 @@ void ia64_teardown_msi_irq(unsigned int irq) | |||
84 | destroy_irq(irq); | 85 | destroy_irq(irq); |
85 | } | 86 | } |
86 | 87 | ||
87 | static void ia64_ack_msi_irq(unsigned int irq) | 88 | static void ia64_ack_msi_irq(struct irq_data *data) |
88 | { | 89 | { |
89 | irq_complete_move(irq); | 90 | irq_complete_move(data->irq); |
90 | move_native_irq(irq); | 91 | move_native_irq(data->irq); |
91 | ia64_eoi(); | 92 | ia64_eoi(); |
92 | } | 93 | } |
93 | 94 | ||
94 | static int ia64_msi_retrigger_irq(unsigned int irq) | 95 | static int ia64_msi_retrigger_irq(struct irq_data *data) |
95 | { | 96 | { |
96 | unsigned int vector = irq_to_vector(irq); | 97 | unsigned int vector = irq_to_vector(data->irq); |
97 | ia64_resend_irq(vector); | 98 | ia64_resend_irq(vector); |
98 | 99 | ||
99 | return 1; | 100 | return 1; |
@@ -103,14 +104,14 @@ static int ia64_msi_retrigger_irq(unsigned int irq) | |||
103 | * Generic ops used on most IA64 platforms. | 104 | * Generic ops used on most IA64 platforms. |
104 | */ | 105 | */ |
105 | static struct irq_chip ia64_msi_chip = { | 106 | static struct irq_chip ia64_msi_chip = { |
106 | .name = "PCI-MSI", | 107 | .name = "PCI-MSI", |
107 | .irq_mask = mask_msi_irq, | 108 | .irq_mask = mask_msi_irq, |
108 | .irq_unmask = unmask_msi_irq, | 109 | .irq_unmask = unmask_msi_irq, |
109 | .ack = ia64_ack_msi_irq, | 110 | .irq_ack = ia64_ack_msi_irq, |
110 | #ifdef CONFIG_SMP | 111 | #ifdef CONFIG_SMP |
111 | .set_affinity = ia64_set_msi_irq_affinity, | 112 | .irq_set_affinity = ia64_set_msi_irq_affinity, |
112 | #endif | 113 | #endif |
113 | .retrigger = ia64_msi_retrigger_irq, | 114 | .irq_retrigger = ia64_msi_retrigger_irq, |
114 | }; | 115 | }; |
115 | 116 | ||
116 | 117 | ||
@@ -132,8 +133,10 @@ void arch_teardown_msi_irq(unsigned int irq) | |||
132 | 133 | ||
133 | #ifdef CONFIG_DMAR | 134 | #ifdef CONFIG_DMAR |
134 | #ifdef CONFIG_SMP | 135 | #ifdef CONFIG_SMP |
135 | static int dmar_msi_set_affinity(unsigned int irq, const struct cpumask *mask) | 136 | static int dmar_msi_set_affinity(struct irq_data *data, |
137 | const struct cpumask *mask, bool force) | ||
136 | { | 138 | { |
139 | unsigned int irq = data->irq; | ||
137 | struct irq_cfg *cfg = irq_cfg + irq; | 140 | struct irq_cfg *cfg = irq_cfg + irq; |
138 | struct msi_msg msg; | 141 | struct msi_msg msg; |
139 | int cpu = cpumask_first(mask); | 142 | int cpu = cpumask_first(mask); |
@@ -152,7 +155,7 @@ static int dmar_msi_set_affinity(unsigned int irq, const struct cpumask *mask) | |||
152 | msg.address_lo |= MSI_ADDR_DEST_ID_CPU(cpu_physical_id(cpu)); | 155 | msg.address_lo |= MSI_ADDR_DEST_ID_CPU(cpu_physical_id(cpu)); |
153 | 156 | ||
154 | dmar_msi_write(irq, &msg); | 157 | dmar_msi_write(irq, &msg); |
155 | cpumask_copy(irq_desc[irq].affinity, mask); | 158 | cpumask_copy(data->affinity, mask); |
156 | 159 | ||
157 | return 0; | 160 | return 0; |
158 | } | 161 | } |
@@ -162,11 +165,11 @@ static struct irq_chip dmar_msi_type = { | |||
162 | .name = "DMAR_MSI", | 165 | .name = "DMAR_MSI", |
163 | .irq_unmask = dmar_msi_unmask, | 166 | .irq_unmask = dmar_msi_unmask, |
164 | .irq_mask = dmar_msi_mask, | 167 | .irq_mask = dmar_msi_mask, |
165 | .ack = ia64_ack_msi_irq, | 168 | .irq_ack = ia64_ack_msi_irq, |
166 | #ifdef CONFIG_SMP | 169 | #ifdef CONFIG_SMP |
167 | .set_affinity = dmar_msi_set_affinity, | 170 | .irq_set_affinity = dmar_msi_set_affinity, |
168 | #endif | 171 | #endif |
169 | .retrigger = ia64_msi_retrigger_irq, | 172 | .irq_retrigger = ia64_msi_retrigger_irq, |
170 | }; | 173 | }; |
171 | 174 | ||
172 | static int | 175 | static int |