diff options
author | Jon Hunter <jonathanh@nvidia.com> | 2016-05-10 11:14:41 -0400 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2016-05-11 05:12:43 -0400 |
commit | c2baa2f3f42fc6ea302bb666889c5843986a19a3 (patch) | |
tree | c6e959dff84d756c03fdbb3d18cbb623a6beb710 /drivers/irqchip/irq-gic.c | |
parent | 26acfe7463dc7162e595a8f7bd7ef3e06111e25d (diff) |
irqchip/gic: Remove static irq_chip definition for eoimode1
There are only 3 differences (not including the name) in the definitions
of the gic_chip and gic_eoimode1_chip structures. Instead of statically
defining the gic_eoimode1_chip structure, remove it and populate the
eoimode1 functions dynamically for the appropriate GIC irqchips.
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'drivers/irqchip/irq-gic.c')
-rw-r--r-- | drivers/irqchip/irq-gic.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c index 612a3584a282..a8cb86bea544 100644 --- a/drivers/irqchip/irq-gic.c +++ b/drivers/irqchip/irq-gic.c | |||
@@ -399,20 +399,6 @@ static struct irq_chip gic_chip = { | |||
399 | IRQCHIP_MASK_ON_SUSPEND, | 399 | IRQCHIP_MASK_ON_SUSPEND, |
400 | }; | 400 | }; |
401 | 401 | ||
402 | static struct irq_chip gic_eoimode1_chip = { | ||
403 | .name = "GICv2", | ||
404 | .irq_mask = gic_eoimode1_mask_irq, | ||
405 | .irq_unmask = gic_unmask_irq, | ||
406 | .irq_eoi = gic_eoimode1_eoi_irq, | ||
407 | .irq_set_type = gic_set_type, | ||
408 | .irq_get_irqchip_state = gic_irq_get_irqchip_state, | ||
409 | .irq_set_irqchip_state = gic_irq_set_irqchip_state, | ||
410 | .irq_set_vcpu_affinity = gic_irq_set_vcpu_affinity, | ||
411 | .flags = IRQCHIP_SET_TYPE_MASKED | | ||
412 | IRQCHIP_SKIP_SET_WAKE | | ||
413 | IRQCHIP_MASK_ON_SUSPEND, | ||
414 | }; | ||
415 | |||
416 | void __init gic_cascade_irq(unsigned int gic_nr, unsigned int irq) | 402 | void __init gic_cascade_irq(unsigned int gic_nr, unsigned int irq) |
417 | { | 403 | { |
418 | BUG_ON(gic_nr >= CONFIG_ARM_GIC_MAX_NR); | 404 | BUG_ON(gic_nr >= CONFIG_ARM_GIC_MAX_NR); |
@@ -1034,10 +1020,14 @@ static void __init __gic_init_bases(unsigned int gic_nr, int irq_start, | |||
1034 | gic = &gic_data[gic_nr]; | 1020 | gic = &gic_data[gic_nr]; |
1035 | 1021 | ||
1036 | /* Initialize irq_chip */ | 1022 | /* Initialize irq_chip */ |
1023 | gic->chip = gic_chip; | ||
1024 | |||
1037 | if (static_key_true(&supports_deactivate) && gic_nr == 0) { | 1025 | if (static_key_true(&supports_deactivate) && gic_nr == 0) { |
1038 | gic->chip = gic_eoimode1_chip; | 1026 | gic->chip.irq_mask = gic_eoimode1_mask_irq; |
1027 | gic->chip.irq_eoi = gic_eoimode1_eoi_irq; | ||
1028 | gic->chip.irq_set_vcpu_affinity = gic_irq_set_vcpu_affinity; | ||
1029 | gic->chip.name = "GICv2"; | ||
1039 | } else { | 1030 | } else { |
1040 | gic->chip = gic_chip; | ||
1041 | gic->chip.name = kasprintf(GFP_KERNEL, "GIC-%d", gic_nr); | 1031 | gic->chip.name = kasprintf(GFP_KERNEL, "GIC-%d", gic_nr); |
1042 | } | 1032 | } |
1043 | 1033 | ||