From 40206928b5a4b9f1178e170a8236fc859ef2e6aa Mon Sep 17 00:00:00 2001 From: leoliu-oc Date: Thu, 25 Dec 2025 18:27:37 +0800 Subject: [PATCH] anolis: x86/hpet: Set dynamic IRQ feature for HPET for KH-50000 ANBZ: #28530 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 6ff87f37e150..a1f34d47cca0 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