From: David Brownell <david-b@pacbell.net>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: dmapool (was: Re: Linux 2.6.3-rc2)
Date: Fri, 13 Feb 2004 12:23:32 -0800 [thread overview]
Message-ID: <402D3244.6020402@pacbell.net> (raw)
> +static inline int
> +dma_supported(struct device *dev, u64 mask)
> +{
> + BUG();
> + return 0;
> +}
dma_supported() in particular shouldn't BUG(); this should work:
if (use_dma && dma_supported(dev, ~(u32)0)) {
... set up for DMA ...
} else {
... just use PIO instead ...
}
Likewise the other routines that have clearly defined fault paths
should probably just use those instead of BUG(). Examples of this
type would be dma_alloc_coherent(), dma_map_sg() and maybe also
dma_get_cache_alignment().
Of course the API still lacks clean fault reporting for the single
shot mapping calls -- like maybe an arch-settable
#define DMA_ADDR_INVALID (~(dma_addr_t)0)
return value -- but that'd be a different patch.
- Dave
next reply other threads:[~2004-02-13 20:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-13 20:23 David Brownell [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-02-10 3:17 Linux 2.6.3-rc2 Linus Torvalds
2004-02-10 13:31 ` dmapool (was: Re: Linux 2.6.3-rc2) Geert Uytterhoeven
2004-02-10 14:32 ` Geert Uytterhoeven
2004-02-10 14:47 ` Russell King
2004-02-10 14:57 ` Geert Uytterhoeven
2004-02-10 14:55 ` Christoph Hellwig
2004-02-10 16:23 ` Greg KH
2004-02-10 16:29 ` Geert Uytterhoeven
2004-02-10 18:14 ` David S. Miller
2004-02-12 9:52 ` Geert Uytterhoeven
2004-02-12 10:25 ` Gerd Knorr
2004-02-13 15:24 ` Geert Uytterhoeven
2004-02-13 21:27 ` Roman Zippel
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=402D3244.6020402@pacbell.net \
--to=david-b@pacbell.net \
--cc=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox