From patchwork Thu Nov 2 01:30:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 740416 Delivered-To: patch@linaro.org Received: by 2002:a5d:538f:0:b0:32d:baff:b0ca with SMTP id d15csp597790wrv; Wed, 1 Nov 2023 18:48:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFLSNzvbL4OyqbwYFRGkKRPdoBHGJKxJLxeU+26piyIB8yn8NvPmIXragLpBmEMI3aXyi8F X-Received: by 2002:a05:622a:208:b0:417:d600:115d with SMTP id b8-20020a05622a020800b00417d600115dmr19420945qtx.66.1698889686057; Wed, 01 Nov 2023 18:48:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698889686; cv=none; d=google.com; s=arc-20160816; b=MkteC4YUSJ+ARElxCFqUNM+wseRLQb0V/aS0tBpIMbV4OFhP/70Zb1YLo/ArT+x0c+ gnQDw7CUrbEHmx1j4Ii74mntOaYSfENrq6E8/E9/sqrqT6rAiY/YG9PraeJZE3wK0F2V Y+d2G00MP5F72UfPiaaWurXh4n+/YNCpq0fGG6qpqFsRQ2iGQhkOFFaUJdbqVA0e+NSV pmeSQhXVT4QfKBfIj6AaOOmjdhNIYBclrvVd7WtMBNyQdz7wPUz0fkBT5aO7E2FFeViC 4b8AlPacvjyuBWD82hI12849SmTtR1ZWGTpoupTHPY5MNTVm975uXsh08aCdqKp1BDbc ANeA== 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=nPDrqyoPtn/P2Y3dlnz8L7OPFIA66GeNv3k0Fexkp9U=; fh=f2WZoDMBYjCKWIIOoPI+rQtxlv4fmOm4u+dLdQLqpOk=; b=BAeUoLpUc5gXWFu6b15+zfNfvPyJi3aUrTSDQ9QU/fhwiWVMDfdd6mC2C5kTN5xSST U28ymbU8Oq+w3WGKQFeDrlgLWSjeIadszV3zqfDvERPzzFa0kgglV+g1P5Lxu0GoIXPv M/HfF/Dm68jOqm5oeWDKvAGqY/5JlQZsBe6v6iWKACrbSoFtvtU20GHrTHz6SAmoIuqa T1Bs4Zsm8yNmTx5dJgMrtAI6wRBt39QhMZjEr7KN3Vdkct+7ohbxmWPTeIVyQbddLeEt onnS9tyGfr1JfHpgZxfnNLCjXRJTDI87kySXMFYAitjZRUoYcakUJIoyi7iVJm3bWt60 /0mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hzS+e9Mc; 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: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id c13-20020a05622a058d00b00416547101b3si3618358qtb.720.2023.11.01.18.48.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 01 Nov 2023 18:48:06 -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=pass header.i=@linaro.org header.s=google header.b=hzS+e9Mc; 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 ) id 1qyMcc-0000S9-V0; Wed, 01 Nov 2023 21:35:48 -0400 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 1qyMbN-0006iO-0U for qemu-devel@nongnu.org; Wed, 01 Nov 2023 21:34:30 -0400 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qyMbJ-0002BT-Na for qemu-devel@nongnu.org; Wed, 01 Nov 2023 21:34:27 -0400 Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-1cc68c1fac2so3495015ad.0 for ; Wed, 01 Nov 2023 18:34:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698888863; x=1699493663; 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=nPDrqyoPtn/P2Y3dlnz8L7OPFIA66GeNv3k0Fexkp9U=; b=hzS+e9McjoBxmaeepjlz1ZtieXAgRPKC0fql+/Zjko+QfPWwIh2y6aLyeiIsJOSgAO vTZzyFYkczRklRzIDEZUFMmbQbOdeKTf8C5n9IxReDEn+s0ZihAG0L/1nJoFd/isdyFA 5LS200YjaghUz8ylmJZScyNBCKvpbWR5qJ7mtgBTF1sw5l603h/TmpsiRcZoUvT/jC9m rIi7219JuMx91fjsnIdXg1xabk+9apqG4KDufHz7z/JnCf1Dv/R8PnWCClxArQDxGB4l 6bmrhjgj/DkWuqLQ8hztWiANN6fAeVrNU2eJn07Ru7sWLJrzJoCfK7RsxGFLgt8oUgp2 c4+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698888863; x=1699493663; 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=nPDrqyoPtn/P2Y3dlnz8L7OPFIA66GeNv3k0Fexkp9U=; b=R+6mfmxoN9SUcxCounlLUGc3KuALK6ru3EPclLbzkTcjdKbauTupswtwSTAAtOz/xe 37UK4qwWa2M8CkP9bccdX3d/ugKc+7JDJ26UUgic+41bV+QJjeY7WvpiOuiohTADUHeS U/CGD+WidzJQMYGst1zAjE1B9+vNru7M2SSkGvlLrPJ8Q8/puvKFZsHPs2lBzLwEP8VW czdZ7CaNfwndlMw+zdqr1/Vl1QyL4zbGaxS49oYntrlCflC4b76ubBFz0sSWv5JNaTnB 5Ce+SgcMgY5x7y6rf3Am6YMUFvRzHh8WDr2H0L3bnlGxoMmAwhipwYpL7JTwoEKCw+tP VHDw== X-Gm-Message-State: AOJu0Yza9FQg/7r+9NVPORKTOIBECjB2V/ynOwCFhDtQXKlWF//nmUXz 3zfpMlyiNwr5mAq1Az7m+PEpyGSdMApro5CsZvo= X-Received: by 2002:a17:902:ab81:b0:1ca:7f91:aa5d with SMTP id f1-20020a170902ab8100b001ca7f91aa5dmr15637499plr.16.1698888863578; Wed, 01 Nov 2023 18:34:23 -0700 (PDT) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id t2-20020a1709027fc200b001a98f844e60sm1918125plb.263.2023.11.01.18.34.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 18:34:23 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: deller@gmx.de Subject: [PATCH v3 78/88] target/hppa: Avoid async_safe_run_on_cpu on uniprocessor system Date: Wed, 1 Nov 2023 18:30:06 -0700 Message-Id: <20231102013016.369010-79-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231102013016.369010-1-richard.henderson@linaro.org> References: <20231102013016.369010-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::629; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x629.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Signed-off-by: Richard Henderson --- target/hppa/mem_helper.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/target/hppa/mem_helper.c b/target/hppa/mem_helper.c index 7132ea221c..602e6c809f 100644 --- a/target/hppa/mem_helper.c +++ b/target/hppa/mem_helper.c @@ -480,6 +480,7 @@ void HELPER(ptlb)(CPUHPPAState *env, target_ulong addr) { CPUState *src = env_cpu(env); CPUState *cpu; + bool wait = false; trace_hppa_tlb_ptlb(env); run_on_cpu_data data = RUN_ON_CPU_TARGET_PTR(addr); @@ -487,9 +488,14 @@ void HELPER(ptlb)(CPUHPPAState *env, target_ulong addr) CPU_FOREACH(cpu) { if (cpu != src) { async_run_on_cpu(cpu, ptlb_work, data); + wait = true; } } - async_safe_run_on_cpu(src, ptlb_work, data); + if (wait) { + async_safe_run_on_cpu(src, ptlb_work, data); + } else { + ptlb_work(src, data); + } } void hppa_ptlbe(CPUHPPAState *env)