lkml.org 
[lkml]   [2023]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] scsi: ufs: core: Limit DMA alignment check
From
On 1/31/23 19:49, Bjorn Andersson wrote:
> The three DMA memory regions allocated for the host memory space is
> documented to require alignment of 128, 1024 and 1024 respectively, but
> the returned address is checked for PAGE_SIZE alignment.
>
> In the case these allocations are serviced by e.g. the Arm SMMU, the
> size and alignment will be determined by its supported page sizes. In
> most cases SZ_4K and a few larger sizes are available.
>
> In the typical configuration this does not cause problems, but in the
> event that the system PAGE_SIZE is increased beyond 4k, it's no longer
> reasonable to expect that the allocation will be PAGE_SIZE aligned.
>
> Limit the DMA alignment check to the actual alignment requirements
> written in the comments in the code, to avoid the UFS core refusing to
> initialize with such configuration.

Reviewed-by: Bart Van Assche <bvanassche@acm.org>

\
 
 \ /
  Last update: 2023-03-27 00:06    [W:0.666 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site