diff mbox series

[09/17] bsd-user: target_msync unused, remove it

Message ID 20240802235617.7971-10-imp@bsdimp.com
State New
Headers show
Series For 9.2: A bunch of cleanups and work towards variable pagesize support | expand

Commit Message

Warner Losh Aug. 2, 2024, 11:56 p.m. UTC
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(-)

Comments

Richard Henderson Aug. 4, 2024, 7:28 a.m. UTC | #1
On 8/3/24 09:56, Warner Losh wrote:
> 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(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~
diff mbox series

Patch

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);