Skip to content

Commit c524cec

Browse files
author
Nicolas Pitre
committed
arch: arm64: Increase MAX_XLAT_TABLES for userspace tests
Memory protection and userspace tests require more MMU translation tables than the default. Without this increase, tests fail with: E: CONFIG_MAX_XLAT_TABLES too small ASSERTION FAIL [ret == 0] @ arch/arm64/core/mmu.c:1244 privatize_page_range() returned -12 Increase defaults when both USERSPACE and TEST are enabled: - 32 tables for SMP configurations (matching qemu_cortex_a53 SMP) - 24 tables for non-SMP configurations (matching qemu_cortex_a53) This fixes: - sample.kernel.memory_protection.shared_mem (all platforms) - rtio.api.userspace (v8a, v9a) - rtio.api.userspace.submit_sem (v8a, v9a) Consequently the demand paging test needed adjustment to its qemu_cortex_a53 configs to keep working as this test is highly sensitive to the amount of available free memory. Signed-off-by: Nicolas Pitre <[email protected]>
1 parent 483a1c7 commit c524cec

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

arch/arm64/core/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,8 @@ config ARM64_PA_BITS
387387

388388
config MAX_XLAT_TABLES
389389
int "Maximum numbers of translation tables"
390+
default 32 if USERSPACE && TEST && SMP
391+
default 24 if USERSPACE && TEST
390392
default 20 if USERSPACE && (ARM64_VA_BITS >= 40)
391393
default 16 if USERSPACE
392394
default 12 if (ARM64_VA_BITS >= 40)

tests/kernel/mem_protect/demand_paging/mem_map/boards/qemu_cortex_a53.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33

44
CONFIG_BACKING_STORE_RAM=y
55
CONFIG_BACKING_STORE_RAM_PAGES=24
6-
CONFIG_SRAM_SIZE=400
6+
CONFIG_SRAM_SIZE=440

tests/kernel/mem_protect/demand_paging/mem_map/boards/qemu_cortex_a53_smp.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33

44
CONFIG_BACKING_STORE_RAM=y
55
CONFIG_BACKING_STORE_RAM_PAGES=24
6-
CONFIG_SRAM_SIZE=450
6+
CONFIG_SRAM_SIZE=520
77
CONFIG_DEMAND_PAGING_ALLOW_IRQ=y

0 commit comments

Comments
 (0)