From patchwork Thu Jun 23 15:47:16 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 2235 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 9978823F08 for ; Thu, 23 Jun 2011 15:47:20 +0000 (UTC) Received: from mail-qy0-f180.google.com (mail-qy0-f180.google.com [209.85.216.180]) by fiordland.canonical.com (Postfix) with ESMTP id 6C123A185BE for ; Thu, 23 Jun 2011 15:47:20 +0000 (UTC) Received: by qyk30 with SMTP id 30so1433133qyk.11 for ; Thu, 23 Jun 2011 08:47:20 -0700 (PDT) Received: by 10.229.137.149 with SMTP id w21mr1712264qct.59.1308844039567; Thu, 23 Jun 2011 08:47:19 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.229.230.139 with SMTP id jm11cs22205qcb; Thu, 23 Jun 2011 08:47:19 -0700 (PDT) Received: by 10.14.122.81 with SMTP id s57mr1612216eeh.195.1308844038456; Thu, 23 Jun 2011 08:47:18 -0700 (PDT) Received: from mail-ey0-f178.google.com (mail-ey0-f178.google.com [209.85.215.178]) by mx.google.com with ESMTPS id d48si3083399eec.69.2011.06.23.08.47.16 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 23 Jun 2011 08:47:17 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.215.178 is neither permitted nor denied by best guess record for domain of riku.voipio@linaro.org) client-ip=209.85.215.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.215.178 is neither permitted nor denied by best guess record for domain of riku.voipio@linaro.org) smtp.mail=riku.voipio@linaro.org Received: by eya25 with SMTP id 25so747589eya.37 for ; Thu, 23 Jun 2011 08:47:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.14.120.199 with SMTP id p47mr1456280eeh.163.1308844036605; Thu, 23 Jun 2011 08:47:16 -0700 (PDT) Received: by 10.213.8.78 with HTTP; Thu, 23 Jun 2011 08:47:16 -0700 (PDT) Date: Thu, 23 Jun 2011 18:47:16 +0300 Message-ID: Subject: linux-user: Fix sync_file_range on 32bit mips From: Riku Voipio To: Patch Tracking >From d19bb3509bd2b81568a850f579008080287ffe95 Mon Sep 17 00:00:00 2001 Message-Id: In-Reply-To: References: From: Riku Voipio Date: Mon, 20 Jun 2011 16:24:39 +0300 Subject: [PATCH 18/18] linux-user: Fix sync_file_range on 32bit mips As noticed while looking at "Bump do_syscall() up to 8 syscall arguments" patch, sync_file_range uses a pad argument on 32bit mips. Deal with it by reading the correct arguments when on mips. Signed-off-by: Riku Voipio --- linux-user/syscall.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index aa11a2c..beb482c 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -7842,8 +7842,13 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, #if defined(TARGET_NR_sync_file_range) case TARGET_NR_sync_file_range: #if TARGET_ABI_BITS == 32 +#if defined(TARGET_MIPS) + ret = get_errno(sync_file_range(arg1, target_offset64(arg3, arg4), + target_offset64(arg5, arg6), arg7)); +#else ret = get_errno(sync_file_range(arg1, target_offset64(arg2, arg3), target_offset64(arg4, arg5), arg6)); +#endif /* !TARGET_MIPS */ #else ret = get_errno(sync_file_range(arg1, arg2, arg3, arg4)); #endif -- 1.7.4.1