hyperv/vmbus: Avoid tx_evtflags setting code duplication.
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6915
This commit is contained in:
parent
88d2677299
commit
44d03f9a5f
@ -58,14 +58,14 @@ static void VmbusProcessChannelEvent(void* channel, int pending);
|
||||
static void
|
||||
vmbus_channel_set_event(hv_vmbus_channel *channel)
|
||||
{
|
||||
if (channel->offer_msg.monitor_allocated) {
|
||||
struct vmbus_softc *sc = channel->vmbus_sc;
|
||||
hv_vmbus_monitor_page *monitor_page;
|
||||
uint32_t chanid = channel->offer_msg.child_rel_id;
|
||||
struct vmbus_softc *sc = channel->vmbus_sc;
|
||||
uint32_t chanid = channel->offer_msg.child_rel_id;
|
||||
|
||||
atomic_set_long(
|
||||
&sc->vmbus_tx_evtflags[chanid >> VMBUS_EVTFLAG_SHIFT],
|
||||
1UL << (chanid & VMBUS_EVTFLAG_MASK));
|
||||
atomic_set_long(&sc->vmbus_tx_evtflags[chanid >> VMBUS_EVTFLAG_SHIFT],
|
||||
1UL << (chanid & VMBUS_EVTFLAG_MASK));
|
||||
|
||||
if (channel->offer_msg.monitor_allocated) {
|
||||
hv_vmbus_monitor_page *monitor_page;
|
||||
|
||||
monitor_page = sc->vmbus_mnf2;
|
||||
synch_set_bit(channel->monitor_bit,
|
||||
|
@ -164,15 +164,8 @@ vmbus_event_proc_compat(struct vmbus_softc *sc, int cpu)
|
||||
int
|
||||
hv_vmbus_set_event(hv_vmbus_channel *channel)
|
||||
{
|
||||
struct vmbus_softc *sc = channel->vmbus_sc;
|
||||
int ret = 0;
|
||||
uint32_t chanid = channel->offer_msg.child_rel_id;
|
||||
|
||||
atomic_set_long(&sc->vmbus_tx_evtflags[chanid >> VMBUS_EVTFLAG_SHIFT],
|
||||
1UL << (chanid & VMBUS_EVTFLAG_MASK));
|
||||
ret = hv_vmbus_signal_event(channel->signal_event_param);
|
||||
|
||||
return (ret);
|
||||
return hv_vmbus_signal_event(channel->signal_event_param);
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user