Re: [PATCH v2] scsi: libsas: Allocation SMP request is aligned to ARCH_DMA_MINALIGN

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/28/24 16:29, Christoph Hellwig wrote:
> On Thu, Mar 28, 2024 at 04:23:22PM +0900, Damien Le Moal wrote:
>> But I thought that the original issue was that some arch have ARCH_DMA_MINALIGN
>> down to 8B but hisi driver needs at least 16 ?
>>
>> So in the end, you need something like:
>>
>> 	size = ALIGN(size, max(16, ARCH_DMA_MINALIGN));
>>
>> no ?
> 
> I don't think we ever have an 8 byte dma minalign.  With 8-byte
> aligned addresses dma_mapping_error could run into problems.

My bad: it is kmalloc() that can return something aligned to 8B...
So "size = ALIGN(size, ARCH_DMA_MINALIGN);" is the right thing to do.

-- 
Damien Le Moal
Western Digital Research





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux