Linux PARISC architecture development
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: John David Anglin <dave.anglin@bell.net>,
	John David Anglin <dave@parisc-linux.org>,
	Helge Deller <deller@gmx.de>,
	 linux-parisc@vger.kernel.org
Subject: Re: ARCH_DMA_MINALIGN on PA-RISC
Date: Thu, 25 Jul 2024 15:19:40 -0400	[thread overview]
Message-ID: <7ba1e7372f40ec88f4c0c085c46785e6c95fe86f.camel@HansenPartnership.com> (raw)
In-Reply-To: <ba2ff9e3-257c-43d7-e74b-e3bede258e8@redhat.com>

On Thu, 2024-07-25 at 19:46 +0200, Mikulas Patocka wrote:
> 
> 
> On Thu, 25 Jul 2024, James Bottomley wrote:
> 
> > > > #define ARCH_DMA_MINALIGN       (128)
> > > > #define ARCH_KMALLOC_MINALIGN   (8)
> > > > 
> > > > L1_CACHE_BYTES is 64 on arm64.
> > > > 
> > > > Possibly, the same can occur on parisc.
> > > > 
> > > > Dave
> > > 
> > > L1_CACHE_BYTES is a performance hint that is used to avoid cache
> > > line ping-pong when multiple CPUs modify nearby data.
> > > 
> > > ARCH_DMA_MINALIGN is the biggest possible cache line size to
> > > avoid DMA data corruption. As there are some arm64 machines with
> > > 128-byte cache line, arm64 has to define it to 128.
> > > 
> > > James said that the L2 cache on PA8800/8900 is coherent with PCI.
> > > So, I  think that ARCH_DMA_MINALIGN should be 64 (is that the L1
> > > cache line size  on PA8800/8900?).
> > 
> > By default, if unset, ARCH_DMA_MINALIGN defaults to alignof(long
> > long), so it is already 64 on parisc.
> > 
> > James
> 
> No, alignof(long long) is 8 :-)

Sorry, thinking in bits not bytes.  We definitely need that to be at
least 16 for all the pure VIPT systems.

James



  reply	other threads:[~2024-07-25 19:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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=7ba1e7372f40ec88f4c0c085c46785e6c95fe86f.camel@HansenPartnership.com \
    --to=james.bottomley@hansenpartnership.com \
    --cc=dave.anglin@bell.net \
    --cc=dave@parisc-linux.org \
    --cc=deller@gmx.de \
    --cc=linux-parisc@vger.kernel.org \
    --cc=mpatocka@redhat.com \
    /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