From nobody Tue Nov 26 16:42:05 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1706417148; cv=none; d=zohomail.com; s=zohoarc; b=VEJUNkP2dQW3RtwG3gG+CLrF0Fze32Qx0NVaku4dXErD+jlJPw70QNjyOnj5b+BENvRy8/sJPhJBJQonNWNQGplLyGO9iGtvBL6LHf4953ZSLmVYHNVIuNLQOwppJOGtp2WuWlZHgaOohu3Wh9J1MorUqYqq0rEnhNLG6/qX5Sc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1706417148; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=p58dq3BNm1M9yORIAE2cQcXeCTaVjSrZcGgMOspnf2M=; b=Fp6DzXPxc9U7oxqJ308I+Kzy9uv1qBfDIG2ssPbsx9Ntr/ZAPVyULl/yqCkP2uY3awWsgOlwwdyw5rpGMS3DgWvtH1dgRvDiQ/Rk6mwEq7E5Qm439J0k1l4cJI0zmI+Wq8u9PML5Gy2XGDRiofO16rTmKQiXgfVEQgHi43AcV0o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 170641714828941.485263402252144; Sat, 27 Jan 2024 20:45:48 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rTx0X-0004oJ-Gx; Sat, 27 Jan 2024 23:43:01 -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 ) id 1rTx0W-0004oA-DF for qemu-devel@nongnu.org; Sat, 27 Jan 2024 23:43:00 -0500 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rTx0U-0004Ls-Qy for qemu-devel@nongnu.org; Sat, 27 Jan 2024 23:43:00 -0500 Received: by mail-pj1-x102b.google.com with SMTP id 98e67ed59e1d1-29065efa06fso1553799a91.1 for ; Sat, 27 Jan 2024 20:42:58 -0800 (PST) Received: from stoup.. (ppp121-45-131-89.bri-pow-que-bras31.tpg.internode.on.net. [121.45.131.89]) by smtp.gmail.com with ESMTPSA id w24-20020a17090aaf9800b002906e09e1d1sm5631873pjq.18.2024.01.27.20.42.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Jan 2024 20:42:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706416977; x=1707021777; darn=nongnu.org; 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=p58dq3BNm1M9yORIAE2cQcXeCTaVjSrZcGgMOspnf2M=; b=FFQcIL8r9e1BzlduKnXMpK2Odl/2g3YabMHMfV/DpnnSRAW1ZYRpzhfq7Mw5AveHwH v4O8952/hjrwNgSFlvkzuiLP+Gsrm4Z2fAtJ9+BGvwyCkNWZPx6reep+kOd2DIME/865 SZzfXszBPrz54YeYGlitwcZyOOCb+KCLyJr/EYp33THU0PpA3rrbFc8IPKtqUlK1mB64 2DSEVhzDH/ERcogPQZcu2RVVhlwptj7l934hE9g1L8Rke6vXXF7RXivE3pVGJtMrq8gm vY/D2/5ImmvPrKRVy8qnH44PIh31c9vy+83/d3Gni9MlSmPpPot+IVcL0DYT4kU5kXKv l0kQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706416977; x=1707021777; 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=p58dq3BNm1M9yORIAE2cQcXeCTaVjSrZcGgMOspnf2M=; b=MWPLEWzIS05OMcunCN4hSdZp94iJCJDJn8OF0wlFnbyWLcuWEHI1B9GqF1MBzKm9pD +diRTJzhcuHgTrF3H9+5K20dEgSynFzBuwr2QQZEE+PMXJMgiRyOQ+NbtfrEXHBeLt1/ aIA9tbkA2bVNhT56z1ViY/2h7STLszbatX+Z2LYF39w2A0JrMXHhJYw4eTVJ1y5rQqWW AHHJpKj4zgaFRhqbVEbDcjn7vaQy4oxWAMjzahAFDosn/+YTfqDw73R+PhBEMYvBagaf ca4HzSM6KWJH/4MCL0WHpW5vkyKXczY4NFDBNDYIP9LhEZkysZ6eTC/9922j0vkFRFlZ jdVQ== X-Gm-Message-State: AOJu0Yxnl+PnIUMKOh4ZhBMehxpXqtEdMWll1Uwz+npWkh7IbaWa9mj1 sy5q6jWrVOzuvMJxUDHc6/K+meSItARBBVG7p5Bp1WW2HVmSRG5XDP2MPjDzaFYD0UGTtRG3rlK 3qS7hew== X-Google-Smtp-Source: AGHT+IGf3VxO1VhOTznnn69pllVLFyMmg4ojYaF58hz4yLlUxbJX7zc1k3sy4UU7CYZW2yWFLmow4Q== X-Received: by 2002:a17:90a:4bc6:b0:290:11a4:ec4b with SMTP id u6-20020a17090a4bc600b0029011a4ec4bmr1603372pjl.61.1706416977455; Sat, 27 Jan 2024 20:42:57 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 16/33] accel/tcg/cpu-exec: Use RCU_READ_LOCK_GUARD Date: Sun, 28 Jan 2024 14:41:56 +1000 Message-Id: <20240128044213.316480-17-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240128044213.316480-1-richard.henderson@linaro.org> References: <20240128044213.316480-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102b.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, T_SCC_BODY_TEXT_LINE=-0.01 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1706417148890100005 From: Philippe Mathieu-Daud=C3=A9 Replace the manual rcu_read_(un)lock calls in cpu_exec(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20240124074201.8239-2-philmd@linaro.org> [rth: Use RCU_READ_LOCK_GUARD not WITH_RCU_READ_LOCK_GUARD] Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- accel/tcg/cpu-exec.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 40c268bfa1..950dad63cb 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -1050,7 +1050,7 @@ int cpu_exec(CPUState *cpu) return EXCP_HALTED; } =20 - rcu_read_lock(); + RCU_READ_LOCK_GUARD(); cpu_exec_enter(cpu); =20 /* @@ -1064,8 +1064,6 @@ int cpu_exec(CPUState *cpu) ret =3D cpu_exec_setjmp(cpu, &sc); =20 cpu_exec_exit(cpu); - rcu_read_unlock(); - return ret; } =20 --=20 2.34.1