From owner-freebsd-hackers Mon Jan 14 13: 0: 4 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from aslan.scsiguy.com (aslan.scsiguy.com [63.229.232.106]) by hub.freebsd.org (Postfix) with ESMTP id 0529137B431 for ; Mon, 14 Jan 2002 12:59:42 -0800 (PST) Received: from scsiguy.com (localhost [127.0.0.1]) by aslan.scsiguy.com (8.11.5/8.11.5) with ESMTP id g0EKxdg30516; Mon, 14 Jan 2002 13:59:39 -0700 (MST) (envelope-from gibbs@scsiguy.com) Message-Id: <200201142059.g0EKxdg30516@aslan.scsiguy.com> To: Phungte Ha Cc: hackers@FreeBSD.ORG Subject: Re: bus_dmamap_load change request. In-Reply-To: Your message of "Mon, 14 Jan 2002 12:46:46 PST." <3C4343B6.2AE5D996@decru.com> Date: Mon, 14 Jan 2002 13:59:39 -0700 From: "Justin T. Gibbs" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG >Hi all, > >Currently bus_dmamap_load builds the dma descriptor in a table on the >stack. >This cause us following problems: > . our dma can be large, 1MB or more, this forces us to increase the >kernel stack size. > . our hardware would be happy with the dma descriptors as they are, > address and length. Unfortunately, with the table on the stack, > as soon the callback returns, we cannot count on this table anymore. Most drivers cannot use the passed in format as is. The fact that the format may change if the platform changes (consider that even the addition of PAE support on x86 might change the format), makes the "conversion" into a local, per-transaction list a requirement for a well designed driver. >Can we either change the IF, or having another IF which accepts as >arguments the table address and a number of entries. The caller will >be in charge of allocate and free this table. I changed the code locally a while back to allocate the table during the allocation of the dma tag. This seems to work, but I just haven't gotten back to it to think through all of the consequences. Whatever the solution, we don't want to device a solution where most drivers have allocated 2X their required S/G list size. -- Justin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message