Subject: Re: bce(4) and memory > 1GB problem
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: Jachym Holecek <freza@dspfpga.com>
List: tech-kern
Date: 01/12/2007 14:03:37
# Manuel Bouyer 2007-01-12:
> On Fri, Jan 12, 2007 at 12:42:15PM +0200, Yorick Hardy wrote:
> > >Yes. Maybe it should be better to add this as a parameter to
> > >bus_dmamap_create(), and compute the proper _dm_bounce_thresh at this
> > >time. But this is a big change in the bus_dma API, and require
> > >changing a lot of files, unless we keep bus_dmamap_create() as is and
> > >intruduce a new function with this extra parameter.
> > >
> > >
> > Is there an advantage to passing by parameter rather than by flag (as in
> > my patch) ?
>
> This is a gross hack, a flag is meant as a boolean, not an arbitrary
> value. And this doesn't handle bus_dmamem
>
> > Obviously my patch limits the address to a power of 2, will this be a
> > problem?
>
> And it can't sepcify a minimum address.
Do we add "bus_addr_t minaddr, bus_addr_t limit" arguments to the affected
functions, or perhaps "bus_addr_t addrbits" (where only lowest and highest
bit set are considered)?
> > I think the patch I proposed may address the above paragraph without the
> > need to
> > change many files.
>
> I'd prefer to do it properly, even if we need to change many files.
Agreed.
-- Jachym