From patchwork Mon Jun 20 16:20:23 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 101166 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id F10B7B6F89 for ; Tue, 21 Jun 2011 03:20:14 +1000 (EST) Received: from localhost ([::1]:35453 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYi8x-0002UV-Ne for incoming@patchwork.ozlabs.org; Mon, 20 Jun 2011 13:20:11 -0400 Received: from eggs.gnu.org ([140.186.70.92]:45201) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYhDu-0003ee-9n for qemu-devel@nongnu.org; Mon, 20 Jun 2011 12:21:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QYhDr-0008Sn-Dn for qemu-devel@nongnu.org; Mon, 20 Jun 2011 12:21:13 -0400 Received: from afflict.kos.to ([92.243.29.197]:34646) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYhDq-0008SF-P5 for qemu-devel@nongnu.org; Mon, 20 Jun 2011 12:21:11 -0400 Received: from kos.to (a88-115-163-181.elisa-laajakaista.fi [88.115.163.181]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by afflict.kos.to (Postfix) with ESMTPSA id 08F1F26689; Mon, 20 Jun 2011 16:21:08 +0000 (UTC) Received: by kos.to (sSMTP sendmail emulation); Mon, 20 Jun 2011 19:21:08 +0300 From: riku.voipio@iki.fi To: qemu-devel@nongnu.org Date: Mon, 20 Jun 2011 19:20:23 +0300 Message-Id: X-Mailer: git-send-email 1.7.4.1 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 92.243.29.197 Cc: Riku Voipio Subject: [Qemu-devel] [PATCH 18/18] linux-user: Fix sync_file_range on 32bit mips X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Riku Voipio 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