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 branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull irq fixes from Thomas Gleixner:
"A small set of fixes for the interrupt subsystem:

- Fix a double increment in the irq descriptor allocator which
resulted in a sanity check only being done for every second
affinity mask

- Add a missing device tree translation in the stm32-exti driver.
Without that the interrupt association is completely wrong.

- Initialize the mutex in the GIC-V3 MBI driver

- Fix the alignment for aliasing devices in the GIC-V3-ITS driver so
multi MSI allocations work correctly

- Ensure that the initial affinity of a interrupt is not empty at
startup time.

- Drop bogus include in the madera irq chip driver

- Fix KernelDoc regression"

* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
irqchip/gic-v3-its: Align PCI Multi-MSI allocation on their size
genirq/irqdesc: Fix double increment in alloc_descs()
genirq: Fix the kerneldoc comment for struct irq_affinity_desc
irqchip/madera: Drop GPIO includes
irqchip/gic-v3-mbi: Fix uninitialized mbi_lock
irqchip/stm32-exti: Add domain translate function
genirq: Make sure the initial affinity is not empty

+20 -16
+13 -12
drivers/irqchip/irq-gic-v3-its.c
··· 2399 2399 kfree(its_dev); 2400 2400 } 2401 2401 2402 - static int its_alloc_device_irq(struct its_device *dev, irq_hw_number_t *hwirq) 2402 + static int its_alloc_device_irq(struct its_device *dev, int nvecs, irq_hw_number_t *hwirq) 2403 2403 { 2404 2404 int idx; 2405 2405 2406 - idx = find_first_zero_bit(dev->event_map.lpi_map, 2407 - dev->event_map.nr_lpis); 2408 - if (idx == dev->event_map.nr_lpis) 2406 + idx = bitmap_find_free_region(dev->event_map.lpi_map, 2407 + dev->event_map.nr_lpis, 2408 + get_count_order(nvecs)); 2409 + if (idx < 0) 2409 2410 return -ENOSPC; 2410 2411 2411 2412 *hwirq = dev->event_map.lpi_base + idx; ··· 2502 2501 int err; 2503 2502 int i; 2504 2503 2505 - for (i = 0; i < nr_irqs; i++) { 2506 - err = its_alloc_device_irq(its_dev, &hwirq); 2507 - if (err) 2508 - return err; 2504 + err = its_alloc_device_irq(its_dev, nr_irqs, &hwirq); 2505 + if (err) 2506 + return err; 2509 2507 2510 - err = its_irq_gic_domain_alloc(domain, virq + i, hwirq); 2508 + for (i = 0; i < nr_irqs; i++) { 2509 + err = its_irq_gic_domain_alloc(domain, virq + i, hwirq + i); 2511 2510 if (err) 2512 2511 return err; 2513 2512 2514 2513 irq_domain_set_hwirq_and_chip(domain, virq + i, 2515 - hwirq, &its_irq_chip, its_dev); 2514 + hwirq + i, &its_irq_chip, its_dev); 2516 2515 irqd_set_single_target(irq_desc_get_irq_data(irq_to_desc(virq + i))); 2517 2516 pr_debug("ID:%d pID:%d vID:%d\n", 2518 - (int)(hwirq - its_dev->event_map.lpi_base), 2519 - (int) hwirq, virq + i); 2517 + (int)(hwirq + i - its_dev->event_map.lpi_base), 2518 + (int)(hwirq + i), virq + i); 2520 2519 } 2521 2520 2522 2521 return 0;
+1 -1
drivers/irqchip/irq-gic-v3-mbi.c
··· 24 24 unsigned long *bm; 25 25 }; 26 26 27 - static struct mutex mbi_lock; 27 + static DEFINE_MUTEX(mbi_lock); 28 28 static phys_addr_t mbi_phys_base; 29 29 static struct mbi_range *mbi_ranges; 30 30 static unsigned int mbi_range_nr;
-2
drivers/irqchip/irq-madera.c
··· 7 7 */ 8 8 9 9 #include <linux/module.h> 10 - #include <linux/gpio.h> 11 10 #include <linux/interrupt.h> 12 11 #include <linux/irq.h> 13 12 #include <linux/irqdomain.h> ··· 15 16 #include <linux/slab.h> 16 17 #include <linux/of.h> 17 18 #include <linux/of_device.h> 18 - #include <linux/of_gpio.h> 19 19 #include <linux/of_irq.h> 20 20 #include <linux/irqchip/irq-madera.h> 21 21 #include <linux/mfd/madera/core.h>
+1
drivers/irqchip/irq-stm32-exti.c
··· 822 822 static const struct irq_domain_ops stm32_exti_h_domain_ops = { 823 823 .alloc = stm32_exti_h_domain_alloc, 824 824 .free = irq_domain_free_irqs_common, 825 + .xlate = irq_domain_xlate_twocell, 825 826 }; 826 827 827 828 static int
+1
include/linux/interrupt.h
··· 260 260 /** 261 261 * struct irq_affinity_desc - Interrupt affinity descriptor 262 262 * @mask: cpumask to hold the affinity assignment 263 + * @is_managed: 1 if the interrupt is managed internally 263 264 */ 264 265 struct irq_affinity_desc { 265 266 struct cpumask mask;
+1 -1
kernel/irq/irqdesc.c
··· 457 457 458 458 /* Validate affinity mask(s) */ 459 459 if (affinity) { 460 - for (i = 0; i < cnt; i++, i++) { 460 + for (i = 0; i < cnt; i++) { 461 461 if (cpumask_empty(&affinity[i].mask)) 462 462 return -EINVAL; 463 463 }
+3
kernel/irq/manage.c
··· 393 393 } 394 394 395 395 cpumask_and(&mask, cpu_online_mask, set); 396 + if (cpumask_empty(&mask)) 397 + cpumask_copy(&mask, cpu_online_mask); 398 + 396 399 if (node != NUMA_NO_NODE) { 397 400 const struct cpumask *nodemask = cpumask_of_node(node); 398 401