vmbus.c (297634) | vmbus.c (297636) |
---|---|
1/*- 2 * Copyright (c) 2009-2012 Microsoft Corp. 3 * Copyright (c) 2012 NetApp Inc. 4 * Copyright (c) 2012 Citrix Inc. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 16 unchanged lines hidden (view full) --- 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29/* 30 * VM Bus Driver Implementation 31 */ 32#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2009-2012 Microsoft Corp. 3 * Copyright (c) 2012 NetApp Inc. 4 * Copyright (c) 2012 Citrix Inc. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 16 unchanged lines hidden (view full) --- 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29/* 30 * VM Bus Driver Implementation 31 */ 32#include <sys/cdefs.h> |
33__FBSDID("$FreeBSD: head/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c 297634 2016-04-07 05:31:22Z sephe $"); | 33__FBSDID("$FreeBSD: head/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c 297636 2016-04-07 05:56:22Z sephe $"); |
34 35#include <sys/param.h> 36#include <sys/bus.h> 37#include <sys/kernel.h> 38#include <sys/lock.h> 39#include <sys/malloc.h> 40#include <sys/module.h> 41#include <sys/proc.h> --- 73 unchanged lines hidden (view full) --- 115 * Make sure the write to message_type (ie set to 116 * HV_MESSAGE_TYPE_NONE) happens before we read the 117 * message_pending and EOMing. Otherwise, the EOMing will 118 * not deliver any more messages 119 * since there is no empty slot 120 * 121 * NOTE: 122 * mb() is used here, since atomic_thread_fence_seq_cst() | 34 35#include <sys/param.h> 36#include <sys/bus.h> 37#include <sys/kernel.h> 38#include <sys/lock.h> 39#include <sys/malloc.h> 40#include <sys/module.h> 41#include <sys/proc.h> --- 73 unchanged lines hidden (view full) --- 115 * Make sure the write to message_type (ie set to 116 * HV_MESSAGE_TYPE_NONE) happens before we read the 117 * message_pending and EOMing. Otherwise, the EOMing will 118 * not deliver any more messages 119 * since there is no empty slot 120 * 121 * NOTE: 122 * mb() is used here, since atomic_thread_fence_seq_cst() |
123 * will become compler fence on UP kernel. | 123 * will become compiler fence on UP kernel. |
124 */ 125 mb(); 126 127 if (msg->header.message_flags.u.message_pending) { 128 /* 129 * This will cause message queue rescan to possibly 130 * deliver another msg from the hypervisor 131 */ --- 60 unchanged lines hidden (view full) --- 192 * Make sure the write to message_type (ie set to 193 * HV_MESSAGE_TYPE_NONE) happens before we read the 194 * message_pending and EOMing. Otherwise, the EOMing will 195 * not deliver any more messages 196 * since there is no empty slot 197 * 198 * NOTE: 199 * mb() is used here, since atomic_thread_fence_seq_cst() | 124 */ 125 mb(); 126 127 if (msg->header.message_flags.u.message_pending) { 128 /* 129 * This will cause message queue rescan to possibly 130 * deliver another msg from the hypervisor 131 */ --- 60 unchanged lines hidden (view full) --- 192 * Make sure the write to message_type (ie set to 193 * HV_MESSAGE_TYPE_NONE) happens before we read the 194 * message_pending and EOMing. Otherwise, the EOMing will 195 * not deliver any more messages 196 * since there is no empty slot 197 * 198 * NOTE: 199 * mb() is used here, since atomic_thread_fence_seq_cst() |
200 * will become compler fence on UP kernel. | 200 * will become compiler fence on UP kernel. |
201 */ 202 mb(); 203 204 if (msg->header.message_flags.u.message_pending) { 205 /* 206 * This will cause message queue rescan to possibly 207 * deliver another msg from the hypervisor 208 */ --- 536 unchanged lines hidden --- | 201 */ 202 mb(); 203 204 if (msg->header.message_flags.u.message_pending) { 205 /* 206 * This will cause message queue rescan to possibly 207 * deliver another msg from the hypervisor 208 */ --- 536 unchanged lines hidden --- |