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: 678093 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3spKmW0lGPz9s3v for ; Wed, 5 Oct 2016 00:40:27 +1100 (AEDT) Received: from localhost ([::1]:42667 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brPxH-00080q-QR for incoming@patchwork.ozlabs.org; Tue, 04 Oct 2016 09:40:23 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38754) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brPXg-0001vE-Vj for qemu-devel@nongnu.org; Tue, 04 Oct 2016 09:14:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1brPXb-0006NX-6C for qemu-devel@nongnu.org; Tue, 04 Oct 2016 09:13:55 -0400 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:47194) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brPXa-0006Lp-W3 for qemu-devel@nongnu.org; Tue, 04 Oct 2016 09:13:51 -0400 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 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 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:8b0:1d0::2 Subject: [Qemu-devel] [PATCH] 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: Riku Voipio , patches@linaro.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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(+) 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 */