Re: [PATCH/RFC] SPI: add DMAUNSAFE analog to David Brownell's core
- From: Vitaly Wool <vwool@xxxxxxxxxxxxx>
- Date: Fri, 16 Dec 2005 01:23:32 +0300
Greg KH wrote:
On Thu, Dec 15, 2005 at 09:47:42AM +0300, Vitaly Wool wrote:Looking at my usbnet stuff, I can't share that opinion :-/
David Brownell wrote:
One cannot allocate memory in interrupt context, so the way to go is allocating it on stack, thus the buffer is not DMA-safe.No, "stupid drivers will suffer"; nothing new. Just observe how the ads7846 touchscreen driver does small async transfers.
Making it DMA-safe in thread that does the very message processing is a good way of overcoming this.
Using preallocated buffer is not a good way, since it may well be
already used by another interrupt or not yet processed by the worker
thread (or tasklet, or whatever).
Yes it is a good way. That's the way USB currently works in the kernel,
and it works just fine. It keeps the rules simple and everyone knows
what needs to be done.
Are you really ready to lower the performance and quality of service just for approach uniformity?
And, can you please point me out the examples of devices behind USB bus that need to write registers from an interrupt context?
Vitaly
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- References:
- [PATCH 2.6-git 0/4] SPI core refresh
- From: Vitaly Wool
- Re: [PATCH/RFC] SPI: add DMAUNSAFE analog to David Brownell's core
- From: Greg KH
- Re: [PATCH/RFC] SPI: add DMAUNSAFE analog to David Brownell's core
- From: Vitaly Wool
- Re: [PATCH/RFC] SPI: add DMAUNSAFE analog to David Brownell's core
- From: David Brownell
- Re: [PATCH/RFC] SPI: add DMAUNSAFE analog to David Brownell's core
- From: Vitaly Wool
- Re: [PATCH/RFC] SPI: add DMAUNSAFE analog to David Brownell's core
- From: Greg KH
- [PATCH 2.6-git 0/4] SPI core refresh
- Prev by Date: Re: [spi-devel-general] Re: [PATCH/RFC] SPI: add DMAUNSAFE analog
- Next by Date: Re: [Perfctr-devel] 2.6.15-rc5-git3 perfmon2 new code base + libpfm available
- Previous by thread: Re: [PATCH/RFC] SPI: add DMAUNSAFE analog to David Brownell's core
- Next by thread: Re: [PATCH/RFC] SPI: add DMAUNSAFE analog to David Brownell's core
- Index(es):
Relevant Pages
|