From owner-cvs-all@FreeBSD.ORG Sun Aug 22 19:02:45 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F166E16A4CE; Sun, 22 Aug 2004 19:02:45 +0000 (GMT) Received: from mail.droso.net (koala.droso.net [193.88.12.38]) by mx1.FreeBSD.org (Postfix) with ESMTP id B87EB43D45; Sun, 22 Aug 2004 19:02:45 +0000 (GMT) (envelope-from erwin@mail.droso.net) Received: by mail.droso.net (Postfix, from userid 1001) id 5785C22856; Sun, 22 Aug 2004 21:02:44 +0200 (CEST) Date: Sun, 22 Aug 2004 21:02:44 +0200 From: Erwin Lansing To: Brian Feldman Message-ID: <20040822190244.GE42943@droso.net> References: <200408221857.i7MIvf8a039929@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vtzGhvizbBRQ85DL" Content-Disposition: inline In-Reply-To: <200408221857.i7MIvf8a039929@repoman.freebsd.org> X-Operating-System: FreeBSD/i386 5.2.1-RELEASE-p1 User-Agent: Mutt/1.5.6i cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/sound/pci maestro.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2004 19:02:46 -0000 --vtzGhvizbBRQ85DL Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Aug 22, 2004 at 06:57:41PM +0000, Brian Feldman wrote: > green 2004-08-22 18:57:41 UTC >=20 > FreeBSD src repository >=20 > Modified files: > sys/dev/sound/pci maestro.c=20 > Log: > The new contigmalloc code is exposing a lot of misuses of busdma memory > allocation. Notably, in this case, the driver tries to allocate several > pieces of memory and then fails if the pieces allocated after the first > do not come after it physically, and within a specific range (8MB I > believe). Of course, this could just as easily fail for any number of > reasons, but it almost always fails now that contiguous allocations sta= rt > at the end of possible specified memory locations rather than the begin= ning. > =20 > Allocate all the possibly-needed memory up front, even though it's a wa= ste, > to get around this. The least bogus solution would be to take the phys= ical > address from the first allocation and create a new tag that specified t= hat > further allocations must follow it within that 8MB window, then use that > when allocating new channels, but that's left for anyone else that real= ly > feels like doing it. > =20 > Tested by: Erwin Lansing > =20 Thanks for looking into this so quickly! This probably should also go into 5.3. -erwin --=20 _._ _,-'""`-._ Erwin Lansing (,-.`._,'( |\`-/| erwin@lansing.dk http://droso.org `-.-' \ )-`( , o o) erwin@FreeBSD.org -bf- `- \`_`"'- --vtzGhvizbBRQ85DL Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (FreeBSD) iD8DBQFBKO3Uqy9aWxUlaZARAm4GAJ0ZQdhrUCF83HheiE8Vtg/czE6ErgCg3NTN gYeET8Wqqxs9UtVgOXNnXw0= =ZQco -----END PGP SIGNATURE----- --vtzGhvizbBRQ85DL--