From patchwork Wed May 31 13:08:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 100749 Delivered-To: patch@linaro.org Received: by 10.182.202.35 with SMTP id kf3csp294113obc; Wed, 31 May 2017 06:11:32 -0700 (PDT) X-Received: by 10.200.35.177 with SMTP id q46mr31532760qtq.158.1496236291950; Wed, 31 May 2017 06:11:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496236291; cv=none; d=google.com; s=arc-20160816; b=tGadevj/cwjpe45CZp2ISXu1OzJB/BNzPPnTAp1wUboLRPMd90ob9ecmi9H+Kkw0YD F1R/M7gBtops4KCNc7wmDiIgu8RAdv+2A2PWFe/HJ8xDTD+8vbQoXatO61z3yuMIxbmi TZVkpTJH2CODVQzOfYil2kc4Iw5w6xU5YiGpD/gSfDgnvVktIu0P6vbyThAQYzxIHiw8 OLHbapacwRD+urdv57nicX6Z7nc0EAV+uDbsubmUO/9K6uCV0DRhZs2eFk8im1SqK+wo 3n7ZaRww7O6PyhtobS7SipvltWmefhPv3Kir2aGu1CrqH8uBSVQvMgNNDpaDIyVCDSTE YS5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=ro0PfRjsVkhc/pvBMyQZREjtRPqkIWjlcs9UnUNz23Q=; b=Ig1AecOFFdsMQrm+zzTs5jxYsTTNgI9c4s09E7khz2QlTIuzEK23Fi7DFUWOHve39x i0hOouQ9VjNP863NgHl2hED1TNxlMqeNdlOyclr5fLPqnXK3AG0GM63n34GOWRxaAH6/ 82unmMsOKSGWPpmmDBRni1UCdBAdWo0j5AM+QeQk4SG+Kvnl1rhGvsENiG+IBDK4ZSCm 6nVOnKKTcb9CBRTQAyI7nHkRDpZ1xNTWOd3kF9C61HoK+iPWbXyV1X/6d0BFxkrB6czO tpxNbOJWakCSqzQnvPPR0zr4lYlrwBC3mwPtPZ42S601NJ62f4WudVnF4LRBFDKusKLO rDAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id s32si16187527qts.244.2017.05.31.06.11.31 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 31 May 2017 06:11:31 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:59333 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dG3PN-0001B8-9x for patch@linaro.org; Wed, 31 May 2017 09:11:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36698) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dG3Mb-0007SC-K4 for qemu-devel@nongnu.org; Wed, 31 May 2017 09:08:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dG3Ma-0003cS-Lg for qemu-devel@nongnu.org; Wed, 31 May 2017 09:08:37 -0400 Received: from mail-lf0-x22a.google.com ([2a00:1450:4010:c07::22a]:35916) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dG3Ma-0003bx-Eu for qemu-devel@nongnu.org; Wed, 31 May 2017 09:08:36 -0400 Received: by mail-lf0-x22a.google.com with SMTP id h4so8614275lfj.3 for ; Wed, 31 May 2017 06:08:36 -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=ro0PfRjsVkhc/pvBMyQZREjtRPqkIWjlcs9UnUNz23Q=; b=U2lmeerRitNiy7ne41dWh2MXGJSqT0MY9mJct0ZBPyolEe7kyy89yaix3skIDUON8E a3zuetGA/fy45zSaK+E2Ql6pt5SLS7e/05CAFHuAuB0dtDtAcUF0cPfPvEd0Pc7OiM3S gzCcvC6z6XNTboMG435obuu6cv9HNY5oEN7oI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ro0PfRjsVkhc/pvBMyQZREjtRPqkIWjlcs9UnUNz23Q=; b=ruNHKyu2Qbd29ay0V6uoVBbZ/fNJctkJrjCMtkx7OWaGXb/+UiuJomf1CXN7rcgavt /4JE+PnPqoOlFNg8LRKOzD1aA31Hg+ihpFQCT6F+rOFEh0LTyFJ8fQqXUFQdZrB3+ped eZ2jntE2o+6OIEks1hdwjCtfzvLJXe+Ex8eB056QinWCU3rmL1yuHzby2DSu8DsqHTys f6v1nJZKf7I32TVtJgXkgwXHAcwFkF0fZ6qErwhwAVUN5+c/DLtXuGoL9tXndfo8NZwK 8E5EuMJ+/jFATRaCRpfF2tI85xQl5DQWeF4NnhpQg7KEiNwADS6NTfQFqFsFA6EmFY7Q wETQ== X-Gm-Message-State: AODbwcDfQRZsBk9+khibMNPpFJlcs0bpkVlyL3K90uIGaDNomsCk3FeN hxv/tyZCySkYL+Ou7F4Ggg== X-Received: by 10.25.19.31 with SMTP id j31mr7472258lfi.79.1496236115103; Wed, 31 May 2017 06:08:35 -0700 (PDT) Received: from localhost.localdomain (91-157-170-157.elisa-laajakaista.fi. [91.157.170.157]) by smtp.gmail.com with ESMTPSA id o101sm3741766lfg.3.2017.05.31.06.08.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 May 2017 06:08:34 -0700 (PDT) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Wed, 31 May 2017 16:08:15 +0300 Message-Id: <43046b5a074029a9354bb2b772ca1f91320440f5.1496234766.git.riku.voipio@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::22a Subject: [Qemu-devel] [PULL 03/15] linux-user: fix fadvise64_64() on ppc 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@linaro.org, Laurent Vivier , stefanha@redhat.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Laurent Vivier On ppc, advice is arg2, not arg6: long ppc_fadvise64_64(int fd, int advice, u32 offset_high, u32 offset_low, u32 len_high, u32 len_low) Signed-off-by: Laurent Vivier Signed-off-by: Riku Voipio --- linux-user/syscall.c | 10 ++++++++++ 1 file changed, 10 insertions(+) -- 2.11.0 diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 2da8426aaa..671b13a23b 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -11261,6 +11261,15 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, #ifdef TARGET_NR_fadvise64_64 case TARGET_NR_fadvise64_64: +#if defined(TARGET_PPC) + /* 6 args: fd, advice, offset (high, low), len (high, low) */ + ret = arg2; + arg2 = arg3; + arg3 = arg4; + arg4 = arg5; + arg5 = arg6; + arg6 = ret; +#else /* 6 args: fd, offset (high, low), len (high, low), advice */ if (regpairs_aligned(cpu_env)) { /* offset is in (3,4), len in (5,6) and advice in 7 */ @@ -11270,6 +11279,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, arg5 = arg6; arg6 = arg7; } +#endif ret = -host_to_target_errno(posix_fadvise(arg1, target_offset64(arg2, arg3), target_offset64(arg4, arg5),