[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 09/17] bsd-user: target_msync unused, remove it
|
From: |
Warner Losh |
|
Subject: |
[PATCH 09/17] bsd-user: target_msync unused, remove it |
|
Date: |
Fri, 2 Aug 2024 17:56:09 -0600 |
Nothing calls target_msync in the upstream or blitz fork, so remove it.
It will save us having to modernize it.
Signed-off-by: Warner Losh <imp@bsdimp.com>
---
bsd-user/mmap.c | 17 -----------------
bsd-user/qemu.h | 1 -
2 files changed, 18 deletions(-)
diff --git a/bsd-user/mmap.c b/bsd-user/mmap.c
index f3a4f1712da..fc69cb43ebd 100644
--- a/bsd-user/mmap.c
+++ b/bsd-user/mmap.c
@@ -739,20 +739,3 @@ int target_munmap(abi_ulong start, abi_ulong len)
mmap_unlock();
return ret;
}
-
-int target_msync(abi_ulong start, abi_ulong len, int flags)
-{
- abi_ulong end;
-
- if (start & ~TARGET_PAGE_MASK)
- return -EINVAL;
- len = TARGET_PAGE_ALIGN(len);
- end = start + len;
- if (end < start)
- return -EINVAL;
- if (end == start)
- return 0;
-
- start &= qemu_host_page_mask;
- return msync(g2h_untagged(start), end - start, flags);
-}
diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h
index ed6044cfdaf..a2bc14eea50 100644
--- a/bsd-user/qemu.h
+++ b/bsd-user/qemu.h
@@ -236,7 +236,6 @@ int target_munmap(abi_ulong start, abi_ulong len);
abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size,
abi_ulong new_size, unsigned long flags,
abi_ulong new_addr);
-int target_msync(abi_ulong start, abi_ulong len, int flags);
extern abi_ulong mmap_next_start;
abi_ulong mmap_find_vma(abi_ulong start, abi_ulong size);
void mmap_reserve(abi_ulong start, abi_ulong size);
--
2.45.1
- [PATCH 07/17] bsd-user: Remove deprecated -p argument, (continued)
- [PATCH 07/17] bsd-user: Remove deprecated -p argument, Warner Losh, 2024/08/02
- [PATCH 08/17] bsd-user: Eliminate unused qemu_uname_release, Warner Losh, 2024/08/02
- [PATCH 06/17] bsd-user: Remove load_flt_binary prototype, Warner Losh, 2024/08/02
- [PATCH 11/17] bsd-user: Replace set_brk and padzero with zerobss from linux-user, Warner Losh, 2024/08/02
- [PATCH 13/17] bsd-user: target_mprotect: rename prot to target_prot, Warner Losh, 2024/08/02
- [PATCH 09/17] bsd-user: target_msync unused, remove it,
Warner Losh <=
- [PATCH 16/17] bsd-user: Define validate_prot_to_pageflags and use in mprotect, Warner Losh, 2024/08/02
- [PATCH 14/17] bsd-user: target_mmap*: change prot to target_prot, Warner Losh, 2024/08/02
- [PATCH 15/17] bsd-user: target_mprotect: use helper host_page_size local, Warner Losh, 2024/08/02
- [PATCH 10/17] bsd-user: Pass image name down the stack, Warner Losh, 2024/08/02
- [PATCH 17/17] bsd-user: copy linux-user target_mprotect impl, Warner Losh, 2024/08/02