Skip to content

Commit

Permalink
Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/l…
Browse files Browse the repository at this point in the history
…inux/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
  • Loading branch information
Linus Torvalds committed Oct 18, 2016
2 parents 351267d + d102eb5 commit 50276c9
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
4 changes: 2 additions & 2 deletions drivers/irqchip/irq-eznps.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ static void nps400_irq_eoi_global(struct irq_data *irqd)
nps_ack_gic();
}

static void nps400_irq_eoi(struct irq_data *irqd)
static void nps400_irq_ack(struct irq_data *irqd)
{
unsigned int __maybe_unused irq = irqd_to_hwirq(irqd);

Expand All @@ -103,7 +103,7 @@ static struct irq_chip nps400_irq_chip_percpu = {
.name = "NPS400 IC",
.irq_mask = nps400_irq_mask,
.irq_unmask = nps400_irq_unmask,
.irq_eoi = nps400_irq_eoi,
.irq_ack = nps400_irq_ack,
};

static int nps400_irq_map(struct irq_domain *d, unsigned int virq,
Expand Down
2 changes: 1 addition & 1 deletion drivers/irqchip/irq-gic-v3.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ static void gic_enable_redist(bool enable)
return; /* No PM support in this redistributor */
}

while (count--) {
while (--count) {
val = readl_relaxed(rbase + GICR_WAKER);
if (enable ^ (bool)(val & GICR_WAKER_ChildrenAsleep))
break;
Expand Down
20 changes: 19 additions & 1 deletion drivers/irqchip/irq-jcore-aic.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,30 @@

static struct irq_chip jcore_aic;

/*
* The J-Core AIC1 and AIC2 are cpu-local interrupt controllers and do
* not distinguish or use distinct irq number ranges for per-cpu event
* interrupts (timer, IPI). Since information to determine whether a
* particular irq number should be treated as per-cpu is not available
* at mapping time, we use a wrapper handler function which chooses
* the right handler at runtime based on whether IRQF_PERCPU was used
* when requesting the irq.
*/

static void handle_jcore_irq(struct irq_desc *desc)
{
if (irqd_is_per_cpu(irq_desc_get_irq_data(desc)))
handle_percpu_irq(desc);
else
handle_simple_irq(desc);
}

static int jcore_aic_irqdomain_map(struct irq_domain *d, unsigned int irq,
irq_hw_number_t hwirq)
{
struct irq_chip *aic = d->host_data;

irq_set_chip_and_handler(irq, aic, handle_simple_irq);
irq_set_chip_and_handler(irq, aic, handle_jcore_irq);

return 0;
}
Expand Down

0 comments on commit 50276c9

Please sign in to comment.