Skip to content

Commit b7fd35a

Browse files
committed
Merge tag 'irqchip-fixes-5.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent
Pull irqchip fixes from Marc Zyngier: - Fix Armada-370-XP Multi-MSi allocation to be aligned on the allocation size, as required by the PCI spec - Fix aspeed-scu interrupt acknowledgement by directly writing to the register instead of a read-modify-write sequence - Use standard bitfirl helpers in the MIPS GIC driver instead of custom constructs - Fix the NVIC driver IPR register offset - Correctly drop the reference of the device node in the irq-bcm7120-l2 driver - Fix the GICv3 ITS INVALL command by issueing a following SYNC command - Add a missing __init attribute to the init function of the Apple AIC driver Link: https://lore.kernel.org/r/[email protected]
2 parents 0fcfb00 + c3fbab7 commit b7fd35a

File tree

7 files changed

+14
-17
lines changed

7 files changed

+14
-17
lines changed

drivers/irqchip/irq-apple-aic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ static const struct irq_domain_ops aic_ipi_domain_ops = {
707707
.free = aic_ipi_free,
708708
};
709709

710-
static int aic_init_smp(struct aic_irq_chip *irqc, struct device_node *node)
710+
static int __init aic_init_smp(struct aic_irq_chip *irqc, struct device_node *node)
711711
{
712712
struct irq_domain *ipi_domain;
713713
int base_ipi;

drivers/irqchip/irq-armada-370-xp.c

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -232,16 +232,12 @@ static int armada_370_xp_msi_alloc(struct irq_domain *domain, unsigned int virq,
232232
int hwirq, i;
233233

234234
mutex_lock(&msi_used_lock);
235+
hwirq = bitmap_find_free_region(msi_used, PCI_MSI_DOORBELL_NR,
236+
order_base_2(nr_irqs));
237+
mutex_unlock(&msi_used_lock);
235238

236-
hwirq = bitmap_find_next_zero_area(msi_used, PCI_MSI_DOORBELL_NR,
237-
0, nr_irqs, 0);
238-
if (hwirq >= PCI_MSI_DOORBELL_NR) {
239-
mutex_unlock(&msi_used_lock);
239+
if (hwirq < 0)
240240
return -ENOSPC;
241-
}
242-
243-
bitmap_set(msi_used, hwirq, nr_irqs);
244-
mutex_unlock(&msi_used_lock);
245241

246242
for (i = 0; i < nr_irqs; i++) {
247243
irq_domain_set_info(domain, virq + i, hwirq + i,
@@ -250,7 +246,7 @@ static int armada_370_xp_msi_alloc(struct irq_domain *domain, unsigned int virq,
250246
NULL, NULL);
251247
}
252248

253-
return hwirq;
249+
return 0;
254250
}
255251

256252
static void armada_370_xp_msi_free(struct irq_domain *domain,
@@ -259,7 +255,7 @@ static void armada_370_xp_msi_free(struct irq_domain *domain,
259255
struct irq_data *d = irq_domain_get_irq_data(domain, virq);
260256

261257
mutex_lock(&msi_used_lock);
262-
bitmap_clear(msi_used, d->hwirq, nr_irqs);
258+
bitmap_release_region(msi_used, d->hwirq, order_base_2(nr_irqs));
263259
mutex_unlock(&msi_used_lock);
264260
}
265261

drivers/irqchip/irq-aspeed-scu-ic.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ static void aspeed_scu_ic_irq_handler(struct irq_desc *desc)
7676
generic_handle_domain_irq(scu_ic->irq_domain,
7777
bit - scu_ic->irq_shift);
7878

79-
regmap_update_bits(scu_ic->scu, scu_ic->reg, mask,
80-
BIT(bit + ASPEED_SCU_IC_STATUS_SHIFT));
79+
regmap_write_bits(scu_ic->scu, scu_ic->reg, mask,
80+
BIT(bit + ASPEED_SCU_IC_STATUS_SHIFT));
8181
}
8282

8383
chained_irq_exit(chip, desc);

drivers/irqchip/irq-bcm7120-l2.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ static int __init bcm7120_l2_intc_probe(struct device_node *dn,
238238
}
239239

240240
data->num_parent_irqs = platform_irq_count(pdev);
241+
put_device(&pdev->dev);
241242
if (data->num_parent_irqs <= 0) {
242243
pr_err("invalid number of parent interrupts\n");
243244
ret = -ENOMEM;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ static struct its_collection *its_build_invall_cmd(struct its_node *its,
742742

743743
its_fixup_cmd(cmd);
744744

745-
return NULL;
745+
return desc->its_invall_cmd.col;
746746
}
747747

748748
static struct its_vpe *its_build_vinvall_cmd(struct its_node *its,

drivers/irqchip/irq-mips-gic.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
#define pr_fmt(fmt) "irq-mips-gic: " fmt
1111

12+
#include <linux/bitfield.h>
1213
#include <linux/bitmap.h>
1314
#include <linux/clocksource.h>
1415
#include <linux/cpuhotplug.h>
@@ -735,8 +736,7 @@ static int __init gic_of_init(struct device_node *node,
735736
mips_gic_base = ioremap(gic_base, gic_len);
736737

737738
gicconfig = read_gic_config();
738-
gic_shared_intrs = gicconfig & GIC_CONFIG_NUMINTERRUPTS;
739-
gic_shared_intrs >>= __ffs(GIC_CONFIG_NUMINTERRUPTS);
739+
gic_shared_intrs = FIELD_GET(GIC_CONFIG_NUMINTERRUPTS, gicconfig);
740740
gic_shared_intrs = (gic_shared_intrs + 1) * 8;
741741

742742
if (cpu_has_veic) {

drivers/irqchip/irq-nvic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
#define NVIC_ISER 0x000
2828
#define NVIC_ICER 0x080
29-
#define NVIC_IPR 0x300
29+
#define NVIC_IPR 0x400
3030

3131
#define NVIC_MAX_BANKS 16
3232
/*

0 commit comments

Comments
 (0)