From patchwork Tue Oct 4 13:13:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 77265 Delivered-To: patches@linaro.org Received: by 10.140.106.72 with SMTP id d66csp2212417qgf; Tue, 4 Oct 2016 06:13:50 -0700 (PDT) X-Received: by 10.28.158.2 with SMTP id h2mr16719899wme.48.1475586830249; Tue, 04 Oct 2016 06:13:50 -0700 (PDT) Return-Path: Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by mx.google.com with ESMTPS id iw5si4429619wjb.86.2016.10.04.06.13.49 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Oct 2016 06:13:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) client-ip=2001:8b0:1d0::2; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) smtp.mailfrom=pm215@archaic.org.uk; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from pm215 by orth.archaic.org.uk with local (Exim 4.84_2) (envelope-from ) id 1brPXX-0005uF-1J; Tue, 04 Oct 2016 14:13:47 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Riku Voipio Subject: [PATCH] linux-user: sparc64: Use correct target SHMLBA in shmat() Date: Tue, 4 Oct 2016 14:13:46 +0100 Message-Id: <1475586826-5670-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 2.7.4 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 --- linux-user/sparc64/target_syscall.h | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.7.4 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 */