Re: [PATCH AUTOSEL 6.3 12/37] irqchip/gic-v3: Disable pseudo NMIs on Mediatek devices w/ firmware issues

From: Doug Anderson
Date: Wed May 31 2023 - 10:12:49 EST


On Wed, May 31, 2023 at 6:40 AM Sasha Levin <sashal@xxxxxxxxxx> wrote:
> From: Douglas Anderson <dianders@xxxxxxxxxxxx>
> [ Upstream commit 44bd78dd2b8897f59b7e3963f088caadb7e4f047 ]
> Some Chromebooks with Mediatek SoCs have a problem where the firmware
> doesn't properly save/restore certain GICR registers. Newer
> Chromebooks should fix this issue and we may be able to do firmware
> updates for old Chromebooks. At the moment, the only known issue with
> these Chromebooks is that we can't enable "pseudo NMIs" since the
> priority register can be lost. Enabling "pseudo NMIs" on Chromebooks
> with the problematic firmware causes crashes and freezes.
> Let's detect devices with this problem and then disable "pseudo NMIs"
> on them. We'll detect the problem by looking for the presence of the
> "mediatek,broken-save-restore-fw" property in the GIC device tree
> node. Any devices with fixed firmware will not have this property.
> Our detection plan works because we never bake a Chromebook's device
> tree into firmware. Instead, device trees are always bundled with the
> kernel. We'll update the device trees of all affected Chromebooks and
> then we'll never enable "pseudo NMI" on a kernel that is bundled with
> old device trees. When a firmware update is shipped that fixes this
> issue it will know to patch the device tree to remove the property.
> In order to make this work, the quick detection mechanism of the GICv3
> code is extended to be able to look for properties in addition to
> looking at "compatible".
> Reviewed-by: Julius Werner <jwerner@xxxxxxxxxxxx>
> Signed-off-by: Douglas Anderson <dianders@xxxxxxxxxxxx>
> Signed-off-by: Marc Zyngier <maz@xxxxxxxxxx>
> Link:
> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
> ---
> drivers/irqchip/irq-gic-common.c | 8 ++++++--
> drivers/irqchip/irq-gic-common.h | 1 +
> drivers/irqchip/irq-gic-v3.c | 20 ++++++++++++++++++++
> 3 files changed, 27 insertions(+), 2 deletions(-)

Please delay picking this across all stable versions unless until you
can also get Marc's fix: