Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F135593516
D8406.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D8406.id.diff
View Options
Index: head/sys/dev/hyperv/include/hyperv.h
===================================================================
--- head/sys/dev/hyperv/include/hyperv.h
+++ head/sys/dev/hyperv/include/hyperv.h
@@ -44,15 +44,4 @@
int hyperv_guid2str(const struct hyperv_guid *, char *, size_t);
-/**
- * @brief Get physical address from virtual
- */
-static inline unsigned long
-hv_get_phys_addr(void *virt)
-{
- unsigned long ret;
- ret = (vtophys(virt) | ((vm_offset_t) virt & PAGE_MASK));
- return (ret);
-}
-
#endif /* _HYPERV_H_ */
Index: head/sys/dev/hyperv/include/vmbus.h
===================================================================
--- head/sys/dev/hyperv/include/vmbus.h
+++ head/sys/dev/hyperv/include/vmbus.h
@@ -146,8 +146,6 @@
void vmbus_chan_cpu_set(struct vmbus_channel *chan, int cpu);
void vmbus_chan_cpu_rr(struct vmbus_channel *chan);
-struct vmbus_channel *
- vmbus_chan_cpu2chan(struct vmbus_channel *chan, int cpu);
void vmbus_chan_set_readbatch(struct vmbus_channel *chan, bool on);
struct vmbus_channel **
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
@@ -1534,65 +1534,6 @@
}
}
-/*
- * The channel whose vcpu binding is closest to the currect vcpu will
- * be selected.
- * If no multi-channel, always select primary channel.
- */
-struct vmbus_channel *
-vmbus_chan_cpu2chan(struct vmbus_channel *prichan, int cpu)
-{
- struct vmbus_channel *sel, *chan;
- uint32_t vcpu, sel_dist;
-
- KASSERT(cpu >= 0 && cpu < mp_ncpus, ("invalid cpuid %d", cpu));
- if (TAILQ_EMPTY(&prichan->ch_subchans))
- return prichan;
-
- vcpu = VMBUS_PCPU_GET(prichan->ch_vmbus, vcpuid, cpu);
-
-#define CHAN_VCPU_DIST(ch, vcpu) \
- (((ch)->ch_vcpuid > (vcpu)) ? \
- ((ch)->ch_vcpuid - (vcpu)) : ((vcpu) - (ch)->ch_vcpuid))
-
-#define CHAN_SELECT(ch) \
-do { \
- sel = ch; \
- sel_dist = CHAN_VCPU_DIST(ch, vcpu); \
-} while (0)
-
- CHAN_SELECT(prichan);
-
- mtx_lock(&prichan->ch_subchan_lock);
- TAILQ_FOREACH(chan, &prichan->ch_subchans, ch_sublink) {
- uint32_t dist;
-
- KASSERT(chan->ch_stflags & VMBUS_CHAN_ST_OPENED,
- ("chan%u is not opened", chan->ch_id));
-
- if (chan->ch_vcpuid == vcpu) {
- /* Exact match; done */
- CHAN_SELECT(chan);
- break;
- }
-
- dist = CHAN_VCPU_DIST(chan, vcpu);
- if (sel_dist <= dist) {
- /* Far or same distance; skip */
- continue;
- }
-
- /* Select the closer channel. */
- CHAN_SELECT(chan);
- }
- mtx_unlock(&prichan->ch_subchan_lock);
-
-#undef CHAN_SELECT
-#undef CHAN_VCPU_DIST
-
- return sel;
-}
-
struct vmbus_channel **
vmbus_subchan_get(struct vmbus_channel *pri_chan, int subchan_cnt)
{
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 12, 3:26 AM (11 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25191784
Default Alt Text
D8406.id.diff (2 KB)
Attached To
Mode
D8406: hyperv: GC unused functions.
Attached
Detach File
Event Timeline
Log In to Comment