aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-10-18 12:01:22 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-10-18 12:01:22 -0400
commit50276c9abb9c236a359854f30eb8bb81fd14a22d (patch)
tree967e8049fbdbe7896f47a35b850f52e8fd149708
parent351267d941bffeddfaa55ba05c77f971b9f67cfe (diff)
parentd102eb5c1ac5e6743b1c6d145c06a25d98ad1375 (diff)
Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq fixes from Ingo Molnar: "Three irqchip driver fixes" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/gicv3: Handle loop timeout proper irqchip/jcore: Fix lost per-cpu interrupts irqchip/eznps: Acknowledge NPS_IPI before calling the handler
-rw-r--r--drivers/irqchip/irq-eznps.c4
-rw-r--r--drivers/irqchip/irq-gic-v3.c2
-rw-r--r--drivers/irqchip/irq-jcore-aic.c20
3 files changed, 22 insertions, 4 deletions
diff --git a/drivers/irqchip/irq-eznps.c b/drivers/irqchip/irq-eznps.c
index efbf0e4304b7..ebc2b0b15f67 100644
--- a/drivers/irqchip/irq-eznps.c
+++ b/drivers/irqchip/irq-eznps.c
@@ -85,7 +85,7 @@ static void nps400_irq_eoi_global(struct irq_data *irqd)
85 nps_ack_gic(); 85 nps_ack_gic();
86} 86}
87 87
88static void nps400_irq_eoi(struct irq_data *irqd) 88static void nps400_irq_ack(struct irq_data *irqd)
89{ 89{
90 unsigned int __maybe_unused irq = irqd_to_hwirq(irqd); 90 unsigned int __maybe_unused irq = irqd_to_hwirq(irqd);
91 91
@@ -103,7 +103,7 @@ static struct irq_chip nps400_irq_chip_percpu = {
103 .name = "NPS400 IC", 103 .name = "NPS400 IC",
104 .irq_mask = nps400_irq_mask, 104 .irq_mask = nps400_irq_mask,
105 .irq_unmask = nps400_irq_unmask, 105 .irq_unmask = nps400_irq_unmask,
106 .irq_eoi = nps400_irq_eoi, 106 .irq_ack = nps400_irq_ack,
107}; 107};
108 108
109static int nps400_irq_map(struct irq_domain *d, unsigned int virq, 109static int nps400_irq_map(struct irq_domain *d, unsigned int virq,
diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
index 9b81bd8b929c..19d642eae096 100644
--- a/drivers/irqchip/irq-gic-v3.c
+++ b/drivers/irqchip/irq-gic-v3.c
@@ -153,7 +153,7 @@ static void gic_enable_redist(bool enable)
153 return; /* No PM support in this redistributor */ 153 return; /* No PM support in this redistributor */
154 } 154 }
155 155
156 while (count--) { 156 while (--count) {
157 val = readl_relaxed(rbase + GICR_WAKER); 157 val = readl_relaxed(rbase + GICR_WAKER);
158 if (enable ^ (bool)(val & GICR_WAKER_ChildrenAsleep)) 158 if (enable ^ (bool)(val & GICR_WAKER_ChildrenAsleep))
159 break; 159 break;
diff --git a/drivers/irqchip/irq-jcore-aic.c b/drivers/irqchip/irq-jcore-aic.c
index 84b01dec277d..033bccb41455 100644
--- a/drivers/irqchip/irq-jcore-aic.c
+++ b/drivers/irqchip/irq-jcore-aic.c
@@ -25,12 +25,30 @@
25 25
26static struct irq_chip jcore_aic; 26static struct irq_chip jcore_aic;
27 27
28/*
29 * The J-Core AIC1 and AIC2 are cpu-local interrupt controllers and do
30 * not distinguish or use distinct irq number ranges for per-cpu event
31 * interrupts (timer, IPI). Since information to determine whether a
32 * particular irq number should be treated as per-cpu is not available
33 * at mapping time, we use a wrapper handler function which chooses
34 * the right handler at runtime based on whether IRQF_PERCPU was used
35 * when requesting the irq.
36 */
37
38static void handle_jcore_irq(struct irq_desc *desc)
39{
40 if (irqd_is_per_cpu(irq_desc_get_irq_data(desc)))
41 handle_percpu_irq(desc);
42 else
43 handle_simple_irq(desc);
44}
45
28static int jcore_aic_irqdomain_map(struct irq_domain *d, unsigned int irq, 46static int jcore_aic_irqdomain_map(struct irq_domain *d, unsigned int irq,
29 irq_hw_number_t hwirq) 47 irq_hw_number_t hwirq)
30{ 48{
31 struct irq_chip *aic = d->host_data; 49 struct irq_chip *aic = d->host_data;
32 50
33 irq_set_chip_and_handler(irq, aic, handle_simple_irq); 51 irq_set_chip_and_handler(irq, aic, handle_jcore_irq);
34 52
35 return 0; 53 return 0;
36} 54}