hyperv/vmbus: Revoke unnecessary exposure of vmbus softc

MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7348
This commit is contained in:
Sepherosa Ziehau 2016-07-29 06:10:27 +00:00
parent fd42dfc550
commit c0c9089709
2 changed files with 7 additions and 15 deletions

View File

@ -125,7 +125,7 @@ static void vmbus_msghc_free(struct vmbus_msghc *);
static struct vmbus_msghc *vmbus_msghc_get1(struct vmbus_msghc_ctx *,
uint32_t);
struct vmbus_softc *vmbus_sc;
static struct vmbus_softc *vmbus_sc;
extern inthand_t IDTVEC(vmbus_isr);
@ -176,6 +176,12 @@ DRIVER_MODULE(vmbus, acpi, vmbus_driver, vmbus_devclass, NULL, NULL);
MODULE_DEPEND(vmbus, acpi, 1, 1, 1);
MODULE_VERSION(vmbus, 1);
static __inline struct vmbus_softc *
vmbus_get_softc(void)
{
return vmbus_sc;
}
static struct vmbus_msghc *
vmbus_msghc_alloc(bus_dma_tag_t parent_dtag)
{

View File

@ -120,20 +120,6 @@ struct vmbus_softc {
#define VMBUS_FLAG_ATTACHED 0x0001 /* vmbus was attached */
#define VMBUS_FLAG_SYNIC 0x0002 /* SynIC was setup */
extern struct vmbus_softc *vmbus_sc;
static __inline struct vmbus_softc *
vmbus_get_softc(void)
{
return vmbus_sc;
}
static __inline device_t
vmbus_get_device(void)
{
return vmbus_sc->vmbus_dev;
}
#define VMBUS_PCPU_GET(sc, field, cpu) (sc)->vmbus_pcpu[(cpu)].field
#define VMBUS_PCPU_PTR(sc, field, cpu) &(sc)->vmbus_pcpu[(cpu)].field