]> git.itanic.dy.fi Git - linux-stable/commit
net: ipa: fix assumptions about DMA address size
authorAlex Elder <elder@linaro.org>
Thu, 18 Mar 2021 18:59:27 +0000 (13:59 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Sep 2022 09:10:33 +0000 (11:10 +0200)
commitc2cf0613d1ff43623f07c969357083aec4c15637
tree54c0a3c3cf42f1bb66abbc203161e3f270544d14
parentd58815af89791b4514eae2083f6cf2df8cdf2798
net: ipa: fix assumptions about DMA address size

[ Upstream commit d2fd2311de909a7f4e99b4bd11a19e6b671d6a6b ]

Some build time checks in ipa_table_validate_build() assume that a
DMA address is 64 bits wide.  That is more restrictive than it has
to be.  A route or filter table is 64 bits wide no matter what the
size of a DMA address is on the AP.  The code actually uses a
pointer to __le64 to access table entries, and a fixed constant
IPA_TABLE_ENTRY_SIZE to describe the size of those entries.

Loosen up two checks so they still verify some requirements, but
such that they do not assume the size of a DMA address is 64 bits.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stable-dep-of: cf412ec33325 ("net: ipa: properly limit modem routing table use")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ipa/ipa_table.c