From patchwork Tue Oct 18 13:21:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 9382133 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 16D66600CA for ; Tue, 18 Oct 2016 13:27:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 07BA9295DB for ; Tue, 18 Oct 2016 13:27:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F08A1295E1; Tue, 18 Oct 2016 13:27:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0CDF7295DC for ; Tue, 18 Oct 2016 13:27:15 +0000 (UTC) Received: from localhost ([::1]:41525 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bwUQE-0001gx-9q for patchwork-qemu-devel@patchwork.kernel.org; Tue, 18 Oct 2016 09:27:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53779) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bwULG-0006GX-5q for qemu-devel@nongnu.org; Tue, 18 Oct 2016 09:22:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bwULE-0000f2-Oq for qemu-devel@nongnu.org; Tue, 18 Oct 2016 09:22:06 -0400 Received: from mail-lf0-x232.google.com ([2a00:1450:4010:c07::232]:35937) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bwULE-0000eX-Gt for qemu-devel@nongnu.org; Tue, 18 Oct 2016 09:22:04 -0400 Received: by mail-lf0-x232.google.com with SMTP id b75so346721477lfg.3 for ; Tue, 18 Oct 2016 06:22:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=A3CaVHQJ8szVwiR0wdXfF7U9LyGEMuAVe4rxDstQtBk=; b=ame+t3gkGhBg4Vor0ySi8LyxQqPcEWwnp8QujLcfFn/JHLcVEV9eoibOzqasodRZ23 ig/MNNfoDJ7JS6BG66HAdJ6U7kh5Px2+/pQZl95cYj2LyQjR29YCpLEjU7Elsd3AJLlh VQunYLJ1YTCEAJmRuHsrvIQ8jiXYVqCTNQQLw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=A3CaVHQJ8szVwiR0wdXfF7U9LyGEMuAVe4rxDstQtBk=; b=Yef+Jmmp0CgMZiAr5KQQnlEQDdzfVZ/BT7SUuguYPy/MZYaBfblXQPHX61crG6iGM9 PcupLN2g7SFXSZ9zjLEGlh5XbFoJrCG9cXdvggedymovLpxkpAW3z4u12XFvTGJTuE4V TnYLzeyW2OxsP7r1R5fDu7aiIvNdFw5Yxlpkc1mVuXWAVY82xbc4A5uND/Ss52kptDGv 6RU328y8IPEDUMy5O5gKQieQYvatWG6tIBMR35s0UJHYu2s5eM2lhN53BguXixvO3XNX 6IAF72nY5AVm9G/Vm00yKU+OjeM7RZe4FMqNFLtAknrM/3Y74OBcNyHHZFwdZw6cVPab 2qcw== X-Gm-Message-State: AA6/9RktclCt+NbmTmZuokg9DQZv+tPlsKhw1SHExBvkYoqc3LMYoMYaZQ9DcOijTZOLKXVA X-Received: by 10.25.24.205 with SMTP id 74mr650037lfy.34.1476796921883; Tue, 18 Oct 2016 06:22:01 -0700 (PDT) Received: from beaming.home (91-157-170-157.elisa-laajakaista.fi. [91.157.170.157]) by smtp.gmail.com with ESMTPSA id 201sm9535359ljf.48.2016.10.18.06.22.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 18 Oct 2016 06:22:01 -0700 (PDT) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Tue, 18 Oct 2016 16:21:36 +0300 Message-Id: <7ff289e741b3ad6cc77b248e82afcede8c246180.1476796525.git.riku.voipio@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::232 Subject: [Qemu-devel] [PULL v2 08/22] linux-user: sparc64: Use correct target SHMLBA in shmat() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Peter Maydell 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 Signed-off-by: Riku Voipio --- linux-user/sparc64/target_syscall.h | 7 +++++++ 1 file changed, 7 insertions(+) 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 */