|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] x86/HPET: make another channel flags update atomic
commit d4691d3aaa038020815a4962c3247eebd7ff65be
Author: Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Thu Jan 22 09:11:43 2026 +0100
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Jan 22 09:11:43 2026 +0100
x86/HPET: make another channel flags update atomic
Unlike the setting of HPET_EVT_LEGACY in hpet_broadcast_init(), the
setting of HPET_EVT_DISABLE in hpet_disable_legacy_broadcast() isn't init-
only and hence can race other flag manipulation (not all of which occur
while holding the channel's lock). While possibly any such updates would
only ever occur when HPET_EVT_LEGACY isn't set in the first place, this
doesn't look straightforward to prove, so better be on the safe side.
Fixes: d09486dba36a ("cpuidle: Enable hpet broadcast by default")
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
xen/arch/x86/hpet.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/arch/x86/hpet.c b/xen/arch/x86/hpet.c
index d94da24f42..f34863e0df 100644
--- a/xen/arch/x86/hpet.c
+++ b/xen/arch/x86/hpet.c
@@ -729,7 +729,7 @@ void hpet_disable_legacy_broadcast(void)
spin_lock_irqsave(&hpet_events->lock, flags);
- hpet_events->flags |= HPET_EVT_DISABLE;
+ set_bit(HPET_EVT_DISABLE_BIT, &hpet_events->flags);
/* disable HPET T0 */
cfg = hpet_read32(HPET_Tn_CFG(0));
--
generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |