From patchwork Fri Jan 7 21:32:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 530514 Delivered-To: patch@linaro.org Received: by 2002:ad5:544f:0:0:0:0:0 with SMTP id a15csp729861imp; Fri, 7 Jan 2022 14:00:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJxPfJRKMuJXEA0CFhLkfluZ+ru/izomgAvYOEPCfjVaqHnkFRwwfUx7fweiIYEzEtGPo0E6 X-Received: by 2002:a05:6638:2641:: with SMTP id n1mr30386653jat.265.1641592852006; Fri, 07 Jan 2022 14:00:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1641592852; cv=none; d=google.com; s=arc-20160816; b=M2OWMNJ9HhbfDbrTWc+JpuNK8PPpcjpmi4x8cZNzLs+zYTBUr0kjAOou9FQcqRNjdH HMAJTNO2c/sstwAqVUNCtVO80hnCrr/SV1gkKbYFuPOMY53JRpPCAF4WKGHrUGyRElH9 pNRBl6xg2eafPnp0+W4yAB5XkPLyVOQWr9p+FeF7eq4SrYIPoI/Euza916SHKjbkguzn sRqztPSBvuU0hHXbKfk+JdBinz6/0uPwzhLu+QOgnsYwEJOUkCsnrqTSSGL24jtyduvu yRIfDX6qm069S/GX9uGd83PuZ5oEylH1z1jIJXq5mlB9kcoA9ENtw3N+eAmC7teohbKc IVvg== 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=IoCTcgZr8ax/7M37Z9ZYxx4sW/uyBEgqSZ20UDGQHeQ=; b=CNG4UMDRYZMg39mjwM9AzrExSTViMNbdAXqefH0GNIRtWU5DzHxqA7IU8jDXrjjalz CRYTZJfzX2anKb5054LatfHEkRuChzEiqaxXYz9gNB4G8G5fEqdwWRhU9hCldD2so7zn /h+iMsC0qzjbOxXHjX6CM+kBDFqMTugZWRA2mDhMn/ydXf+V0GHZL5RY2Iw7QdabdSYE gePCkfC1l4yiSeMti9LSNUZuZtNC8HwDqCtsG3XaFop9au9esLU06oTK9Hc+KK8ayq7e swXSHIO0It3r7ueobSlw1OBMjJKOQ10xN8bOo7R7+vIjti42B/aHtuggd6QM0jOZrhTb K21Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=gMQmOXzk; 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 h3si2922022ili.73.2022.01.07.14.00.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 07 Jan 2022 14:00:51 -0800 (PST) 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=gMQmOXzk; 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]:37796 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n5xI3-0004rR-Gj for patch@linaro.org; Fri, 07 Jan 2022 17:00:51 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42702) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n5wr8-0005Hh-QV for qemu-devel@nongnu.org; Fri, 07 Jan 2022 16:33:02 -0500 Received: from [2607:f8b0:4864:20::1031] (port=39880 helo=mail-pj1-x1031.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n5wr6-0007rN-BL for qemu-devel@nongnu.org; Fri, 07 Jan 2022 16:33:02 -0500 Received: by mail-pj1-x1031.google.com with SMTP id c14-20020a17090a674e00b001b31e16749cso11741856pjm.4 for ; Fri, 07 Jan 2022 13:32:58 -0800 (PST) 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=IoCTcgZr8ax/7M37Z9ZYxx4sW/uyBEgqSZ20UDGQHeQ=; b=gMQmOXzkwTxyrm2GQhr6We3rFtK457tlpDKpS/nEFpBZMyd6NT1i5fMNoshLMhL5EE A28livDmGZH8/uwwiIAUedKptoKKoKrUE4rpGcZorKxp2d5E1aR+UMSAD2NGU16mGOuB W+QgFtBDS358UvPLMastvR/6W0E7+E56rpUeqKJN8lrj1x85WQqabX/05LTjclJIo2Gi h+g1VBwisfuXzr//d0sHr7R01e+D09JfL+Tp7cLl5R8gklsKwFwU5kBqp6BKarXxsRXX XT+vN5fe7avJ6oNgDi8/j4vsJsECmO98/cmTBciXcpYuLxI6r85ulwPq5uI0yAn0kTLB f25w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IoCTcgZr8ax/7M37Z9ZYxx4sW/uyBEgqSZ20UDGQHeQ=; b=qXLzYMod5giWEkECHmIZ5ZYSg6VnAF8dv9NM+iCA4DrZ6Bu0FtM6Vb7JuOKTNkM0Ui ZGQJD6fwWuMZa0i0cSATXfpibajL2JNAqNAz/11W7PV/mnoaoJPAjuSGSXXNA4CHhXeT pxHS+MLTTho1/3+n6QFXODIVffOQ/nZfwPR3g0teGeExonq4m/SovYTiamSCLTqd7oBs cOJrj4NMmh9sG26lKPuGfMJpzPpRss1c4FkW/gSEJmCWPi9mjL1B4f8PHD24agYPXyde QQj3mY6QpJ03ltQSlwxOBLFrZemWRKEQ1yRq/FRYSz+R3ZOuZ2IqWdu53XvSNogr7tAK Zc7A== X-Gm-Message-State: AOAM532ZCA7RJpy9axXFHmeQESzgdJHi+YRuPgvtgCZZZbDYCmbsGJtX mj/0SeUT+2CwV31P1qSe0y2Lu7aRJpGVsg== X-Received: by 2002:a17:90a:ce04:: with SMTP id f4mr17958746pju.10.1641591177986; Fri, 07 Jan 2022 13:32:57 -0800 (PST) Received: from localhost.localdomain (174-21-75-75.tukw.qwest.net. [174.21.75.75]) by smtp.gmail.com with ESMTPSA id y11sm6633030pfi.80.2022.01.07.13.32.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jan 2022 13:32:57 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v5 22/24] linux-user/sh4: Use force_sig_fault Date: Fri, 7 Jan 2022 13:32:41 -0800 Message-Id: <20220107213243.212806-23-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220107213243.212806-1-richard.henderson@linaro.org> References: <20220107213243.212806-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::1031 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::1031; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1031.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , laurent@vivier.eu Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Use the new function instead of setting up a target_siginfo_t and calling queue_signal. Fill in the missing PC for SIGTRAP. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- linux-user/sh4/cpu_loop.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/linux-user/sh4/cpu_loop.c b/linux-user/sh4/cpu_loop.c index 3290f6445c..1bd313cb19 100644 --- a/linux-user/sh4/cpu_loop.c +++ b/linux-user/sh4/cpu_loop.c @@ -28,7 +28,6 @@ void cpu_loop(CPUSH4State *env) { CPUState *cs = env_cpu(env); int trapnr, ret; - target_siginfo_t info; while (1) { bool arch_interrupt = true; @@ -60,10 +59,7 @@ void cpu_loop(CPUSH4State *env) /* just indicate that signals should be handled asap */ break; case EXCP_DEBUG: - info.si_signo = TARGET_SIGTRAP; - info.si_errno = 0; - info.si_code = TARGET_TRAP_BRKPT; - queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info); + force_sig_fault(TARGET_SIGTRAP, TARGET_TRAP_BRKPT, env->pc); break; case EXCP_ATOMIC: cpu_exec_step_atomic(cs);