diff mbox

[PULL,v2,08/22] linux-user: sparc64: Use correct target SHMLBA in shmat()

Message ID 7ff289e741b3ad6cc77b248e82afcede8c246180.1476796525.git.riku.voipio@linaro.org
State Accepted
Commit a7c65cbfe707aba92511bd63540a2be069bf9ffc
Headers show

Commit Message

Riku Voipio Oct. 18, 2016, 1:21 p.m. UTC
From: Peter Maydell <peter.maydell@linaro.org>


In commit 40df8c0c0722 support was added for target-specific
handling of SHMLBA. Unfortunately the sparc64-specific part
of the change got lost somewhere between the patch being
posted to the list and going into master:
 http://patchwork.ozlabs.org/patch/646980/
 http://patchwork.ozlabs.org/patch/673339/

Add the accidentally-dropped code.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Signed-off-by: Riku Voipio <riku.voipio@linaro.org>

---
 linux-user/sparc64/target_syscall.h | 7 +++++++
 1 file changed, 7 insertions(+)

-- 
2.1.4
diff mbox

Patch

diff --git a/linux-user/sparc64/target_syscall.h b/linux-user/sparc64/target_syscall.h
index b7e3bf8..2cbbaae 100644
--- a/linux-user/sparc64/target_syscall.h
+++ b/linux-user/sparc64/target_syscall.h
@@ -23,4 +23,11 @@  struct target_pt_regs {
 #define TARGET_MLOCKALL_MCL_CURRENT 0x2000
 #define TARGET_MLOCKALL_MCL_FUTURE  0x4000
 
+#define TARGET_FORCE_SHMLBA
+
+static inline abi_ulong target_shmlba(CPUSPARCState *env)
+{
+    return MAX(TARGET_PAGE_SIZE, 16 * 1024);
+}
+
 #endif /* SPARC64_TARGET_SYSCALL_H */