From: Mikulas Patocka <mpatocka@redhat.com>
To: John David Anglin <dave@parisc-linux.org>
Cc: Helge Deller <deller@gmx.de>,
"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
linux-parisc@vger.kernel.org
Subject: ARCH_DMA_MINALIGN on PA-RISC
Date: Wed, 24 Jul 2024 20:17:28 +0200 (CEST) [thread overview]
Message-ID: <93fcf9-f61b-7620-b5f1-d44449d280c9@redhat.com> (raw)
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
next reply other threads:[~2024-07-24 18:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-24 18:17 Mikulas Patocka [this message]
2024-07-24 18:48 ` ARCH_DMA_MINALIGN on PA-RISC 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
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=93fcf9-f61b-7620-b5f1-d44449d280c9@redhat.com \
--to=mpatocka@redhat.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=dave@parisc-linux.org \
--cc=deller@gmx.de \
--cc=linux-parisc@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