diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2019-01-18 17:32:29 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2019-01-18 17:32:29 -0500 |
commit | 37b144df8099465bf8d08296d8b424c77fd9b0ac (patch) | |
tree | c56dc3c491dca9b0c52670465c80cf354de9bfce | |
parent | 12fee4cd5be2c4a73cc13d7ad76eb2d2feda8a71 (diff) | |
parent | 8208d1708b88b412ca97f50a6d951242c88cbbac (diff) |
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
-rw-r--r-- | drivers/irqchip/irq-gic-v3-its.c | 25 | ||||
-rw-r--r-- | drivers/irqchip/irq-gic-v3-mbi.c | 2 | ||||
-rw-r--r-- | drivers/irqchip/irq-madera.c | 2 | ||||
-rw-r--r-- | drivers/irqchip/irq-stm32-exti.c | 1 |
4 files changed, 15 insertions, 15 deletions
diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c index db20e992a40f..7f2a45445b00 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c | |||
@@ -2399,13 +2399,14 @@ static void its_free_device(struct its_device *its_dev) | |||
2399 | kfree(its_dev); | 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 | int idx; | 2404 | int idx; |
2405 | 2405 | ||
2406 | idx = find_first_zero_bit(dev->event_map.lpi_map, | 2406 | idx = bitmap_find_free_region(dev->event_map.lpi_map, |
2407 | dev->event_map.nr_lpis); | 2407 | dev->event_map.nr_lpis, |
2408 | if (idx == dev->event_map.nr_lpis) | 2408 | get_count_order(nvecs)); |
2409 | if (idx < 0) | ||
2409 | return -ENOSPC; | 2410 | return -ENOSPC; |
2410 | 2411 | ||
2411 | *hwirq = dev->event_map.lpi_base + idx; | 2412 | *hwirq = dev->event_map.lpi_base + idx; |
@@ -2501,21 +2502,21 @@ static int its_irq_domain_alloc(struct irq_domain *domain, unsigned int virq, | |||
2501 | int err; | 2502 | int err; |
2502 | int i; | 2503 | int i; |
2503 | 2504 | ||
2504 | for (i = 0; i < nr_irqs; i++) { | 2505 | err = its_alloc_device_irq(its_dev, nr_irqs, &hwirq); |
2505 | err = its_alloc_device_irq(its_dev, &hwirq); | 2506 | if (err) |
2506 | if (err) | 2507 | return err; |
2507 | return err; | ||
2508 | 2508 | ||
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); | ||
2510 | if (err) | 2511 | if (err) |
2511 | return err; | 2512 | return err; |
2512 | 2513 | ||
2513 | irq_domain_set_hwirq_and_chip(domain, virq + i, | 2514 | irq_domain_set_hwirq_and_chip(domain, virq + i, |
2514 | hwirq, &its_irq_chip, its_dev); | 2515 | hwirq + i, &its_irq_chip, its_dev); |
2515 | irqd_set_single_target(irq_desc_get_irq_data(irq_to_desc(virq + i))); | 2516 | irqd_set_single_target(irq_desc_get_irq_data(irq_to_desc(virq + i))); |
2516 | pr_debug("ID:%d pID:%d vID:%d\n", | 2517 | pr_debug("ID:%d pID:%d vID:%d\n", |
2517 | (int)(hwirq - its_dev->event_map.lpi_base), | 2518 | (int)(hwirq + i - its_dev->event_map.lpi_base), |
2518 | (int) hwirq, virq + i); | 2519 | (int)(hwirq + i), virq + i); |
2519 | } | 2520 | } |
2520 | 2521 | ||
2521 | return 0; | 2522 | return 0; |
diff --git a/drivers/irqchip/irq-gic-v3-mbi.c b/drivers/irqchip/irq-gic-v3-mbi.c index ad70e7c416e3..fbfa7ff6deb1 100644 --- a/drivers/irqchip/irq-gic-v3-mbi.c +++ b/drivers/irqchip/irq-gic-v3-mbi.c | |||
@@ -24,7 +24,7 @@ struct mbi_range { | |||
24 | unsigned long *bm; | 24 | unsigned long *bm; |
25 | }; | 25 | }; |
26 | 26 | ||
27 | static struct mutex mbi_lock; | 27 | static DEFINE_MUTEX(mbi_lock); |
28 | static phys_addr_t mbi_phys_base; | 28 | static phys_addr_t mbi_phys_base; |
29 | static struct mbi_range *mbi_ranges; | 29 | static struct mbi_range *mbi_ranges; |
30 | static unsigned int mbi_range_nr; | 30 | static unsigned int mbi_range_nr; |
diff --git a/drivers/irqchip/irq-madera.c b/drivers/irqchip/irq-madera.c index e9256dee1a45..8b81271c823c 100644 --- a/drivers/irqchip/irq-madera.c +++ b/drivers/irqchip/irq-madera.c | |||
@@ -7,7 +7,6 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
10 | #include <linux/gpio.h> | ||
11 | #include <linux/interrupt.h> | 10 | #include <linux/interrupt.h> |
12 | #include <linux/irq.h> | 11 | #include <linux/irq.h> |
13 | #include <linux/irqdomain.h> | 12 | #include <linux/irqdomain.h> |
@@ -16,7 +15,6 @@ | |||
16 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
17 | #include <linux/of.h> | 16 | #include <linux/of.h> |
18 | #include <linux/of_device.h> | 17 | #include <linux/of_device.h> |
19 | #include <linux/of_gpio.h> | ||
20 | #include <linux/of_irq.h> | 18 | #include <linux/of_irq.h> |
21 | #include <linux/irqchip/irq-madera.h> | 19 | #include <linux/irqchip/irq-madera.h> |
22 | #include <linux/mfd/madera/core.h> | 20 | #include <linux/mfd/madera/core.h> |
diff --git a/drivers/irqchip/irq-stm32-exti.c b/drivers/irqchip/irq-stm32-exti.c index 6edfd4bfa169..a93296b9b45d 100644 --- a/drivers/irqchip/irq-stm32-exti.c +++ b/drivers/irqchip/irq-stm32-exti.c | |||
@@ -822,6 +822,7 @@ out_unmap: | |||
822 | static const struct irq_domain_ops stm32_exti_h_domain_ops = { | 822 | static const struct irq_domain_ops stm32_exti_h_domain_ops = { |
823 | .alloc = stm32_exti_h_domain_alloc, | 823 | .alloc = stm32_exti_h_domain_alloc, |
824 | .free = irq_domain_free_irqs_common, | 824 | .free = irq_domain_free_irqs_common, |
825 | .xlate = irq_domain_xlate_twocell, | ||
825 | }; | 826 | }; |
826 | 827 | ||
827 | static int | 828 | static int |