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>
This commit is contained in:

committed by
Marc Zyngier

parent
fa15001919
commit
9d111d4910
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user