Deleted Added
full compact
busdma_machdep-v4.c (257203) busdma_machdep-v4.c (257228)
1/*-
2 * Copyright (c) 2012 Ian Lepore
3 * Copyright (c) 2004 Olivier Houchard
4 * Copyright (c) 2002 Peter Grehan
5 * Copyright (c) 1997, 1998 Justin T. Gibbs.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * From i386/busdma_machdep.c,v 1.26 2002/04/19 22:58:09 alfred
30 */
31
32#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2012 Ian Lepore
3 * Copyright (c) 2004 Olivier Houchard
4 * Copyright (c) 2002 Peter Grehan
5 * Copyright (c) 1997, 1998 Justin T. Gibbs.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * From i386/busdma_machdep.c,v 1.26 2002/04/19 22:58:09 alfred
30 */
31
32#include <sys/cdefs.h>
33__FBSDID("$FreeBSD: head/sys/arm/arm/busdma_machdep.c 257203 2013-10-27 03:29:38Z ian $");
33__FBSDID("$FreeBSD: head/sys/arm/arm/busdma_machdep.c 257228 2013-10-27 21:39:16Z kib $");
34
35/*
36 * ARM bus dma support routines.
37 *
38 * XXX Things to investigate / fix some day...
39 * - What is the earliest that this API can be called? Could there be any
40 * fallout from changing the SYSINIT() order from SI_SUB_VM to SI_SUB_KMEM?
41 * - The manpage mentions the BUS_DMA_NOWAIT flag only in the context of the

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

987 * Did we fit?
988 */
989 if (buflen != 0) {
990 _bus_dmamap_unload(dmat, map);
991 return (EFBIG); /* XXX better return value here? */
992 }
993 return (0);
994}
34
35/*
36 * ARM bus dma support routines.
37 *
38 * XXX Things to investigate / fix some day...
39 * - What is the earliest that this API can be called? Could there be any
40 * fallout from changing the SYSINIT() order from SI_SUB_VM to SI_SUB_KMEM?
41 * - The manpage mentions the BUS_DMA_NOWAIT flag only in the context of the

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

987 * Did we fit?
988 */
989 if (buflen != 0) {
990 _bus_dmamap_unload(dmat, map);
991 return (EFBIG); /* XXX better return value here? */
992 }
993 return (0);
994}
995
996int
997_bus_dmamap_load_ma(bus_dma_tag_t dmat, bus_dmamap_t map,
998 struct vm_page **ma, bus_size_t tlen, int ma_offs, int flags,
999 bus_dma_segment_t *segs, int *segp)
1000{
1001
1002 return (bus_dmamap_load_ma_triv(dmat, map, ma, tlen, ma_offs, flags,
1003 segs, segp));
1004}
1005
995/*
996 * Utility function to load a linear buffer. segp contains
997 * the starting segment on entrance, and the ending segment on exit.
998 */
999int
1000_bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf,
1001 bus_size_t buflen, struct pmap *pmap, int flags, bus_dma_segment_t *segs,
1002 int *segp)

--- 495 unchanged lines hidden ---
1006/*
1007 * Utility function to load a linear buffer. segp contains
1008 * the starting segment on entrance, and the ending segment on exit.
1009 */
1010int
1011_bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf,
1012 bus_size_t buflen, struct pmap *pmap, int flags, bus_dma_segment_t *segs,
1013 int *segp)

--- 495 unchanged lines hidden ---