diff options
author | BALATON Zoltan <balaton@eik.bme.hu> | 2024-05-05 14:10:08 +0200 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-05-06 11:17:15 +0200 |
commit | 86b7c5518232c8e5cda7951cbe62b0b23fc0b4e5 (patch) | |
tree | 9bf78ea08c94d92d5cd98dd2484e8f97fbf04e85 /bsd-user | |
parent | 1072f927f0966d37b37c52084b4eb957288b2704 (diff) |
exec/cpu: Rename PAGE_BITS macro to PAGE_RWX
This macro can be used to abbreviate PAGE_READ | PAGE_WRITE | PAGE_EXEC
for which PAGE_RWX is a better name and renaming it also shows it is
not related to TARGET_PAGE_BITS.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20240505121008.44A0D4E602D@zero.eik.bme.hu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'bsd-user')
-rw-r--r-- | bsd-user/mmap.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bsd-user/mmap.c b/bsd-user/mmap.c index 3ef11b2807..c785615392 100644 --- a/bsd-user/mmap.c +++ b/bsd-user/mmap.c @@ -96,7 +96,7 @@ int target_mprotect(abi_ulong start, abi_ulong len, int prot) end = host_end; } ret = mprotect(g2h_untagged(host_start), - qemu_host_page_size, prot1 & PAGE_BITS); + qemu_host_page_size, prot1 & PAGE_RWX); if (ret != 0) goto error; host_start += qemu_host_page_size; @@ -107,7 +107,7 @@ int target_mprotect(abi_ulong start, abi_ulong len, int prot) prot1 |= page_get_flags(addr); } ret = mprotect(g2h_untagged(host_end - qemu_host_page_size), - qemu_host_page_size, prot1 & PAGE_BITS); + qemu_host_page_size, prot1 & PAGE_RWX); if (ret != 0) goto error; host_end -= qemu_host_page_size; @@ -174,7 +174,7 @@ static int mmap_frag(abi_ulong real_start, return -1; prot1 = prot; } - prot1 &= PAGE_BITS; + prot1 &= PAGE_RWX; prot_new = prot | prot1; if (fd != -1) { |