aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev/mpic.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/sysdev/mpic.c')
-rw-r--r--arch/powerpc/sysdev/mpic.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 4e9ccb1015de..c83a512fa175 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -965,13 +965,13 @@ static struct irq_chip mpic_irq_ht_chip = {
965#endif /* CONFIG_MPIC_U3_HT_IRQS */ 965#endif /* CONFIG_MPIC_U3_HT_IRQS */
966 966
967 967
968static int mpic_host_match(struct irq_host *h, struct device_node *node) 968static int mpic_host_match(struct irq_domain *h, struct device_node *node)
969{ 969{
970 /* Exact match, unless mpic node is NULL */ 970 /* Exact match, unless mpic node is NULL */
971 return h->of_node == NULL || h->of_node == node; 971 return h->of_node == NULL || h->of_node == node;
972} 972}
973 973
974static int mpic_host_map(struct irq_host *h, unsigned int virq, 974static int mpic_host_map(struct irq_domain *h, unsigned int virq,
975 irq_hw_number_t hw) 975 irq_hw_number_t hw)
976{ 976{
977 struct mpic *mpic = h->host_data; 977 struct mpic *mpic = h->host_data;
@@ -1041,7 +1041,7 @@ static int mpic_host_map(struct irq_host *h, unsigned int virq,
1041 return 0; 1041 return 0;
1042} 1042}
1043 1043
1044static int mpic_host_xlate(struct irq_host *h, struct device_node *ct, 1044static int mpic_host_xlate(struct irq_domain *h, struct device_node *ct,
1045 const u32 *intspec, unsigned int intsize, 1045 const u32 *intspec, unsigned int intsize,
1046 irq_hw_number_t *out_hwirq, unsigned int *out_flags) 1046 irq_hw_number_t *out_hwirq, unsigned int *out_flags)
1047 1047
@@ -1121,13 +1121,13 @@ static void mpic_cascade(unsigned int irq, struct irq_desc *desc)
1121 BUG_ON(!(mpic->flags & MPIC_SECONDARY)); 1121 BUG_ON(!(mpic->flags & MPIC_SECONDARY));
1122 1122
1123 virq = mpic_get_one_irq(mpic); 1123 virq = mpic_get_one_irq(mpic);
1124 if (virq != NO_IRQ) 1124 if (virq)
1125 generic_handle_irq(virq); 1125 generic_handle_irq(virq);
1126 1126
1127 chip->irq_eoi(&desc->irq_data); 1127 chip->irq_eoi(&desc->irq_data);
1128} 1128}
1129 1129
1130static struct irq_host_ops mpic_host_ops = { 1130static struct irq_domain_ops mpic_host_ops = {
1131 .match = mpic_host_match, 1131 .match = mpic_host_match,
1132 .map = mpic_host_map, 1132 .map = mpic_host_map,
1133 .xlate = mpic_host_xlate, 1133 .xlate = mpic_host_xlate,
@@ -1345,10 +1345,9 @@ struct mpic * __init mpic_alloc(struct device_node *node,
1345 mpic->isu_shift = 1 + __ilog2(mpic->isu_size - 1); 1345 mpic->isu_shift = 1 + __ilog2(mpic->isu_size - 1);
1346 mpic->isu_mask = (1 << mpic->isu_shift) - 1; 1346 mpic->isu_mask = (1 << mpic->isu_shift) - 1;
1347 1347
1348 mpic->irqhost = irq_alloc_host(mpic->node, IRQ_HOST_MAP_LINEAR, 1348 mpic->irqhost = irq_domain_add_linear(mpic->node,
1349 isu_size ? isu_size : mpic->num_sources, 1349 isu_size ? isu_size : mpic->num_sources,
1350 &mpic_host_ops, 1350 &mpic_host_ops, mpic);
1351 flags & MPIC_LARGE_VECTORS ? 2048 : 256);
1352 1351
1353 /* 1352 /*
1354 * FIXME: The code leaks the MPIC object and mappings here; this 1353 * FIXME: The code leaks the MPIC object and mappings here; this
@@ -1357,8 +1356,6 @@ struct mpic * __init mpic_alloc(struct device_node *node,
1357 if (mpic->irqhost == NULL) 1356 if (mpic->irqhost == NULL)
1358 return NULL; 1357 return NULL;
1359 1358
1360 mpic->irqhost->host_data = mpic;
1361
1362 /* Display version */ 1359 /* Display version */
1363 switch (greg_feature & MPIC_GREG_FEATURE_VERSION_MASK) { 1360 switch (greg_feature & MPIC_GREG_FEATURE_VERSION_MASK) {
1364 case 1: 1361 case 1: