From owner-svn-src-head@FreeBSD.ORG Sat Aug 10 00:43:49 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2F1678A8; Sat, 10 Aug 2013 00:43:49 +0000 (UTC) (envelope-from alc@rice.edu) Received: from pp1.rice.edu (proofpoint1.mail.rice.edu [128.42.201.100]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F06442D80; Sat, 10 Aug 2013 00:43:48 +0000 (UTC) Received: from pps.filterd (pp1.rice.edu [127.0.0.1]) by pp1.rice.edu (8.14.5/8.14.5) with SMTP id r79LUYPb023230; Fri, 9 Aug 2013 19:43:47 -0500 Received: from mh3.mail.rice.edu (mh3.mail.rice.edu [128.42.199.10]) by pp1.rice.edu with ESMTP id 1dsymjr3y6-1; Fri, 09 Aug 2013 19:43:47 -0500 X-Virus-Scanned: by amavis-2.7.0 at mh3.mail.rice.edu, auth channel Received: from [10.104.199.154] (unknown [131.107.165.33]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh3.mail.rice.edu (Postfix) with ESMTPSA id 3DE8C40122; Fri, 9 Aug 2013 19:43:47 -0500 (CDT) Subject: Re: svn commit: r254171 - head/sys/arm/s3c2xx0 Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Alan Cox In-Reply-To: <201308100031.r7A0VoWd006481@svn.freebsd.org> Date: Fri, 9 Aug 2013 17:43:37 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <92A89B14-4C6A-426D-B949-706B19ABD78D@rice.edu> References: <201308100031.r7A0VoWd006481@svn.freebsd.org> To: Olivier Houchard X-Mailer: Apple Mail (2.1085) 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:43:49 -0000 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 >=20 > 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) >=20 > Modified: > head/sys/arm/s3c2xx0/s3c2xx0_space.c >=20 > Modified: head/sys/arm/s3c2xx0/s3c2xx0_space.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- 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,=20 > 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; >=20 > - if (pmap_devmap_find_va((vm_offset_t)t, size) !=3D NULL) { > + if (pmap_devmap_find_va((vm_offset_t)h, size) !=3D NULL) { > /* Device was statically mapped; nothing to do. */ > return; > } >=20 > - endva =3D round_page((vm_offset_t)t + size); > - va =3D trunc_page((vm_offset_t)t); > + endva =3D round_page((vm_offset_t)h + size); > + origva =3D va =3D trunc_page((vm_offset_t)h); >=20 > while (va < endva) { > pmap_kremove(va); > va +=3D PAGE_SIZE; > } > - kva_free(va, endva - va); > + kva_free(va, endva - origva); Shouldn't this be kva_free(origva, endva - origva): ? > } >=20 > int >=20