Module Name: src Committed By: martin Date: Fri Nov 14 07:29:13 UTC 2014
Modified Files: src/sys/arch/arm/arm32 [netbsd-7]: bus_dma.c locore.S Log Message: Pull up the following revisions, requested by skrll in ticket #222: src/sys/arch/arm/arm32/locore.S 1.37 src/sys/arch/arm/arm32/bus_dma.c 1.87 Make the initial svcstack is doubleword aligned if EABI. With PMAP_NEED_ALLOC_POOLPAGE, before using pmap_map_poolpage make sure the page comes from the same freelist that pmap_map_poolpage uses. To generate a diff of this commit: cvs rdiff -u -r1.86.2.1 -r1.86.2.2 src/sys/arch/arm/arm32/bus_dma.c cvs rdiff -u -r1.36 -r1.36.2.1 src/sys/arch/arm/arm32/locore.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/arm/arm32/bus_dma.c diff -u src/sys/arch/arm/arm32/bus_dma.c:1.86.2.1 src/sys/arch/arm/arm32/bus_dma.c:1.86.2.2 --- src/sys/arch/arm/arm32/bus_dma.c:1.86.2.1 Mon Nov 10 19:57:26 2014 +++ src/sys/arch/arm/arm32/bus_dma.c Fri Nov 14 07:29:13 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma.c,v 1.86.2.1 2014/11/10 19:57:26 martin Exp $ */ +/* $NetBSD: bus_dma.c,v 1.86.2.2 2014/11/14 07:29:13 martin Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ #include "opt_arm_bus_space.h" #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.86.2.1 2014/11/10 19:57:26 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.86.2.2 2014/11/14 07:29:13 martin Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -1307,6 +1307,19 @@ _bus_dmamem_map(bus_dma_tag_t t, bus_dma } } +#ifdef PMAP_NEED_ALLOC_POOLPAGE + /* + * The page can only be direct mapped if was allocated out + * of the arm poolpage vm freelist. + */ + int lcv = vm_physseg_find(atop(pa), NULL); + KASSERT(lcv != -1); + if (direct_mapable) { + direct_mapable = + (arm_poolpage_vmfreelist == VM_PHYSMEM_PTR(lcv)->free_list); + } +#endif + if (direct_mapable) { *kvap = (void *)PMAP_MAP_POOLPAGE(pa); #ifdef DEBUG_DMA Index: src/sys/arch/arm/arm32/locore.S diff -u src/sys/arch/arm/arm32/locore.S:1.36 src/sys/arch/arm/arm32/locore.S:1.36.2.1 --- src/sys/arch/arm/arm32/locore.S:1.36 Fri Apr 11 16:34:29 2014 +++ src/sys/arch/arm/arm32/locore.S Fri Nov 14 07:29:13 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.36 2014/04/11 16:34:29 matt Exp $ */ +/* $NetBSD: locore.S,v 1.36.2.1 2014/11/14 07:29:13 martin Exp $ */ /* * Copyright (C) 1994-1997 Mark Brinicombe @@ -40,7 +40,7 @@ /* What size should this really be ? It is only used by init_arm() */ #define INIT_ARM_STACK_SIZE 2048 - RCSID("$NetBSD: locore.S,v 1.36 2014/04/11 16:34:29 matt Exp $") + RCSID("$NetBSD: locore.S,v 1.36.2.1 2014/11/14 07:29:13 martin Exp $") /* * This is for kvm_mkdb, and should be the address of the beginning @@ -115,6 +115,9 @@ ASENTRY_NP(start) ASEND(start) .bss +#ifdef __ARM_EABI__ + .align 3 +#endif svcstk: .space INIT_ARM_STACK_SIZE