Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F137079107
D7246.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D7246.id.diff
View Options
Index: head/sys/dev/hyperv/vmbus/vmbus_chan.c
===================================================================
--- head/sys/dev/hyperv/vmbus/vmbus_chan.c
+++ head/sys/dev/hyperv/vmbus/vmbus_chan.c
@@ -89,13 +89,10 @@
atomic_set_long(&sc->vmbus_tx_evtflags[chanid >> VMBUS_EVTFLAG_SHIFT],
1UL << (chanid & VMBUS_EVTFLAG_MASK));
- if (chan->ch_flags & VMBUS_CHAN_FLAG_HASMNF) {
- atomic_set_int(
- &sc->vmbus_mnf2->mnf_trigs[chan->ch_montrig_idx].mt_pending,
- chan->ch_montrig_mask);
- } else {
+ if (chan->ch_flags & VMBUS_CHAN_FLAG_HASMNF)
+ atomic_set_int(chan->ch_montrig, chan->ch_montrig_mask);
+ else
hypercall_signal_event(chan->ch_monprm_dma.hv_paddr);
- }
}
static int
@@ -1106,13 +1103,19 @@
chan->ch_monprm->mp_connid = offer->chm_connid;
if (offer->chm_flags1 & VMBUS_CHOFFER_FLAG1_HASMNF) {
+ int trig_idx;
+
/*
* Setup MNF stuffs.
*/
chan->ch_flags |= VMBUS_CHAN_FLAG_HASMNF;
- chan->ch_montrig_idx = offer->chm_montrig / VMBUS_MONTRIG_LEN;
- if (chan->ch_montrig_idx >= VMBUS_MONTRIGS_MAX)
+
+ trig_idx = offer->chm_montrig / VMBUS_MONTRIG_LEN;
+ if (trig_idx >= VMBUS_MONTRIGS_MAX)
panic("invalid monitor trigger %u", offer->chm_montrig);
+ chan->ch_montrig =
+ &sc->vmbus_mnf2->mnf_trigs[trig_idx].mt_pending;
+
chan->ch_montrig_mask =
1 << (offer->chm_montrig % VMBUS_MONTRIG_LEN);
}
Index: head/sys/dev/hyperv/vmbus/vmbus_chanvar.h
===================================================================
--- head/sys/dev/hyperv/vmbus/vmbus_chanvar.h
+++ head/sys/dev/hyperv/vmbus/vmbus_chanvar.h
@@ -80,7 +80,7 @@
* These are based on the offer_msg.monitor_id.
* Save it here for easy access.
*/
- int ch_montrig_idx; /* MNF trig index */
+ volatile uint32_t *ch_montrig; /* MNF trigger */
uint32_t ch_montrig_mask;/* MNF trig mask */
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 22, 2:43 AM (11 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25878128
Default Alt Text
D7246.id.diff (1 KB)
Attached To
Mode
D7246: hyperv/vmbus: Save MNF trigger location instead of MNF trigger index.
Attached
Detach File
Event Timeline
Log In to Comment