From a7e2d82ab36871723f9f048d087e5c63d0d772f7 Mon Sep 17 00:00:00 2001 From: Philip Guenthe Date: Mon, 27 Dec 2010 20:22:24 +0000 Subject: Correct x86_atomic_*_ul() to operate on 64bit integers, eliminate x86_atomic_*_l(), and update the callers of all of those to use the underlying x86_atomic_*_u32() functions that they were expecting anyway. Whether the x86_atomic_*_ul() macros should be eliminated has been deferred. ok kettenis@, tedu@ --- sys/arch/amd64/amd64/intr.c | 4 ++-- sys/arch/amd64/amd64/ipi.c | 8 ++++---- sys/arch/amd64/include/atomic.h | 10 ++++------ 3 files changed, 10 insertions(+), 12 deletions(-) (limited to 'sys/arch/amd64') diff --git a/sys/arch/amd64/amd64/intr.c b/sys/arch/amd64/amd64/intr.c index 655c0ef64e8..44ba2669fc1 100644 --- a/sys/arch/amd64/amd64/intr.c +++ b/sys/arch/amd64/amd64/intr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.c,v 1.25 2010/09/20 06:33:46 matthew Exp $ */ +/* $OpenBSD: intr.c,v 1.26 2010/12/27 20:22:23 guenther Exp $ */ /* $NetBSD: intr.c,v 1.3 2003/03/03 22:16:20 fvdl Exp $ */ /* @@ -498,7 +498,7 @@ intr_disestablish(struct intrhand *ih) simple_lock(&ci->ci_slock); pic->pic_hwmask(pic, ih->ih_pin); - x86_atomic_clearbits_l(&ci->ci_ipending, (1 << ih->ih_slot)); + x86_atomic_clearbits_u32(&ci->ci_ipending, (1 << ih->ih_slot)); /* * Remove the handler from the chain. diff --git a/sys/arch/amd64/amd64/ipi.c b/sys/arch/amd64/amd64/ipi.c index 253d4b607be..f6ca47c87f6 100644 --- a/sys/arch/amd64/amd64/ipi.c +++ b/sys/arch/amd64/amd64/ipi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipi.c,v 1.9 2010/12/27 19:51:27 guenther Exp $ */ +/* $OpenBSD: ipi.c,v 1.10 2010/12/27 20:22:23 guenther Exp $ */ /* $NetBSD: ipi.c,v 1.2 2003/03/01 13:05:37 fvdl Exp $ */ /*- @@ -50,7 +50,7 @@ x86_send_ipi(struct cpu_info *ci, int ipimask) { int ret; - x86_atomic_setbits_l(&ci->ci_ipis, ipimask); + x86_atomic_setbits_u32(&ci->ci_ipis, ipimask); /* Don't send IPI to cpu which isn't (yet) running. */ if (!(ci->ci_flags & CPUF_RUNNING)) @@ -88,7 +88,7 @@ x86_broadcast_ipi(int ipimask) continue; if ((ci->ci_flags & CPUF_RUNNING) == 0) continue; - x86_atomic_setbits_l(&ci->ci_ipis, ipimask); + x86_atomic_setbits_u32(&ci->ci_ipis, ipimask); count++; } if (!count) @@ -105,7 +105,7 @@ x86_ipi_handler(void) u_int32_t pending; int bit; - pending = x86_atomic_testset_ul(&ci->ci_ipis, 0); + pending = x86_atomic_testset_u32(&ci->ci_ipis, 0); for (bit = 0; bit < X86_NIPI && pending; bit++) { if (pending & (1<