diff options
author | Scott Soule Cheloha <cheloha@cvs.openbsd.org> | 2023-02-04 23:17:06 +0000 |
---|---|---|
committer | Scott Soule Cheloha <cheloha@cvs.openbsd.org> | 2023-02-04 23:17:06 +0000 |
commit | 661c072abb7fea8222a382b8d81d8fc307d4531a (patch) | |
tree | 21e434808de964bc3dd5a11dd4070500d6440f80 /sys/arch/macppc | |
parent | b9d7f65c19902ff8c3f3601c08169ba4474c429b (diff) |
macppc: dec_rearm: don't disable interrupts around atomic operations
We don't need to disable interrupts around ppc_mtdec(). The
underlying operation, mtdec, is atomic.
Link: https://marc.info/?l=openbsd-tech&m=167494864124073&w=2
ok gkoehler@
Diffstat (limited to 'sys/arch/macppc')
-rw-r--r-- | sys/arch/macppc/macppc/clock.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/sys/arch/macppc/macppc/clock.c b/sys/arch/macppc/macppc/clock.c index 18b2522a3d1..cbffc4a1d72 100644 --- a/sys/arch/macppc/macppc/clock.c +++ b/sys/arch/macppc/macppc/clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clock.c,v 1.53 2023/02/04 19:19:36 cheloha Exp $ */ +/* $OpenBSD: clock.c,v 1.54 2023/02/04 23:17:05 cheloha Exp $ */ /* $NetBSD: clock.c,v 1.1 1996/09/30 16:34:40 ws Exp $ */ /* @@ -247,16 +247,13 @@ void dec_rearm(void *unused, uint64_t nsecs) { uint32_t cycles; - int s; if (nsecs > dec_nsec_max) nsecs = dec_nsec_max; cycles = (nsecs * dec_nsec_cycle_ratio) >> 32; if (cycles > UINT32_MAX >> 1) cycles = UINT32_MAX >> 1; - s = ppc_intr_disable(); ppc_mtdec(cycles); - ppc_intr_enable(s); } void |