From patchwork Sun Jun 10 03:01:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 138153 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp2604884lji; Sat, 9 Jun 2018 21:00:02 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKzLheqnPgSaQ3fSrnnWs7Yzj5bQvEEZ/JiwVD6k6l/a1EaRsX62sFSYE7OUZCXNWGYgky4 X-Received: by 2002:ac8:328d:: with SMTP id z13-v6mr11589930qta.305.1528603202095; Sat, 09 Jun 2018 21:00:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528603202; cv=none; d=google.com; s=arc-20160816; b=1BzTtOmOTI/qMNgoUCjuCm+N2hIyy+/d9gQFcVbLJNY0xCoC9+ZNOpqVBb5jR+b5m0 r7iHSF4FAHOjGmIUHadoFDeuDzdVngC/3OW5l7k+GzBqFOOJJYNwVv8b8dOjBp8tsSRI InoRey+nE6HDt0+S6ZpL2M3nLXGIsYH9aAqC0/z4AMdlWEOhZdiGsxpFHZnRFWWRubSv 5h1WSyi0G9xMJioQmYIgOaXF9LYdxV8sa/lTWx+5E4+UNLg4L6eF8N6RQjHOT12fEw/7 N/w5mbx8oUiOFDXR1ZwjGMz3MaPy18bFcstEIhZCeam1oKb80i/6EiU+ZxavysOCuXIB IY8A== 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=9+MuT/uQabhArjlyjrnItekracZ5fkskfajdM8mX/fY=; b=QJi9kDfmrD7BCABboLwOV0JEF+LqiYI0n5td/zSTfzkqsyTWPTykeJBfNbKGafrIeY AoNwUMOQ1GTIWoYazpCsm4q57NzXi89vT8hd+RSMLIJHZSc1nCDKPBlkzaFOAINkEE34 Fq69brSX98d712/g5VAFaa0cUUay2f7OYFC3Jqn4Mm/372hJ90BL7uUy4ZAIQE8RRIHY C3Ta2bHfEfEYnB30ZfpGFRdF+tMiSmuN8sz9e+d1kBlngGqq2dkEFuNXjFkbo2a9uTie Roumt4zXjHes+3XgCRE2U2vMzah8ylCqPStBsei/7uJy94MUG9EW0nOjm4HD91vlGbvs j4XQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=XfcSpRPY; 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 x76-v6si302723qkb.248.2018.06.09.21.00.01 for (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 09 Jun 2018 21:00:02 -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 header.s=google header.b=XfcSpRPY; 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]:42489 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRrWL-0004QC-Fz for patch@linaro.org; Sun, 10 Jun 2018 00:00:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41040) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRqev-0003ah-GM for qemu-devel@nongnu.org; Sat, 09 Jun 2018 23:04:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fRqeu-00041P-Nd for qemu-devel@nongnu.org; Sat, 09 Jun 2018 23:04:49 -0400 Received: from mail-pl0-x231.google.com ([2607:f8b0:400e:c01::231]:43105) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fRqeu-00040q-IG for qemu-devel@nongnu.org; Sat, 09 Jun 2018 23:04:48 -0400 Received: by mail-pl0-x231.google.com with SMTP id c41-v6so10385516plj.10 for ; Sat, 09 Jun 2018 20:04:48 -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=9+MuT/uQabhArjlyjrnItekracZ5fkskfajdM8mX/fY=; b=XfcSpRPY4PRFNbf+VV217fGBcQ6KBvQjhZ3Ec0sU5o3X0+dG+gGpauaUbpbZ429tDp MvAqn4vMFDWosVtTpkcZlzRV7CrVupidgQnC8zeK8+jVeS12FA89YawwRUTk97cCHTJd hYoU9AA9XxWfHUHKfAhaHsFhIliPMAtfZnovY= 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=9+MuT/uQabhArjlyjrnItekracZ5fkskfajdM8mX/fY=; b=mBzKAil1WYOynhduKN5l72JmnYOhD3GtzgWU4LyZIgFE7BXlMt4S+Dh+FLscEFvqlE 6TqjYeP1BsxTpkWfOZ0juCF6y577M12h3BuzV1Q/a7/5r6wc/tn6pk9w1r3lGENvAZD7 Vedm8q6VXSY9fwdgd+CM0QD3qXcG2oMcNjRZqQyyxgmD0xQNTOxlgGN7I54LcDOgPI6E /3YrNOpGzr5EKbWeulp87iXqmM/bp2WviRwG8tCzPu0afAAkQ5AnfZYknN7eUPAVGJp3 UlxAd/yS5BCAoVc2+kKdFunPBdAbmkkdrgZpvLyaxcNFBT0XN2WQAJP5owg4RZCvjlsL Dx8Q== X-Gm-Message-State: APt69E1FecwedFKMwSbFsBIRCO/maVrhI/8NSkB5+DiEyYB3/7aldcDf 69mS8ytx2oQJMhEGV9taI6qgKHbsb+U= X-Received: by 2002:a17:902:7248:: with SMTP id c8-v6mr13079820pll.128.1528599887360; Sat, 09 Jun 2018 20:04:47 -0700 (PDT) Received: from cloudburst.twiddle.net (rrcs-173-198-77-219.west.biz.rr.com. [173.198.77.219]) by smtp.gmail.com with ESMTPSA id y17-v6sm31712718pfe.33.2018.06.09.20.04.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 09 Jun 2018 20:04:46 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sat, 9 Jun 2018 17:01:38 -1000 Message-Id: <20180610030220.3777-67-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180610030220.3777-1-richard.henderson@linaro.org> References: <20180610030220.3777-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c01::231 Subject: [Qemu-devel] [PATCH v2 066/108] linux-user: Split out arch_prctl 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: laurent@vivier.eu Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson --- linux-user/syscall.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) -- 2.17.1 diff --git a/linux-user/syscall.c b/linux-user/syscall.c index ee3a31f06d..e3765069ab 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -7680,6 +7680,17 @@ IMPL(alarm) } #endif +#ifdef TARGET_NR_arch_prctl +IMPL(arch_prctl) +{ +# if defined(TARGET_I386) && !defined(TARGET_ABI32) + return do_arch_prctl(cpu_env, arg1, arg2); +# else +# error unreachable +# endif +} +#endif + #ifdef TARGET_NR_bind IMPL(bind) { @@ -11118,14 +11129,6 @@ static abi_long do_syscall1(void *cpu_env, unsigned num, abi_long arg1, void *p; switch(num) { -#ifdef TARGET_NR_arch_prctl - case TARGET_NR_arch_prctl: -#if defined(TARGET_I386) && !defined(TARGET_ABI32) - return do_arch_prctl(cpu_env, arg1, arg2); -#else -#error unreachable -#endif -#endif #ifdef TARGET_NR_pread64 case TARGET_NR_pread64: if (regpairs_aligned(cpu_env, num)) { @@ -12961,6 +12964,9 @@ static impl_fn *syscall_table(unsigned num) #ifdef TARGET_NR_alarm SYSCALL(alarm); #endif +#ifdef TARGET_NR_arch_prctl + SYSCALL(arch_prctl); +#endif #ifdef TARGET_NR_bind SYSCALL(bind); #endif