From owner-cvs-all Wed Feb 26 4:46:47 2003 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 EB15A37B407 for ; Wed, 26 Feb 2003 04:46:43 -0800 (PST) Received: from mail.gmx.net (mail.gmx.de [213.165.65.60]) by mx1.FreeBSD.org (Postfix) with SMTP id 3BF9A43FCB for ; Wed, 26 Feb 2003 04:46:41 -0800 (PST) (envelope-from tmoestl@gmx.net) Received: (qmail 27263 invoked by uid 0); 26 Feb 2003 12:46:39 -0000 Received: from p508E51BA.dip.t-dialin.net (HELO galatea.local) (80.142.81.186) by mail.gmx.net (mp004-rz3) with SMTP; 26 Feb 2003 12:46:39 -0000 Received: from tmm by galatea.local with local (Exim 4.12 #1) id 18o0xF-0000Xy-00; Wed, 26 Feb 2003 13:46:33 +0100 Date: Wed, 26 Feb 2003 13:46:33 +0100 From: Thomas Moestl To: Maxime Henrion Cc: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/alpha/alpha busdma_machdep.c src/sys/alpha/include bus.h src/sys/i386/i386 busdma_machdep.c src/sys/i386/include bus_at386.h bus_pc98.h src/sys/ia64/ia64 busdma_machdep.c src/sys/ia64/include bus.h src/sys/powerpc/include bus.h ... Message-ID: <20030226124632.GA631@crow.dom2ip.de> References: <200302260216.h1Q2G6UK033030@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200302260216.h1Q2G6UK033030@repoman.freebsd.org> User-Agent: Mutt/1.4i Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, 2003/02/25 at 18:16:06 -0800, Maxime Henrion wrote: > mux 2003/02/25 18:16:06 PST > > Modified files: > sys/alpha/alpha busdma_machdep.c > sys/alpha/include bus.h > sys/i386/i386 busdma_machdep.c > sys/i386/include bus_at386.h bus_pc98.h > sys/ia64/ia64 busdma_machdep.c > sys/ia64/include bus.h > sys/powerpc/include bus.h > sys/sparc64/include bus.h > Log: > Correctly set BUS_SPACE_MAXSIZE in all the busdma backends. > It was bogusly set to 64 * 1024 or 128 * 1024 because it was > bogusly reused in the BUS_DMAMAP_NSEGS definition. Hmmm, I think that this was quite useful, since it gave the size the backend is guaranteed to be able to handle (as the comments besides the definitions noted), although being a bit of a misnomer. Users of the busdma interface should use realistic sizes and for the maxsize argument to bus_dma_tag_create(), since tag creation can in fact result in bounce buffer allocation (or e.g. DVMA allocation), so excessive sizes will just suck up resources, and this constant was a useful hint (while the new one might be used for maxsegsz like the old one could be too, but should not be for maxsize). While some implementations did not stricly enforce that limit in the non-__GNUC__ case, it was still mostly correct, as it is arbitrary except for the stack space and bounce buffer usage in some places in those busdma implementations; if we can tolerate memory usage there BUS_SPACE_MAXSIZE could as well have been increased. This change also breaks the sparc64 IOMMU code, which relied on the old semantics for it's preallocation clamping code. - Thomas -- Thomas Moestl http://www.tu-bs.de/~y0015675/ http://people.FreeBSD.org/~tmm/ PGP fingerprint: 1C97 A604 2BD0 E492 51D0 9C0F 1FE6 4F1D 419C 776C To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message