ANDROID: 16K: Only support page size emulation for x86_64

The original intention was to keep this generic so that it can be
used for other architectures (arm64).

This is no longer needed, only emulate PAGE_SHIFT for x86_64.

Bug: 328138888
Bug: 345252092
Bug: 315325080
Bug: 302403436
Change-Id: Ie1fb9b8cf6a18de77b2ec615ba5452060216c483
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
This commit is contained in:
Kalesh Singh 2024-06-10 11:21:43 -07:00 committed by Matthias Männich
parent fece38d63a
commit 2d8f89ca0e

View File

@ -34,6 +34,7 @@
DECLARE_STATIC_KEY_FALSE(page_shift_compat_enabled);
extern int page_shift_compat;
#ifdef CONFIG_X86_64
static __always_inline unsigned __page_shift(void)
{
if (static_branch_unlikely(&page_shift_compat_enabled))
@ -41,6 +42,9 @@ static __always_inline unsigned __page_shift(void)
else
return PAGE_SHIFT;
}
#else /* !CONFIG_X86_64 */
#define __page_shift() PAGE_SHIFT
#endif /* CONFIG_X86_64 */
#define __PAGE_SHIFT __page_shift()
#define __PAGE_SIZE (_AC(1,UL) << __PAGE_SHIFT)