Date: Fri, 23 Sep 2016 12:38:05 +0000 (UTC) From: Andrew Turner <andrew@FreeBSD.org> 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... Message-ID: <201609231238.u8NCc5gk048275@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#define _ARM32_BUS_DMA_PRIVATE #include <sys/param.h> #include <sys/systm.h> #include <sys/bus.h> @@ -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 <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#define _ARM32_BUS_DMA_PRIVATE #include <sys/param.h> #include <sys/systm.h> #include <sys/bus.h> @@ -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 <sys/param.h> #include <sys/systm.h> #include <sys/bus.h> @@ -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 <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#define _ARM32_BUS_DMA_PRIVATE #include <sys/param.h> #include <sys/systm.h> #include <sys/bus.h> @@ -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 <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#define _ARM32_BUS_DMA_PRIVATE #include <sys/param.h> #include <sys/systm.h> #include <sys/malloc.h> @@ -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 <sys/param.h> #include <sys/bus.h> #include <sys/kernel.h> 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 <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#define _ARM32_BUS_DMA_PRIVATE #include <sys/param.h> #include <sys/systm.h> #include <sys/bus.h> @@ -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 <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#define _ARM32_BUS_DMA_PRIVATE #include <sys/param.h> #include <sys/systm.h> #include <sys/reboot.h> @@ -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 <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#define _ARM32_BUS_DMA_PRIVATE #include <sys/param.h> #include <sys/systm.h> #include <sys/bus.h> @@ -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 <sys/cdefs.h> @@ -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 <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#define _ARM32_BUS_DMA_PRIVATE #include <sys/param.h> #include <sys/systm.h> #include <sys/devmap.h> @@ -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 <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#define _ARM32_BUS_DMA_PRIVATE #include <sys/param.h> #include <sys/systm.h> #include <sys/bus.h> @@ -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 <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#define _ARM32_BUS_DMA_PRIVATE #include <sys/param.h> #include <sys/systm.h> #include <sys/bus.h> @@ -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 <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#define _ARM32_BUS_DMA_PRIVATE #include <sys/param.h> #include <sys/systm.h> #include <sys/bus.h> @@ -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 <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#define _ARM32_BUS_DMA_PRIVATE #include <sys/param.h> #include <sys/systm.h> #include <sys/bus.h> @@ -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 <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#define _ARM32_BUS_DMA_PRIVATE #include <sys/param.h> #include <sys/systm.h> #include <sys/bus.h> @@ -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() {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609231238.u8NCc5gk048275>