diff options
author | Sudeep Holla <Sudeep.Holla@arm.com> | 2015-09-21 11:47:00 -0400 |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2015-10-27 19:13:31 -0400 |
commit | 9100d20c5b6307bacd8756aba2f157cb1a8ffb56 (patch) | |
tree | ef9b56c6d2d2cad0d44dbe24f0ee460a7f8c0c5a | |
parent | 96eea6426f56042c28eff849cb2cc01895db081e (diff) |
powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of redundant mpic_irq_set_wake
mpic_irq_set_wake return -ENXIO for non FSL MPIC and sets IRQF_NO_SUSPEND
flag for FSL ones. enable_irq_wake already returns -ENXIO if irq_set_wak
is not implemented. Also there's no need to set the IRQF_NO_SUSPEND flag
as it doesn't guarantee wakeup for that interrupt.
This patch removes the redundant mpic_irq_set_wake and sets the
IRQCHIP_SKIP_SET_WAKE for only FSL MPIC.
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Hongtao Jia <hongtao.jia@freescale.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Acked-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
-rw-r--r-- | arch/powerpc/sysdev/mpic.c | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c index 537e5db85a06..123e43612f0a 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c | |||
@@ -924,22 +924,6 @@ int mpic_set_irq_type(struct irq_data *d, unsigned int flow_type) | |||
924 | return IRQ_SET_MASK_OK_NOCOPY; | 924 | return IRQ_SET_MASK_OK_NOCOPY; |
925 | } | 925 | } |
926 | 926 | ||
927 | static int mpic_irq_set_wake(struct irq_data *d, unsigned int on) | ||
928 | { | ||
929 | struct irq_desc *desc = container_of(d, struct irq_desc, irq_data); | ||
930 | struct mpic *mpic = mpic_from_irq_data(d); | ||
931 | |||
932 | if (!(mpic->flags & MPIC_FSL)) | ||
933 | return -ENXIO; | ||
934 | |||
935 | if (on) | ||
936 | desc->action->flags |= IRQF_NO_SUSPEND; | ||
937 | else | ||
938 | desc->action->flags &= ~IRQF_NO_SUSPEND; | ||
939 | |||
940 | return 0; | ||
941 | } | ||
942 | |||
943 | void mpic_set_vector(unsigned int virq, unsigned int vector) | 927 | void mpic_set_vector(unsigned int virq, unsigned int vector) |
944 | { | 928 | { |
945 | struct mpic *mpic = mpic_from_irq(virq); | 929 | struct mpic *mpic = mpic_from_irq(virq); |
@@ -977,7 +961,6 @@ static struct irq_chip mpic_irq_chip = { | |||
977 | .irq_unmask = mpic_unmask_irq, | 961 | .irq_unmask = mpic_unmask_irq, |
978 | .irq_eoi = mpic_end_irq, | 962 | .irq_eoi = mpic_end_irq, |
979 | .irq_set_type = mpic_set_irq_type, | 963 | .irq_set_type = mpic_set_irq_type, |
980 | .irq_set_wake = mpic_irq_set_wake, | ||
981 | }; | 964 | }; |
982 | 965 | ||
983 | #ifdef CONFIG_SMP | 966 | #ifdef CONFIG_SMP |
@@ -992,7 +975,6 @@ static struct irq_chip mpic_tm_chip = { | |||
992 | .irq_mask = mpic_mask_tm, | 975 | .irq_mask = mpic_mask_tm, |
993 | .irq_unmask = mpic_unmask_tm, | 976 | .irq_unmask = mpic_unmask_tm, |
994 | .irq_eoi = mpic_end_irq, | 977 | .irq_eoi = mpic_end_irq, |
995 | .irq_set_wake = mpic_irq_set_wake, | ||
996 | }; | 978 | }; |
997 | 979 | ||
998 | #ifdef CONFIG_MPIC_U3_HT_IRQS | 980 | #ifdef CONFIG_MPIC_U3_HT_IRQS |
@@ -1283,8 +1265,11 @@ struct mpic * __init mpic_alloc(struct device_node *node, | |||
1283 | flags |= MPIC_NO_RESET; | 1265 | flags |= MPIC_NO_RESET; |
1284 | if (of_get_property(node, "single-cpu-affinity", NULL)) | 1266 | if (of_get_property(node, "single-cpu-affinity", NULL)) |
1285 | flags |= MPIC_SINGLE_DEST_CPU; | 1267 | flags |= MPIC_SINGLE_DEST_CPU; |
1286 | if (of_device_is_compatible(node, "fsl,mpic")) | 1268 | if (of_device_is_compatible(node, "fsl,mpic")) { |
1287 | flags |= MPIC_FSL | MPIC_LARGE_VECTORS; | 1269 | flags |= MPIC_FSL | MPIC_LARGE_VECTORS; |
1270 | mpic_irq_chip.flags |= IRQCHIP_SKIP_SET_WAKE; | ||
1271 | mpic_tm_chip.flags |= IRQCHIP_SKIP_SET_WAKE; | ||
1272 | } | ||
1288 | 1273 | ||
1289 | mpic = kzalloc(sizeof(struct mpic), GFP_KERNEL); | 1274 | mpic = kzalloc(sizeof(struct mpic), GFP_KERNEL); |
1290 | if (mpic == NULL) | 1275 | if (mpic == NULL) |