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-2020-04-19' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

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

- Remove setup_irq() and remove_irq(). All users have been converted
so remove them before new users surface.

- A set of bugfixes for various interrupt chip drivers

- Add a few missing static attributes to address sparse warnings"

* tag 'irq-urgent-2020-04-19' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
irqchip/irq-bcm7038-l1: Make bcm7038_l1_of_init() static
irqchip/irq-mvebu-icu: Make legacy_bindings static
irqchip/meson-gpio: Fix HARDIRQ-safe -> HARDIRQ-unsafe lock order
irqchip/sifive-plic: Fix maximum priority threshold value
irqchip/ti-sci-inta: Fix processing of masked irqs
irqchip/mbigen: Free msi_desc on device teardown
irqchip/gic-v4.1: Update effective affinity of virtual SGIs
irqchip/gic-v4.1: Add support for VPENDBASER's Dirty+Valid signaling
genirq: Remove setup_irq() and remove_irq()

+51 -63
+1 -1
drivers/irqchip/irq-bcm7038-l1.c
··· 416 416 .map = bcm7038_l1_map, 417 417 }; 418 418 419 - int __init bcm7038_l1_of_init(struct device_node *dn, 419 + static int __init bcm7038_l1_of_init(struct device_node *dn, 420 420 struct device_node *parent) 421 421 { 422 422 struct bcm7038_l1_chip *intc;
+20
drivers/irqchip/irq-gic-v3-its.c
··· 14 14 #include <linux/dma-iommu.h> 15 15 #include <linux/efi.h> 16 16 #include <linux/interrupt.h> 17 + #include <linux/iopoll.h> 17 18 #include <linux/irqdomain.h> 18 19 #include <linux/list.h> 19 20 #include <linux/log2.h> ··· 3673 3672 return IRQ_SET_MASK_OK_DONE; 3674 3673 } 3675 3674 3675 + static void its_wait_vpt_parse_complete(void) 3676 + { 3677 + void __iomem *vlpi_base = gic_data_rdist_vlpi_base(); 3678 + u64 val; 3679 + 3680 + if (!gic_rdists->has_vpend_valid_dirty) 3681 + return; 3682 + 3683 + WARN_ON_ONCE(readq_relaxed_poll_timeout(vlpi_base + GICR_VPENDBASER, 3684 + val, 3685 + !(val & GICR_VPENDBASER_Dirty), 3686 + 10, 500)); 3687 + } 3688 + 3676 3689 static void its_vpe_schedule(struct its_vpe *vpe) 3677 3690 { 3678 3691 void __iomem *vlpi_base = gic_data_rdist_vlpi_base(); ··· 3717 3702 val |= vpe->idai ? GICR_VPENDBASER_IDAI : 0; 3718 3703 val |= GICR_VPENDBASER_Valid; 3719 3704 gicr_write_vpendbaser(val, vlpi_base + GICR_VPENDBASER); 3705 + 3706 + its_wait_vpt_parse_complete(); 3720 3707 } 3721 3708 3722 3709 static void its_vpe_deschedule(struct its_vpe *vpe) ··· 3927 3910 val |= FIELD_PREP(GICR_VPENDBASER_4_1_VPEID, vpe->vpe_id); 3928 3911 3929 3912 gicr_write_vpendbaser(val, vlpi_base + GICR_VPENDBASER); 3913 + 3914 + its_wait_vpt_parse_complete(); 3930 3915 } 3931 3916 3932 3917 static void its_vpe_4_1_deschedule(struct its_vpe *vpe, ··· 4054 4035 * not on the host (since they can only be targetting a vPE). 4055 4036 * Tell the kernel we've done whatever it asked for. 4056 4037 */ 4038 + irq_data_update_effective_affinity(d, mask_val); 4057 4039 return IRQ_SET_MASK_OK; 4058 4040 } 4059 4041
+7 -4
drivers/irqchip/irq-gic-v3.c
··· 873 873 gic_data.rdists.has_rvpeid &= !!(typer & GICR_TYPER_RVPEID); 874 874 gic_data.rdists.has_direct_lpi &= (!!(typer & GICR_TYPER_DirectLPIS) | 875 875 gic_data.rdists.has_rvpeid); 876 + gic_data.rdists.has_vpend_valid_dirty &= !!(typer & GICR_TYPER_DIRTY); 876 877 877 878 /* Detect non-sensical configurations */ 878 879 if (WARN_ON_ONCE(gic_data.rdists.has_rvpeid && !gic_data.rdists.has_vlpis)) { ··· 894 893 if (WARN_ON(gic_data.ppi_nr == UINT_MAX)) 895 894 gic_data.ppi_nr = 0; 896 895 pr_info("%d PPIs implemented\n", gic_data.ppi_nr); 897 - pr_info("%sVLPI support, %sdirect LPI support, %sRVPEID support\n", 898 - !gic_data.rdists.has_vlpis ? "no " : "", 899 - !gic_data.rdists.has_direct_lpi ? "no " : "", 900 - !gic_data.rdists.has_rvpeid ? "no " : ""); 896 + if (gic_data.rdists.has_vlpis) 897 + pr_info("GICv4 features: %s%s%s\n", 898 + gic_data.rdists.has_direct_lpi ? "DirectLPI " : "", 899 + gic_data.rdists.has_rvpeid ? "RVPEID " : "", 900 + gic_data.rdists.has_vpend_valid_dirty ? "Valid+Dirty " : ""); 901 901 } 902 902 903 903 /* Check whether it's single security state view */ ··· 1622 1620 gic_data.rdists.has_rvpeid = true; 1623 1621 gic_data.rdists.has_vlpis = true; 1624 1622 gic_data.rdists.has_direct_lpi = true; 1623 + gic_data.rdists.has_vpend_valid_dirty = true; 1625 1624 1626 1625 if (WARN_ON(!gic_data.domain) || WARN_ON(!gic_data.rdists.rdist)) { 1627 1626 err = -ENOMEM;
+7 -1
drivers/irqchip/irq-mbigen.c
··· 220 220 return 0; 221 221 } 222 222 223 + static void mbigen_irq_domain_free(struct irq_domain *domain, unsigned int virq, 224 + unsigned int nr_irqs) 225 + { 226 + platform_msi_domain_free(domain, virq, nr_irqs); 227 + } 228 + 223 229 static const struct irq_domain_ops mbigen_domain_ops = { 224 230 .translate = mbigen_domain_translate, 225 231 .alloc = mbigen_irq_domain_alloc, 226 - .free = irq_domain_free_irqs_common, 232 + .free = mbigen_irq_domain_free, 227 233 }; 228 234 229 235 static int mbigen_of_create_domain(struct platform_device *pdev,
+10 -8
drivers/irqchip/irq-meson-gpio.c
··· 144 144 static void meson_gpio_irq_update_bits(struct meson_gpio_irq_controller *ctl, 145 145 unsigned int reg, u32 mask, u32 val) 146 146 { 147 + unsigned long flags; 147 148 u32 tmp; 149 + 150 + spin_lock_irqsave(&ctl->lock, flags); 148 151 149 152 tmp = readl_relaxed(ctl->base + reg); 150 153 tmp &= ~mask; 151 154 tmp |= val; 152 155 writel_relaxed(tmp, ctl->base + reg); 156 + 157 + spin_unlock_irqrestore(&ctl->lock, flags); 153 158 } 154 159 155 160 static void meson_gpio_irq_init_dummy(struct meson_gpio_irq_controller *ctl) ··· 201 196 unsigned long hwirq, 202 197 u32 **channel_hwirq) 203 198 { 199 + unsigned long flags; 204 200 unsigned int idx; 205 201 206 - spin_lock(&ctl->lock); 202 + spin_lock_irqsave(&ctl->lock, flags); 207 203 208 204 /* Find a free channel */ 209 205 idx = find_first_zero_bit(ctl->channel_map, NUM_CHANNEL); 210 206 if (idx >= NUM_CHANNEL) { 211 - spin_unlock(&ctl->lock); 207 + spin_unlock_irqrestore(&ctl->lock, flags); 212 208 pr_err("No channel available\n"); 213 209 return -ENOSPC; 214 210 } 215 211 216 212 /* Mark the channel as used */ 217 213 set_bit(idx, ctl->channel_map); 214 + 215 + spin_unlock_irqrestore(&ctl->lock, flags); 218 216 219 217 /* 220 218 * Setup the mux of the channel to route the signal of the pad ··· 232 224 * it, using the table base. 233 225 */ 234 226 *channel_hwirq = &(ctl->channel_irqs[idx]); 235 - 236 - spin_unlock(&ctl->lock); 237 227 238 228 pr_debug("hwirq %lu assigned to channel %d - irq %u\n", 239 229 hwirq, idx, **channel_hwirq); ··· 293 287 val |= REG_EDGE_POL_LOW(params, idx); 294 288 } 295 289 296 - spin_lock(&ctl->lock); 297 - 298 290 meson_gpio_irq_update_bits(ctl, REG_EDGE_POL, 299 291 REG_EDGE_POL_MASK(params, idx), val); 300 - 301 - spin_unlock(&ctl->lock); 302 292 303 293 return 0; 304 294 }
+1 -1
drivers/irqchip/irq-mvebu-icu.c
··· 66 66 unsigned int type; 67 67 }; 68 68 69 - DEFINE_STATIC_KEY_FALSE(legacy_bindings); 69 + static DEFINE_STATIC_KEY_FALSE(legacy_bindings); 70 70 71 71 static void mvebu_icu_init(struct mvebu_icu *icu, 72 72 struct mvebu_icu_msi_data *msi_data,
+1 -1
drivers/irqchip/irq-sifive-plic.c
··· 56 56 #define CONTEXT_THRESHOLD 0x00 57 57 #define CONTEXT_CLAIM 0x04 58 58 59 - #define PLIC_DISABLE_THRESHOLD 0xf 59 + #define PLIC_DISABLE_THRESHOLD 0x7 60 60 #define PLIC_ENABLE_THRESHOLD 0 61 61 62 62 struct plic_priv {
+2 -1
drivers/irqchip/irq-ti-sci-inta.c
··· 37 37 #define VINT_ENABLE_SET_OFFSET 0x0 38 38 #define VINT_ENABLE_CLR_OFFSET 0x8 39 39 #define VINT_STATUS_OFFSET 0x18 40 + #define VINT_STATUS_MASKED_OFFSET 0x20 40 41 41 42 /** 42 43 * struct ti_sci_inta_event_desc - Description of an event coming to ··· 117 116 chained_irq_enter(irq_desc_get_chip(desc), desc); 118 117 119 118 val = readq_relaxed(inta->base + vint_desc->vint_id * 0x1000 + 120 - VINT_STATUS_OFFSET); 119 + VINT_STATUS_MASKED_OFFSET); 121 120 122 121 for_each_set_bit(bit, &val, MAX_EVENTS_PER_VINT) { 123 122 virq = irq_find_mapping(domain, vint_desc->events[bit].hwirq);
-2
include/linux/irq.h
··· 573 573 #define IRQ_DEFAULT_INIT_FLAGS ARCH_IRQ_INIT_FLAGS 574 574 575 575 struct irqaction; 576 - extern int setup_irq(unsigned int irq, struct irqaction *new); 577 - extern void remove_irq(unsigned int irq, struct irqaction *act); 578 576 extern int setup_percpu_irq(unsigned int irq, struct irqaction *new); 579 577 extern void remove_percpu_irq(unsigned int irq, struct irqaction *act); 580 578
+2
include/linux/irqchip/arm-gic-v3.h
··· 243 243 244 244 #define GICR_TYPER_PLPIS (1U << 0) 245 245 #define GICR_TYPER_VLPIS (1U << 1) 246 + #define GICR_TYPER_DIRTY (1U << 2) 246 247 #define GICR_TYPER_DirectLPIS (1U << 3) 247 248 #define GICR_TYPER_LAST (1U << 4) 248 249 #define GICR_TYPER_RVPEID (1U << 7) ··· 687 686 bool has_vlpis; 688 687 bool has_rvpeid; 689 688 bool has_direct_lpi; 689 + bool has_vpend_valid_dirty; 690 690 }; 691 691 692 692 struct irq_domain;
-44
kernel/irq/manage.c
··· 1690 1690 return ret; 1691 1691 } 1692 1692 1693 - /** 1694 - * setup_irq - setup an interrupt 1695 - * @irq: Interrupt line to setup 1696 - * @act: irqaction for the interrupt 1697 - * 1698 - * Used to statically setup interrupts in the early boot process. 1699 - */ 1700 - int setup_irq(unsigned int irq, struct irqaction *act) 1701 - { 1702 - int retval; 1703 - struct irq_desc *desc = irq_to_desc(irq); 1704 - 1705 - if (!desc || WARN_ON(irq_settings_is_per_cpu_devid(desc))) 1706 - return -EINVAL; 1707 - 1708 - retval = irq_chip_pm_get(&desc->irq_data); 1709 - if (retval < 0) 1710 - return retval; 1711 - 1712 - retval = __setup_irq(irq, desc, act); 1713 - 1714 - if (retval) 1715 - irq_chip_pm_put(&desc->irq_data); 1716 - 1717 - return retval; 1718 - } 1719 - EXPORT_SYMBOL_GPL(setup_irq); 1720 - 1721 1693 /* 1722 1694 * Internal function to unregister an irqaction - used to free 1723 1695 * regular and special interrupts that are part of the architecture. ··· 1829 1857 kfree(action->secondary); 1830 1858 return action; 1831 1859 } 1832 - 1833 - /** 1834 - * remove_irq - free an interrupt 1835 - * @irq: Interrupt line to free 1836 - * @act: irqaction for the interrupt 1837 - * 1838 - * Used to remove interrupts statically setup by the early boot process. 1839 - */ 1840 - void remove_irq(unsigned int irq, struct irqaction *act) 1841 - { 1842 - struct irq_desc *desc = irq_to_desc(irq); 1843 - 1844 - if (desc && !WARN_ON(irq_settings_is_per_cpu_devid(desc))) 1845 - __free_irq(desc, act->dev_id); 1846 - } 1847 - EXPORT_SYMBOL_GPL(remove_irq); 1848 1860 1849 1861 /** 1850 1862 * free_irq - free an interrupt allocated with request_irq