From 382e101f8a670324082801e122e9d1ac53117a5d Mon Sep 17 00:00:00 2001 From: Chris Friedt Date: Mon, 10 Feb 2025 08:51:35 -0600 Subject: [PATCH 1/2] kernel: mmu: update dependencies for x86 Currently, some x86 platforms do not support MMU operations out-of-the-box. I don't claim to understand all of the nuances of the x86 arch by any means, so this change is mainly intended to fix a regression by only allowing MMU to be selected on x86 when x86_mmu is also selected. This affects the following platforms. * intel_ish_5_4_1 * intel_ish_5_6_0 * intel_ish_5_8_0 Previously, linking would fail because `arch_mem_map()` and `arch_mem_unmap()` were not implemented on these platforms. Signed-off-by: Chris Friedt --- kernel/Kconfig.vm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/Kconfig.vm b/kernel/Kconfig.vm index 923d511d9dbd..009d409e5f1c 100644 --- a/kernel/Kconfig.vm +++ b/kernel/Kconfig.vm @@ -100,7 +100,7 @@ endif # KERNEL_VM_SUPPORT menuconfig MMU bool "MMU features" - depends on CPU_HAS_MMU + depends on CPU_HAS_MMU && (!X86 || (X86 && X86_MMU)) select KERNEL_VM_SUPPORT help This option is enabled when the CPU's memory management unit is active From 0164f55dc469c14fe2ae72c0c0797c3ca0bb52b8 Mon Sep 17 00:00:00 2001 From: Chris Friedt Date: Mon, 10 Feb 2025 09:06:21 -0600 Subject: [PATCH 2/2] test: posix: xsi_realtime: do not exclude intel_ish platforms Previously, intel_ish platforms would fail to link due to missing `arch_mem_map()` and `arch_mem_unmap()` symbols due to nuances in the x86 architecture on those platforms. The previous commit addresses this in kernel/Kconfig.vm by adding specific x86 conditions for dependencies, so the platforms no longer need to be filtered, the implementation of `mmap()` and `munmap()` on those platforms will return -1 and set errno to `ENOTSUP`. Signed-off-by: Chris Friedt --- tests/posix/xsi_realtime/testcase.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tests/posix/xsi_realtime/testcase.yaml b/tests/posix/xsi_realtime/testcase.yaml index d3b98962cf2d..f084983c38b3 100644 --- a/tests/posix/xsi_realtime/testcase.yaml +++ b/tests/posix/xsi_realtime/testcase.yaml @@ -13,10 +13,6 @@ common: platform_exclude: # linker_zephyr_pre0.cmd:140: syntax error (??) - qemu_xtensa/dc233c - # CONFIG_MMU=y but no arch_mem_map() or arch_mem_unmap() - - intel_ish_5_4_1 - - intel_ish_5_6_0 - - intel_ish_5_8_0 - native_sim - native_sim/native/64 tests: