Content-Type: multipart/mixed; boundary="===============3884405633493238769==" MIME-Version: 1.0 From: David Laight To: kbuild-all@lists.01.org Subject: Re: Bogus struct page layout on 32-bit Date: Sat, 17 Apr 2021 13:08:30 +0000 Message-ID: In-Reply-To: List-Id: --===============3884405633493238769== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Grygorii Strashko > Sent: 16 April 2021 10:27 ... > Sry, for delayed reply. > = > The TI platforms am3/4/5 (cpsw) and Keystone 2 (netcp) can do only 32bit = DMA even in case of LPAE > (dma-ranges are used). > Originally, as I remember, CONFIG_ARCH_DMA_ADDR_T_64BIT has not been sele= cted for the LPAE case > on TI platforms and the fact that it became set is the result of multi-pa= ltform/allXXXconfig/DMA > optimizations and unification. > (just checked - not set in 4.14) > = > Probable commit 4965a68780c5 ("arch: define the ARCH_DMA_ADDR_T_64BIT con= fig symbol in lib/Kconfig"). > = > The TI drivers have been updated, finally to accept ARCH_DMA_ADDR_T_64BIT= =3Dy by using things like > (__force u32) > for example. Hmmm using (__force u32) is probably wrong. If an address +length >=3D 2**32 can get passed then the IO request needs to be errored (or a bounce buffer used). Otherwise you can get particularly horrid corruptions. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1= PT, UK Registration No: 1397386 (Wales) --===============3884405633493238769==--