diff options
| -rw-r--r-- | drivers/irqchip/irq-eznps.c | 4 | ||||
| -rw-r--r-- | drivers/irqchip/irq-gic-v3.c | 2 | ||||
| -rw-r--r-- | drivers/irqchip/irq-jcore-aic.c | 20 |
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 | ||
| 88 | static void nps400_irq_eoi(struct irq_data *irqd) | 88 | static 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 | ||
| 109 | static int nps400_irq_map(struct irq_domain *d, unsigned int virq, | 109 | static 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 | ||
| 26 | static struct irq_chip jcore_aic; | 26 | static 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 | |||
| 38 | static 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 | |||
| 28 | static int jcore_aic_irqdomain_map(struct irq_domain *d, unsigned int irq, | 46 | static 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 | } |
