From owner-svn-src-head@FreeBSD.ORG Sat Aug 10 00:52:27 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9415EBD8; Sat, 10 Aug 2013 00:52:27 +0000 (UTC) (envelope-from cognet@ci0.org) Received: from kanar.ci0.org (unknown [IPv6:2a01:e0b:1:150:ca0a:a9ff:fef1:a4c9]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 185822DF2; Sat, 10 Aug 2013 00:52:26 +0000 (UTC) Received: from kanar.ci0.org (pluxor@localhost [127.0.0.1]) by kanar.ci0.org (8.14.5/8.14.5) with ESMTP id r7A0q2DT061003; Sat, 10 Aug 2013 02:52:02 +0200 (CEST) (envelope-from cognet@ci0.org) Received: (from doginou@localhost) by kanar.ci0.org (8.14.5/8.14.5/Submit) id r7A0q2N8061002; Sat, 10 Aug 2013 02:52:02 +0200 (CEST) (envelope-from cognet@ci0.org) X-Authentication-Warning: kanar.ci0.org: doginou set sender to cognet@ci0.org using -f Date: Sat, 10 Aug 2013 02:52:02 +0200 From: Olivier Houchard To: Alan Cox Subject: Re: svn commit: r254171 - head/sys/arm/s3c2xx0 Message-ID: <20130810005202.GA60990@ci0.org> References: <201308100031.r7A0VoWd006481@svn.freebsd.org> <92A89B14-4C6A-426D-B949-706B19ABD78D@rice.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <92A89B14-4C6A-426D-B949-706B19ABD78D@rice.edu> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 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: Sat, 10 Aug 2013 00:52:27 -0000 On Fri, Aug 09, 2013 at 05:43:37PM -0700, Alan Cox wrote: > > 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): > > ? > Yes it should be, that's what I get for committing at almost 3am :) Thanks a lot ! Olivier