From 2d45d59b28dc8fd6e5cca08ffe9b0753be01ca8e Mon Sep 17 00:00:00 2001 From: leoliu-oc Date: Mon, 9 Mar 2026 10:56:25 +0800 Subject: [PATCH] x86/hpet: Set dynamic IRQ feature for HPET for KH-50000 zhaoxin inclusion category: feature version: v6.0.8 -------------------- To avoid unnecessary wakeups of core 0 caused by HPET broadcast timer interrupts, enable the dynamic IRQ feature for HPET on the KH-50000 platform. Reviewed-by: Alan Song Tested-by: Lyle Li Signed-off-by: leoliu-oc --- arch/x86/kernel/hpet.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c index 2626fa052b45..e1dcb241b2e1 100644 --- a/arch/x86/kernel/hpet.c +++ b/arch/x86/kernel/hpet.c @@ -457,6 +457,15 @@ static void __init hpet_legacy_clockevent_register(struct hpet_channel *hc) hc->evt.features |= CLOCK_EVT_FEAT_PERIODIC; hc->evt.set_state_periodic = hpet_clkevt_set_state_periodic; + /* + * On the KH-50000 platform, enable dynamic HPET interrupts + * to prevent unnecessary wakeups of core 0 caused by broadcast timer events. + */ + if ((boot_cpu_data.x86_vendor == X86_VENDOR_CENTAUR || + boot_cpu_data.x86_vendor == X86_VENDOR_ZHAOXIN) && + (boot_cpu_data.x86 == 0x7 && boot_cpu_data.x86_model == 0x7b)) + hc->evt.features |= CLOCK_EVT_FEAT_DYNIRQ; + /* Start HPET legacy interrupts */ hpet_enable_legacy_int(); -- Gitee