Re: [PATCH/RFC] SPI: add DMAUNSAFE analog to David Brownell's core
- From: Vitaly Wool <vwool@xxxxxxxxxxxxx>
- Date: Thu, 15 Dec 2005 09:47:42 +0300
David Brownell wrote:
No, "stupid drivers will suffer"; nothing new. Just observeOne cannot allocate memory in interrupt context, so the way to go is allocating it on stack, thus the buffer is not DMA-safe.
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).
The way it's done in this ads7846 driver is not quite acceptable. Losing the transfer if the previous one is still processed is *not* the way to go in some cases. One can not predict how many transfers are gonna be dropped due to "previous trransfer is being processed" problem, it depends on the system load. And though it's not a problem for touchscreen, it *will* be a problem if it were MMC, for instance.
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:
- Re: [spi-devel-general] Re: [PATCH/RFC] SPI: add DMAUNSAFE analog
- From: David Brownell
- Re: [PATCH/RFC] SPI: add DMAUNSAFE analog to David Brownell's core
- From: Greg KH
- Re: [spi-devel-general] Re: [PATCH/RFC] SPI: add DMAUNSAFE analog
- 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
- [PATCH 2.6-git 0/4] SPI core refresh
- Prev by Date: Re: cs5536 ID for cs5535audio
- Next by Date: Re: [patch 0/5] Add MMC password protection (lock/unlock) support
- 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):