diff options
| author | Sepherosa Ziehau <sephe@FreeBSD.org> | 2016-05-16 08:50:32 +0000 |
|---|---|---|
| committer | Sepherosa Ziehau <sephe@FreeBSD.org> | 2016-05-16 08:50:32 +0000 |
| commit | 81ccfbbc2e968afaabfa7a0de25d7d4972e0e1f8 (patch) | |
| tree | 1abdba29f0cc2e5c46c3657b082b32757c5adfb9 /sys/dev/hyperv | |
| parent | 653d2f366d9b305e307d7d94d5b809db2649c084 (diff) | |
Notes
Diffstat (limited to 'sys/dev/hyperv')
| -rw-r--r-- | sys/dev/hyperv/vmbus/hv_connection.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/hyperv/vmbus/hv_connection.c b/sys/dev/hyperv/vmbus/hv_connection.c index e598ed17c447d..321e6ab3b846e 100644 --- a/sys/dev/hyperv/vmbus/hv_connection.c +++ b/sys/dev/hyperv/vmbus/hv_connection.c @@ -33,6 +33,7 @@ #include <sys/lock.h> #include <sys/mutex.h> #include <machine/bus.h> +#include <machine/atomic.h> #include <vm/vm.h> #include <vm/vm_param.h> #include <vm/pmap.h> @@ -313,7 +314,7 @@ hv_vmbus_on_events(int cpu) /* * receive size is 1/2 page and divide that by 4 bytes */ - if (synch_test_and_clear_bit(0, &event->flags32[0])) { + if (atomic_testandclear_int(&event->flags32[0], 0)) { recv_interrupt_page = hv_vmbus_g_connection.recv_interrupt_page; } else { @@ -337,8 +338,8 @@ hv_vmbus_on_events(int cpu) continue; for (bit = 0; bit < HV_CHANNEL_DWORD_LEN; bit++) { - if (synch_test_and_clear_bit(bit, - (uint32_t *)&recv_interrupt_page[dword])) { + if (atomic_testandclear_int( + &recv_interrupt_page[dword], bit)) { struct hv_vmbus_channel *channel; rel_id = (dword << 5) + bit; |
