2024-01-27 11:07:18

by Marc Zyngier

[permalink] [raw]
Subject: [PATCH] irqchip/gic-v3-its: Restore quirk probing for ACPI-based systems

While refactoring the way the ITSs are probed, the handling of
quirks applicable to ACPI-based platforms was lost. As a result,
systems such as HIP07 lose their GICv4 functionnality, and some
other may even fail to boot, unless they are configured to boot
with DT.

Move the enabling of quirks into its_probe_one(), making it
common to all firmware implementations.

Fixes: 9585a495ac93 ("irqchip/gic-v3-its: Split allocation from initialisation of its_node")
Signed-off-by: Marc Zyngier <[email protected]>
Cc: [email protected]
---
drivers/irqchip/irq-gic-v3-its.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index fec1b58470df..250b4562f308 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -5091,6 +5091,8 @@ static int __init its_probe_one(struct its_node *its)
u32 ctlr;
int err;

+ its_enable_quirks(its);
+
if (is_v4(its)) {
if (!(its->typer & GITS_TYPER_VMOVP)) {
err = its_compute_its_list_map(its);
@@ -5442,7 +5444,6 @@ static int __init its_of_probe(struct device_node *node)
if (!its)
return -ENOMEM;

- its_enable_quirks(its);
err = its_probe_one(its);
if (err) {
its_node_destroy(its);
--
2.39.2



2024-01-29 08:46:05

by Lorenzo Pieralisi

[permalink] [raw]
Subject: Re: [PATCH] irqchip/gic-v3-its: Restore quirk probing for ACPI-based systems

On Sat, Jan 27, 2024 at 11:07:02AM +0000, Marc Zyngier wrote:
> While refactoring the way the ITSs are probed, the handling of
> quirks applicable to ACPI-based platforms was lost. As a result,
> systems such as HIP07 lose their GICv4 functionnality, and some

Just noticed: s/functionnality/functionality

> other may even fail to boot, unless they are configured to boot
> with DT.
>
> Move the enabling of quirks into its_probe_one(), making it
> common to all firmware implementations.
>
> Fixes: 9585a495ac93 ("irqchip/gic-v3-its: Split allocation from initialisation of its_node")
> Signed-off-by: Marc Zyngier <[email protected]>
> Cc: [email protected]
> ---
> drivers/irqchip/irq-gic-v3-its.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)

I obviously tested it with ACPI with platforms not neededing
its quirks, apologies.

Reviewed-by: Lorenzo Pieralisi <[email protected]>

> diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
> index fec1b58470df..250b4562f308 100644
> --- a/drivers/irqchip/irq-gic-v3-its.c
> +++ b/drivers/irqchip/irq-gic-v3-its.c
> @@ -5091,6 +5091,8 @@ static int __init its_probe_one(struct its_node *its)
> u32 ctlr;
> int err;
>
> + its_enable_quirks(its);
> +
> if (is_v4(its)) {
> if (!(its->typer & GITS_TYPER_VMOVP)) {
> err = its_compute_its_list_map(its);
> @@ -5442,7 +5444,6 @@ static int __init its_of_probe(struct device_node *node)
> if (!its)
> return -ENOMEM;
>
> - its_enable_quirks(its);
> err = its_probe_one(its);
> if (err) {
> its_node_destroy(its);
> --
> 2.39.2
>

2024-01-31 09:39:25

by Zenghui Yu

[permalink] [raw]
Subject: Re: [PATCH] irqchip/gic-v3-its: Restore quirk probing for ACPI-based systems

On 2024/1/27 19:07, Marc Zyngier wrote:
> While refactoring the way the ITSs are probed, the handling of
> quirks applicable to ACPI-based platforms was lost. As a result,
> systems such as HIP07 lose their GICv4 functionnality, and some
> other may even fail to boot, unless they are configured to boot
> with DT.
>
> Move the enabling of quirks into its_probe_one(), making it
> common to all firmware implementations.
>
> Fixes: 9585a495ac93 ("irqchip/gic-v3-its: Split allocation from initialisation of its_node")
> Signed-off-by: Marc Zyngier <[email protected]>
> Cc: [email protected]

Looks good,

Reviewed-by: Zenghui Yu <[email protected]>