Date: Fri, 9 Aug 2013 17:43:37 -0700 From: Alan Cox <alc@rice.edu> To: Olivier Houchard <cognet@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r254171 - head/sys/arm/s3c2xx0 Message-ID: <92A89B14-4C6A-426D-B949-706B19ABD78D@rice.edu> In-Reply-To: <201308100031.r7A0VoWd006481@svn.freebsd.org> References: <201308100031.r7A0VoWd006481@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Aug 9, 2013, at 5:31 PM, Olivier Houchard wrote: > Author: cognet > Date: Sat Aug 10 00:31:49 2013 > New Revision: 254171 > URL: http://svnweb.freebsd.org/changeset/base/254171 > > Log: > - The address lies in the bus space handle, not in the cookie > - Use the right address when calling kva_free() > (Is there any reason why the s3c2xx0 comes with its own version of bs_map/ > bs_unmap ? It seems to be just the same as in bus_space_generic.c) > > Modified: > head/sys/arm/s3c2xx0/s3c2xx0_space.c > > Modified: head/sys/arm/s3c2xx0/s3c2xx0_space.c > ============================================================================== > --- head/sys/arm/s3c2xx0/s3c2xx0_space.c Sat Aug 10 00:06:56 2013 (r254170) > +++ head/sys/arm/s3c2xx0/s3c2xx0_space.c Sat Aug 10 00:31:49 2013 (r254171) > @@ -200,21 +200,21 @@ s3c2xx0_bs_map(void *t, bus_addr_t bpa, > void > s3c2xx0_bs_unmap(void *t, bus_space_handle_t h, bus_size_t size) > { > - vm_offset_t va, endva; > + vm_offset_t va, endva, origva; > > - if (pmap_devmap_find_va((vm_offset_t)t, size) != NULL) { > + if (pmap_devmap_find_va((vm_offset_t)h, size) != NULL) { > /* Device was statically mapped; nothing to do. */ > return; > } > > - endva = round_page((vm_offset_t)t + size); > - va = trunc_page((vm_offset_t)t); > + endva = round_page((vm_offset_t)h + size); > + origva = va = trunc_page((vm_offset_t)h); > > while (va < endva) { > pmap_kremove(va); > va += PAGE_SIZE; > } > - kva_free(va, endva - va); > + kva_free(va, endva - origva); Shouldn't this be kva_free(origva, endva - origva): ? > } > > int >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?92A89B14-4C6A-426D-B949-706B19ABD78D>
