[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 14/37] linux-user: Fix madvise(MADV_DONTNEED) on alpha
From: |
Laurent Vivier |
Subject: |
[PULL 14/37] linux-user: Fix madvise(MADV_DONTNEED) on alpha |
Date: |
Wed, 28 Sep 2022 22:27:14 +0200 |
From: Ilya Leoshkevich <iii@linux.ibm.com>
MADV_DONTNEED has a different value on alpha, compared to all the other
architectures. Fix by using TARGET_MADV_DONTNEED instead of
MADV_DONTNEED.
Fixes: 892a4f6a750a ("linux-user: Add partial support for MADV_DONTNEED")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220906000839.1672934-3-iii@linux.ibm.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
linux-user/mmap.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/linux-user/mmap.c b/linux-user/mmap.c
index 83fdae7034ea..942bec7e8528 100644
--- a/linux-user/mmap.c
+++ b/linux-user/mmap.c
@@ -22,6 +22,7 @@
#include "qemu.h"
#include "user-internals.h"
#include "user-mmap.h"
+#include "target_mman.h"
static pthread_mutex_t mmap_mutex = PTHREAD_MUTEX_INITIALIZER;
static __thread int mmap_lock_count;
@@ -897,7 +898,7 @@ abi_long target_madvise(abi_ulong start, abi_ulong len_in,
int advice)
* anonymous mappings. In this case passthrough is safe, so do it.
*/
mmap_lock();
- if (advice == MADV_DONTNEED &&
+ if (advice == TARGET_MADV_DONTNEED &&
can_passthrough_madv_dontneed(start, end)) {
ret = get_errno(madvise(g2h_untagged(start), len, MADV_DONTNEED));
if (ret == 0) {
--
2.37.3
- [PULL 03/37] linux-user: Add missing signals in strace output, (continued)
- [PULL 03/37] linux-user: Add missing signals in strace output, Laurent Vivier, 2022/09/28
- [PULL 11/37] linux-user: Add strace for clock_nanosleep(), Laurent Vivier, 2022/09/28
- [PULL 01/37] linux-user: use 'max' instead of 'qemu32' / 'qemu64' by default, Laurent Vivier, 2022/09/28
- [PULL 04/37] linux-user: Add missing clock_gettime64() syscall strace, Laurent Vivier, 2022/09/28
- [PULL 07/37] linux-user/hppa: Use EXCP_DUMP() to show enhanced debug info, Laurent Vivier, 2022/09/28
- [PULL 09/37] linux-user: Fix strace of chmod() if mode == 0, Laurent Vivier, 2022/09/28
- [PULL 06/37] linux-user: Log failing executable in EXCP_DUMP(), Laurent Vivier, 2022/09/28
- [PULL 10/37] linux-user/hppa: Set TASK_UNMAPPED_BASE to 0xfa000000 for hppa arch, Laurent Vivier, 2022/09/28
- [PULL 12/37] linux-user: Show timespec on strace for futex(), Laurent Vivier, 2022/09/28
- [PULL 08/37] linux-user/hppa: Dump IIR on register dump, Laurent Vivier, 2022/09/28
- [PULL 14/37] linux-user: Fix madvise(MADV_DONTNEED) on alpha,
Laurent Vivier <=
- [PULL 18/37] linux-user: Fix TARGET_PROT_SEM for XTENSA, Laurent Vivier, 2022/09/28
- [PULL 13/37] linux-user: Provide MADV_* definitions, Laurent Vivier, 2022/09/28
- [PULL 15/37] linux-user: Implement stracing madvise(), Laurent Vivier, 2022/09/28
- [PULL 21/37] linux-user/hppa: Drop stack guard page on hppa target, Laurent Vivier, 2022/09/28
- [PULL 20/37] linux-user/hppa: Add signal trampoline for hppa target, Laurent Vivier, 2022/09/28
- [PULL 16/37] linux-user: Passthrough MADV_DONTNEED for certain file mappings, Laurent Vivier, 2022/09/28
- [PULL 17/37] tests/tcg/linux-test: Add linux-madvise test, Laurent Vivier, 2022/09/28
- [PULL 23/37] linux-user/hppa: Allow PROT_GROWSUP and PROT_GROWSDOWN in mprotect(), Laurent Vivier, 2022/09/28
- [PULL 22/37] linux-user/hppa: Increase guest stack size to 80MB for hppa target, Laurent Vivier, 2022/09/28
- [PULL 24/37] linux-user/hppa: Fix setup_sigcontext(), Laurent Vivier, 2022/09/28