Re: arm: dmamap_destroy: remove explicit unload of map
> On 6 Mar 2016, at 9:53 PM, Tobias Ulmer wrote: > > map is passed straight into free where it gets overwritten with junk. > No other arch makes map invalid before free, and my N2100 didn't > suddenly misbehave either. > > ok? ok > > Index: arch/arm/arm/bus_dma.c > === > RCS file: /home/vcs/cvs/openbsd/src/sys/arch/arm/arm/bus_dma.c,v > retrieving revision 1.28 > diff -u -p -r1.28 bus_dma.c > --- arch/arm/arm/bus_dma.c16 Nov 2014 12:30:56 - 1.28 > +++ arch/arm/arm/bus_dma.c6 Mar 2016 11:34:35 - > @@ -164,15 +164,6 @@ _bus_dmamap_destroy(bus_dma_tag_t t, bus > printf("dmamap_destroy: t=%p map=%p\n", t, map); > #endif/* DEBUG_DMA */ > > - /* > - * Explicit unload. > - */ > - map->dm_mapsize = 0; > - map->dm_nsegs = 0; > - map->_dm_origbuf = NULL; > - map->_dm_buftype = ARM32_BUFTYPE_INVALID; > - map->_dm_proc = NULL; > - > free(map, M_DEVBUF, 0); > } > >
Re: arm: dmamap_destroy: remove explicit unload of map
On Sun, Mar 06, 2016 at 12:53:24PM +0100, Tobias Ulmer wrote: > map is passed straight into free where it gets overwritten with junk. > No other arch makes map invalid before free, and my N2100 didn't > suddenly misbehave either. > > ok? Have been building -current with this diff applied too and no problems so far. -- db
Re: arm: dmamap_destroy: remove explicit unload of map
On Sun, Mar 06, 2016 at 12:53:24PM +0100, Tobias Ulmer wrote: > map is passed straight into free where it gets overwritten with junk. > No other arch makes map invalid before free, and my N2100 didn't > suddenly misbehave either. Been building base with this diff, no issues. Also it doesn't seem like something that would throw issues. Looks reasonable to me. > > ok? > > Index: arch/arm/arm/bus_dma.c > === > RCS file: /home/vcs/cvs/openbsd/src/sys/arch/arm/arm/bus_dma.c,v > retrieving revision 1.28 > diff -u -p -r1.28 bus_dma.c > --- arch/arm/arm/bus_dma.c16 Nov 2014 12:30:56 - 1.28 > +++ arch/arm/arm/bus_dma.c6 Mar 2016 11:34:35 - > @@ -164,15 +164,6 @@ _bus_dmamap_destroy(bus_dma_tag_t t, bus > printf("dmamap_destroy: t=%p map=%p\n", t, map); > #endif /* DEBUG_DMA */ > > - /* > - * Explicit unload. > - */ > - map->dm_mapsize = 0; > - map->dm_nsegs = 0; > - map->_dm_origbuf = NULL; > - map->_dm_buftype = ARM32_BUFTYPE_INVALID; > - map->_dm_proc = NULL; > - > free(map, M_DEVBUF, 0); > } > >
arm: dmamap_destroy: remove explicit unload of map
map is passed straight into free where it gets overwritten with junk. No other arch makes map invalid before free, and my N2100 didn't suddenly misbehave either. ok? Index: arch/arm/arm/bus_dma.c === RCS file: /home/vcs/cvs/openbsd/src/sys/arch/arm/arm/bus_dma.c,v retrieving revision 1.28 diff -u -p -r1.28 bus_dma.c --- arch/arm/arm/bus_dma.c 16 Nov 2014 12:30:56 - 1.28 +++ arch/arm/arm/bus_dma.c 6 Mar 2016 11:34:35 - @@ -164,15 +164,6 @@ _bus_dmamap_destroy(bus_dma_tag_t t, bus printf("dmamap_destroy: t=%p map=%p\n", t, map); #endif /* DEBUG_DMA */ - /* -* Explicit unload. -*/ - map->dm_mapsize = 0; - map->dm_nsegs = 0; - map->_dm_origbuf = NULL; - map->_dm_buftype = ARM32_BUFTYPE_INVALID; - map->_dm_proc = NULL; - free(map, M_DEVBUF, 0); }