Message ID | 20180610030220.3777-103-richard.henderson@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp2609256lji; Sat, 9 Jun 2018 21:06:22 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIcfnsdeFfxJvD78pZusywXA6NkWAAKZle+V7h/ejqqVM67UrZilQDONiroVIRjqqjCRmk6 X-Received: by 2002:aed:24fa:: with SMTP id u55-v6mr11035933qtc.400.1528603582329; Sat, 09 Jun 2018 21:06:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528603582; cv=none; d=google.com; s=arc-20160816; b=ftQKH5GdHnJxQYUxcWfZHCV5kbVeGp1RPXsnlG9ghMW0dbqvauZzBg34khoing2A8O soe9BStu/eKDaYBhPLy3Sh/E/IHOBs3MREeYWY2/Qy24shUwCE8/bJGeUzwkP2E3wNry R4ra0qQ58ilkhiec0PjE4HlnqRWYJ6WAdAAoA1keA2hSeQBF3pDlTVJPRHoYiYgSvyZ3 yIvC3ULbn6ROahzVoTg5msK3al+MtyJchuD7QuFAbdHtT7jC3oggSHvOAR2i8KvQLdYM cQNxMbeZ+9fulY5qNFiYviSKDH3rzPI47fBpMSxqaHiBr7fHNUy2N/QwbLxE50YvWfA0 7Syw== 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=jLLvyOyCR9sBDrjnbBlwTEKWtAmf/X2N+TUmW3BbCpw=; b=jASa+ScNNVeSDzSB12oLXN1zwzTquyu1t7eSCRrvOHBX/lZASQQmiM6I9Y0UlyyPHg Al/AN5zcbLjWm7A2bMUbgiVbihhNSRxEjJ1AbkPNSiIPlrIiks8wSph9P0VyweJhkOLp zgP0lJ1StL+p7KQJ9270LWn6MRolkhVIRV/55dlJ2i8+3jmZ6ZTknS6eB74VUHOnfBth yUuHPMa189hHnW/ug6TpG9AShJUGYF9mP1Wi2X9ja+L1+lrU3xFTFxz1/rpcnnKhgZEQ fW4BNwBtiF2QmFJamC7XGYgARvEWouzmXbIOcJlrDe9mFQdnsLhDUVXXUiqZ0s5JzDnR OhcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=h17X9WjU; 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: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id z46-v6si8101052qvg.249.2018.06.09.21.06.22 for <patch@linaro.org> (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 09 Jun 2018 21:06:22 -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=h17X9WjU; 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]:42533 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1fRrcT-000157-OI for patch@linaro.org; Sun, 10 Jun 2018 00:06:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41539) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1fRqfz-0004eh-RP for qemu-devel@nongnu.org; Sat, 09 Jun 2018 23:05:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1fRqfy-0004mh-Qr for qemu-devel@nongnu.org; Sat, 09 Jun 2018 23:05:55 -0400 Received: from mail-pl0-x242.google.com ([2607:f8b0:400e:c01::242]:41590) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1fRqfy-0004ln-KX for qemu-devel@nongnu.org; Sat, 09 Jun 2018 23:05:54 -0400 Received: by mail-pl0-x242.google.com with SMTP id az12-v6so10381429plb.8 for <qemu-devel@nongnu.org>; Sat, 09 Jun 2018 20:05:54 -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=jLLvyOyCR9sBDrjnbBlwTEKWtAmf/X2N+TUmW3BbCpw=; b=h17X9WjUghIqpdISGSsrdPG1AKvOUU788vZfLTOZULr7a2bWlZpbOnU5/7NNFlHGEW 0ACddkpMo7bssuFPMl9qSEAjqHyvBVstFijC28ccIH57SJHTB0Nwqd0usvyRjsRXO+K5 /CK2wHEM+NYizTzjlwbp0d0Vtb/bM/kcUJlic= 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=jLLvyOyCR9sBDrjnbBlwTEKWtAmf/X2N+TUmW3BbCpw=; b=dDrvXuiLm/doKLlBoAj+t0L9yIol/iJ/uYl42QCq9sV2UUPsRN9Yiq3GhBhD0cR+DD EG/npfjERluZY6vVeLmC/Qp1RYdcJL7kDclYKDJYRVncIYurtea9SEZmA2r08GVTcR1f jmTWrgkI+OuK9TuqASpjwGDEM4S51h1nrO/THqkbats4yJuCuNVFQK3S7GQMuRpT9Df7 aCjju6LbAO0eQCpmm2CdTC6z+EqfqYU555veMGc+cnRNnnb8MazkkX/QQZqcE1MCM89T B9gPAVSliDGYqZilys2uSK0iskO7qNCifqxRuyi4Zcyg5ieKCz6HTri2PAwG7lP3A+GQ dHdw== X-Gm-Message-State: APt69E1G3GDXx1hJbnd3cqjTQBRFMaylvBu9aYRglmvfU+dsEuGkUF6Y 6k9JogPn0N1paAodK2oKMYgKgBDQ7NE= X-Received: by 2002:a17:902:3303:: with SMTP id a3-v6mr12939985plc.209.1528599953514; Sat, 09 Jun 2018 20:05:53 -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.05.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 09 Jun 2018 20:05:52 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Date: Sat, 9 Jun 2018 17:02:14 -1000 Message-Id: <20180610030220.3777-103-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::242 Subject: [Qemu-devel] [PATCH v2 102/108] linux-user: Split out atomic_barrier, gethostname X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: laurent@vivier.eu Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
linux-user: Split do_syscall
|
expand
|
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 91d90c7417..f898e70e98 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -7552,6 +7552,14 @@ IMPL(arch_prctl) } #endif +#ifdef TARGET_NR_atomic_barrier +IMPL(atomic_barrier) +{ + /* Like the kernel implementation and the qemu arm barrier, no-op this. */ + return 0; +} +#endif + #ifdef TARGET_NR_bind IMPL(bind) { @@ -8987,6 +8995,21 @@ IMPL(getgroups32) } #endif +#ifdef TARGET_NR_gethostname +IMPL(gethostname) +{ + char *name = lock_user(VERIFY_WRITE, arg1, arg2, 0); + abi_long ret; + + if (!name) { + ret = -TARGET_EFAULT; + } + ret = get_errno(gethostname(name, arg2)); + unlock_user(name, arg1, arg2); + return ret; +} +#endif + IMPL(getitimer) { struct itimerval value; @@ -13002,19 +13025,6 @@ static abi_long do_syscall1(void *cpu_env, unsigned num, abi_long arg1, abi_long ret; switch(num) { -#ifdef TARGET_NR_gethostname - case TARGET_NR_gethostname: - { - char *name = lock_user(VERIFY_WRITE, arg1, arg2, 0); - if (name) { - ret = get_errno(gethostname(name, arg2)); - unlock_user(name, arg1, arg2); - } else { - ret = -TARGET_EFAULT; - } - return ret; - } -#endif #ifdef TARGET_NR_atomic_cmpxchg_32 case TARGET_NR_atomic_cmpxchg_32: { @@ -13036,13 +13046,6 @@ static abi_long do_syscall1(void *cpu_env, unsigned num, abi_long arg1, return mem_value; } #endif -#ifdef TARGET_NR_atomic_barrier - case TARGET_NR_atomic_barrier: - /* Like the kernel implementation and the - qemu arm barrier, no-op this? */ - return 0; -#endif - #ifdef TARGET_NR_timer_create case TARGET_NR_timer_create: { @@ -13293,6 +13296,9 @@ static impl_fn *syscall_table(unsigned num) #endif #ifdef TARGET_NR_bind SYSCALL(bind); +#endif +#ifdef TARGET_NR_atomic_barrier + SYSCALL(atomic_barrier); #endif SYSCALL(brk); #ifdef TARGET_NR_cacheflush @@ -13448,6 +13454,9 @@ static impl_fn *syscall_table(unsigned num) SYSCALL(getgroups); #ifdef TARGET_NR_getgroups32 SYSCALL(getgroups32); +#endif +#ifdef TARGET_NR_gethostname + SYSCALL(gethostname); #endif SYSCALL(getitimer); #ifdef TARGET_NR_getpagesize
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- linux-user/syscall.c | 49 ++++++++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 20 deletions(-) -- 2.17.1