Deleted Added
full compact
vmbus.c (301583) vmbus.c (301588)
1/*-
2 * Copyright (c) 2009-2012,2016 Microsoft Corp.
3 * Copyright (c) 2012 NetApp Inc.
4 * Copyright (c) 2012 Citrix Inc.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 16 unchanged lines hidden (view full) ---

25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29/*
30 * VM Bus Driver Implementation
31 */
32#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2009-2012,2016 Microsoft Corp.
3 * Copyright (c) 2012 NetApp Inc.
4 * Copyright (c) 2012 Citrix Inc.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 16 unchanged lines hidden (view full) ---

25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29/*
30 * VM Bus Driver Implementation
31 */
32#include <sys/cdefs.h>
33__FBSDID("$FreeBSD: head/sys/dev/hyperv/vmbus/vmbus.c 301583 2016-06-08 05:34:22Z sephe $");
33__FBSDID("$FreeBSD: head/sys/dev/hyperv/vmbus/vmbus.c 301588 2016-06-08 07:47:21Z sephe $");
34
35#include <sys/param.h>
36#include <sys/bus.h>
37#include <sys/kernel.h>
38#include <sys/lock.h>
39#include <sys/malloc.h>
40#include <sys/module.h>
41#include <sys/proc.h>

--- 293 unchanged lines hidden (view full) ---

335 VMBUS_PCPU_GET(sc, event_flags, cpu) = ptr;
336 }
337
338 evtflags = hyperv_dmamem_alloc(parent_dtag, PAGE_SIZE, 0,
339 PAGE_SIZE, &sc->vmbus_evtflags_dma, BUS_DMA_WAITOK | BUS_DMA_ZERO);
340 if (evtflags == NULL)
341 return ENOMEM;
342 sc->vmbus_rx_evtflags = (u_long *)evtflags;
34
35#include <sys/param.h>
36#include <sys/bus.h>
37#include <sys/kernel.h>
38#include <sys/lock.h>
39#include <sys/malloc.h>
40#include <sys/module.h>
41#include <sys/proc.h>

--- 293 unchanged lines hidden (view full) ---

335 VMBUS_PCPU_GET(sc, event_flags, cpu) = ptr;
336 }
337
338 evtflags = hyperv_dmamem_alloc(parent_dtag, PAGE_SIZE, 0,
339 PAGE_SIZE, &sc->vmbus_evtflags_dma, BUS_DMA_WAITOK | BUS_DMA_ZERO);
340 if (evtflags == NULL)
341 return ENOMEM;
342 sc->vmbus_rx_evtflags = (u_long *)evtflags;
343 sc->vmbus_tx_evtflags = evtflags + (PAGE_SIZE / 2);
343 sc->vmbus_tx_evtflags = (u_long *)(evtflags + (PAGE_SIZE / 2));
344 sc->vmbus_evtflags = evtflags;
345
346 sc->vmbus_mnf1 = hyperv_dmamem_alloc(parent_dtag, PAGE_SIZE, 0,
347 PAGE_SIZE, &sc->vmbus_mnf1_dma, BUS_DMA_WAITOK | BUS_DMA_ZERO);
348 if (sc->vmbus_mnf1 == NULL)
349 return ENOMEM;
350
351 sc->vmbus_mnf2 = hyperv_dmamem_alloc(parent_dtag, PAGE_SIZE, 0,

--- 430 unchanged lines hidden ---
344 sc->vmbus_evtflags = evtflags;
345
346 sc->vmbus_mnf1 = hyperv_dmamem_alloc(parent_dtag, PAGE_SIZE, 0,
347 PAGE_SIZE, &sc->vmbus_mnf1_dma, BUS_DMA_WAITOK | BUS_DMA_ZERO);
348 if (sc->vmbus_mnf1 == NULL)
349 return ENOMEM;
350
351 sc->vmbus_mnf2 = hyperv_dmamem_alloc(parent_dtag, PAGE_SIZE, 0,

--- 430 unchanged lines hidden ---