[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZgUPpwhkE9bRwHec@infradead.org>
Date: Wed, 27 Mar 2024 23:35:19 -0700
From: Christoph Hellwig <hch@...radead.org>
To: John Garry <john.g.garry@...cle.com>
Cc: Damien Le Moal <dlemoal@...nel.org>, Yihang Li <liyihang9@...wei.com>,
yanaijie@...wei.com, jejb@...ux.ibm.com, martin.petersen@...cle.com,
chenxiang66@...ilicon.com, linux-scsi@...r.kernel.org,
linux-kernel@...r.kernel.org, linuxarm@...wei.com,
prime.zeng@...wei.com, yangxingui@...wei.com
Subject: Re: [PATCH v2] scsi: libsas: Allocation SMP request is aligned to
ARCH_DMA_MINALIGN
On Tue, Mar 26, 2024 at 01:32:09PM +0000, John Garry wrote:
> > > + u8 *p;
> > > +
> > > + size = ALIGN(size, ARCH_DMA_MINALIGN);
>
>
> If this is a hisi_sas requirement, then why use ARCH_DMA_MINALIGN and not
> 16B as minimum alignment?
>
> Or are we really talking about an arch requirement?
One thing is that we should never allocate unaligned memory for
anything DMA mapped, or data will be corrupted by non-coherent DMA.
So ARCH_DMA_MINALIGN needs to be here. If specific hardware has
further requirements we'll need to communicated it through a field
or op vector.
Powered by blists - more mailing lists