From owner-svn-src-all@freebsd.org Thu Jul 21 06:09:50 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2895CB9DA59; Thu, 21 Jul 2016 06:09:50 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E9F2318E7; Thu, 21 Jul 2016 06:09:49 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6L69na9005600; Thu, 21 Jul 2016 06:09:49 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6L69lYK005582; Thu, 21 Jul 2016 06:09:47 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201607210609.u6L69lYK005582@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Thu, 21 Jul 2016 06:09:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303131 - in head/sys/dev/hyperv: include netvsc storvsc utilities vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jul 2016 06:09:50 -0000 Author: sephe Date: Thu Jul 21 06:09:47 2016 New Revision: 303131 URL: https://svnweb.freebsd.org/changeset/base/303131 Log: hyperv: hv_vmbus_channel -> vmbus_channel MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7260 Modified: head/sys/dev/hyperv/include/vmbus.h head/sys/dev/hyperv/netvsc/hv_net_vsc.c head/sys/dev/hyperv/netvsc/hv_net_vsc.h head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c head/sys/dev/hyperv/netvsc/hv_rndis.h head/sys/dev/hyperv/netvsc/hv_rndis_filter.c head/sys/dev/hyperv/netvsc/hv_rndis_filter.h head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c head/sys/dev/hyperv/utilities/hv_heartbeat.c head/sys/dev/hyperv/utilities/hv_kvp.c head/sys/dev/hyperv/utilities/hv_shutdown.c head/sys/dev/hyperv/utilities/hv_timesync.c head/sys/dev/hyperv/utilities/hv_util.c head/sys/dev/hyperv/utilities/hv_util.h head/sys/dev/hyperv/vmbus/vmbus.c head/sys/dev/hyperv/vmbus/vmbus_chan.c head/sys/dev/hyperv/vmbus/vmbus_chanvar.h head/sys/dev/hyperv/vmbus/vmbus_var.h Modified: head/sys/dev/hyperv/include/vmbus.h ============================================================================== --- head/sys/dev/hyperv/include/vmbus.h Thu Jul 21 06:06:11 2016 (r303130) +++ head/sys/dev/hyperv/include/vmbus.h Thu Jul 21 06:09:47 2016 (r303131) @@ -104,56 +104,56 @@ struct vmbus_chanpkt_rxbuf { #define VMBUS_CHAN_SGLIST_MAX 32 #define VMBUS_CHAN_PRPLIST_MAX 32 -struct hv_vmbus_channel; +struct vmbus_channel; struct hyperv_guid; -typedef void (*vmbus_chan_callback_t)(struct hv_vmbus_channel *, void *); +typedef void (*vmbus_chan_callback_t)(struct vmbus_channel *, void *); -static __inline struct hv_vmbus_channel * +static __inline struct vmbus_channel * vmbus_get_channel(device_t dev) { return device_get_ivars(dev); } -int vmbus_chan_open(struct hv_vmbus_channel *chan, +int vmbus_chan_open(struct vmbus_channel *chan, int txbr_size, int rxbr_size, const void *udata, int udlen, vmbus_chan_callback_t cb, void *cbarg); -void vmbus_chan_close(struct hv_vmbus_channel *chan); +void vmbus_chan_close(struct vmbus_channel *chan); -int vmbus_chan_gpadl_connect(struct hv_vmbus_channel *chan, +int vmbus_chan_gpadl_connect(struct vmbus_channel *chan, bus_addr_t paddr, int size, uint32_t *gpadl); -int vmbus_chan_gpadl_disconnect(struct hv_vmbus_channel *chan, +int vmbus_chan_gpadl_disconnect(struct vmbus_channel *chan, uint32_t gpadl); -void vmbus_chan_cpu_set(struct hv_vmbus_channel *chan, int cpu); -void vmbus_chan_cpu_rr(struct hv_vmbus_channel *chan); -struct hv_vmbus_channel * - vmbus_chan_cpu2chan(struct hv_vmbus_channel *chan, int cpu); -void vmbus_chan_set_readbatch(struct hv_vmbus_channel *chan, bool on); - -struct hv_vmbus_channel ** - vmbus_subchan_get(struct hv_vmbus_channel *pri_chan, int subchan_cnt); -void vmbus_subchan_rel(struct hv_vmbus_channel **subchan, int subchan_cnt); -void vmbus_subchan_drain(struct hv_vmbus_channel *pri_chan); +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 ** + vmbus_subchan_get(struct vmbus_channel *pri_chan, int subchan_cnt); +void vmbus_subchan_rel(struct vmbus_channel **subchan, int subchan_cnt); +void vmbus_subchan_drain(struct vmbus_channel *pri_chan); -int vmbus_chan_recv(struct hv_vmbus_channel *chan, void *data, int *dlen, +int vmbus_chan_recv(struct vmbus_channel *chan, void *data, int *dlen, uint64_t *xactid); -int vmbus_chan_recv_pkt(struct hv_vmbus_channel *chan, +int vmbus_chan_recv_pkt(struct vmbus_channel *chan, struct vmbus_chanpkt_hdr *pkt, int *pktlen); -int vmbus_chan_send(struct hv_vmbus_channel *chan, uint16_t type, +int vmbus_chan_send(struct vmbus_channel *chan, uint16_t type, uint16_t flags, void *data, int dlen, uint64_t xactid); -int vmbus_chan_send_sglist(struct hv_vmbus_channel *chan, +int vmbus_chan_send_sglist(struct vmbus_channel *chan, struct vmbus_gpa sg[], int sglen, void *data, int dlen, uint64_t xactid); -int vmbus_chan_send_prplist(struct hv_vmbus_channel *chan, +int vmbus_chan_send_prplist(struct vmbus_channel *chan, struct vmbus_gpa_range *prp, int prp_cnt, void *data, int dlen, uint64_t xactid); -uint32_t vmbus_chan_id(const struct hv_vmbus_channel *chan); -uint32_t vmbus_chan_subidx(const struct hv_vmbus_channel *chan); -bool vmbus_chan_is_primary(const struct hv_vmbus_channel *chan); +uint32_t vmbus_chan_id(const struct vmbus_channel *chan); +uint32_t vmbus_chan_subidx(const struct vmbus_channel *chan); +bool vmbus_chan_is_primary(const struct vmbus_channel *chan); const struct hyperv_guid * - vmbus_chan_guid_inst(const struct hv_vmbus_channel *chan); + vmbus_chan_guid_inst(const struct vmbus_channel *chan); #endif /* !_VMBUS_H_ */ Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_net_vsc.c Thu Jul 21 06:06:11 2016 (r303130) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.c Thu Jul 21 06:09:47 2016 (r303131) @@ -54,7 +54,7 @@ MALLOC_DEFINE(M_NETVSC, "netvsc", "Hyper /* * Forward declarations */ -static void hv_nv_on_channel_callback(struct hv_vmbus_channel *chan, +static void hv_nv_on_channel_callback(struct vmbus_channel *chan, void *xrxr); static int hv_nv_init_send_buffer_with_net_vsp(struct hn_softc *sc); static int hv_nv_init_rx_buffer_with_net_vsp(struct hn_softc *); @@ -62,11 +62,11 @@ static int hv_nv_destroy_send_buffer(ne static int hv_nv_destroy_rx_buffer(netvsc_dev *net_dev); static int hv_nv_connect_to_vsp(struct hn_softc *sc); static void hv_nv_on_send_completion(netvsc_dev *net_dev, - struct hv_vmbus_channel *, const struct vmbus_chanpkt_hdr *pkt); -static void hv_nv_on_receive_completion(struct hv_vmbus_channel *chan, + struct vmbus_channel *, const struct vmbus_chanpkt_hdr *pkt); +static void hv_nv_on_receive_completion(struct vmbus_channel *chan, uint64_t tid, uint32_t status); static void hv_nv_on_receive(netvsc_dev *net_dev, - struct hn_rx_ring *rxr, struct hv_vmbus_channel *chan, + struct hn_rx_ring *rxr, struct vmbus_channel *chan, const struct vmbus_chanpkt_hdr *pkt); /* @@ -639,7 +639,7 @@ hv_nv_disconnect_from_vsp(netvsc_dev *ne } void -hv_nv_subchan_attach(struct hv_vmbus_channel *chan, struct hn_rx_ring *rxr) +hv_nv_subchan_attach(struct vmbus_channel *chan, struct hn_rx_ring *rxr) { KASSERT(rxr->hn_rx_idx == vmbus_chan_subidx(chan), ("chan%u subidx %u, rxr%d mismatch", @@ -658,7 +658,7 @@ netvsc_dev * hv_nv_on_device_add(struct hn_softc *sc, void *additional_info, struct hn_rx_ring *rxr) { - struct hv_vmbus_channel *chan = sc->hn_prichan; + struct vmbus_channel *chan = sc->hn_prichan; netvsc_dev *net_dev; int ret = 0; @@ -735,7 +735,7 @@ hv_nv_on_device_remove(struct hn_softc * * Net VSC on send completion */ static void -hv_nv_on_send_completion(netvsc_dev *net_dev, struct hv_vmbus_channel *chan, +hv_nv_on_send_completion(netvsc_dev *net_dev, struct vmbus_channel *chan, const struct vmbus_chanpkt_hdr *pkt) { const nvsp_msg *nvsp_msg_pkt; @@ -799,7 +799,7 @@ hv_nv_on_send_completion(netvsc_dev *net * Returns 0 on success, non-zero on failure. */ int -hv_nv_on_send(struct hv_vmbus_channel *chan, netvsc_packet *pkt) +hv_nv_on_send(struct vmbus_channel *chan, netvsc_packet *pkt) { nvsp_msg send_msg; int ret; @@ -838,7 +838,7 @@ hv_nv_on_send(struct hv_vmbus_channel *c */ static void hv_nv_on_receive(netvsc_dev *net_dev, struct hn_rx_ring *rxr, - struct hv_vmbus_channel *chan, const struct vmbus_chanpkt_hdr *pkthdr) + struct vmbus_channel *chan, const struct vmbus_chanpkt_hdr *pkthdr) { const struct vmbus_chanpkt_rxbuf *pkt; const nvsp_msg *nvsp_msg_pkt; @@ -894,7 +894,7 @@ hv_nv_on_receive(netvsc_dev *net_dev, st * Send a receive completion packet to RNDIS device (ie NetVsp) */ static void -hv_nv_on_receive_completion(struct hv_vmbus_channel *chan, uint64_t tid, +hv_nv_on_receive_completion(struct vmbus_channel *chan, uint64_t tid, uint32_t status) { nvsp_msg rx_comp_msg; @@ -969,7 +969,7 @@ hv_nv_send_table(struct hn_softc *sc, co * Net VSC on channel callback */ static void -hv_nv_on_channel_callback(struct hv_vmbus_channel *chan, void *xrxr) +hv_nv_on_channel_callback(struct vmbus_channel *chan, void *xrxr) { struct hn_rx_ring *rxr = xrxr; struct hn_softc *sc = rxr->hn_ifp->if_softc; Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_net_vsc.h Thu Jul 21 06:06:11 2016 (r303130) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.h Thu Jul 21 06:09:47 2016 (r303131) @@ -1082,9 +1082,9 @@ typedef struct netvsc_dev_ { uint32_t vrss_send_table[VRSS_SEND_TABLE_SIZE]; } netvsc_dev; -struct hv_vmbus_channel; +struct vmbus_channel; -typedef void (*pfn_on_send_rx_completion)(struct hv_vmbus_channel *, void *); +typedef void (*pfn_on_send_rx_completion)(struct vmbus_channel *, void *); #define NETVSC_DEVICE_RING_BUFFER_SIZE (128 * PAGE_SIZE) @@ -1207,7 +1207,7 @@ struct hn_tx_ring { struct mtx hn_tx_lock; struct hn_softc *hn_sc; - struct hv_vmbus_channel *hn_chan; + struct vmbus_channel *hn_chan; int hn_direct_tx_size; int hn_tx_chimney_size; @@ -1246,7 +1246,7 @@ typedef struct hn_softc { /* See hv_netvsc_drv_freebsd.c for rules on how to use */ int temp_unusable; netvsc_dev *net_dev; - struct hv_vmbus_channel *hn_prichan; + struct vmbus_channel *hn_prichan; int hn_rx_ring_cnt; int hn_rx_ring_inuse; @@ -1273,9 +1273,9 @@ netvsc_dev *hv_nv_on_device_add(struct h void *additional_info, struct hn_rx_ring *rxr); int hv_nv_on_device_remove(struct hn_softc *sc, boolean_t destroy_channel); -int hv_nv_on_send(struct hv_vmbus_channel *chan, netvsc_packet *pkt); +int hv_nv_on_send(struct vmbus_channel *chan, netvsc_packet *pkt); int hv_nv_get_next_send_section(netvsc_dev *net_dev); -void hv_nv_subchan_attach(struct hv_vmbus_channel *chan, +void hv_nv_subchan_attach(struct vmbus_channel *chan, struct hn_rx_ring *rxr); #endif /* __HV_NET_VSC_H__ */ Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Thu Jul 21 06:06:11 2016 (r303130) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Thu Jul 21 06:09:47 2016 (r303131) @@ -340,8 +340,8 @@ static int hn_encap(struct hn_tx_ring *, static void hn_create_rx_data(struct hn_softc *sc, int); static void hn_destroy_rx_data(struct hn_softc *sc); static void hn_set_tx_chimney_size(struct hn_softc *, int); -static void hn_channel_attach(struct hn_softc *, struct hv_vmbus_channel *); -static void hn_subchan_attach(struct hn_softc *, struct hv_vmbus_channel *); +static void hn_channel_attach(struct hn_softc *, struct vmbus_channel *); +static void hn_subchan_attach(struct hn_softc *, struct vmbus_channel *); static void hn_subchan_setup(struct hn_softc *); static int hn_transmit(struct ifnet *, struct mbuf *); @@ -780,7 +780,7 @@ hn_txeof(struct hn_tx_ring *txr) } static void -hn_tx_done(struct hv_vmbus_channel *chan, void *xpkt) +hn_tx_done(struct vmbus_channel *chan, void *xpkt) { netvsc_packet *packet = xpkt; struct hn_txdesc *txd; @@ -2911,7 +2911,7 @@ hn_xmit_txeof_taskfunc(void *xtxr, int p } static void -hn_channel_attach(struct hn_softc *sc, struct hv_vmbus_channel *chan) +hn_channel_attach(struct hn_softc *sc, struct vmbus_channel *chan) { struct hn_rx_ring *rxr; int idx; @@ -2950,7 +2950,7 @@ hn_channel_attach(struct hn_softc *sc, s } static void -hn_subchan_attach(struct hn_softc *sc, struct hv_vmbus_channel *chan) +hn_subchan_attach(struct hn_softc *sc, struct vmbus_channel *chan) { KASSERT(!vmbus_chan_is_primary(chan), @@ -2961,7 +2961,7 @@ hn_subchan_attach(struct hn_softc *sc, s static void hn_subchan_setup(struct hn_softc *sc) { - struct hv_vmbus_channel **subchans; + struct vmbus_channel **subchans; int subchan_cnt = sc->net_dev->num_channel - 1; int i; @@ -2970,7 +2970,7 @@ hn_subchan_setup(struct hn_softc *sc) /* Attach the sub-channels. */ for (i = 0; i < subchan_cnt; ++i) { - struct hv_vmbus_channel *subchan = subchans[i]; + struct vmbus_channel *subchan = subchans[i]; /* NOTE: Calling order is critical. */ hn_subchan_attach(sc, subchan); Modified: head/sys/dev/hyperv/netvsc/hv_rndis.h ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_rndis.h Thu Jul 21 06:06:11 2016 (r303130) +++ head/sys/dev/hyperv/netvsc/hv_rndis.h Thu Jul 21 06:09:47 2016 (r303131) @@ -1082,7 +1082,6 @@ typedef struct rndismp_rx_bufs_info_ { /* * Externs */ -struct hv_vmbus_channel; struct hn_rx_ring; struct hn_tx_ring; Modified: head/sys/dev/hyperv/netvsc/hv_rndis_filter.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_rndis_filter.c Thu Jul 21 06:06:11 2016 (r303130) +++ head/sys/dev/hyperv/netvsc/hv_rndis_filter.c Thu Jul 21 06:09:47 2016 (r303131) @@ -86,8 +86,8 @@ static int hv_rf_set_packet_filter(rndi static int hv_rf_init_device(rndis_device *device); static int hv_rf_open_device(rndis_device *device); static int hv_rf_close_device(rndis_device *device); -static void hv_rf_on_send_request_completion(struct hv_vmbus_channel *, void *context); -static void hv_rf_on_send_request_halt_completion(struct hv_vmbus_channel *, void *context); +static void hv_rf_on_send_request_completion(struct vmbus_channel *, void *context); +static void hv_rf_on_send_request_halt_completion(struct vmbus_channel *, void *context); int hv_rf_send_offload_request(struct hn_softc *sc, rndis_offload_params *offloads); @@ -1243,7 +1243,7 @@ hv_rf_on_close(struct hn_softc *sc) * RNDIS filter on send request completion callback */ static void -hv_rf_on_send_request_completion(struct hv_vmbus_channel *chan __unused, +hv_rf_on_send_request_completion(struct vmbus_channel *chan __unused, void *context __unused) { } @@ -1252,7 +1252,7 @@ hv_rf_on_send_request_completion(struct * RNDIS filter on send request (halt only) completion callback */ static void -hv_rf_on_send_request_halt_completion(struct hv_vmbus_channel *chan __unused, +hv_rf_on_send_request_halt_completion(struct vmbus_channel *chan __unused, void *context) { rndis_request *request = context; Modified: head/sys/dev/hyperv/netvsc/hv_rndis_filter.h ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_rndis_filter.h Thu Jul 21 06:06:11 2016 (r303130) +++ head/sys/dev/hyperv/netvsc/hv_rndis_filter.h Thu Jul 21 06:09:47 2016 (r303131) @@ -111,7 +111,6 @@ typedef struct rndis_device_ { /* * Externs */ -struct hv_vmbus_channel; struct hn_softc; struct hn_rx_ring; Modified: head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Thu Jul 21 06:06:11 2016 (r303130) +++ head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Thu Jul 21 06:09:47 2016 (r303131) @@ -132,7 +132,7 @@ struct hv_storvsc_request { }; struct storvsc_softc { - struct hv_vmbus_channel *hs_chan; + struct vmbus_channel *hs_chan; LIST_HEAD(, hv_storvsc_request) hs_free_list; struct mtx hs_lock; struct storvsc_driver_props *hs_drv_props; @@ -148,7 +148,7 @@ struct storvsc_softc { struct hv_storvsc_request hs_reset_req; device_t hs_dev; - struct hv_vmbus_channel *hs_cpu2chan[MAXCPU]; + struct vmbus_channel *hs_cpu2chan[MAXCPU]; }; @@ -274,7 +274,7 @@ static int create_storvsc_request(union static void storvsc_free_request(struct storvsc_softc *sc, struct hv_storvsc_request *reqp); static enum hv_storage_type storvsc_get_storage_type(device_t dev); static void hv_storvsc_rescan_target(struct storvsc_softc *sc); -static void hv_storvsc_on_channel_callback(struct hv_vmbus_channel *chan, void *xsc); +static void hv_storvsc_on_channel_callback(struct vmbus_channel *chan, void *xsc); static void hv_storvsc_on_iocompletion( struct storvsc_softc *sc, struct vstor_packet *vstor_packet, struct hv_storvsc_request *request); @@ -309,7 +309,7 @@ MODULE_DEPEND(storvsc, vmbus, 1, 1, 1); static void storvsc_subchan_attach(struct storvsc_softc *sc, - struct hv_vmbus_channel *new_channel) + struct vmbus_channel *new_channel) { struct vmstor_chan_props props; int ret = 0; @@ -334,7 +334,7 @@ storvsc_subchan_attach(struct storvsc_so static void storvsc_send_multichannel_request(struct storvsc_softc *sc, int max_chans) { - struct hv_vmbus_channel **subchan; + struct vmbus_channel **subchan; struct hv_storvsc_request *request; struct vstor_packet *vstor_packet; int request_channels_cnt = 0; @@ -648,7 +648,7 @@ hv_storvsc_io_request(struct storvsc_sof struct hv_storvsc_request *request) { struct vstor_packet *vstor_packet = &request->vstor_packet; - struct hv_vmbus_channel* outgoing_channel = NULL; + struct vmbus_channel* outgoing_channel = NULL; int ret = 0; vstor_packet->flags |= REQUEST_COMPLETION_FLAG; @@ -765,7 +765,7 @@ hv_storvsc_rescan_target(struct storvsc_ } static void -hv_storvsc_on_channel_callback(struct hv_vmbus_channel *channel, void *xsc) +hv_storvsc_on_channel_callback(struct vmbus_channel *channel, void *xsc) { int ret = 0; struct storvsc_softc *sc = xsc; Modified: head/sys/dev/hyperv/utilities/hv_heartbeat.c ============================================================================== --- head/sys/dev/hyperv/utilities/hv_heartbeat.c Thu Jul 21 06:06:11 2016 (r303130) +++ head/sys/dev/hyperv/utilities/hv_heartbeat.c Thu Jul 21 06:09:47 2016 (r303131) @@ -49,7 +49,7 @@ static const struct hyperv_guid service_ * Process heartbeat message */ static void -hv_heartbeat_cb(struct hv_vmbus_channel *channel, void *context) +hv_heartbeat_cb(struct vmbus_channel *channel, void *context) { uint8_t* buf; int recvlen; Modified: head/sys/dev/hyperv/utilities/hv_kvp.c ============================================================================== --- head/sys/dev/hyperv/utilities/hv_kvp.c Thu Jul 21 06:06:11 2016 (r303130) +++ head/sys/dev/hyperv/utilities/hv_kvp.c Thu Jul 21 06:09:47 2016 (r303131) @@ -334,7 +334,7 @@ hv_kvp_convert_utf16_ipinfo_to_utf8(stru /* XXX access other driver's softc? are you kidding? */ device_t dev = devs[devcnt]; struct hn_softc *sc = device_get_softc(dev); - struct hv_vmbus_channel *chan; + struct vmbus_channel *chan; char buf[HYPERV_GUID_STRLEN]; /* @@ -616,7 +616,7 @@ static void hv_kvp_process_request(void *context, int pending) { uint8_t *kvp_buf; - struct hv_vmbus_channel *channel; + struct vmbus_channel *channel; uint32_t recvlen = 0; uint64_t requestid; struct hv_vmbus_icmsg_hdr *icmsghdrp; @@ -711,7 +711,7 @@ hv_kvp_process_request(void *context, in * Callback routine that gets called whenever there is a message from host */ static void -hv_kvp_callback(struct hv_vmbus_channel *chan __unused, void *context) +hv_kvp_callback(struct vmbus_channel *chan __unused, void *context) { hv_kvp_sc *sc = (hv_kvp_sc*)context; /* Modified: head/sys/dev/hyperv/utilities/hv_shutdown.c ============================================================================== --- head/sys/dev/hyperv/utilities/hv_shutdown.c Thu Jul 21 06:06:11 2016 (r303130) +++ head/sys/dev/hyperv/utilities/hv_shutdown.c Thu Jul 21 06:09:47 2016 (r303131) @@ -53,7 +53,7 @@ static const struct hyperv_guid service_ * Shutdown */ static void -hv_shutdown_cb(struct hv_vmbus_channel *channel, void *context) +hv_shutdown_cb(struct vmbus_channel *channel, void *context) { uint8_t* buf; uint8_t execute_shutdown = 0; Modified: head/sys/dev/hyperv/utilities/hv_timesync.c ============================================================================== --- head/sys/dev/hyperv/utilities/hv_timesync.c Thu Jul 21 06:06:11 2016 (r303130) +++ head/sys/dev/hyperv/utilities/hv_timesync.c Thu Jul 21 06:09:47 2016 (r303131) @@ -130,7 +130,7 @@ void hv_adj_guesttime(hv_timesync_sc *sc * Time Sync Channel message handler */ static void -hv_timesync_cb(struct hv_vmbus_channel *channel, void *context) +hv_timesync_cb(struct vmbus_channel *channel, void *context) { hv_vmbus_icmsg_hdr* icmsghdrp; uint32_t recvlen; Modified: head/sys/dev/hyperv/utilities/hv_util.c ============================================================================== --- head/sys/dev/hyperv/utilities/hv_util.c Thu Jul 21 06:06:11 2016 (r303130) +++ head/sys/dev/hyperv/utilities/hv_util.c Thu Jul 21 06:09:47 2016 (r303131) @@ -77,7 +77,7 @@ int hv_util_attach(device_t dev) { struct hv_util_sc* softc; - struct hv_vmbus_channel *chan; + struct vmbus_channel *chan; int ret; softc = device_get_softc(dev); Modified: head/sys/dev/hyperv/utilities/hv_util.h ============================================================================== --- head/sys/dev/hyperv/utilities/hv_util.h Thu Jul 21 06:06:11 2016 (r303130) +++ head/sys/dev/hyperv/utilities/hv_util.h Thu Jul 21 06:09:47 2016 (r303131) @@ -39,7 +39,7 @@ typedef struct hv_util_sc { /* * function to process Hyper-V messages */ - void (*callback)(struct hv_vmbus_channel *, void *); + void (*callback)(struct vmbus_channel *, void *); uint8_t *receive_buffer; } hv_util_sc; Modified: head/sys/dev/hyperv/vmbus/vmbus.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus.c Thu Jul 21 06:06:11 2016 (r303130) +++ head/sys/dev/hyperv/vmbus/vmbus.c Thu Jul 21 06:09:47 2016 (r303131) @@ -992,7 +992,7 @@ vmbus_read_ivar(device_t dev, device_t c static int vmbus_child_pnpinfo_str(device_t dev, device_t child, char *buf, size_t buflen) { - const struct hv_vmbus_channel *chan; + const struct vmbus_channel *chan; char guidbuf[HYPERV_GUID_STRLEN]; chan = vmbus_get_channel(child); @@ -1013,7 +1013,7 @@ vmbus_child_pnpinfo_str(device_t dev, de } int -vmbus_add_child(struct hv_vmbus_channel *chan) +vmbus_add_child(struct vmbus_channel *chan) { struct vmbus_softc *sc = chan->ch_vmbus; device_t parent = sc->vmbus_dev; @@ -1038,7 +1038,7 @@ done: } int -vmbus_delete_child(struct hv_vmbus_channel *chan) +vmbus_delete_child(struct vmbus_channel *chan) { int error; @@ -1082,7 +1082,7 @@ static int vmbus_probe_guid_method(device_t bus, device_t dev, const struct hyperv_guid *guid) { - const struct hv_vmbus_channel *chan = vmbus_get_channel(dev); + const struct vmbus_channel *chan = vmbus_get_channel(dev); if (memcmp(&chan->ch_guid_type, guid, sizeof(struct hyperv_guid)) == 0) return 0; @@ -1132,7 +1132,7 @@ vmbus_doattach(struct vmbus_softc *sc) mtx_init(&sc->vmbus_prichan_lock, "vmbus prichan", NULL, MTX_DEF); TAILQ_INIT(&sc->vmbus_prichans); sc->vmbus_chmap = malloc( - sizeof(struct hv_vmbus_channel *) * VMBUS_CHAN_MAX, M_DEVBUF, + sizeof(struct vmbus_channel *) * VMBUS_CHAN_MAX, M_DEVBUF, M_WAITOK | M_ZERO); /* Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_chan.c Thu Jul 21 06:06:11 2016 (r303130) +++ head/sys/dev/hyperv/vmbus/vmbus_chan.c Thu Jul 21 06:09:47 2016 (r303131) @@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$"); #include static void vmbus_chan_update_evtflagcnt(struct vmbus_softc *, - const struct hv_vmbus_channel *); + const struct vmbus_channel *); static void vmbus_chan_task(void *, int); static void vmbus_chan_task_nobatch(void *, int); @@ -80,7 +80,7 @@ vmbus_chan_msgprocs[VMBUS_CHANMSG_TYPE_M * Notify host that there are data pending on our TX bufring. */ static __inline void -vmbus_chan_signal_tx(const struct hv_vmbus_channel *chan) +vmbus_chan_signal_tx(const struct vmbus_channel *chan) { atomic_set_long(chan->ch_evtflag, chan->ch_evtflag_mask); if (chan->ch_txflags & VMBUS_CHAN_TXF_HASMNF) @@ -92,7 +92,7 @@ vmbus_chan_signal_tx(const struct hv_vmb static int vmbus_chan_sysctl_mnf(SYSCTL_HANDLER_ARGS) { - struct hv_vmbus_channel *chan = arg1; + struct vmbus_channel *chan = arg1; int mnf = 0; if (chan->ch_txflags & VMBUS_CHAN_TXF_HASMNF) @@ -101,7 +101,7 @@ vmbus_chan_sysctl_mnf(SYSCTL_HANDLER_ARG } static void -vmbus_chan_sysctl_create(struct hv_vmbus_channel *chan) +vmbus_chan_sysctl_create(struct vmbus_channel *chan) { struct sysctl_oid *ch_tree, *chid_tree, *br_tree; struct sysctl_ctx_list *ctx; @@ -193,7 +193,7 @@ vmbus_chan_sysctl_create(struct hv_vmbus } int -vmbus_chan_open(struct hv_vmbus_channel *chan, int txbr_size, int rxbr_size, +vmbus_chan_open(struct vmbus_channel *chan, int txbr_size, int rxbr_size, const void *udata, int udlen, vmbus_chan_callback_t cb, void *cbarg) { struct vmbus_softc *sc = chan->ch_vmbus; @@ -325,7 +325,7 @@ failed: } int -vmbus_chan_gpadl_connect(struct hv_vmbus_channel *chan, bus_addr_t paddr, +vmbus_chan_gpadl_connect(struct vmbus_channel *chan, bus_addr_t paddr, int size, uint32_t *gpadl0) { struct vmbus_softc *sc = chan->ch_vmbus; @@ -455,7 +455,7 @@ vmbus_chan_gpadl_connect(struct hv_vmbus * Disconnect the GPA from the target channel */ int -vmbus_chan_gpadl_disconnect(struct hv_vmbus_channel *chan, uint32_t gpadl) +vmbus_chan_gpadl_disconnect(struct vmbus_channel *chan, uint32_t gpadl) { struct vmbus_softc *sc = chan->ch_vmbus; struct vmbus_msghc *mh; @@ -492,7 +492,7 @@ vmbus_chan_gpadl_disconnect(struct hv_vm } static void -vmbus_chan_close_internal(struct hv_vmbus_channel *chan) +vmbus_chan_close_internal(struct vmbus_channel *chan) { struct vmbus_softc *sc = chan->ch_vmbus; struct vmbus_msghc *mh; @@ -569,7 +569,7 @@ vmbus_chan_close_internal(struct hv_vmbu * are not being opened. */ void -vmbus_chan_close(struct hv_vmbus_channel *chan) +vmbus_chan_close(struct vmbus_channel *chan) { int subchan_cnt; @@ -586,7 +586,7 @@ vmbus_chan_close(struct hv_vmbus_channel */ subchan_cnt = chan->ch_subchan_cnt; if (subchan_cnt > 0) { - struct hv_vmbus_channel **subchan; + struct vmbus_channel **subchan; int i; subchan = vmbus_subchan_get(chan, subchan_cnt); @@ -600,7 +600,7 @@ vmbus_chan_close(struct hv_vmbus_channel } int -vmbus_chan_send(struct hv_vmbus_channel *chan, uint16_t type, uint16_t flags, +vmbus_chan_send(struct vmbus_channel *chan, uint16_t type, uint16_t flags, void *data, int dlen, uint64_t xactid) { struct vmbus_chanpkt pkt; @@ -633,7 +633,7 @@ vmbus_chan_send(struct hv_vmbus_channel } int -vmbus_chan_send_sglist(struct hv_vmbus_channel *chan, +vmbus_chan_send_sglist(struct vmbus_channel *chan, struct vmbus_gpa sg[], int sglen, void *data, int dlen, uint64_t xactid) { struct vmbus_chanpkt_sglist pkt; @@ -673,7 +673,7 @@ vmbus_chan_send_sglist(struct hv_vmbus_c } int -vmbus_chan_send_prplist(struct hv_vmbus_channel *chan, +vmbus_chan_send_prplist(struct vmbus_channel *chan, struct vmbus_gpa_range *prp, int prp_cnt, void *data, int dlen, uint64_t xactid) { @@ -715,7 +715,7 @@ vmbus_chan_send_prplist(struct hv_vmbus_ } int -vmbus_chan_recv(struct hv_vmbus_channel *chan, void *data, int *dlen0, +vmbus_chan_recv(struct vmbus_channel *chan, void *data, int *dlen0, uint64_t *xactid) { struct vmbus_chanpkt_hdr pkt; @@ -745,7 +745,7 @@ vmbus_chan_recv(struct hv_vmbus_channel } int -vmbus_chan_recv_pkt(struct hv_vmbus_channel *chan, +vmbus_chan_recv_pkt(struct vmbus_channel *chan, struct vmbus_chanpkt_hdr *pkt0, int *pktlen0) { struct vmbus_chanpkt_hdr pkt; @@ -773,7 +773,7 @@ vmbus_chan_recv_pkt(struct hv_vmbus_chan static void vmbus_chan_task(void *xchan, int pending __unused) { - struct hv_vmbus_channel *chan = xchan; + struct vmbus_channel *chan = xchan; vmbus_chan_callback_t cb = chan->ch_cb; void *cbarg = chan->ch_cbarg; @@ -806,7 +806,7 @@ vmbus_chan_task(void *xchan, int pending static void vmbus_chan_task_nobatch(void *xchan, int pending __unused) { - struct hv_vmbus_channel *chan = xchan; + struct vmbus_channel *chan = xchan; chan->ch_cb(chan, chan->ch_cbarg); } @@ -829,7 +829,7 @@ vmbus_event_flags_proc(struct vmbus_soft chid_base = f << VMBUS_EVTFLAG_SHIFT; while ((chid_ofs = ffsl(flags)) != 0) { - struct hv_vmbus_channel *chan; + struct vmbus_channel *chan; --chid_ofs; /* NOTE: ffsl is 1-based */ flags &= ~(1UL << chid_ofs); @@ -875,7 +875,7 @@ vmbus_event_proc_compat(struct vmbus_sof static void vmbus_chan_update_evtflagcnt(struct vmbus_softc *sc, - const struct hv_vmbus_channel *chan) + const struct vmbus_channel *chan) { volatile int *flag_cnt_ptr; int flag_cnt; @@ -900,10 +900,10 @@ vmbus_chan_update_evtflagcnt(struct vmbu } } -static struct hv_vmbus_channel * +static struct vmbus_channel * vmbus_chan_alloc(struct vmbus_softc *sc) { - struct hv_vmbus_channel *chan; + struct vmbus_channel *chan; chan = malloc(sizeof(*chan), M_DEVBUF, M_WAITOK | M_ZERO); @@ -925,7 +925,7 @@ vmbus_chan_alloc(struct vmbus_softc *sc) } static void -vmbus_chan_free(struct hv_vmbus_channel *chan) +vmbus_chan_free(struct vmbus_channel *chan) { /* TODO: assert sub-channel list is empty */ /* TODO: asset no longer on the primary channel's sub-channel list */ @@ -936,10 +936,10 @@ vmbus_chan_free(struct hv_vmbus_channel } static int -vmbus_chan_add(struct hv_vmbus_channel *newchan) +vmbus_chan_add(struct vmbus_channel *newchan) { struct vmbus_softc *sc = newchan->ch_vmbus; - struct hv_vmbus_channel *prichan; + struct vmbus_channel *prichan; if (newchan->ch_id == 0) { /* @@ -1027,7 +1027,7 @@ vmbus_chan_add(struct hv_vmbus_channel * } void -vmbus_chan_cpu_set(struct hv_vmbus_channel *chan, int cpu) +vmbus_chan_cpu_set(struct vmbus_channel *chan, int cpu) { KASSERT(cpu >= 0 && cpu < mp_ncpus, ("invalid cpu %d", cpu)); @@ -1047,7 +1047,7 @@ vmbus_chan_cpu_set(struct hv_vmbus_chann } void -vmbus_chan_cpu_rr(struct hv_vmbus_channel *chan) +vmbus_chan_cpu_rr(struct vmbus_channel *chan) { static uint32_t vmbus_chan_nextcpu; int cpu; @@ -1057,7 +1057,7 @@ vmbus_chan_cpu_rr(struct hv_vmbus_channe } static void -vmbus_chan_cpu_default(struct hv_vmbus_channel *chan) +vmbus_chan_cpu_default(struct vmbus_channel *chan) { /* * By default, pin the channel to cpu0. Devices having @@ -1072,7 +1072,7 @@ vmbus_chan_msgproc_choffer(struct vmbus_ const struct vmbus_message *msg) { const struct vmbus_chanmsg_choffer *offer; - struct hv_vmbus_channel *chan; + struct vmbus_channel *chan; int error; offer = (const struct vmbus_chanmsg_choffer *)msg->msg_data; @@ -1152,7 +1152,7 @@ vmbus_chan_msgproc_chrescind(struct vmbu const struct vmbus_message *msg) { const struct vmbus_chanmsg_chrescind *note; - struct hv_vmbus_channel *chan; + struct vmbus_channel *chan; note = (const struct vmbus_chanmsg_chrescind *)msg->msg_data; if (note->chm_chanid > VMBUS_CHAN_MAX) { @@ -1177,7 +1177,7 @@ vmbus_chan_msgproc_chrescind(struct vmbu static void vmbus_chan_detach_task(void *xchan, int pending __unused) { - struct hv_vmbus_channel *chan = xchan; + struct vmbus_channel *chan = xchan; if (VMBUS_CHAN_ISPRIMARY(chan)) { /* Only primary channel owns the device */ @@ -1185,7 +1185,7 @@ vmbus_chan_detach_task(void *xchan, int /* NOTE: DO NOT free primary channel for now */ } else { struct vmbus_softc *sc = chan->ch_vmbus; - struct hv_vmbus_channel *pri_chan = chan->ch_prichan; + struct vmbus_channel *pri_chan = chan->ch_prichan; struct vmbus_chanmsg_chfree *req; struct vmbus_msghc *mh; int error; @@ -1235,7 +1235,7 @@ remove: void vmbus_chan_destroy_all(struct vmbus_softc *sc) { - struct hv_vmbus_channel *chan; + struct vmbus_channel *chan; mtx_lock(&sc->vmbus_prichan_lock); while ((chan = TAILQ_FIRST(&sc->vmbus_prichans)) != NULL) { @@ -1249,7 +1249,7 @@ vmbus_chan_destroy_all(struct vmbus_soft mtx_lock(&sc->vmbus_prichan_lock); } bzero(sc->vmbus_chmap, - sizeof(struct hv_vmbus_channel *) * VMBUS_CHAN_MAX); + sizeof(struct vmbus_channel *) * VMBUS_CHAN_MAX); mtx_unlock(&sc->vmbus_prichan_lock); } @@ -1258,10 +1258,10 @@ vmbus_chan_destroy_all(struct vmbus_soft * be selected. * If no multi-channel, always select primary channel. */ -struct hv_vmbus_channel * -vmbus_chan_cpu2chan(struct hv_vmbus_channel *prichan, int cpu) +struct vmbus_channel * +vmbus_chan_cpu2chan(struct vmbus_channel *prichan, int cpu) { - struct hv_vmbus_channel *sel, *chan; + struct vmbus_channel *sel, *chan; uint32_t vcpu, sel_dist; KASSERT(cpu >= 0 && cpu < mp_ncpus, ("invalid cpuid %d", cpu)); @@ -1312,13 +1312,13 @@ do { \ return sel; } -struct hv_vmbus_channel ** -vmbus_subchan_get(struct hv_vmbus_channel *pri_chan, int subchan_cnt) +struct vmbus_channel ** +vmbus_subchan_get(struct vmbus_channel *pri_chan, int subchan_cnt) { - struct hv_vmbus_channel **ret, *chan; + struct vmbus_channel **ret, *chan; int i; - ret = malloc(subchan_cnt * sizeof(struct hv_vmbus_channel *), M_TEMP, + ret = malloc(subchan_cnt * sizeof(struct vmbus_channel *), M_TEMP, M_WAITOK); mtx_lock(&pri_chan->ch_subchan_lock); @@ -1344,14 +1344,14 @@ vmbus_subchan_get(struct hv_vmbus_channe } void -vmbus_subchan_rel(struct hv_vmbus_channel **subchan, int subchan_cnt __unused) +vmbus_subchan_rel(struct vmbus_channel **subchan, int subchan_cnt __unused) { free(subchan, M_TEMP); } void -vmbus_subchan_drain(struct hv_vmbus_channel *pri_chan) +vmbus_subchan_drain(struct vmbus_channel *pri_chan) { mtx_lock(&pri_chan->ch_subchan_lock); while (pri_chan->ch_subchan_cnt > 0) @@ -1375,7 +1375,7 @@ vmbus_chan_msgproc(struct vmbus_softc *s } void -vmbus_chan_set_readbatch(struct hv_vmbus_channel *chan, bool on) +vmbus_chan_set_readbatch(struct vmbus_channel *chan, bool on) { if (!on) chan->ch_flags &= ~VMBUS_CHAN_FLAG_BATCHREAD; @@ -1384,19 +1384,19 @@ vmbus_chan_set_readbatch(struct hv_vmbus } uint32_t -vmbus_chan_id(const struct hv_vmbus_channel *chan) +vmbus_chan_id(const struct vmbus_channel *chan) { return chan->ch_id; } uint32_t -vmbus_chan_subidx(const struct hv_vmbus_channel *chan) +vmbus_chan_subidx(const struct vmbus_channel *chan) { return chan->ch_subidx; } bool -vmbus_chan_is_primary(const struct hv_vmbus_channel *chan) +vmbus_chan_is_primary(const struct vmbus_channel *chan) { if (VMBUS_CHAN_ISPRIMARY(chan)) return true; @@ -1405,7 +1405,7 @@ vmbus_chan_is_primary(const struct hv_vm } const struct hyperv_guid * -vmbus_chan_guid_inst(const struct hv_vmbus_channel *chan) +vmbus_chan_guid_inst(const struct vmbus_channel *chan) { return &chan->ch_guid_inst; } Modified: head/sys/dev/hyperv/vmbus/vmbus_chanvar.h ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_chanvar.h Thu Jul 21 06:06:11 2016 (r303130) +++ head/sys/dev/hyperv/vmbus/vmbus_chanvar.h Thu Jul 21 06:09:47 2016 (r303131) @@ -70,7 +70,7 @@ typedef struct { uint32_t ring_data_size; /* ring_size */ } hv_vmbus_ring_buffer_info; -typedef struct hv_vmbus_channel { +struct vmbus_channel { /* * NOTE: * Fields before ch_txbr are only accessed on this channel's @@ -142,19 +142,19 @@ typedef struct hv_vmbus_channel { * channel. */ struct mtx ch_subchan_lock; - TAILQ_HEAD(, hv_vmbus_channel) ch_subchans; + TAILQ_HEAD(, vmbus_channel) ch_subchans; int ch_subchan_cnt; /* If this is a sub-channel */ - TAILQ_ENTRY(hv_vmbus_channel) ch_sublink; /* sub-channel link */ - struct hv_vmbus_channel *ch_prichan; /* owner primary chan */ + TAILQ_ENTRY(vmbus_channel) ch_sublink; /* sub-channel link */ + struct vmbus_channel *ch_prichan; /* owner primary chan */ void *ch_bufring; /* TX+RX bufrings */ struct hyperv_dma ch_bufring_dma; uint32_t ch_bufring_gpadl; struct task ch_detach_task; - TAILQ_ENTRY(hv_vmbus_channel) ch_prilink; /* primary chan link */ + TAILQ_ENTRY(vmbus_channel) ch_prilink; /* primary chan link */ uint32_t ch_subidx; /* subchan index */ volatile uint32_t ch_stflags; /* atomic-op */ /* VMBUS_CHAN_ST_ */ @@ -162,7 +162,7 @@ typedef struct hv_vmbus_channel { struct hyperv_guid ch_guid_inst; struct sysctl_ctx_list ch_sysctl_ctx; -} hv_vmbus_channel __aligned(CACHE_LINE_SIZE); +} __aligned(CACHE_LINE_SIZE); #define VMBUS_CHAN_ISPRIMARY(chan) ((chan)->ch_subidx == 0) Modified: head/sys/dev/hyperv/vmbus/vmbus_var.h ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_var.h Thu Jul 21 06:06:11 2016 (r303130) +++ head/sys/dev/hyperv/vmbus/vmbus_var.h Thu Jul 21 06:09:47 2016 (r303131) @@ -86,7 +86,7 @@ struct vmbus_softc { u_long *vmbus_rx_evtflags; /* compat evtflgs from host */ - struct hv_vmbus_channel **vmbus_chmap; + struct vmbus_channel **vmbus_chmap; struct vmbus_msghc_ctx *vmbus_msg_hc; struct vmbus_pcpu_data vmbus_pcpu[MAXCPU]; @@ -115,7 +115,7 @@ struct vmbus_softc { /* Primary channels */ struct mtx vmbus_prichan_lock; - TAILQ_HEAD(, hv_vmbus_channel) vmbus_prichans; + TAILQ_HEAD(, vmbus_channel) vmbus_prichans; }; #define VMBUS_FLAG_ATTACHED 0x0001 /* vmbus was attached */ @@ -138,14 +138,14 @@ vmbus_get_device(void) #define VMBUS_PCPU_GET(sc, field, cpu) (sc)->vmbus_pcpu[(cpu)].field #define VMBUS_PCPU_PTR(sc, field, cpu) &(sc)->vmbus_pcpu[(cpu)].field -struct hv_vmbus_channel; +struct vmbus_channel; struct trapframe; struct vmbus_message; struct vmbus_msghc; void vmbus_handle_intr(struct trapframe *); -int vmbus_add_child(struct hv_vmbus_channel *); -int vmbus_delete_child(struct hv_vmbus_channel *); +int vmbus_add_child(struct vmbus_channel *); +int vmbus_delete_child(struct vmbus_channel *); void vmbus_et_intr(struct trapframe *); uint32_t vmbus_gpadl_alloc(struct vmbus_softc *);