Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/hyperv/vmbus/hv_connection.c
Show First 20 Lines • Show All 347 Lines • ▼ Show 20 Lines | |||||
/** | /** | ||||
* Send an event notification to the parent | * Send an event notification to the parent | ||||
*/ | */ | ||||
int | int | ||||
hv_vmbus_set_event(hv_vmbus_channel *channel) | hv_vmbus_set_event(hv_vmbus_channel *channel) | ||||
{ | { | ||||
struct vmbus_softc *sc = vmbus_get_softc(); | struct vmbus_softc *sc = vmbus_get_softc(); | ||||
int ret = 0; | int ret = 0; | ||||
uint32_t child_rel_id = channel->offer_msg.child_rel_id; | uint32_t chanid = channel->offer_msg.child_rel_id; | ||||
/* Each uint32_t represents 32 channels */ | atomic_set_long(&sc->vmbus_tx_evtflags[chanid >> VMBUS_EVTFLAG_SHIFT], | ||||
1UL << (chanid & VMBUS_EVTFLAG_MASK)); | |||||
synch_set_bit(child_rel_id & 31, | |||||
(((uint32_t *)sc->vmbus_tx_evtflags + (child_rel_id >> 5)))); | |||||
ret = hv_vmbus_signal_event(channel->signal_event_param); | ret = hv_vmbus_signal_event(channel->signal_event_param); | ||||
return (ret); | return (ret); | ||||
} | } | ||||
void | void | ||||
vmbus_on_channel_open(const struct hv_vmbus_channel *chan) | vmbus_on_channel_open(const struct hv_vmbus_channel *chan) | ||||
{ | { | ||||
Show All 24 Lines |