From owner-svn-src-head@freebsd.org Fri Sep 23 12:38:08 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31069BE6EE9; Fri, 23 Sep 2016 12:38:08 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 01822AA6; Fri, 23 Sep 2016 12:38:07 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8NCc7c5048293; Fri, 23 Sep 2016 12:38:07 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8NCc5gk048275; Fri, 23 Sep 2016 12:38:05 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201609231238.u8NCc5gk048275@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 23 Sep 2016 12:38:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r306262 - in head/sys/arm: allwinner altera/socfpga amlogic/aml8726 annapurna/alpine arm broadcom/bcm2835 freescale/imx freescale/vybrid include mv nvidia/tegra124 qemu rockchip samsung... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2016 12:38:08 -0000 Author: andrew Date: Fri Sep 23 12:38:05 2016 New Revision: 306262 URL: https://svnweb.freebsd.org/changeset/base/306262 Log: Remove bus_dma_get_range and bus_dma_get_range_nb on armv6. We only need this on a few earlier arm SoCs. Reviewed by: manu (earlier version) Sponsored by: ABT Systems Ltd Modified: head/sys/arm/allwinner/aw_machdep.c head/sys/arm/altera/socfpga/socfpga_machdep.c head/sys/arm/amlogic/aml8726/aml8726_machdep.c head/sys/arm/annapurna/alpine/alpine_machdep.c head/sys/arm/arm/busdma_machdep-v6.c head/sys/arm/arm/platform.c head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c head/sys/arm/freescale/imx/imx_machdep.c head/sys/arm/freescale/vybrid/vf_machdep.c head/sys/arm/include/bus_dma.h head/sys/arm/mv/mv_machdep.c head/sys/arm/nvidia/tegra124/tegra124_machdep.c head/sys/arm/qemu/virt_machdep.c head/sys/arm/rockchip/rk30xx_machdep.c head/sys/arm/samsung/exynos/exynos5_machdep.c head/sys/arm/ti/ti_machdep.c head/sys/arm/versatile/versatile_machdep.c head/sys/arm/xilinx/zy7_machdep.c Modified: head/sys/arm/allwinner/aw_machdep.c ============================================================================== --- head/sys/arm/allwinner/aw_machdep.c Fri Sep 23 12:34:54 2016 (r306261) +++ head/sys/arm/allwinner/aw_machdep.c Fri Sep 23 12:38:05 2016 (r306262) @@ -36,7 +36,6 @@ #include __FBSDID("$FreeBSD$"); -#define _ARM32_BUS_DMA_PRIVATE #include #include #include @@ -147,18 +146,6 @@ allwinner_devmap_init(platform_t plat) return (0); } -struct arm32_dma_range * -bus_dma_get_range(void) -{ - return (NULL); -} - -int -bus_dma_get_range_nb(void) -{ - return (0); -} - void cpu_reset() { Modified: head/sys/arm/altera/socfpga/socfpga_machdep.c ============================================================================== --- head/sys/arm/altera/socfpga/socfpga_machdep.c Fri Sep 23 12:34:54 2016 (r306261) +++ head/sys/arm/altera/socfpga/socfpga_machdep.c Fri Sep 23 12:38:05 2016 (r306262) @@ -34,7 +34,6 @@ #include __FBSDID("$FreeBSD$"); -#define _ARM32_BUS_DMA_PRIVATE #include #include #include @@ -100,17 +99,3 @@ platform_devmap_init(void) return (0); } - -struct arm32_dma_range * -bus_dma_get_range(void) -{ - - return (NULL); -} - -int -bus_dma_get_range_nb(void) -{ - - return (0); -} Modified: head/sys/arm/amlogic/aml8726/aml8726_machdep.c ============================================================================== --- head/sys/arm/amlogic/aml8726/aml8726_machdep.c Fri Sep 23 12:34:54 2016 (r306261) +++ head/sys/arm/amlogic/aml8726/aml8726_machdep.c Fri Sep 23 12:38:05 2016 (r306262) @@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$"); #include "opt_platform.h" -#define _ARM32_BUS_DMA_PRIVATE #include #include #include @@ -166,20 +165,6 @@ platform_devmap_init(void) return (0); } -struct arm32_dma_range * -bus_dma_get_range(void) -{ - - return (NULL); -} - -int -bus_dma_get_range_nb(void) -{ - - return (0); -} - struct fdt_fixup_entry fdt_fixup_table[] = { { NULL, NULL } }; Modified: head/sys/arm/annapurna/alpine/alpine_machdep.c ============================================================================== --- head/sys/arm/annapurna/alpine/alpine_machdep.c Fri Sep 23 12:34:54 2016 (r306261) +++ head/sys/arm/annapurna/alpine/alpine_machdep.c Fri Sep 23 12:38:05 2016 (r306262) @@ -29,7 +29,6 @@ #include __FBSDID("$FreeBSD$"); -#define _ARM32_BUS_DMA_PRIVATE #include #include #include @@ -92,17 +91,3 @@ platform_devmap_init(void) devmap_add_entry(al_devmap_pa, al_devmap_size); return (0); } - -struct arm32_dma_range * -bus_dma_get_range(void) -{ - - return (NULL); -} - -int -bus_dma_get_range_nb(void) -{ - - return (0); -} Modified: head/sys/arm/arm/busdma_machdep-v6.c ============================================================================== --- head/sys/arm/arm/busdma_machdep-v6.c Fri Sep 23 12:34:54 2016 (r306261) +++ head/sys/arm/arm/busdma_machdep-v6.c Fri Sep 23 12:38:05 2016 (r306262) @@ -33,7 +33,6 @@ #include __FBSDID("$FreeBSD$"); -#define _ARM32_BUS_DMA_PRIVATE #include #include #include @@ -95,14 +94,6 @@ struct bus_dma_tag { bus_dma_lock_t *lockfunc; void *lockfuncarg; struct bounce_zone *bounce_zone; - /* - * DMA range for this tag. If the page doesn't fall within - * one of these ranges, an error is returned. The caller - * may then decide what to do with the transfer. If the - * range pointer is NULL, it is ignored. - */ - struct arm32_dma_range *ranges; - int _nranges; }; struct bounce_page { @@ -407,22 +398,6 @@ must_bounce(bus_dma_tag_t dmat, bus_dmam return (0); } -static __inline struct arm32_dma_range * -_bus_dma_inrange(struct arm32_dma_range *ranges, int nranges, - bus_addr_t curaddr) -{ - struct arm32_dma_range *dr; - int i; - - for (i = 0, dr = ranges; i < nranges; i++, dr++) { - if (curaddr >= dr->dr_sysbase && - round_page(curaddr) <= (dr->dr_sysbase + dr->dr_len)) - return (dr); - } - - return (NULL); -} - /* * Convenience function for manipulating driver locks from busdma (during * busdma_swi, for example). Drivers that don't provide their own locks @@ -507,8 +482,6 @@ bus_dma_tag_create(bus_dma_tag_t parent, newtag->flags = flags; newtag->ref_count = 1; /* Count ourself */ newtag->map_count = 0; - newtag->ranges = bus_dma_get_range(); - newtag->_nranges = bus_dma_get_range_nb(); if (lockfunc != NULL) { newtag->lockfunc = lockfunc; newtag->lockfuncarg = lockfuncarg; @@ -992,22 +965,6 @@ _bus_dmamap_addseg(bus_dma_tag_t dmat, b sgsize = (baddr - curaddr); } - if (dmat->ranges) { - struct arm32_dma_range *dr; - - dr = _bus_dma_inrange(dmat->ranges, dmat->_nranges, - curaddr); - if (dr == NULL) { - _bus_dmamap_unload(dmat, map); - return (0); - } - /* - * In a valid DMA range. Translate the physical - * memory address to an address in the DMA window. - */ - curaddr = (curaddr - dr->dr_sysbase) + dr->dr_busbase; - } - /* * Insert chunk into a segment, coalescing with * previous segment if possible. Modified: head/sys/arm/arm/platform.c ============================================================================== --- head/sys/arm/arm/platform.c Fri Sep 23 12:34:54 2016 (r306261) +++ head/sys/arm/arm/platform.c Fri Sep 23 12:38:05 2016 (r306262) @@ -34,7 +34,6 @@ __FBSDID("$FreeBSD$"); * through a previously registered kernel object. */ -#define _ARM32_BUS_DMA_PRIVATE #include #include #include Modified: head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Fri Sep 23 12:34:54 2016 (r306261) +++ head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Fri Sep 23 12:38:05 2016 (r306262) @@ -42,7 +42,6 @@ #include __FBSDID("$FreeBSD$"); -#define _ARM32_BUS_DMA_PRIVATE #include #include #include @@ -113,19 +112,7 @@ bcm2836_devmap_init(platform_t plat) } #endif -struct arm32_dma_range * -bus_dma_get_range(void) -{ - - return (NULL); -} -int -bus_dma_get_range_nb(void) -{ - - return (0); -} void cpu_reset() Modified: head/sys/arm/freescale/imx/imx_machdep.c ============================================================================== --- head/sys/arm/freescale/imx/imx_machdep.c Fri Sep 23 12:34:54 2016 (r306261) +++ head/sys/arm/freescale/imx/imx_machdep.c Fri Sep 23 12:38:05 2016 (r306262) @@ -29,7 +29,6 @@ #include __FBSDID("$FreeBSD$"); -#define _ARM32_BUS_DMA_PRIVATE #include #include #include @@ -54,20 +53,6 @@ SYSCTL_UINT(_hw_imx, OID_AUTO, last_rese SYSCTL_STRING(_hw_imx, OID_AUTO, last_reset_reason, CTLFLAG_RD, "unknown", 0, "Last reset reason"); -struct arm32_dma_range * -bus_dma_get_range(void) -{ - - return (NULL); -} - -int -bus_dma_get_range_nb(void) -{ - - return (0); -} - /* * This code which manipulates the watchdog hardware is here to implement * cpu_reset() because the watchdog is the only way for software to reset the Modified: head/sys/arm/freescale/vybrid/vf_machdep.c ============================================================================== --- head/sys/arm/freescale/vybrid/vf_machdep.c Fri Sep 23 12:34:54 2016 (r306261) +++ head/sys/arm/freescale/vybrid/vf_machdep.c Fri Sep 23 12:38:05 2016 (r306262) @@ -30,7 +30,6 @@ #include __FBSDID("$FreeBSD$"); -#define _ARM32_BUS_DMA_PRIVATE #include #include #include @@ -78,17 +77,3 @@ platform_devmap_init(void) return (0); } - -struct arm32_dma_range * -bus_dma_get_range(void) -{ - - return (NULL); -} - -int -bus_dma_get_range_nb(void) -{ - - return (0); -} Modified: head/sys/arm/include/bus_dma.h ============================================================================== --- head/sys/arm/include/bus_dma.h Fri Sep 23 12:34:54 2016 (r306261) +++ head/sys/arm/include/bus_dma.h Fri Sep 23 12:38:05 2016 (r306262) @@ -72,7 +72,7 @@ #define BUS_DMA_TAG_VALID(t) ((t) != (bus_dma_tag_t)0) -#ifdef _ARM32_BUS_DMA_PRIVATE +#if defined(_ARM32_BUS_DMA_PRIVATE) && __ARM_ARCH < 6 /* * arm32_dma_range * Modified: head/sys/arm/mv/mv_machdep.c ============================================================================== --- head/sys/arm/mv/mv_machdep.c Fri Sep 23 12:34:54 2016 (r306261) +++ head/sys/arm/mv/mv_machdep.c Fri Sep 23 12:38:05 2016 (r306262) @@ -432,6 +432,7 @@ platform_devmap_init(void) return (0); } +#if __ARM_ARCH < 6 struct arm32_dma_range * bus_dma_get_range(void) { @@ -445,6 +446,7 @@ bus_dma_get_range_nb(void) return (0); } +#endif #if defined(CPU_MV_PJ4B) #ifdef DDB Modified: head/sys/arm/nvidia/tegra124/tegra124_machdep.c ============================================================================== --- head/sys/arm/nvidia/tegra124/tegra124_machdep.c Fri Sep 23 12:34:54 2016 (r306261) +++ head/sys/arm/nvidia/tegra124/tegra124_machdep.c Fri Sep 23 12:38:05 2016 (r306262) @@ -24,7 +24,6 @@ * SUCH DAMAGE. */ -#define _ARM32_BUS_DMA_PRIVATE #include "opt_platform.h" #include @@ -66,20 +65,6 @@ struct fdt_fixup_entry fdt_fixup_table[] { NULL, NULL } }; -struct arm32_dma_range * -bus_dma_get_range(void) -{ - - return (NULL); -} - -int -bus_dma_get_range_nb(void) -{ - - return (0); -} - static vm_offset_t tegra124_lastaddr(platform_t plat) { Modified: head/sys/arm/qemu/virt_machdep.c ============================================================================== --- head/sys/arm/qemu/virt_machdep.c Fri Sep 23 12:34:54 2016 (r306261) +++ head/sys/arm/qemu/virt_machdep.c Fri Sep 23 12:38:05 2016 (r306262) @@ -30,7 +30,6 @@ #include __FBSDID("$FreeBSD$"); -#define _ARM32_BUS_DMA_PRIVATE #include #include #include @@ -45,20 +44,6 @@ __FBSDID("$FreeBSD$"); #include "platform_if.h" -struct arm32_dma_range * -bus_dma_get_range(void) -{ - - return (NULL); -} - -int -bus_dma_get_range_nb(void) -{ - - return (0); -} - void cpu_reset(void) { Modified: head/sys/arm/rockchip/rk30xx_machdep.c ============================================================================== --- head/sys/arm/rockchip/rk30xx_machdep.c Fri Sep 23 12:34:54 2016 (r306261) +++ head/sys/arm/rockchip/rk30xx_machdep.c Fri Sep 23 12:38:05 2016 (r306262) @@ -34,7 +34,6 @@ #include __FBSDID("$FreeBSD$"); -#define _ARM32_BUS_DMA_PRIVATE #include #include #include @@ -92,20 +91,6 @@ platform_devmap_init(void) return (0); } -struct arm32_dma_range * -bus_dma_get_range(void) -{ - - return (NULL); -} - -int -bus_dma_get_range_nb(void) -{ - - return (0); -} - void cpu_reset() { Modified: head/sys/arm/samsung/exynos/exynos5_machdep.c ============================================================================== --- head/sys/arm/samsung/exynos/exynos5_machdep.c Fri Sep 23 12:34:54 2016 (r306261) +++ head/sys/arm/samsung/exynos/exynos5_machdep.c Fri Sep 23 12:38:05 2016 (r306262) @@ -30,7 +30,6 @@ #include __FBSDID("$FreeBSD$"); -#define _ARM32_BUS_DMA_PRIVATE #include #include #include @@ -83,17 +82,3 @@ platform_devmap_init(void) return (0); } - -struct arm32_dma_range * -bus_dma_get_range(void) -{ - - return (NULL); -} - -int -bus_dma_get_range_nb(void) -{ - - return (0); -} Modified: head/sys/arm/ti/ti_machdep.c ============================================================================== --- head/sys/arm/ti/ti_machdep.c Fri Sep 23 12:34:54 2016 (r306261) +++ head/sys/arm/ti/ti_machdep.c Fri Sep 23 12:38:05 2016 (r306262) @@ -40,7 +40,6 @@ #include __FBSDID("$FreeBSD$"); -#define _ARM32_BUS_DMA_PRIVATE #include #include #include @@ -96,20 +95,6 @@ ti_am335x_devmap_init(platform_t plat) } #endif -struct arm32_dma_range * -bus_dma_get_range(void) -{ - - return (NULL); -} - -int -bus_dma_get_range_nb(void) -{ - - return (0); -} - void cpu_reset() { Modified: head/sys/arm/versatile/versatile_machdep.c ============================================================================== --- head/sys/arm/versatile/versatile_machdep.c Fri Sep 23 12:34:54 2016 (r306261) +++ head/sys/arm/versatile/versatile_machdep.c Fri Sep 23 12:38:05 2016 (r306262) @@ -39,7 +39,6 @@ #include __FBSDID("$FreeBSD$"); -#define _ARM32_BUS_DMA_PRIVATE #include #include #include @@ -102,20 +101,6 @@ platform_devmap_init(void) return (0); } -struct arm32_dma_range * -bus_dma_get_range(void) -{ - - return (NULL); -} - -int -bus_dma_get_range_nb(void) -{ - - return (0); -} - void cpu_reset() { Modified: head/sys/arm/xilinx/zy7_machdep.c ============================================================================== --- head/sys/arm/xilinx/zy7_machdep.c Fri Sep 23 12:34:54 2016 (r306261) +++ head/sys/arm/xilinx/zy7_machdep.c Fri Sep 23 12:38:05 2016 (r306262) @@ -36,7 +36,6 @@ #include __FBSDID("$FreeBSD$"); -#define _ARM32_BUS_DMA_PRIVATE #include #include #include @@ -120,20 +119,6 @@ fdt_pic_decode_t fdt_pic_table[] = { }; #endif -struct arm32_dma_range * -bus_dma_get_range(void) -{ - - return (NULL); -} - -int -bus_dma_get_range_nb(void) -{ - - return (0); -} - void cpu_reset() {