mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-12 20:35:23 +02:00
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:
parent
fece38d63a
commit
2d8f89ca0e
|
@ -34,6 +34,7 @@
|
||||||
DECLARE_STATIC_KEY_FALSE(page_shift_compat_enabled);
|
DECLARE_STATIC_KEY_FALSE(page_shift_compat_enabled);
|
||||||
extern int page_shift_compat;
|
extern int page_shift_compat;
|
||||||
|
|
||||||
|
#ifdef CONFIG_X86_64
|
||||||
static __always_inline unsigned __page_shift(void)
|
static __always_inline unsigned __page_shift(void)
|
||||||
{
|
{
|
||||||
if (static_branch_unlikely(&page_shift_compat_enabled))
|
if (static_branch_unlikely(&page_shift_compat_enabled))
|
||||||
|
@ -41,6 +42,9 @@ static __always_inline unsigned __page_shift(void)
|
||||||
else
|
else
|
||||||
return PAGE_SHIFT;
|
return PAGE_SHIFT;
|
||||||
}
|
}
|
||||||
|
#else /* !CONFIG_X86_64 */
|
||||||
|
#define __page_shift() PAGE_SHIFT
|
||||||
|
#endif /* CONFIG_X86_64 */
|
||||||
|
|
||||||
#define __PAGE_SHIFT __page_shift()
|
#define __PAGE_SHIFT __page_shift()
|
||||||
#define __PAGE_SIZE (_AC(1,UL) << __PAGE_SHIFT)
|
#define __PAGE_SIZE (_AC(1,UL) << __PAGE_SHIFT)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user