From patchwork Sun Jun 10 03:01:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 138158 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp2607145lji; Sat, 9 Jun 2018 21:03:10 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIh/gAhueD6oCqN8eR5/BTsN/jaXlrHE7yFjxJpH52Afzyt9V0NqHmw42zMWlczqDOEcCu7 X-Received: by 2002:a0c:a916:: with SMTP id y22-v6mr10976066qva.179.1528603390041; Sat, 09 Jun 2018 21:03:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528603390; cv=none; d=google.com; s=arc-20160816; b=vjE14fbgJJPLvolS1UfUArnreNgkGuB31HnKkA8MYaPDCzO+3FIRg7OUZK//St6YgU VRRdOyanrQTmAArsI7UR90fa+i/maRVxYQIGU1YfOxvlFyGyZWNhF18rKqRP12S8QVcL TDygChUvNgJ9OkCns+Q/7tL3XPRFCDyiayPF7J3Lskrbk6CntgyJN80Hb5LeVl0ZGMo7 ymlzjgwQGpMuaycvb0dr1gSrmRNJgFExgboI1lu32MBMBYAfu9UcGGuh69wKMtbH71Rj sEV8Vr8OtckVGQXVwnqaOpxZV7e8Dj6tEaS7d0UazPmkFxx61viO9a09mo5qbk8UUoiO Zd/g== 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=6r3VIlXxdv24PQAq4vDjTSBr3IMhJIKhmjDNerJdXbw=; b=cXNHViyJjJqCZYSm/3Tl4AxS/HtdC79oqji56Nm+wwsHixCwXRCiv4RMmldhjuE5mk do8Fwxs8tBRlZ2ZHZ1bupl7nRY4emNWKUECSuVyKFGR4LZ8mGH5a0OTlhpLlRnHzTtCJ nSsXyK+ljg9h3cxO+u7HrbJKW/eZMdAN859Li4GcSRhGKjDnCTy2IH4WPMqhDKiblUii 0qkz82d+M28V90GK3gByPhcLrKQ3DrFLjwzElXJSIQ2es3q44GbaWTxtkb893iozezdC GoYPv1juTw3w1Awmisvi2FsyYpJNHOeqOuK0wAfrgVFMYN1aWXt0/hyrBze7t/jdoozV PeVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ISIgBl1K; 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 s69-v6si5632108qkl.373.2018.06.09.21.03.09 for (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 09 Jun 2018 21:03:10 -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=ISIgBl1K; 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]:42508 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRrZN-0006lA-E9 for patch@linaro.org; Sun, 10 Jun 2018 00:03:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41316) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRqfX-0004ED-NA for qemu-devel@nongnu.org; Sat, 09 Jun 2018 23:05:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fRqfW-0004WO-7u for qemu-devel@nongnu.org; Sat, 09 Jun 2018 23:05:27 -0400 Received: from mail-pf0-x243.google.com ([2607:f8b0:400e:c00::243]:34417) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fRqfW-0004VT-0k for qemu-devel@nongnu.org; Sat, 09 Jun 2018 23:05:26 -0400 Received: by mail-pf0-x243.google.com with SMTP id a63-v6so8499989pfl.1 for ; Sat, 09 Jun 2018 20:05:25 -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=6r3VIlXxdv24PQAq4vDjTSBr3IMhJIKhmjDNerJdXbw=; b=ISIgBl1KqUN3YGBvalPwt4ncA35AYIwfinXBvReFxZloCyarlFfuYu+qpYXaxCdrG2 /l2I7zGzRDcLUR/vTCFtlI3ItoGWzQ1E6oaCFAF6vX/yG84G5llnqMD/LP/pN9nrn/+E bVKJU8cULeD1czBE9FjMWtY1c7q6f+qVX4/Ig= 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=6r3VIlXxdv24PQAq4vDjTSBr3IMhJIKhmjDNerJdXbw=; b=T4L1lG2y84bXpZOcZkuc7+KbeDyJeLyfhaMZvWRhm7G09F5A+K1BR76Y72rIzxbA/R DWjovlcEsQ6nXpfQYTldnt9dpzQ1B2Of6DLR57SileWqFMz/ISMR9LZ+akFvIVagwZS7 G8Lf4HHgKqPPipZyEfrGUVHOSeX+QMMzlsHMiZAup0ZmoqgbwLwTbGcHQQEh0wN/+LQG AE8WkH9/YIjhrPvtCJt6bgSxyM/jE8z5P5GM8x80GKTwWFSdy87Vmouvf3yamkA0ToXX JdD/cc4n4geZ3kOmB4bgSklsAuKOxW5JbeIT1cP6pConrZ7sDzg83HjJ5MyyzXEcfEP6 8zUg== X-Gm-Message-State: APt69E3S+y7PdcweIPFigC+V/hgemWNgCExGQ3PFhEWQ7CuYxsgE56o+ lPqWBM0drX0EIoU4uV2vmi7Pc2OdmTQ= X-Received: by 2002:a65:5d8a:: with SMTP id f10-v6mr10636494pgt.119.1528599924889; Sat, 09 Jun 2018 20:05:24 -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.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 09 Jun 2018 20:05:24 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sat, 9 Jun 2018 17:01:58 -1000 Message-Id: <20180610030220.3777-87-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:c00::243 Subject: [Qemu-devel] [PATCH v2 086/108] linux-user: Split out gettid, readahead 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" All targets define readahead; remove the ifdef. Signed-off-by: Richard Henderson --- linux-user/syscall.c | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) -- 2.17.1 diff --git a/linux-user/syscall.c b/linux-user/syscall.c index bcddb28947..0897449273 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -8950,6 +8950,11 @@ IMPL(getsockopt) } #endif +IMPL(gettid) +{ + return get_errno(gettid()); +} + IMPL(gettimeofday) { struct timeval tv; @@ -10337,6 +10342,20 @@ static abi_long do_readlinkat(abi_long dirfd, abi_long target_path, return ret; } +IMPL(readahead) +{ +#if TARGET_ABI_BITS == 32 + if (regpairs_aligned(cpu_env, num)) { + arg2 = arg3; + arg3 = arg4; + arg4 = arg5; + } + return get_errno(readahead(arg1, target_offset64(arg2, arg3) , arg4)); +#else + return get_errno(readahead(arg1, arg2, arg3)); +#endif +} + #ifdef TARGET_NR_readlink IMPL(readlink) { @@ -12184,22 +12203,6 @@ static abi_long do_syscall1(void *cpu_env, unsigned num, abi_long arg1, void *p; switch(num) { - case TARGET_NR_gettid: - return get_errno(gettid()); -#ifdef TARGET_NR_readahead - case TARGET_NR_readahead: -#if TARGET_ABI_BITS == 32 - if (regpairs_aligned(cpu_env, num)) { - arg2 = arg3; - arg3 = arg4; - arg4 = arg5; - } - ret = get_errno(readahead(arg1, target_offset64(arg2, arg3) , arg4)); -#else - ret = get_errno(readahead(arg1, arg2, arg3)); -#endif - return ret; -#endif #ifdef CONFIG_ATTR #ifdef TARGET_NR_setxattr case TARGET_NR_listxattr: @@ -13343,6 +13346,7 @@ static impl_fn *syscall_table(unsigned num) #ifdef TARGET_NR_getsockopt SYSCALL(getsockopt); #endif + SYSCALL(gettid); SYSCALL(gettimeofday); #ifdef TARGET_NR_getuid SYSCALL(getuid); @@ -13475,6 +13479,7 @@ static impl_fn *syscall_table(unsigned num) SYSCALL(pwrite64); SYSCALL(pwritev); SYSCALL(read); + SYSCALL(readahead); #ifdef TARGET_NR_readlink SYSCALL(readlink); #endif