From 00eb8cd91520b65fe7926851f6bba0ba70456c02 Mon Sep 17 00:00:00 2001 From: leoliu-oc Date: Tue, 4 Nov 2025 18:02:23 +0800 Subject: [PATCH] x86/hpet: Set dynamic IRQ feature for HPET for KH-50000 zhaoxin inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/ID7DPW CVE: NA -------------------- 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 71f336425e58..bbf8741a7d69 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