Skip to content

Commit

Permalink
Merge tag 'irq_urgent_for_v6.8_rc6' 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 Borislav Petkov:

 - Make sure GICv4 always gets initialized to prevent a kexec-ed kernel
   from silently failing to set it up

 - Do not call bus_get_dev_root() for the mbigen irqchip as it always
   returns NULL - use NULL directly

 - Fix hardware interrupt number truncation when assigning MSI
   interrupts

 - Correct sending end-of-interrupt messages to disabled interrupts
   lines on RISC-V PLIC

* tag 'irq_urgent_for_v6.8_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  irqchip/gic-v3-its: Do not assume vPE tables are preallocated
  irqchip/mbigen: Don't use bus_get_dev_root() to find the parent
  PCI/MSI: Prevent MSI hardware interrupt number truncation
  irqchip/sifive-plic: Enable interrupt if needed before EOI
  • Loading branch information
torvalds committed Feb 25, 2024
2 parents 4ca0d98 + ec4308e commit 8c46ed3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion drivers/irqchip/irq-gic-v3-its.c
Original file line number Diff line number Diff line change
Expand Up @@ -3181,6 +3181,7 @@ static void its_cpu_init_lpis(void)
val |= GICR_CTLR_ENABLE_LPIS;
writel_relaxed(val, rbase + GICR_CTLR);

out:
if (gic_rdists->has_vlpis && !gic_rdists->has_rvpeid) {
void __iomem *vlpi_base = gic_data_rdist_vlpi_base();

Expand Down Expand Up @@ -3216,7 +3217,6 @@ static void its_cpu_init_lpis(void)

/* Make sure the GIC has seen the above */
dsb(sy);
out:
gic_data_rdist()->flags |= RD_LOCAL_LPI_ENABLED;
pr_info("GICv3: CPU%d: using %s LPI pending table @%pa\n",
smp_processor_id(),
Expand Down
8 changes: 1 addition & 7 deletions drivers/irqchip/irq-mbigen.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,22 +235,17 @@ static const struct irq_domain_ops mbigen_domain_ops = {
static int mbigen_of_create_domain(struct platform_device *pdev,
struct mbigen_device *mgn_chip)
{
struct device *parent;
struct platform_device *child;
struct irq_domain *domain;
struct device_node *np;
u32 num_pins;
int ret = 0;

parent = bus_get_dev_root(&platform_bus_type);
if (!parent)
return -ENODEV;

for_each_child_of_node(pdev->dev.of_node, np) {
if (!of_property_read_bool(np, "interrupt-controller"))
continue;

child = of_platform_device_create(np, NULL, parent);
child = of_platform_device_create(np, NULL, NULL);
if (!child) {
ret = -ENOMEM;
break;
Expand All @@ -273,7 +268,6 @@ static int mbigen_of_create_domain(struct platform_device *pdev,
}
}

put_device(parent);
if (ret)
of_node_put(np);

Expand Down
8 changes: 7 additions & 1 deletion drivers/irqchip/irq-sifive-plic.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,13 @@ static void plic_irq_eoi(struct irq_data *d)
{
struct plic_handler *handler = this_cpu_ptr(&plic_handlers);

writel(d->hwirq, handler->hart_base + CONTEXT_CLAIM);
if (unlikely(irqd_irq_disabled(d))) {
plic_toggle(handler, d->hwirq, 1);
writel(d->hwirq, handler->hart_base + CONTEXT_CLAIM);
plic_toggle(handler, d->hwirq, 0);
} else {
writel(d->hwirq, handler->hart_base + CONTEXT_CLAIM);
}
}

#ifdef CONFIG_SMP
Expand Down
2 changes: 1 addition & 1 deletion drivers/pci/msi/irqdomain.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ static irq_hw_number_t pci_msi_domain_calc_hwirq(struct msi_desc *desc)

return (irq_hw_number_t)desc->msi_index |
pci_dev_id(dev) << 11 |
(pci_domain_nr(dev->bus) & 0xFFFFFFFF) << 27;
((irq_hw_number_t)(pci_domain_nr(dev->bus) & 0xFFFFFFFF)) << 27;
}

static void pci_msi_domain_set_desc(msi_alloc_info_t *arg,
Expand Down

0 comments on commit 8c46ed3

Please sign in to comment.