]> git.itanic.dy.fi Git - linux-stable/commit
net: ipa: fix table alignment requirement
authorAlex Elder <elder@linaro.org>
Thu, 18 Mar 2021 18:59:29 +0000 (13:59 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Sep 2022 09:10:34 +0000 (11:10 +0200)
commit3ae25aca3f892087737e6e25c8e0eb49eb8fe0fb
treeafcca2103728f29861b6a66fb44c50cb64757bfd
parentc2cf0613d1ff43623f07c969357083aec4c15637
net: ipa: fix table alignment requirement

[ Upstream commit e5d4e96b44cf20330c970c3e30ea0a8c3a23feca ]

We currently have a build-time check to ensure that the minimum DMA
allocation alignment satisfies the constraint that IPA filter and
route tables must point to rules that are 128-byte aligned.

But what's really important is that the actual allocated DMA memory
has that alignment, even if the minimum is smaller than that.

Remove the BUILD_BUG_ON() call checking against minimim DMA alignment
and instead verify at rutime that the allocated memory is properly
aligned.

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