]> 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)
committerDavid S. Miller <davem@davemloft.net>
Thu, 18 Mar 2021 23:20:34 +0000 (16:20 -0700)
commite5d4e96b44cf20330c970c3e30ea0a8c3a23feca
treeda22178ff3813b1baab07f36004ddd65bb9d1280
parent3c54b7be5d3677f37dfcd68afcc1d8e2b677a5b9
net: ipa: fix table alignment requirement

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>
drivers/net/ipa/ipa_table.c