Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'irq_urgent_for_v6.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull irq fixes from Borislav Petkov:

- Fix a wrong ioremap size in mvebu-gicp

- Remove yet another compile-test case for a driver which needs an
additional dependency

- Fix a lock inversion scenario in the IRQ unit test suite

- Remove an impossible flag situation in gic-v5

- Do not iounmap resources in gic-v5 which are managed by devm

- Make sure stale, left-over interrupts in mvebu-gicp are cleared on
driver init

- Fix a reference counting mishap in msi-lib

- Fix a dereference-before-null-ptr-check case in the riscv-imsic
irqchip driver

* tag 'irq_urgent_for_v6.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
irqchip/mvebu-gicp: Use resource_size() for ioremap()
irqchip: Build IMX_MU_MSI only on ARM
genirq/test: Resolve irq lock inversion warnings
irqchip/gic-v5: Remove IRQD_RESEND_WHEN_IN_PROGRESS for ITS IRQs
irqchip/gic-v5: iwb: Fix iounmap probe failure path
irqchip/mvebu-gicp: Clear pending interrupts on init
irqchip/msi-lib: Fix fwnode refcount in msi_lib_irq_domain_select()
irqchip/riscv-imsic: Don't dereference before NULL pointer check

+20 -15
+1
drivers/irqchip/Kconfig
··· 554 554 tristate "i.MX MU used as MSI controller" 555 555 depends on OF && HAS_IOMEM 556 556 depends on ARCH_MXC || COMPILE_TEST 557 + depends on ARM || ARM64 557 558 default m if ARCH_MXC 558 559 select IRQ_DOMAIN 559 560 select IRQ_DOMAIN_HIERARCHY
-1
drivers/irqchip/irq-gic-v5-its.c
··· 973 973 irqd = irq_get_irq_data(virq + i); 974 974 irqd_set_single_target(irqd); 975 975 irqd_set_affinity_on_activate(irqd); 976 - irqd_set_resend_when_in_progress(irqd); 977 976 } 978 977 979 978 return 0;
+2 -9
drivers/irqchip/irq-gic-v5-iwb.c
··· 241 241 struct gicv5_iwb_chip_data *iwb_node; 242 242 void __iomem *iwb_base; 243 243 struct resource *res; 244 - int ret; 245 244 246 245 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 247 246 if (!res) ··· 253 254 } 254 255 255 256 iwb_node = gicv5_iwb_init_bases(iwb_base, pdev); 256 - if (IS_ERR(iwb_node)) { 257 - ret = PTR_ERR(iwb_node); 258 - goto out_unmap; 259 - } 257 + if (IS_ERR(iwb_node)) 258 + return PTR_ERR(iwb_node); 260 259 261 260 return 0; 262 - 263 - out_unmap: 264 - iounmap(iwb_base); 265 - return ret; 266 261 } 267 262 268 263 static const struct of_device_id gicv5_iwb_of_match[] = {
+3 -3
drivers/irqchip/irq-msi-lib.c
··· 133 133 { 134 134 const struct msi_parent_ops *ops = d->msi_parent_ops; 135 135 u32 busmask = BIT(bus_token); 136 - struct fwnode_handle *fwh; 137 136 138 137 if (!ops) 139 138 return 0; 140 139 141 - fwh = d->flags & IRQ_DOMAIN_FLAG_FWNODE_PARENT ? fwnode_get_parent(fwspec->fwnode) 142 - : fwspec->fwnode; 140 + struct fwnode_handle *fwh __free(fwnode_handle) = 141 + d->flags & IRQ_DOMAIN_FLAG_FWNODE_PARENT ? fwnode_get_parent(fwspec->fwnode) 142 + : fwnode_handle_get(fwspec->fwnode); 143 143 if (fwh != d->fwnode || fwspec->param_count != 0) 144 144 return 0; 145 145
+10
drivers/irqchip/irq-mvebu-gicp.c
··· 177 177 .ops = &gicp_domain_ops, 178 178 }; 179 179 struct mvebu_gicp *gicp; 180 + void __iomem *base; 180 181 int ret, i; 181 182 182 183 gicp = devm_kzalloc(&pdev->dev, sizeof(*gicp), GFP_KERNEL); ··· 235 234 if (!info.parent) { 236 235 dev_err(&pdev->dev, "failed to find parent IRQ domain\n"); 237 236 return -ENODEV; 237 + } 238 + 239 + base = ioremap(gicp->res->start, resource_size(gicp->res)); 240 + if (IS_ERR(base)) { 241 + dev_err(&pdev->dev, "ioremap() failed. Unable to clear pending interrupts.\n"); 242 + } else { 243 + for (i = 0; i < 64; i++) 244 + writel(i, base + GICP_CLRSPI_NSR_OFFSET); 245 + iounmap(base); 238 246 } 239 247 240 248 return msi_create_parent_irq_domain(&info, &gicp_msi_parent_ops) ? 0 : -ENOMEM;
+1 -1
drivers/irqchip/irq-riscv-imsic-platform.c
··· 308 308 int imsic_irqdomain_init(void) 309 309 { 310 310 struct irq_domain_info info = { 311 - .fwnode = imsic->fwnode, 312 311 .ops = &imsic_base_domain_ops, 313 312 .host_data = imsic, 314 313 }; ··· 324 325 } 325 326 326 327 /* Create Base IRQ domain */ 328 + info.fwnode = imsic->fwnode, 327 329 imsic->base_domain = msi_create_parent_irq_domain(&info, &imsic_msi_parent_ops); 328 330 if (!imsic->base_domain) { 329 331 pr_err("%pfwP: failed to create IMSIC base domain\n", imsic->fwnode);
+3 -1
kernel/irq/irq_test.c
··· 1 1 // SPDX-License-Identifier: LGPL-2.1+ 2 2 3 + #include <linux/cleanup.h> 3 4 #include <linux/cpu.h> 4 5 #include <linux/cpumask.h> 5 6 #include <linux/interrupt.h> ··· 135 134 disable_irq(virq); 136 135 KUNIT_EXPECT_EQ(test, desc->depth, 1); 137 136 138 - irq_shutdown_and_deactivate(desc); 137 + scoped_guard(raw_spinlock_irqsave, &desc->lock) 138 + irq_shutdown_and_deactivate(desc); 139 139 140 140 KUNIT_EXPECT_FALSE(test, irqd_is_activated(data)); 141 141 KUNIT_EXPECT_FALSE(test, irqd_is_started(data));