From patchwork Mon Jul 27 12:23:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 247178 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp4760243ilg; Mon, 27 Jul 2020 05:33:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7CIgwunrAK0bJ2s3t3XQe5U7pTKiTxC61NwxuQqHPUpil6lZJbEqP/vtuhnWsSvA/0xMA X-Received: by 2002:a25:18d7:: with SMTP id 206mr35014428yby.473.1595853229393; Mon, 27 Jul 2020 05:33:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595853229; cv=none; d=google.com; s=arc-20160816; b=V/r0JFt0N6rQ+p0JI6hVT3G825jM2jUr92Lb4K3SF1yI1IAw2syL6+Wh3ybWzs5BfB lcfZnTjHgSIu5vX+0kdbWrrckBSRahxH31wWXEF9x8vVIz1cRXRs2kKDxDf9zGSWRie5 SI2RcH4DaoVF83fj9oxt8SrcxhIY/9XMoMgbRchj2yACKrSlMApaRoBXVoS8IIvM8nZT /UjJq17giCVX7Oyx8huRVxfM0itJ/ocQ9hqLIDkdDSH900KErCOTuqCUOxTQjtSV/CLM 4X/aPevtFfH5/AKS3bOGw4A4m5RShigskWT/t9lw6Cr0tlwtf4wpdk0tacfDQBSab7d9 ljVQ== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=rLNmNXPwsek6Q6dP3H8DkSo9b+2a+VCiz0OAeSbTq64=; b=XlgYy9VOIEhs/J/owEdoQk+CtgGqqjaKg+lRtGmXi9FjYhJY3Jkz/JZ1GBXZLSfBiC 9aHmScysCSC8LY3ZeUNyTjdidRBdgLVDz8URw+sTwyKQLQvX7hNLa82xZc7FXM86Dyxv ZZdB73E+U/Qx4t3kffo2bL+K/o0WhQaJgpApS1nu01KxuM97TL5thBjLAAGrNpuJcAVS Tn2VcVg+1JgL9J6gRJPnh/bJvF6NZCN17FVp5rnEQqkgcodh3vH80taIzkTm38MGCEKK 7S9+CEMezmoFdUdPX4MwqaSHsFnOUe/kgkbcxmUAXnLwrhQk0McaKPPHe20KTuQfRHOP Q9lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=gqQHbu9C; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id m78si10038148ybm.302.2020.07.27.05.33.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Jul 2020 05:33:49 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=gqQHbu9C; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:45030 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k02KC-0003gr-Uw for patch@linaro.org; Mon, 27 Jul 2020 08:33:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37150) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k02B4-0007UW-Ey for qemu-devel@nongnu.org; Mon, 27 Jul 2020 08:24:24 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:45947) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k02B2-0006SQ-SU for qemu-devel@nongnu.org; Mon, 27 Jul 2020 08:24:22 -0400 Received: by mail-wr1-x444.google.com with SMTP id z18so11111917wrm.12 for ; Mon, 27 Jul 2020 05:24:20 -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 :mime-version:content-transfer-encoding; bh=rLNmNXPwsek6Q6dP3H8DkSo9b+2a+VCiz0OAeSbTq64=; b=gqQHbu9CU8GC8dEucl7MtjH6MmL/xPXpYh3QqF71Q8SpSL5VcHnlbey+Qob+y6rJvE n8eWPy4Dz7SAlLCmAukC/6H8kYH8HjVegw/Z/Z4djMZaS3aQMC8V48UNQ75yJFzkmpbv 1GWvbMPY73S5ql1IH1Gay641Nu0EIgzH93oEjhA7J1JBxg6wxTCptMffzbOlryUoMBPu 0P9xOToM8h/gEyl/NnGiM0rRdoGFDTqxyURJSS0BM6/+AGwTA1J0tzZ2bNSV3vgQJj9M qPyGdAtd7cnwySlRhoOgatvI0syCbM05qnZzntHI9sk0NctA/yk8TeQJVlqhpPp9y41+ 9riQ== 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:mime-version:content-transfer-encoding; bh=rLNmNXPwsek6Q6dP3H8DkSo9b+2a+VCiz0OAeSbTq64=; b=MU+iAM9flakoicIykhiJ9+w6yAaNaGGzgCdqLOeh9S9h1KUaCe3SDTRMefyAOldOlG 2ET6jOqzyYiydKtCmokwv3Wti3WJ+1YN3LR5EtLIgpp/gsNuUF0lNUc3IzLBiSYptbAW RbmDm6JQrlL4fKl2USI5AIk7mTYcSuHqmVMCehjV1zlhK591Y/iwifFN0dibSHon5elQ 76UoRIpSIJN24RAtaG1VND27fh7dqPqFoUyoLLb362nnLjQd2xNq5aDkDI5N6RVoaM9U lLpi4R9BcXakRkDLpcQZ0m/kW6HUOEjl7lSLkvCXCQUXvgZuEyvdVcFkOUH1rkKY2rS3 tOeg== X-Gm-Message-State: AOAM530gD5+iA942cNxc7UepuZE/OPmRLlYuLCzANgsY1Z223Ybg3crk 9ouOuzw70+AvHZWREdNZuWTbfA== X-Received: by 2002:adf:b352:: with SMTP id k18mr21051035wrd.386.1595852659480; Mon, 27 Jul 2020 05:24:19 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id b186sm18759864wme.1.2020.07.27.05.24.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 05:24:09 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 91EE91FF9C; Mon, 27 Jul 2020 13:23:58 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 13/16] linux-user, ppc: fix clock_nanosleep() for linux-user-ppc Date: Mon, 27 Jul 2020 13:23:54 +0100 Message-Id: <20200727122357.31263-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200727122357.31263-1-alex.bennee@linaro.org> References: <20200727122357.31263-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::444; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x444.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , =?utf-8?q?Alex_Benn?= =?utf-8?b?w6ll?= , qemu-devel@nongnu.org, Laurent Vivier Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Laurent Vivier Our safe_clock_nanosleep() returns -1 and updates errno. We don't need to update the CRF bit in syscall.c because it will be updated in ppc/cpu_loop.c as the return value is negative. Signed-off-by: Laurent Vivier Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Message-Id: <20200722174612.2917566-3-laurent@vivier.eu> Message-Id: <20200724064509.331-14-alex.bennee@linaro.org> -- 2.20.1 diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 43a6e283961..f5c4f6b95db 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -11840,13 +11840,6 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, host_to_target_timespec(arg4, &ts); } -#if defined(TARGET_PPC) - /* clock_nanosleep is odd in that it returns positive errno values. - * On PPC, CR0 bit 3 should be set in such a situation. */ - if (ret && ret != -TARGET_ERESTARTSYS) { - ((CPUPPCState *)cpu_env)->crf[0] |= 1; - } -#endif return ret; } #endif