From e36cf2a328cb2d152b55a710f25581b8ba2d8b8d Mon Sep 17 00:00:00 2001 From: cheloha Date: Sat, 4 Feb 2023 23:17:05 +0000 Subject: [PATCH] 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@ --- sys/arch/macppc/macppc/clock.c | 5 +---- 1 file changed, 1 insertion(+), 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 -- 2.20.1