[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b9bc20f3-cf68-6546-1979-6b36f622913f@acm.org>
Date: Wed, 1 Feb 2023 09:20:39 -0800
From: Bart Van Assche <bvanassche@....org>
To: Bjorn Andersson <quic_bjorande@...cinc.com>,
Alim Akhtar <alim.akhtar@...sung.com>,
Avri Altman <avri.altman@....com>,
"James E.J. Bottomley" <jejb@...ux.ibm.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
Asutosh Das <quic_asutoshd@...cinc.com>
Cc: Bean Huo <beanhuo@...ron.com>,
Stanley Chu <stanley.chu@...iatek.com>,
Jinyoung Choi <j-young.choi@...sung.com>,
linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-msm@...r.kernel.org, mani@...nel.org
Subject: Re: [PATCH] scsi: ufs: core: Limit DMA alignment check
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@....org>
Powered by blists - more mailing lists