diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2017-10-17 19:55:55 +0300 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2017-10-19 13:22:38 +0300 |
commit | 9d111d49106b61f5a652d5418e85d8741b1a0427 (patch) | |
tree | a094c133a7f1d0d453791e950ec10e0b6b2ec805 /drivers/irqchip/irq-gic-common.c | |
parent | fa1500191958660952a3a8466aad54003701a7b6 (diff) | |
download | linux-9d111d49106b61f5a652d5418e85d8741b1a0427.tar.xz |
irqchip/gic: Make quirks matching conditional on init return value
As it turns out, the IIDR is not sufficient to distinguish between GICv3
implementations when it comes to enabling quirks. So update the prototype
of the init() hook to return a bool, and interpret a 'false' return value
as no match, in which case the 'enabling workaround' log message should
not be printed.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'drivers/irqchip/irq-gic-common.c')
-rw-r--r-- | drivers/irqchip/irq-gic-common.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/irqchip/irq-gic-common.c b/drivers/irqchip/irq-gic-common.c index 9ae71804b5dd..30017df5b54c 100644 --- a/drivers/irqchip/irq-gic-common.c +++ b/drivers/irqchip/irq-gic-common.c @@ -40,8 +40,9 @@ void gic_enable_quirks(u32 iidr, const struct gic_quirk *quirks, for (; quirks->desc; quirks++) { if (quirks->iidr != (quirks->mask & iidr)) continue; - quirks->init(data); - pr_info("GIC: enabling workaround for %s\n", quirks->desc); + if (quirks->init(data)) + pr_info("GIC: enabling workaround for %s\n", + quirks->desc); } } |