From: cheloha Date: Sat, 4 Feb 2023 23:20:54 +0000 (+0000) Subject: powerpc64: dec_rearm: don't disable interrupts around atomic operations X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=00fa57d452105c881132b703cd8a1dab006ec792;p=openbsd powerpc64: dec_rearm: don't disable interrupts around atomic operations We don't need to disable interrupts around this singular mtdec() call. The mtdec operation is atomic. Link: https://marc.info/?l=openbsd-tech&m=167494864124073&w=2 ok gkoehler@ --- diff --git a/sys/arch/powerpc64/powerpc64/clock.c b/sys/arch/powerpc64/powerpc64/clock.c index dee92d75eb2..e9e111de040 100644 --- a/sys/arch/powerpc64/powerpc64/clock.c +++ b/sys/arch/powerpc64/powerpc64/clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clock.c,v 1.9 2023/02/04 19:19:36 cheloha Exp $ */ +/* $OpenBSD: clock.c,v 1.10 2023/02/04 23:20:54 cheloha Exp $ */ /* * Copyright (c) 2020 Mark Kettenis @@ -58,7 +58,6 @@ void cpu_startclock(void); void dec_rearm(void *unused, uint64_t nsecs) { - u_long s; uint32_t cycles; if (nsecs > dec_nsec_max) @@ -66,9 +65,7 @@ dec_rearm(void *unused, uint64_t nsecs) cycles = (nsecs * dec_nsec_cycle_ratio) >> 32; if (cycles > UINT32_MAX >> 1) cycles = UINT32_MAX >> 1; - s = intr_disable(); mtdec(cycles); - intr_restore(s); } void