Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Jan 2002 13:59:39 -0700
From:      "Justin T. Gibbs" <gibbs@scsiguy.com>
To:        Phungte Ha <phungte@decru.com>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: bus_dmamap_load change request. 
Message-ID:  <200201142059.g0EKxdg30516@aslan.scsiguy.com>
In-Reply-To: Your message of "Mon, 14 Jan 2002 12:46:46 PST." <3C4343B6.2AE5D996@decru.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
>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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200201142059.g0EKxdg30516>