diff options
| author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-03-07 13:47:21 +0100 |
|---|---|---|
| committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-03-09 14:54:32 +0100 |
| commit | 84d66261bef3cdfea3bd1fb052a7ba38abb34b18 (patch) | |
| tree | fe24c81b2dfdf6fe723849bf42edbb9a01849d4d /bsd-user/bsd-mem.h | |
| parent | 019b4e84eda27a006f94ed0faa024babd0a97e97 (diff) | |
| download | focaccia-qemu-84d66261bef3cdfea3bd1fb052a7ba38abb34b18.tar.gz focaccia-qemu-84d66261bef3cdfea3bd1fb052a7ba38abb34b18.zip | |
bsd-user: Propagate alignment argument to mmap_find_vma()
Propagate the alignment to mmap_find_vma(), effectively embedding mmap_find_vma_aligned() within mmap_find_vma(). Add a comment in do_bsd_shmat() to clarify alignment above page size is not required. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Warner Losh <imp@bsdimp.com> Message-Id: <20250308122842.76377-3-philmd@linaro.org>
Diffstat (limited to 'bsd-user/bsd-mem.h')
| -rw-r--r-- | bsd-user/bsd-mem.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bsd-user/bsd-mem.h b/bsd-user/bsd-mem.h index f5ec0de24c..90ca0e3377 100644 --- a/bsd-user/bsd-mem.h +++ b/bsd-user/bsd-mem.h @@ -370,9 +370,11 @@ static inline abi_long do_bsd_shmat(int shmid, abi_ulong shmaddr, int shmflg) if (shmaddr) { host_raddr = shmat(shmid, (void *)g2h_untagged(shmaddr), shmflg); } else { + abi_ulong alignment; abi_ulong mmap_start; - mmap_start = mmap_find_vma(0, shm_info.shm_segsz); + alignment = 0; /* alignment above page size not required */ + mmap_start = mmap_find_vma(0, shm_info.shm_segsz, alignment); if (mmap_start == -1) { return -TARGET_ENOMEM; |