Skip to content

Commit 37b144d

Browse files
committed
Merge tag 'irqchip-5.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent
Pull irqchip updates from Marc Zyngier - Add missing DT translation call in stm32-exti - Fix uninitialized mutex in the GICv3 MBI support code - Drop useless GPIO includes from the madera driver - Fix PCI Multi-MSI allocation with aliasing devices on GICv3 ITS
2 parents 12fee4c + 8208d17 commit 37b144d

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

drivers/irqchip/irq-gic-v3-its.c

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2399,13 +2399,14 @@ static void its_free_device(struct its_device *its_dev)
23992399
kfree(its_dev);
24002400
}
24012401

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)
24032403
{
24042404
int idx;
24052405

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)
24092410
return -ENOSPC;
24102411

24112412
*hwirq = dev->event_map.lpi_base + idx;
@@ -2501,21 +2502,21 @@ static int its_irq_domain_alloc(struct irq_domain *domain, unsigned int virq,
25012502
int err;
25022503
int i;
25032504

2504-
for (i = 0; i < nr_irqs; i++) {
2505-
err = its_alloc_device_irq(its_dev, &hwirq);
2506-
if (err)
2507-
return err;
2505+
err = its_alloc_device_irq(its_dev, nr_irqs, &hwirq);
2506+
if (err)
2507+
return err;
25082508

2509-
err = its_irq_gic_domain_alloc(domain, virq + i, hwirq);
2509+
for (i = 0; i < nr_irqs; i++) {
2510+
err = its_irq_gic_domain_alloc(domain, virq + i, hwirq + i);
25102511
if (err)
25112512
return err;
25122513

25132514
irq_domain_set_hwirq_and_chip(domain, virq + i,
2514-
hwirq, &its_irq_chip, its_dev);
2515+
hwirq + i, &its_irq_chip, its_dev);
25152516
irqd_set_single_target(irq_desc_get_irq_data(irq_to_desc(virq + i)));
25162517
pr_debug("ID:%d pID:%d vID:%d\n",
2517-
(int)(hwirq - its_dev->event_map.lpi_base),
2518-
(int) hwirq, virq + i);
2518+
(int)(hwirq + i - its_dev->event_map.lpi_base),
2519+
(int)(hwirq + i), virq + i);
25192520
}
25202521

25212522
return 0;

drivers/irqchip/irq-gic-v3-mbi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ struct mbi_range {
2424
unsigned long *bm;
2525
};
2626

27-
static struct mutex mbi_lock;
27+
static DEFINE_MUTEX(mbi_lock);
2828
static phys_addr_t mbi_phys_base;
2929
static struct mbi_range *mbi_ranges;
3030
static unsigned int mbi_range_nr;

drivers/irqchip/irq-madera.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
*/
88

99
#include <linux/module.h>
10-
#include <linux/gpio.h>
1110
#include <linux/interrupt.h>
1211
#include <linux/irq.h>
1312
#include <linux/irqdomain.h>
@@ -16,7 +15,6 @@
1615
#include <linux/slab.h>
1716
#include <linux/of.h>
1817
#include <linux/of_device.h>
19-
#include <linux/of_gpio.h>
2018
#include <linux/of_irq.h>
2119
#include <linux/irqchip/irq-madera.h>
2220
#include <linux/mfd/madera/core.h>

drivers/irqchip/irq-stm32-exti.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -822,6 +822,7 @@ static int __init stm32_exti_init(const struct stm32_exti_drv_data *drv_data,
822822
static const struct irq_domain_ops stm32_exti_h_domain_ops = {
823823
.alloc = stm32_exti_h_domain_alloc,
824824
.free = irq_domain_free_irqs_common,
825+
.xlate = irq_domain_xlate_twocell,
825826
};
826827

827828
static int

0 commit comments

Comments
 (0)