aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev/ehv_pic.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/sysdev/ehv_pic.c')
-rw-r--r--arch/powerpc/sysdev/ehv_pic.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/arch/powerpc/sysdev/ehv_pic.c b/arch/powerpc/sysdev/ehv_pic.c
index b6731e4a6646..6e0e1005227f 100644
--- a/arch/powerpc/sysdev/ehv_pic.c
+++ b/arch/powerpc/sysdev/ehv_pic.c
@@ -182,13 +182,13 @@ unsigned int ehv_pic_get_irq(void)
182 return irq_linear_revmap(global_ehv_pic->irqhost, irq); 182 return irq_linear_revmap(global_ehv_pic->irqhost, irq);
183} 183}
184 184
185static int ehv_pic_host_match(struct irq_host *h, struct device_node *node) 185static int ehv_pic_host_match(struct irq_domain *h, struct device_node *node)
186{ 186{
187 /* Exact match, unless ehv_pic node is NULL */ 187 /* Exact match, unless ehv_pic node is NULL */
188 return h->of_node == NULL || h->of_node == node; 188 return h->of_node == NULL || h->of_node == node;
189} 189}
190 190
191static int ehv_pic_host_map(struct irq_host *h, unsigned int virq, 191static int ehv_pic_host_map(struct irq_domain *h, unsigned int virq,
192 irq_hw_number_t hw) 192 irq_hw_number_t hw)
193{ 193{
194 struct ehv_pic *ehv_pic = h->host_data; 194 struct ehv_pic *ehv_pic = h->host_data;
@@ -217,7 +217,7 @@ static int ehv_pic_host_map(struct irq_host *h, unsigned int virq,
217 return 0; 217 return 0;
218} 218}
219 219
220static int ehv_pic_host_xlate(struct irq_host *h, struct device_node *ct, 220static int ehv_pic_host_xlate(struct irq_domain *h, struct device_node *ct,
221 const u32 *intspec, unsigned int intsize, 221 const u32 *intspec, unsigned int intsize,
222 irq_hw_number_t *out_hwirq, unsigned int *out_flags) 222 irq_hw_number_t *out_hwirq, unsigned int *out_flags)
223 223
@@ -248,7 +248,7 @@ static int ehv_pic_host_xlate(struct irq_host *h, struct device_node *ct,
248 return 0; 248 return 0;
249} 249}
250 250
251static struct irq_host_ops ehv_pic_host_ops = { 251static const struct irq_domain_ops ehv_pic_host_ops = {
252 .match = ehv_pic_host_match, 252 .match = ehv_pic_host_match,
253 .map = ehv_pic_host_map, 253 .map = ehv_pic_host_map,
254 .xlate = ehv_pic_host_xlate, 254 .xlate = ehv_pic_host_xlate,
@@ -275,9 +275,8 @@ void __init ehv_pic_init(void)
275 return; 275 return;
276 } 276 }
277 277
278 ehv_pic->irqhost = irq_alloc_host(np, IRQ_HOST_MAP_LINEAR, 278 ehv_pic->irqhost = irq_domain_add_linear(np, NR_EHV_PIC_INTS,
279 NR_EHV_PIC_INTS, &ehv_pic_host_ops, 0); 279 &ehv_pic_host_ops, ehv_pic);
280
281 if (!ehv_pic->irqhost) { 280 if (!ehv_pic->irqhost) {
282 of_node_put(np); 281 of_node_put(np);
283 kfree(ehv_pic); 282 kfree(ehv_pic);
@@ -293,7 +292,6 @@ void __init ehv_pic_init(void)
293 of_node_put(np2); 292 of_node_put(np2);
294 } 293 }
295 294
296 ehv_pic->irqhost->host_data = ehv_pic;
297 ehv_pic->hc_irq = ehv_pic_irq_chip; 295 ehv_pic->hc_irq = ehv_pic_irq_chip;
298 ehv_pic->hc_irq.irq_set_affinity = ehv_pic_set_affinity; 296 ehv_pic->hc_irq.irq_set_affinity = ehv_pic_set_affinity;
299 ehv_pic->coreint_flag = coreint_flag; 297 ehv_pic->coreint_flag = coreint_flag;