Message ID | 20221122205739.603510-4-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp2723412pvb; Tue, 22 Nov 2022 12:58:33 -0800 (PST) X-Google-Smtp-Source: AA0mqf5ufX5llUkyZdmcfK7JxYViywSnPv0VgL3QchM0/Kv6Cgnr532bFlxEibiCgQIFPGos9/fu X-Received: by 2002:ac8:543:0:b0:35a:710a:341d with SMTP id c3-20020ac80543000000b0035a710a341dmr23314769qth.675.1669150712903; Tue, 22 Nov 2022 12:58:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669150712; cv=none; d=google.com; s=arc-20160816; b=TDaCcv5dPAJkkoHI9GtoXT1cB5v7I1Mc7aVnnz9OWiG2hBLrG6vHr5Mm31YTcYBxIO FTP4lJ4bkhMrEbzYgoHjlBiR0LB4bjdcz2X5ZueY4p0Nq0Cm3j5ZyOLJkf4Nn0HH81L4 ftxNuK8oqg0A1Na/ML0sKd/9CLfA9ABVyAOoO7Z2VwWfMmmIYHd99lwhT//54i+hjG0u pEVobNGT6PScC8b5jpoXCE+bQgBbIfxgcqGdk/WJj3dM2EpuqUC7OdjAXrzkCoRJs4x1 c0yhriNhq1aRJ71GZjtb3mJfyoWr/xi+91T9iG5vcFqn1LMz2Uk5mP7uko9ueIJS63AU tlwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=H9jFu9uG41whHckncNnQfwXtObMjZa4oIQS9COdwadA=; b=dnmuBFpYjouFCnw304qI1z9zfZwg0pWwC/xLPPy8+Dd8loZiHrB0FHUvQ0HXAZnchK X0Xozk0/zbs2s7UKLsSBwbxjAp2s+SqKP/u/yd0KmFMErHim9xIj6gs7Lf/lBdR9XWjM e3XscP+0wSMe4u4Ilv+4r0xsoO10WlZfhQ+TbOo1KeicXgeqUqEus64fRouoSHxvMyPX Z2jjjhoyHWitdxQJ67G4Dg7Gl6gvYquV673Z7OPt9bzpdZmL1MaPdgzrfDfjPKNGjtDp LrQ0SviVxdHZdPLYP6qVKBUmG4F5NddLcbBLa1RKMwALuIbLcjzH9Q9omo+vpLXnALZU eI4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="DhhY/KpJ"; 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=pass (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. [209.51.188.17]) by mx.google.com with ESMTPS id cb5-20020a05622a1f8500b003a528b2621csi9096756qtb.699.2022.11.22.12.58.32 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 Nov 2022 12:58:32 -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=pass header.i=@linaro.org header.s=google header.b="DhhY/KpJ"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1oxaKz-0007Jn-Mg; Tue, 22 Nov 2022 15:57:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1oxaKx-0007HW-DM for qemu-devel@nongnu.org; Tue, 22 Nov 2022 15:57:47 -0500 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1oxaKv-0003UI-Ra for qemu-devel@nongnu.org; Tue, 22 Nov 2022 15:57:47 -0500 Received: by mail-pf1-x433.google.com with SMTP id 140so15481306pfz.6 for <qemu-devel@nongnu.org>; Tue, 22 Nov 2022 12:57:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=H9jFu9uG41whHckncNnQfwXtObMjZa4oIQS9COdwadA=; b=DhhY/KpJvtdCO5i/VsPniYETfljZvdg+k8O6XQuFPrr8Sm33Fzt1JqfS3YOEjkxkkg mIvnPd5WnL+R3yZxYETNnz0ew8nFejLCE8DxDRmaMAAoQwyhtJJCfkg1spCcRZ0FnaXE wI4MtXyQ87hvktRrQu56Ae3UDxyHdl73xR+eE/mvLKIQsWBRPMIjOBEKGbEqgqUqgQSu ol7Jxi7xFX6atGOelABRbAzbAYur7/XSqMeKiqh/x/qU6T13/FpJ7lW0UiVF2ateUdpl J0PVBn/bEzsHxyRtWP573Z0dTSsmB/MUbfU4SmlFWRosq2EM4ZUVDkfKgoWph/rLgue7 FAPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=H9jFu9uG41whHckncNnQfwXtObMjZa4oIQS9COdwadA=; b=Wj3sclpxeF9R4TTYAF5WLTfULKh+L0u5FOwfXg5vJaSQVFEXE2ZElCZBL/F/e0MFRT /B71EYQDF6aAx+wnYrGHlO4l5H7k2GYHn5yZIp/sP7X3GwMq8oyMyN8Oajv4yltDnkFa WquGYB4mD37EqWogvVuIH46CYwl0H3kDMmtfW2seOSDN5bRXBeLH9TEGlQpYHz/SjMic RXvYVzYVUCOJsaQfoasmNHPeILEgNbhp7KQaNZsss8OX5uPMptuQ9ieYaqqH8Ik533I8 CdHTJPLrvyHG60dq1vZgfmyxpaU2DDGF+OHAOD+i/EIMWi7Nyu7QJjCD2spF+2DKcgqX Ommg== X-Gm-Message-State: ANoB5plHbqttCZNGZp94xg8LoGUL4DQiHXjyMh9/THql91m+dYFJ+nfk oFPW8tZ1PlNRodozge+tCoRvJrbrXlMEtg== X-Received: by 2002:a05:6a00:4c11:b0:56d:93d8:d81a with SMTP id ea17-20020a056a004c1100b0056d93d8d81amr5976984pfb.14.1669150664538; Tue, 22 Nov 2022 12:57:44 -0800 (PST) Received: from stoup.. ([2602:47:d48a:1201:90f5:6f8b:e78a:4a0]) by smtp.gmail.com with ESMTPSA id d19-20020a170903209300b00186fa988a13sm12383807plc.166.2022.11.22.12.57.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Nov 2022 12:57:44 -0800 (PST) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, philmd@linaro.org, alex.bennee@linaro.org, Daniel Henrique Barboza <danielhb413@gmail.com> Subject: [PATCH v2 3/7] target/ppc: Use QEMU_IOTHREAD_LOCK_GUARD in ppc_maybe_interrupt Date: Tue, 22 Nov 2022 12:57:35 -0800 Message-Id: <20221122205739.603510-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221122205739.603510-1-richard.henderson@linaro.org> References: <20221122205739.603510-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::433; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x433.google.com 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.29 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: <https://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> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
main-loop: Introduce QEMU_IOTHREAD_LOCK_GUARD
|
expand
|
diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c index 94adcb766b..8591bb3f73 100644 --- a/target/ppc/excp_helper.c +++ b/target/ppc/excp_helper.c @@ -2163,22 +2163,13 @@ static int ppc_next_unmasked_interrupt(CPUPPCState *env) void ppc_maybe_interrupt(CPUPPCState *env) { CPUState *cs = env_cpu(env); - bool locked = false; - - if (!qemu_mutex_iothread_locked()) { - locked = true; - qemu_mutex_lock_iothread(); - } + QEMU_IOTHREAD_LOCK_GUARD(); if (ppc_next_unmasked_interrupt(env)) { cpu_interrupt(cs, CPU_INTERRUPT_HARD); } else { cpu_reset_interrupt(cs, CPU_INTERRUPT_HARD); } - - if (locked) { - qemu_mutex_unlock_iothread(); - } } #if defined(TARGET_PPC64)