artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2ced3cd
)
amd64: lapic_timer_trigger: disable interrupts while configuring timer
author
cheloha
<cheloha@openbsd.org>
Tue, 31 Jan 2023 19:11:47 +0000
(19:11 +0000)
committer
cheloha
<cheloha@openbsd.org>
Tue, 31 Jan 2023 19:11:47 +0000
(19:11 +0000)
lapic_timer_oneshot() does three writes. We need to disable
interrupts to ensure the timer lands in a valid state.
Link:
https://marc.info/?l=openbsd-tech&m=167482851403841&w=2
ok mlarkin@
sys/arch/amd64/amd64/lapic.c
patch
|
blob
|
history
diff --git
a/sys/arch/amd64/amd64/lapic.c
b/sys/arch/amd64/amd64/lapic.c
index
1be0bf1
..
6c8ccdf
100644
(file)
--- a/
sys/arch/amd64/amd64/lapic.c
+++ b/
sys/arch/amd64/amd64/lapic.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: lapic.c,v 1.6
5 2022/11/10 08:26:54 jmatthew Exp $
*/
+/* $OpenBSD: lapic.c,v 1.6
6 2023/01/31 19:11:47 cheloha Exp $
*/
/* $NetBSD: lapic.c,v 1.2 2003/05/08 01:04:35 fvdl Exp $ */
/*-
@@
-437,7
+437,11
@@
lapic_timer_rearm(void *unused, uint64_t nsecs)
void
lapic_timer_trigger(void *unused)
{
+ u_long s;
+
+ s = intr_disable();
lapic_timer_oneshot(0, 1);
+ intr_restore(s);
}
/*