hyperv/vmbus: Forward declare static functions

MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7346
This commit is contained in:
Sepherosa Ziehau 2016-07-29 05:49:12 +00:00
parent 8018156f90
commit 5b444edabc
5 changed files with 59 additions and 15 deletions

View File

@ -67,13 +67,15 @@ struct hypercall_ctx {
struct hyperv_dma hc_dma;
};
static u_int hyperv_get_timecount(struct timecounter *tc);
static u_int hyperv_get_timecount(struct timecounter *);
static bool hyperv_identify(void);
static void hypercall_memfree(void);
u_int hyperv_features;
u_int hyperv_recommends;
u_int hyperv_features;
u_int hyperv_recommends;
static u_int hyperv_pm_features;
static u_int hyperv_features3;
static u_int hyperv_pm_features;
static u_int hyperv_features3;
static struct timecounter hyperv_timecounter = {
.tc_get_timecount = hyperv_get_timecount,

View File

@ -81,6 +81,17 @@ struct vmbus_msghc_ctx {
#define VMBUS_MSGHC_CTXF_DESTROY 0x0001
static int vmbus_probe(device_t);
static int vmbus_attach(device_t);
static int vmbus_detach(device_t);
static int vmbus_read_ivar(device_t, device_t, int,
uintptr_t *);
static int vmbus_child_pnpinfo_str(device_t, device_t,
char *, size_t);
static uint32_t vmbus_get_version_method(device_t, device_t);
static int vmbus_probe_guid_method(device_t, device_t,
const struct hyperv_guid *);
static int vmbus_init(struct vmbus_softc *);
static int vmbus_connect(struct vmbus_softc *, uint32_t);
static int vmbus_req_channels(struct vmbus_softc *sc);
@ -93,8 +104,17 @@ static void vmbus_scan_done(struct vmbus_softc *,
const struct vmbus_message *);
static void vmbus_chanmsg_handle(struct vmbus_softc *,
const struct vmbus_message *);
static void vmbus_msg_task(void *, int);
static void vmbus_synic_setup(void *);
static void vmbus_synic_teardown(void *);
static int vmbus_sysctl_version(SYSCTL_HANDLER_ARGS);
static int vmbus_dma_alloc(struct vmbus_softc *);
static void vmbus_dma_free(struct vmbus_softc *);
static int vmbus_intr_setup(struct vmbus_softc *);
static void vmbus_intr_teardown(struct vmbus_softc *);
static int vmbus_doattach(struct vmbus_softc *);
static void vmbus_event_proc_dummy(struct vmbus_softc *,
int);
static struct vmbus_msghc_ctx *vmbus_msghc_ctx_create(bus_dma_tag_t);
static void vmbus_msghc_ctx_destroy(

View File

@ -41,6 +41,10 @@
/* Increase bufing index */
#define VMBUS_BR_IDXINC(idx, inc, sz) (((idx) + (inc)) % (sz))
static int vmbus_br_sysctl_state(SYSCTL_HANDLER_ARGS);
static int vmbus_br_sysctl_state_bin(SYSCTL_HANDLER_ARGS);
static void vmbus_br_setup(struct vmbus_br *, void *, int);
static int
vmbus_br_sysctl_state(SYSCTL_HANDLER_ARGS)
{

View File

@ -47,17 +47,28 @@ __FBSDID("$FreeBSD$");
#include <dev/hyperv/vmbus/vmbus_brvar.h>
#include <dev/hyperv/vmbus/vmbus_chanvar.h>
static void vmbus_chan_update_evtflagcnt(struct vmbus_softc *,
const struct vmbus_channel *);
static void vmbus_chan_update_evtflagcnt(
struct vmbus_softc *,
const struct vmbus_channel *);
static void vmbus_chan_close_internal(
struct vmbus_channel *);
static int vmbus_chan_sysctl_mnf(SYSCTL_HANDLER_ARGS);
static void vmbus_chan_sysctl_create(
struct vmbus_channel *);
static struct vmbus_channel *vmbus_chan_alloc(struct vmbus_softc *);
static void vmbus_chan_free(struct vmbus_channel *);
static int vmbus_chan_add(struct vmbus_channel *);
static void vmbus_chan_cpu_default(struct vmbus_channel *);
static void vmbus_chan_task(void *, int);
static void vmbus_chan_task_nobatch(void *, int);
static void vmbus_chan_detach_task(void *, int);
static void vmbus_chan_task(void *, int);
static void vmbus_chan_task_nobatch(void *, int);
static void vmbus_chan_detach_task(void *, int);
static void vmbus_chan_msgproc_choffer(struct vmbus_softc *,
const struct vmbus_message *);
static void vmbus_chan_msgproc_chrescind(struct vmbus_softc *,
const struct vmbus_message *);
static void vmbus_chan_msgproc_choffer(struct vmbus_softc *,
const struct vmbus_message *);
static void vmbus_chan_msgproc_chrescind(
struct vmbus_softc *,
const struct vmbus_message *);
/*
* Vmbus channel message processing.

View File

@ -56,6 +56,13 @@ __FBSDID("$FreeBSD$");
CPUID_HV_MSR_SYNIC | \
CPUID_HV_MSR_SYNTIMER)
static void vmbus_et_identify(driver_t *, device_t);
static int vmbus_et_probe(device_t);
static int vmbus_et_attach(device_t);
static int vmbus_et_detach(device_t);
static int vmbus_et_start(struct eventtimer *, sbintime_t,
sbintime_t);
static struct eventtimer vmbus_et;
static __inline uint64_t