提交 1bb55970 编写于 作者: W Wei Li 提交者: Zheng Zengkai

arm64: Fix wrong logic in gic_arch_restore_irqs()

hulk inclusion
category: bugfix
bugzilla: 186819 https://gitee.com/openeuler/kernel/issues/I58L00

--------------------------------

The gic_arch_restore_irqs() depends on commit e7e6a881 ("arm64:
irqflags: fix incomplete save & restore"). While it is reverted in commit
2e680920 ("Revert "arm64: irqflags: fix incomplete save & restore""),
we should update the logic here too.

Currently the upper 32 bits of 'flags' is always zero, change to use
'GIC_PRIO_PSR_I_SET' to indicate the interrupt enabling status.

Fixes: abde6b94 ("stop_machine: mask pseudo nmi before running the callback")
Signed-off-by: NWei Li <liwei391@huawei.com>
Reviewed-by: NCheng Jian <cj.chengjian@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 f6ad67c0
......@@ -191,9 +191,8 @@ static inline void gic_arch_disable_irqs(void)
static inline void gic_arch_restore_irqs(unsigned long flags)
{
if (gic_supports_nmi())
asm volatile ("msr daif, %0" : : "r" (flags >> 32)
: "memory");
if (gic_supports_nmi() && !(flags & GIC_PRIO_PSR_I_SET))
gic_arch_enable_irqs();
}
#endif /* __ASSEMBLY__ */
#endif /* __ASM_ARCH_GICV3_H */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册