From patchwork Tue Aug 12 13:42:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 35269 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yk0-f199.google.com (mail-yk0-f199.google.com [209.85.160.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 40F9520540 for ; Tue, 12 Aug 2014 13:52:44 +0000 (UTC) Received: by mail-yk0-f199.google.com with SMTP id 79sf30390811ykr.10 for ; Tue, 12 Aug 2014 06:52:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=n1FIY+cg81V4ZGuBu1PyIR8yISXnNEKB39vB2QXVIyw=; b=ltvCyKsz6VhfH7U8cjfPsfs7x/HOmUMciz1NStx7vj/73wEOs+EQeoiKPObwDULsnR I/Q3u47nLNfVVHZSoHU8U2r/1OTQ0ZQ7SKlPkKzobCPj+vTFrjyCWOkHpvYfZRnzw++B E/4U6DQBqw62O9aaVlA900T3/8uH6O2s/XOP7yhFuTSdNlN9yE7fEfb99s70k8JJ37gz io4jZFF0IftTCTvDqn7y1nsQ1hYW1DqoAP6lIgDbdKGwh26G5skh+gHdzce1nJJaXbzq c3D3vRwWVnHbIJ7PkNtzJ1IQWoCD/PQahYLza/8Gn4I9vjWg7LMOEcen3+rDbhK6e1vT K7ug== X-Gm-Message-State: ALoCoQmQ7NAF8QHOhqnfIZjSPJNG20tPR1aAbG997XwjRn6O7w1DkeRZOLKOv3dW+qaPasN+6dh+ X-Received: by 10.236.199.108 with SMTP id w72mr16913106yhn.31.1407851564098; Tue, 12 Aug 2014 06:52:44 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.91.40 with SMTP id y37ls127864qgd.2.gmail; Tue, 12 Aug 2014 06:52:43 -0700 (PDT) X-Received: by 10.220.15.8 with SMTP id i8mr1205817vca.45.1407851563880; Tue, 12 Aug 2014 06:52:43 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id cj4si8240297vdd.77.2014.08.12.06.52.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Aug 2014 06:52:43 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id im17so13309704vcb.31 for ; Tue, 12 Aug 2014 06:52:43 -0700 (PDT) X-Received: by 10.221.5.137 with SMTP id og9mr3977235vcb.18.1407851563809; Tue, 12 Aug 2014 06:52:43 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp250619vcb; Tue, 12 Aug 2014 06:52:43 -0700 (PDT) X-Received: by 10.224.79.139 with SMTP id p11mr6519381qak.93.1407851563101; Tue, 12 Aug 2014 06:52:43 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id o3si25709764qat.117.2014.08.12.06.52.43 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 12 Aug 2014 06:52:43 -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; Received: from localhost ([::1]:42185 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHCVG-0007GR-NM for patch@linaro.org; Tue, 12 Aug 2014 09:52:42 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41317) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHCLQ-0007WI-8Q for qemu-devel@nongnu.org; Tue, 12 Aug 2014 09:42:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XHCLH-000197-B1 for qemu-devel@nongnu.org; Tue, 12 Aug 2014 09:42:32 -0400 Received: from [2001:4b98:dc0:45:216:3eff:fe3d:166f] (port=42405 helo=afflict.kos.to) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHCLH-00018f-53 for qemu-devel@nongnu.org; Tue, 12 Aug 2014 09:42:23 -0400 Received: from afflict.kos.to (afflict [92.243.29.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by afflict.kos.to (Postfix) with ESMTPSA id B21C92658A; Tue, 12 Aug 2014 15:42:21 +0200 (CEST) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Tue, 12 Aug 2014 16:42:18 +0300 Message-Id: X-Mailer: git-send-email 1.7.10.4 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 2001:4b98:dc0:45:216:3eff:fe3d:166f Cc: Paul Burton Subject: [Qemu-devel] [PATCH 08/10] linux-user: support ioprio_{get, set} syscalls 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: riku.voipio@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Paul Burton Add support for the ioprio_get & ioprio_set syscalls, allowing their use by target programs. Signed-off-by: Paul Burton Signed-off-by: Riku Voipio --- linux-user/syscall.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 44853d0..f1c182b 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -252,6 +252,12 @@ _syscall2(int, capget, struct __user_cap_header_struct *, header, struct __user_cap_data_struct *, data); _syscall2(int, capset, struct __user_cap_header_struct *, header, struct __user_cap_data_struct *, data); +#if defined(TARGET_NR_ioprio_get) && defined(__NR_ioprio_get) +_syscall2(int, ioprio_get, int, which, int, who) +#endif +#if defined(TARGET_NR_ioprio_set) && defined(__NR_ioprio_set) +_syscall3(int, ioprio_set, int, which, int, who, int, ioprio) +#endif static bitmask_transtbl fcntl_flags_tbl[] = { { TARGET_O_ACCMODE, TARGET_O_WRONLY, O_ACCMODE, O_WRONLY, }, @@ -9592,6 +9598,18 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, break; #endif +#if defined(TARGET_NR_ioprio_get) && defined(__NR_ioprio_get) + case TARGET_NR_ioprio_get: + ret = get_errno(ioprio_get(arg1, arg2)); + break; +#endif + +#if defined(TARGET_NR_ioprio_set) && defined(__NR_ioprio_set) + case TARGET_NR_ioprio_set: + ret = get_errno(ioprio_set(arg1, arg2, arg3)); + break; +#endif + default: unimplemented: gemu_log("qemu: Unsupported syscall: %d\n", num);