From: Michael Buesch <mb@bu3sch.de>
To: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Christoph Hellwig <hch@infradead.org>,
John Linville <linville@tuxdriver.com>,
Andi Kleen <andi@firstfloor.org>,
David Miller <davem@davemloft.net>,
Alan Cox <alan@lxorguk.ukuu.org.uk>, Ingo Molnar <mingo@elte.hu>,
bcm43xx-dev@lists.berlios.de, linux-wireless@vger.kernel.org,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 0/3] Add API for weak DMA masks
Date: Thu, 1 May 2008 19:16:06 +0200 [thread overview]
Message-ID: <200805011916.07340.mb@bu3sch.de> (raw)
In-Reply-To: <200805010930.04799.jbarnes@virtuousgeek.org>
On Thursday 01 May 2008 18:30:04 Jesse Barnes wrote:
> On Thursday, May 01, 2008 9:07 am Michael Buesch wrote:
> > On Thursday 01 May 2008 17:58:26 Christoph Hellwig wrote:
> > > On Thu, May 01, 2008 at 05:47:26PM +0200, Michael Buesch wrote:
> > > > We've discussed that and this behaviour is not acceptable, as the
> > > > driver must know about a possible fallback in case it can do 32bit DMA
> > > > more efficiently than 64bit DMA, for example.
> > >
> > > That's what we have dma_get_required_mask() for. See
> > > Documentation/DMA-API.txt.
> >
> > So well. I'm still unsure about the advantage of having some opencoded
> > probe loop in the driver, instead of implementing it in a common place
> > and doing all of it with a single API call.
> > We can still call dma_get_required_mask() and adjust the mask to that
> > in dma_set_mask_weak(). That can _additionally_ be done there.
>
> So I think we're agreed that we want some core function to fall back to
> different mask values, but yeah, making it take dma_get_required_mask into
> account would also be good.
Ok, will redo the patches with that added and the name changed.
> Most drivers just do the fallback themselves, right?
Right.
> So it makes sense to
> just update the current code to fallback, and update drivers wanting specific
> mask values to check afterwards. I hate to inflict that kind of driver wide
> update on Michael though... :)
Well, that's a lot of work and I'm not sure it's worth it.
I could live with having dma_set_mask as an API that fails on bad masks
and dma_request_mask as an API above that which retries. I think that's
just fine. Drivers can be migrated over time to the new API (or not. That
can be the driver maintainer's choice).
--
Greetings Michael.
next prev parent reply other threads:[~2008-05-01 17:16 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-01 14:38 [PATCH 0/3] Add API for weak DMA masks Michael Buesch
2008-05-01 9:00 ` Arjan van de Ven
2008-05-01 14:40 ` [PATCH 1/3] Add dma_set_mask_weak() API Michael Buesch
2008-05-01 16:20 ` Alan Cox
2008-05-01 17:11 ` Michael Buesch
2008-05-01 14:41 ` [PATCH 2/3] ssb: Add weak DMA-mask API Michael Buesch
2008-05-01 14:43 ` [PATCH 3/3] b43: Use the new " Michael Buesch
2008-05-01 15:36 ` [PATCH 0/3] Add API for weak DMA masks Christoph Hellwig
2008-05-01 15:42 ` Michael Buesch
2008-05-01 15:43 ` Christoph Hellwig
2008-05-01 15:47 ` Michael Buesch
2008-05-01 15:58 ` Christoph Hellwig
2008-05-01 16:07 ` Michael Buesch
2008-05-01 16:30 ` Jesse Barnes
2008-05-01 17:16 ` Michael Buesch [this message]
2008-05-01 17:22 ` Jesse Barnes
2008-05-01 17:25 ` Michael Buesch
2008-05-01 17:27 ` Jesse Barnes
2008-05-01 17:33 ` Michael Buesch
2008-05-01 16:29 ` Alan Cox
2008-05-01 21:39 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200805011916.07340.mb@bu3sch.de \
--to=mb@bu3sch.de \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=andi@firstfloor.org \
--cc=bcm43xx-dev@lists.berlios.de \
--cc=davem@davemloft.net \
--cc=hch@infradead.org \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.