mirror of
https://github.com/raspberrypi/linux.git
synced 2026-01-04 18:27:36 +00:00
Merge tag 'mm-hotfixes-stable-2024-07-26-14-33' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Pull misc hotfixes from Andrew Morton: "11 hotfixes, 7 of which are cc:stable. 7 are MM, 4 are other" * tag 'mm-hotfixes-stable-2024-07-26-14-33' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: nilfs2: handle inconsistent state in nilfs_btnode_create_block() selftests/mm: skip test for non-LPA2 and non-LVA systems mm/page_alloc: fix pcp->count race between drain_pages_zone() vs __rmqueue_pcplist() mm: memcg: add cacheline padding after lruvec in mem_cgroup_per_node alloc_tag: outline and export free_reserved_page() decompress_bunzip2: fix rare decompression failure mm/huge_memory: avoid PMD-size page cache if needed mm: huge_memory: use !CONFIG_64BIT to relax huge page alignment on 32 bit machines mm: fix old/young bit handling in the faulting path dt-bindings: arm: update James Clark's email address MAINTAINERS: mailmap: update James Clark's email address
This commit is contained in:
@@ -293,6 +293,20 @@ static int run_test(struct testcase *test, int count)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef __aarch64__
|
||||
/* Check if userspace VA > 48 bits */
|
||||
static int high_address_present(void)
|
||||
{
|
||||
void *ptr = mmap((void *)(1UL << 50), 1, PROT_READ | PROT_WRITE,
|
||||
MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED, -1, 0);
|
||||
if (ptr == MAP_FAILED)
|
||||
return 0;
|
||||
|
||||
munmap(ptr, 1);
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int supported_arch(void)
|
||||
{
|
||||
#if defined(__powerpc64__)
|
||||
@@ -300,7 +314,7 @@ static int supported_arch(void)
|
||||
#elif defined(__x86_64__)
|
||||
return 1;
|
||||
#elif defined(__aarch64__)
|
||||
return 1;
|
||||
return high_address_present();
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user