Skip to content

Commit cd448b2

Browse files
author
Marc Zyngier
committed
Merge branch irq/misc-5.17 into irq/irqchip-next
* irq/misc-5.17: : . : Misc irqchip fixes: : : - Disable GICv4.1 RD's VPE table at boot time to avoid RAS errors : - Fix Ingenic TCU's u32/unsigned long abuse : - Some GICv2m constifying : - Mark imx_gpcv2_instance as __ro_after_init : - Enable a few missing IRQs on Spear : - Conversion to platform_get_irq_optional() for the Renesas irqchips : . irqchip/renesas-intc-irqpin: Use platform_get_irq_optional() to get the interrupt irqchip/renesas-irqc: Use platform_get_irq_optional() to get the interrupt irqchip/gic-v4: Disable redistributors' view of the VPE table at boot time irqchip/ingenic-tcu: Use correctly sized arguments for bit field irqchip/gic-v2m: Add const to of_device_id irqchip/imx-gpcv2: Mark imx_gpcv2_instance with __ro_after_init irqchip/spear-shirq: Add support for IRQ 0..6 Signed-off-by: Marc Zyngier <[email protected]>
2 parents 16e3613 + 31bd548 commit cd448b2

File tree

7 files changed

+33
-11
lines changed

7 files changed

+33
-11
lines changed

drivers/irqchip/irq-gic-v2m.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ static int __init gicv2m_init_one(struct fwnode_handle *fwnode,
405405
return ret;
406406
}
407407

408-
static struct of_device_id gicv2m_device_id[] = {
408+
static const struct of_device_id gicv2m_device_id[] = {
409409
{ .compatible = "arm,gic-v2m-frame", },
410410
{},
411411
};

drivers/irqchip/irq-gic-v3.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -920,6 +920,22 @@ static int __gic_update_rdist_properties(struct redist_region *region,
920920
{
921921
u64 typer = gic_read_typer(ptr + GICR_TYPER);
922922

923+
/* Boot-time cleanip */
924+
if ((typer & GICR_TYPER_VLPIS) && (typer & GICR_TYPER_RVPEID)) {
925+
u64 val;
926+
927+
/* Deactivate any present vPE */
928+
val = gicr_read_vpendbaser(ptr + SZ_128K + GICR_VPENDBASER);
929+
if (val & GICR_VPENDBASER_Valid)
930+
gicr_write_vpendbaser(GICR_VPENDBASER_PendingLast,
931+
ptr + SZ_128K + GICR_VPENDBASER);
932+
933+
/* Mark the VPE table as invalid */
934+
val = gicr_read_vpropbaser(ptr + SZ_128K + GICR_VPROPBASER);
935+
val &= ~GICR_VPROPBASER_4_1_VALID;
936+
gicr_write_vpropbaser(val, ptr + SZ_128K + GICR_VPROPBASER);
937+
}
938+
923939
gic_data.rdists.has_vlpis &= !!(typer & GICR_TYPER_VLPIS);
924940

925941
/* RVPEID implies some form of DirectLPI, no matter what the doc says... :-/ */

drivers/irqchip/irq-imx-gpcv2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ struct gpcv2_irqchip_data {
2626
u32 cpu2wakeup;
2727
};
2828

29-
static struct gpcv2_irqchip_data *imx_gpcv2_instance;
29+
static struct gpcv2_irqchip_data *imx_gpcv2_instance __ro_after_init;
3030

3131
static void __iomem *gpcv2_idx_to_reg(struct gpcv2_irqchip_data *cd, int i)
3232
{

drivers/irqchip/irq-ingenic-tcu.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ static void ingenic_tcu_intc_cascade(struct irq_desc *desc)
2828
struct irq_chip_generic *gc = irq_get_domain_generic_chip(domain, 0);
2929
struct regmap *map = gc->private;
3030
uint32_t irq_reg, irq_mask;
31+
unsigned long bits;
3132
unsigned int i;
3233

3334
regmap_read(map, TCU_REG_TFR, &irq_reg);
@@ -36,8 +37,9 @@ static void ingenic_tcu_intc_cascade(struct irq_desc *desc)
3637
chained_irq_enter(irq_chip, desc);
3738

3839
irq_reg &= ~irq_mask;
40+
bits = irq_reg;
3941

40-
for_each_set_bit(i, (unsigned long *)&irq_reg, 32)
42+
for_each_set_bit(i, &bits, 32)
4143
generic_handle_domain_irq(domain, i);
4244

4345
chained_irq_exit(irq_chip, desc);

drivers/irqchip/irq-renesas-intc-irqpin.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,6 @@ static int intc_irqpin_probe(struct platform_device *pdev)
375375
struct intc_irqpin_priv *p;
376376
struct intc_irqpin_iomem *i;
377377
struct resource *io[INTC_IRQPIN_REG_NR];
378-
struct resource *irq;
379378
struct irq_chip *irq_chip;
380379
void (*enable_fn)(struct irq_data *d);
381380
void (*disable_fn)(struct irq_data *d);
@@ -418,12 +417,14 @@ static int intc_irqpin_probe(struct platform_device *pdev)
418417

419418
/* allow any number of IRQs between 1 and INTC_IRQPIN_MAX */
420419
for (k = 0; k < INTC_IRQPIN_MAX; k++) {
421-
irq = platform_get_resource(pdev, IORESOURCE_IRQ, k);
422-
if (!irq)
420+
ret = platform_get_irq_optional(pdev, k);
421+
if (ret == -ENXIO)
423422
break;
423+
if (ret < 0)
424+
goto err0;
424425

425426
p->irq[k].p = p;
426-
p->irq[k].requested_irq = irq->start;
427+
p->irq[k].requested_irq = ret;
427428
}
428429

429430
nirqs = k;

drivers/irqchip/irq-renesas-irqc.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ static int irqc_probe(struct platform_device *pdev)
126126
struct device *dev = &pdev->dev;
127127
const char *name = dev_name(dev);
128128
struct irqc_priv *p;
129-
struct resource *irq;
130129
int ret;
131130
int k;
132131

@@ -142,13 +141,15 @@ static int irqc_probe(struct platform_device *pdev)
142141

143142
/* allow any number of IRQs between 1 and IRQC_IRQ_MAX */
144143
for (k = 0; k < IRQC_IRQ_MAX; k++) {
145-
irq = platform_get_resource(pdev, IORESOURCE_IRQ, k);
146-
if (!irq)
144+
ret = platform_get_irq_optional(pdev, k);
145+
if (ret == -ENXIO)
147146
break;
147+
if (ret < 0)
148+
goto err_runtime_pm_disable;
148149

149150
p->irq[k].p = p;
150151
p->irq[k].hw_irq = k;
151-
p->irq[k].requested_irq = irq->start;
152+
p->irq[k].requested_irq = ret;
152153
}
153154

154155
p->number_of_irqs = k;

drivers/irqchip/spear-shirq.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ static struct spear_shirq spear320_shirq_ras3 = {
149149
.offset = 0,
150150
.nr_irqs = 7,
151151
.mask = ((0x1 << 7) - 1) << 0,
152+
.irq_chip = &dummy_irq_chip,
153+
.status_reg = SPEAR320_INT_STS_MASK_REG,
152154
};
153155

154156
static struct spear_shirq spear320_shirq_ras1 = {

0 commit comments

Comments
 (0)