Skip to content

Commit bca2ef6

Browse files
cfriedtkartben
authored andcommitted
posix: mem: remove imply MMU from POSIX options
With MMU being converted to a non-user-configurable option, we can rely on that exclusively to know whether arch_mem_map() and arch_mem_unmap() are available and we can remove the workarounds in POSIX at the Kconfig level. Signed-off-by: Chris Friedt <[email protected]>
1 parent e43fa18 commit bca2ef6

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

lib/posix/options/Kconfig.mem

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,12 @@ config POSIX_SHARED_MEMORY_OBJECTS
2727

2828
config POSIX_MAPPED_FILES
2929
bool "POSIX memory-mapped files"
30-
# disable Xtensa for now until linker issues are resolved
31-
imply MMU if (CPU_HAS_MMU && !XTENSA)
3230
help
3331
Select 'y' here and Zephyr will provide support for mmap(), msync(), and munmap().
3432

33+
Note: This feature depends on hardware MMU support. If the underlying platform does not
34+
support an MMU, then affected POSIX API functions may return -1 and set errno to ENOTSUP.
35+
3536
For more information, please see
3637
https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/V2_chap02.html
3738
https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_port.html#tag_24_03_04
@@ -43,17 +44,23 @@ config POSIX_MEMLOCK
4344
help
4445
Select 'y' here and Zephyr will provide support for mlockall() and munlockall().
4546

47+
Note: This feature depends on hardware MMU support as well as DEMAND_PAGING. If the
48+
underlying platform does not support an MMU or DEMAND_PAGING, then affected POSIX API
49+
functions will return -1 and set errno to ENOTSUP.
50+
4651
For more information, please see
4752
https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/V2_chap02.html
4853
https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_port.html#tag_24_03_04
4954

5055
config POSIX_MEMLOCK_RANGE
5156
bool "POSIX range memory locking"
52-
imply MMU if (CPU_HAS_MMU && ARCH_HAS_DEMAND_PAGING)
5357
imply DEMAND_PAGING
5458
help
5559
Select 'y' here and Zephyr will provide support for mlock() and munlock().
5660

61+
Note: This feature depends on hardware MMU support. If the underlying platform does not
62+
support an MMU, then affected POSIX API functions will return -1 and set errno to ENOTSUP.
63+
5764
For more information, please see
5865
https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/V2_chap02.html
5966
https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_port.html#tag_24_03_04

0 commit comments

Comments
 (0)