* Re: Non-coherent memory mapped devices
2003-03-18 19:48 Non-coherent memory mapped devices Laurent Canet
@ 2003-03-18 19:33 ` Jaroslav Kysela
2003-03-19 11:48 ` Takashi Iwai
1 sibling, 0 replies; 3+ messages in thread
From: Jaroslav Kysela @ 2003-03-18 19:33 UTC (permalink / raw)
To: Laurent Canet; +Cc: alsa-devel@lists.sourceforge.net
On Tue, 18 Mar 2003, Laurent Canet wrote:
> Hi,
>
> On the HPPA architecture, devices (including sound ones) are memory-mapped.
> On particular machines, memory access to devices are not consistent,
> i.e. data wrote to memory could be cached by the CPU, thus inacessible
> to the device.
> To avoid inconsistency in memory writes, there are arch-dep functions
> that flush write buffers. They are defined in <asm/io.h> as
> dma_cache_inv(start,size), dma_cache_wback and dma_cache_wback_inv; and should be called after all DMA memory writes.
>
> On architectures that don't have such cache issues (most ia32, ia64, alpha, mips, ppc, ...), they are just NOP.
>
> I grepped out the whole alsa source tree and didn't find any occurences
> of dma_cache_* functions. Who should implement these calls, low level drivers or PCM middle layer ?
This code belongs to both midlevel and lowlevel drivers. See
snd_pcm_lib_*_transfer() routines in pcm_lib.c.
Also, we'll probably need to define these functions in our library,
because we can access directly to DMA ring buffers there, too.
Jaroslav
-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs
-------------------------------------------------------
This SF.net email is sponsored by: Does your code think in ink?
You could win a Tablet PC. Get a free Tablet PC hat just for playing.
What are you waiting for?
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
^ permalink raw reply [flat|nested] 3+ messages in thread
* Non-coherent memory mapped devices
@ 2003-03-18 19:48 Laurent Canet
2003-03-18 19:33 ` Jaroslav Kysela
2003-03-19 11:48 ` Takashi Iwai
0 siblings, 2 replies; 3+ messages in thread
From: Laurent Canet @ 2003-03-18 19:48 UTC (permalink / raw)
To: alsa-devel
Hi,
On the HPPA architecture, devices (including sound ones) are memory-mapped.
On particular machines, memory access to devices are not consistent,
i.e. data wrote to memory could be cached by the CPU, thus inacessible
to the device.
To avoid inconsistency in memory writes, there are arch-dep functions
that flush write buffers. They are defined in <asm/io.h> as
dma_cache_inv(start,size), dma_cache_wback and dma_cache_wback_inv; and should be called after all DMA memory writes.
On architectures that don't have such cache issues (most ia32, ia64, alpha, mips, ppc, ...), they are just NOP.
I grepped out the whole alsa source tree and didn't find any occurences
of dma_cache_* functions. Who should implement these calls, low level drivers or PCM middle layer ?
Thanks for your answer
-------------------------------------------------------
This SF.net email is sponsored by: Does your code think in ink?
You could win a Tablet PC. Get a free Tablet PC hat just for playing.
What are you waiting for?
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Non-coherent memory mapped devices
2003-03-18 19:48 Non-coherent memory mapped devices Laurent Canet
2003-03-18 19:33 ` Jaroslav Kysela
@ 2003-03-19 11:48 ` Takashi Iwai
1 sibling, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2003-03-19 11:48 UTC (permalink / raw)
To: Laurent Canet; +Cc: alsa-devel
Hi,
At Tue, 18 Mar 2003 20:48:08 +0100,
Laurent Canet wrote:
>
> Hi,
>
> On the HPPA architecture, devices (including sound ones) are memory-mapped.
> On particular machines, memory access to devices are not consistent,
> i.e. data wrote to memory could be cached by the CPU, thus inacessible
> to the device.
doesn't ioremap_nocache() suffice for such a case?
Takashi
-------------------------------------------------------
This SF.net email is sponsored by: Does your code think in ink?
You could win a Tablet PC. Get a free Tablet PC hat just for playing.
What are you waiting for?
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-03-19 11:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-18 19:48 Non-coherent memory mapped devices Laurent Canet
2003-03-18 19:33 ` Jaroslav Kysela
2003-03-19 11:48 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox