Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Apr 2015 07:29:48 -0600
From:      Ian Lepore <ian@freebsd.org>
To:        Svatopluk Kraus <onwahe@gmail.com>
Cc:        freebsd-current@freebsd.org
Subject:   Re: [patch] fix add_bounce_page() for BUS_DMA_KEEP_PG_OFFSET
Message-ID:  <1429882188.1157.2.camel@freebsd.org>
In-Reply-To: <CAFHCsPVgYHL0OyMnn1b2DcNiQO-20k1aDvJNvFjwU21YxB29Cw@mail.gmail.com>
References:  <CAFHCsPVgYHL0OyMnn1b2DcNiQO-20k1aDvJNvFjwU21YxB29Cw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 2015-04-24 at 13:34 +0200, Svatopluk Kraus wrote:
> The add_bounce_page() can be called from _bus_dmamap_load_phys().
> Client virtual address is zero (not valid) in that case. So, client
> physical address must be used to get an offset when
> BUS_DMA_KEEP_PG_OFFSET flag is set. Note that client physical address
> is always valid.
> 
> Svatopluk Kraus

The only user of BUS_DMA_KEEP_PG_OFFSET in the system is USB.  If the
flag didn't exist, we could do bouncing with a whole lot more
efficiency, at least in the ARM world.  I wonder if it would be possible
to just eliminate the flag (and of course, USB's need for it, which I
fully admit I don't understand even a little bit).

-- Ian




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