All of lore.kernel.org
 help / color / mirror / Atom feed
* ARCH_DMA_MINALIGN on PA-RISC
@ 2024-07-24 18:17 Mikulas Patocka
  2024-07-24 18:48 ` John David Anglin
  2024-07-24 19:25 ` James Bottomley
  0 siblings, 2 replies; 15+ messages in thread
From: Mikulas Patocka @ 2024-07-24 18:17 UTC (permalink / raw)
  To: John David Anglin; +Cc: Helge Deller, James E.J. Bottomley, linux-parisc

Hi

Thanks for fixing the cache aliasing issues on PA-RISC in the commit 
72d95924ee35c8cd16ef52f912483ee938a34d49.

I think there is still one problem left - and that is ARCH_DMA_MINALIGN. 
Currently, it is 16, which is obviously wrong.

Some comments in the kernel say that PA8900 has L2 cache with 128-byte 
line size, so I think that ARCH_DMA_MINALIGN should be 128 as well.


The question is - can the CPU speculatively mark a cache line as dirty and 
write it back? If yes, we have a big problem - Linux assumes that a part 
of the page may be used for DMA transfer and another part of that page may 
be used for normal cacheable structures. If the PA-RISC CPU speculatively 
prefetched and wrote back a cache line, it could corrupt the DMA transfer.

If the CPU doesn't speculatively mark cache lines as dirty, then 
increasing ARCH_DMA_MINALIGN would be sufficient solution.

Mikulas


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2024-07-27 15:06 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-24 18:17 ARCH_DMA_MINALIGN on PA-RISC Mikulas Patocka
2024-07-24 18:48 ` John David Anglin
2024-07-24 19:25 ` James Bottomley
2024-07-25 16:45   ` John David Anglin
2024-07-25 17:27     ` Mikulas Patocka
2024-07-25 17:43       ` James Bottomley
2024-07-25 17:46         ` Mikulas Patocka
2024-07-25 19:19           ` James Bottomley
2024-07-25 19:13       ` John David Anglin
2024-07-25 20:05         ` John David Anglin
2024-07-25 20:36           ` Mikulas Patocka
2024-07-25 21:29             ` John David Anglin
2024-07-27 10:24               ` Mikulas Patocka
2024-07-27 15:06                 ` John David Anglin
2024-07-25 17:37   ` Mikulas Patocka

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.