Deleted Added
full compact
busdma_machdep-v4.c (257201) busdma_machdep-v4.c (257203)
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 257201 2013-10-27 03:13:26Z ian $");
33__FBSDID("$FreeBSD: head/sys/arm/arm/busdma_machdep.c 257203 2013-10-27 03:29:38Z ian $");
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

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

802
803static void
804_bus_dmamap_count_phys(bus_dma_tag_t dmat, bus_dmamap_t map, vm_paddr_t buf,
805 bus_size_t buflen, int flags)
806{
807 bus_addr_t curaddr;
808 bus_size_t sgsize;
809
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

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

802
803static void
804_bus_dmamap_count_phys(bus_dma_tag_t dmat, bus_dmamap_t map, vm_paddr_t buf,
805 bus_size_t buflen, int flags)
806{
807 bus_addr_t curaddr;
808 bus_size_t sgsize;
809
810 if ((map->pagesneeded == 0)) {
810 if (map->pagesneeded == 0) {
811 CTR3(KTR_BUSDMA, "lowaddr= %d, boundary= %d, alignment= %d",
812 dmat->lowaddr, dmat->boundary, dmat->alignment);
813 CTR2(KTR_BUSDMA, "map= %p, pagesneeded= %d",
814 map, map->pagesneeded);
815 /*
816 * Count the number of bounce pages
817 * needed in order to complete this transfer
818 */

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

833static void
834_bus_dmamap_count_pages(bus_dma_tag_t dmat, bus_dmamap_t map, pmap_t pmap,
835 void *buf, bus_size_t buflen, int flags)
836{
837 vm_offset_t vaddr;
838 vm_offset_t vendaddr;
839 bus_addr_t paddr;
840
811 CTR3(KTR_BUSDMA, "lowaddr= %d, boundary= %d, alignment= %d",
812 dmat->lowaddr, dmat->boundary, dmat->alignment);
813 CTR2(KTR_BUSDMA, "map= %p, pagesneeded= %d",
814 map, map->pagesneeded);
815 /*
816 * Count the number of bounce pages
817 * needed in order to complete this transfer
818 */

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

833static void
834_bus_dmamap_count_pages(bus_dma_tag_t dmat, bus_dmamap_t map, pmap_t pmap,
835 void *buf, bus_size_t buflen, int flags)
836{
837 vm_offset_t vaddr;
838 vm_offset_t vendaddr;
839 bus_addr_t paddr;
840
841 if ((map->pagesneeded == 0)) {
841 if (map->pagesneeded == 0) {
842 CTR3(KTR_BUSDMA, "lowaddr= %d, boundary= %d, alignment= %d",
843 dmat->lowaddr, dmat->boundary, dmat->alignment);
844 CTR2(KTR_BUSDMA, "map= %p, pagesneeded= %d",
845 map, map->pagesneeded);
846 /*
847 * Count the number of bounce pages
848 * needed in order to complete this transfer
849 */

--- 648 unchanged lines hidden ---
842 CTR3(KTR_BUSDMA, "lowaddr= %d, boundary= %d, alignment= %d",
843 dmat->lowaddr, dmat->boundary, dmat->alignment);
844 CTR2(KTR_BUSDMA, "map= %p, pagesneeded= %d",
845 map, map->pagesneeded);
846 /*
847 * Count the number of bounce pages
848 * needed in order to complete this transfer
849 */

--- 648 unchanged lines hidden ---