book3s64/hash: Early detect debug_pagealloc size requirement
authorRitesh Harjani (IBM) <ritesh.list@gmail.com>
Fri, 18 Oct 2024 17:29:53 +0000 (22:59 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 23 Oct 2024 07:53:20 +0000 (18:53 +1100)
commit8846d9683884fa9ef5bb160011a748701216e186
tree226b2c90f695b14ea421064e9a05458a06285b36
parent76b7d6463fc504ac266472f5948b83902dfca4c6
book3s64/hash: Early detect debug_pagealloc size requirement

Add hash_supports_debug_pagealloc() helper to detect whether
debug_pagealloc can be supported on hash or not. This checks for both,
whether debug_pagealloc config is enabled and the linear map should
fit within rma_size/4 region size.

This can then be used early during htab_init_page_sizes() to decide
linear map pagesize if hash supports either debug_pagealloc or
kfence.

Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://patch.msgid.link/c33c6691b2a2cf619cc74ac100118ca4dbf21a48.1729271995.git.ritesh.list@gmail.com
arch/powerpc/mm/book3s64/hash_utils.c