powerpc/64: Only WARN if __pa()/__va() called with bad addresses
authorMichael Ellerman <mpe@ellerman.id.au>
Wed, 6 Apr 2022 14:58:01 +0000 (00:58 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:23:12 +0000 (10:23 +0200)
commit5a8849d3cb80e31e74ab007a9a7c185950ee89da
tree37f8796b20ccdd8b3b29315c9dddc53ec08fcb8a
parent2530a7c23643a67951b67378136ad67034f53fb5
powerpc/64: Only WARN if __pa()/__va() called with bad addresses

[ Upstream commit c4bce84d0bd3f396f702d69be2e92bbd8af97583 ]

We added checks to __pa() / __va() to ensure they're only called with
appropriate addresses. But using BUG_ON() is too strong, it means
virt_addr_valid() will BUG when DEBUG_VIRTUAL is enabled.

Instead switch them to warnings, arm64 does the same.

Fixes: 4dd7554a6456 ("powerpc/64: Add VIRTUAL_BUG_ON checks for __va and __pa addresses")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220406145802.538416-5-mpe@ellerman.id.au
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/include/asm/page.h