Re: [PATCH net-next] net: ipa: avoid 64-bit modulus

2021-03-24 Thread Alex Elder
On 3/24/21 12:12 PM, David Laight wrote: I think 'count' is also required to be a power of 2. so you could have checked 'addr & (size - 1)'. It is required to be, and that is checked elsewhere (in gsi_channel_data_valid()). And yes, size would therefore be a power-of-2, and so your clever test

RE: [PATCH net-next] net: ipa: avoid 64-bit modulus

2021-03-24 Thread David Laight
From: Alex Elder > Sent: 24 March 2021 17:07 > > On 3/24/21 11:27 AM, David Laight wrote: > > From: Alex Elder > >> Sent: 23 March 2021 01:05 > >> It is possible for a 32 bit x86 build to use a 64 bit DMA address. > >> > >> There are two remaining spots where the IPA driver does a modulo > >> oper

Re: [PATCH net-next] net: ipa: avoid 64-bit modulus

2021-03-24 Thread Alex Elder
On 3/24/21 11:27 AM, David Laight wrote: From: Alex Elder Sent: 23 March 2021 01:05 It is possible for a 32 bit x86 build to use a 64 bit DMA address. There are two remaining spots where the IPA driver does a modulo operation to check alignment of a DMA address, and under certain conditions thi

RE: [PATCH net-next] net: ipa: avoid 64-bit modulus

2021-03-24 Thread David Laight
From: Alex Elder > Sent: 23 March 2021 01:05 > It is possible for a 32 bit x86 build to use a 64 bit DMA address. > > There are two remaining spots where the IPA driver does a modulo > operation to check alignment of a DMA address, and under certain > conditions this can lead to a build error on i

Re: [PATCH net-next] net: ipa: avoid 64-bit modulus

2021-03-23 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Mon, 22 Mar 2021 20:05:05 -0500 you wrote: > It is possible for a 32 bit x86 build to use a 64 bit DMA address. > > There are two remaining spots where the IPA driver does a modulo > operation to check alignment of a DM

Re: [PATCH net-next] net: ipa: avoid 64-bit modulus

2021-03-22 Thread Randy Dunlap
On 3/22/21 6:05 PM, Alex Elder wrote: > It is possible for a 32 bit x86 build to use a 64 bit DMA address. > > There are two remaining spots where the IPA driver does a modulo > operation to check alignment of a DMA address, and under certain > conditions this can lead to a build error on i386 (at

[PATCH net-next] net: ipa: avoid 64-bit modulus

2021-03-22 Thread Alex Elder
It is possible for a 32 bit x86 build to use a 64 bit DMA address. There are two remaining spots where the IPA driver does a modulo operation to check alignment of a DMA address, and under certain conditions this can lead to a build error on i386 (at least). The alignment checks we're doing are f