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: 383389337
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 Carlos Llamas
parent ac98b230db
commit a8df614576

View File

@@ -40,6 +40,7 @@
DECLARE_STATIC_KEY_FALSE(page_shift_compat_enabled);
extern int page_shift_compat __ro_after_init;
#ifdef CONFIG_X86_64
static __always_inline unsigned __page_shift(void)
{
if (static_branch_unlikely(&page_shift_compat_enabled))
@@ -47,6 +48,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)