From patchwork Thu Sep 19 17:10:05 2019 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: 174080 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1320565ill; Thu, 19 Sep 2019 10:43:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqwP2Ho2qA0TknbopRiwxOo0c4cyEHN/Kfw52nklp2RlKukqkstnezx7lctlGSZ29v3WoiwM X-Received: by 2002:a0c:8ad0:: with SMTP id 16mr8946162qvw.237.1568915028171; Thu, 19 Sep 2019 10:43:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568915028; cv=none; d=google.com; s=arc-20160816; b=bvLwMmhA3WRUWAKwTvcrSYcAH6s3hvnll59rUCki1ze6Yvh0d/LrXQXq7ZVyd1mrkw 4+6lDjVFaVsGQBgMUAI57rCPfTcyV32KcjpgHNWRwGF4Ukq55m/4yU0desExY2MQ4B3S Sj2gx7PHzDnFBrbzdwOW155H7OxxL+15gLTuOM+laVS/VLA9vqTMJrl3ylb7Nsxm0iNg 8d+/K54GvR4gjTEyzCpGZji+DcIFf1LGtA7lb4HyoM3v406jW2mAiENVuaiPEoJK3JWu MsO2Xbm0o0IftvyFJvRfQwV+Sjpidb3oWdW4SgOwSXVQBuvFHSbtm4MpXESfgDvMOkbC 6wwg== 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=W2mrxFhentklW247RlP8yuKtv3QDjoQaHxNcDuVxHu8=; b=PyoxHTf1aRWoLMHaI8S8rWtHpUTgI4jnfdDUH43GHuPwO1MVtIdXUzKnHRtSKZbnjy UoDQx5KdTSZxZS2RNLOA5QY0RVkXHNoi2p5r5qw1cHHoaNOWGs/soLfzsRuHqQOA0/0V r4hAozLa22ndkl5dpeJh3304rOOhA6QhO4Usfoc8UI9aKARRtNof4GK9/3SY0xkAIZj4 Q6mNV/wNfeDluYmHIL6exSNRSUjDDj/nb9Gzme0NI30DbrJVJtipND6gb68xvrSHO1jF LUf4hwIdZZP6cnyh/AzcwQRru+YxcwoS9MprAvCkznJtZrmi9rYSDrVB4DJTbrkmOSFB l8Bg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=DcTO9ZWQ; 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 a40si6882253qtk.374.2019.09.19.10.43.48 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Sep 2019 10:43:48 -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=DcTO9ZWQ; 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]:47166 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iB0T5-0005eP-CR for patch@linaro.org; Thu, 19 Sep 2019 13:43:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50363) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iB07N-0000JK-H2 for qemu-devel@nongnu.org; Thu, 19 Sep 2019 13:21:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iAzwk-0004N5-Su for qemu-devel@nongnu.org; Thu, 19 Sep 2019 13:10:23 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:34652) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iAzwk-0004MY-NG for qemu-devel@nongnu.org; Thu, 19 Sep 2019 13:10:22 -0400 Received: by mail-wr1-x441.google.com with SMTP id a11so3962928wrx.1 for ; Thu, 19 Sep 2019 10:10:22 -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=W2mrxFhentklW247RlP8yuKtv3QDjoQaHxNcDuVxHu8=; b=DcTO9ZWQhGQw5BxyhjIUs+dTigLsHsg0L3SDASyd1Vqh7WWzajlgK3p3vEfMAuOVzi Q5MTpb3BLWwR0sBX+eXwNoXxpZ9zC89qFtct3HXnUbZdJ+6+JdokHM1qPXfl4UAAO8TV cQDIvEaySMxbBjhL8bhDF5JbimZdkLkjd+MRcGxsSZJGZTsyFvWRLh2NsAOdRtMKPqJc 5+69jxSg48ze7MvD/UjMfidTm2DudKPMAd2FPbtlvYtBwPLdR9vuubbUN3+QySv1JUP5 tcv5FHQozJsPCHX+0bxJCbQhz0EzTNtI1s4flehD7PK3Fpc9gDyT31aIT47r7gAnIYo4 qHbQ== 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=W2mrxFhentklW247RlP8yuKtv3QDjoQaHxNcDuVxHu8=; b=Dx+n4z7hIaYfIX7F993OFvWiGCcz0dUvZIwlE0ngltuke07bl0RawfRc1Vym6v6Dy9 H7mePUbL3PueAVUaGJLFs2q62qI5gjNKMvJauKKwzHR0ALvrgqxCcb3uF8E5CHG/Vcvn AbGrTk6u6QaXig2RMoJ2fQjP/wqXqVhwvwT14KtwzD/bPoamdWXRLylGV/Ot9ThRHD5p ECdAY+tSLzgQUgXGnfQJ+mWqK0gxeXNrL+qmmmrfto3FdsxzVVdb0xSeRWpic9k+xJuQ KY7ziQQ0DbS8lQ0W31nXRUbYLxf+T78pNFWdWAbBYo1O1NauZhCJrIub8BClsiKrKnyF zAog== X-Gm-Message-State: APjAAAX/VmT/I4Jx4aUXixBq0/5TNTLOKkCVrqLvsmDLNwBEWWuJCf+g 4d30p2y9b/YGsXWTJ3fAlZ9uaw== X-Received: by 2002:a5d:684a:: with SMTP id o10mr7406906wrw.23.1568913021586; Thu, 19 Sep 2019 10:10:21 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id a18sm21374021wrh.25.2019.09.19.10.10.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Sep 2019 10:10:19 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 3354F1FF93; Thu, 19 Sep 2019 18:10:16 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v2 06/16] target/ppc: fix signal delivery for ppc64abi32 Date: Thu, 19 Sep 2019 18:10:05 +0100 Message-Id: <20190919171015.12681-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190919171015.12681-1-alex.bennee@linaro.org> References: <20190919171015.12681-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::441 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: peter.maydell@linaro.org, Riku Voipio , Richard Henderson , Laurent Vivier , qemu-arm@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We were incorrectly using the 64-bit AIX ABI instead of the 32-bit SYSV ABI for setting NIP for the signal handler. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- v2 - change to wording --- linux-user/ppc/signal.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.20.1 Reviewed-by: Laurent Vivier diff --git a/linux-user/ppc/signal.c b/linux-user/ppc/signal.c index 619a56950df..5b82af6cb62 100644 --- a/linux-user/ppc/signal.c +++ b/linux-user/ppc/signal.c @@ -501,7 +501,9 @@ void setup_rt_frame(int sig, struct target_sigaction *ka, int i, err = 0; #if defined(TARGET_PPC64) struct target_sigcontext *sc = 0; +#if !defined(TARGET_ABI32) struct image_info *image = ((TaskState *)thread_cpu->opaque)->info; +#endif #endif rt_sf_addr = get_sigframe(ka, env, sizeof(*rt_sf)); @@ -557,7 +559,7 @@ void setup_rt_frame(int sig, struct target_sigaction *ka, env->gpr[5] = (target_ulong) h2g(&rt_sf->uc); env->gpr[6] = (target_ulong) h2g(rt_sf); -#if defined(TARGET_PPC64) +#if defined(TARGET_PPC64) && !defined(TARGET_ABI32) if (get_ppc64_abi(image) < 2) { /* ELFv1 PPC64 function pointers are pointers to OPD entries. */ struct target_func_ptr *handler =