ANDROID: 16K: __PAGE_ALIGN mmap hint address

In page-compat mode align mmap hint to the emulated page size.

Bug: 383389337
Bug: 315325080
Bug: 302403436
Change-Id: I129b34aaa013e1c548d20a97b8452e50ce8426c9
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
This commit is contained in:
Kalesh Singh
2023-11-03 13:25:50 -07:00
committed by Carlos Llamas
parent a1e630ea0d
commit 81e0928547

View File

@@ -225,10 +225,10 @@ out:
*/
static inline unsigned long round_hint_to_min(unsigned long hint)
{
hint &= PAGE_MASK;
hint &= __PAGE_MASK;
if (((void *)hint != NULL) &&
(hint < mmap_min_addr))
return PAGE_ALIGN(mmap_min_addr);
return __PAGE_ALIGN(mmap_min_addr);
return hint;
}