lkml.org 
[lkml]   [2024]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] scsi: libsas: Allocation SMP request is aligned to ARCH_DMA_MINALIGN
From
Date


On 2024/3/28 14:35, Christoph Hellwig wrote:
> 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.

Got it. Looks like it's still going to be aligned to ARCH_DMA_MINALIGN.

Thanks,
Yihang

>
>
> .
>

\
 
 \ /
  Last update: 2024-05-27 16:13    [W:0.073 / U:1.680 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site