Commit 3c7b3985 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Lin Yujun
Browse files

genirq: Make handle_enforce_irqctx() unconditionally available

stable inclusion
from stable-v6.6.76
commit 20412f04bce862e4912c456b0d5f106aeea3bc55
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IBFOBV

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=20412f04bce862e4912c456b0d5f106aeea3bc55



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

[ Upstream commit 8d187a77f04c14fb459a5301d69f733a5a1396bc ]

Commit 1b57d91b ("irqchip/gic-v2, v3: Prevent SW resends entirely")
sett the flag which enforces interrupt handling in interrupt context and
prevents software base resends for ARM GIC v2/v3.

But it missed that the helper function which checks the flag was hidden
behind CONFIG_GENERIC_PENDING_IRQ, which is not set by ARM[64].

Make the helper unconditionally available so that the enforcement actually
works.

Fixes: 1b57d91b ("irqchip/gic-v2, v3: Prevent SW resends entirely")
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20241210101811.497716609@linutronix.de


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarLin Yujun <linyujun809@huawei.com>
parent bc79b881
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -429,10 +429,6 @@ static inline struct cpumask *irq_desc_get_pending_mask(struct irq_desc *desc)
{
	return desc->pending_mask;
}
static inline bool handle_enforce_irqctx(struct irq_data *data)
{
	return irqd_is_handle_enforce_irqctx(data);
}
bool irq_fixup_move_pending(struct irq_desc *desc, bool force_clear);
#else /* CONFIG_GENERIC_PENDING_IRQ */
static inline bool irq_can_move_pcntxt(struct irq_data *data)
@@ -459,11 +455,12 @@ static inline bool irq_fixup_move_pending(struct irq_desc *desc, bool fclear)
{
	return false;
}
#endif /* !CONFIG_GENERIC_PENDING_IRQ */

static inline bool handle_enforce_irqctx(struct irq_data *data)
{
	return false;
	return irqd_is_handle_enforce_irqctx(data);
}
#endif /* !CONFIG_GENERIC_PENDING_IRQ */

#if !defined(CONFIG_IRQ_DOMAIN) || !defined(CONFIG_IRQ_DOMAIN_HIERARCHY)
static inline int irq_domain_activate_irq(struct irq_data *data, bool reserve)