From patchwork Fri Mar 21 12:57:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 875238 Delivered-To: patch@linaro.org Received: by 2002:a5d:5f4c:0:b0:38f:210b:807b with SMTP id cm12csp850714wrb; Fri, 21 Mar 2025 05:58:58 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVxKO1ZUu9llWaFGqp24IJN3SRMURVedXdfSqCajyw/xg2NxME9co0YuFT1J+rO5sNWqWdbGw==@linaro.org X-Google-Smtp-Source: AGHT+IG++shXcjcJJvYfBdblzWF2x9kpRcpPq3A6NqVXCBuN15IE1pjGbP5q0Roxuc9o43sscwTZ X-Received: by 2002:a05:6214:f64:b0:6eb:1c42:a14b with SMTP id 6a1803df08f44-6eb348e0487mr112906276d6.1.1742561938217; Fri, 21 Mar 2025 05:58:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742561938; cv=none; d=google.com; s=arc-20240605; b=gMRIVuzsH7hmfEsJGJ+c9F5pJbDMmx4ZMHOSVveuRN+a9582bLbqfBaynQMYjCE743 Adc4zxGXlqrpIOrbOf3tNGO98aNb5DOX7Sn6qcJ5CWkc+b840nwbliSbfMfbRrWZGRFs d0bB8zGj7JD+QWlD22+0cXfjmOwSht7lUHTOgp4BnNEKn12+vTpf2CkstR4NEm0Ky69r XnXV9ljYLaw9fAlmhos5etiXFz1R9xbpIZMfYh6lsraortvVooLwoz7uDsSJ8bU9CAN4 yaX7vXQs0Uau8aPNeVe2IP5EaKeyFBRzCOEWMEtnkVDqvD/bXkBi/MwD98bHVOf/QEbJ vqcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=AO+ZUcaKZQJk5enooplb2+PJUlk54AQnNwm/1pAm8KA=; fh=k6vQFqpBIEOZDEx+jp8POk/T7kPLkYHaVFRSFvPBflI=; b=Jed4bUjjK5HeOlohgVCof/63lBPY+31cyWp7jkSfx25OI3I3ZxeLgsZgDIYR412HBj 2sLjuqzw9BTgGpbU/mmBWcISalkQwecZLv0UUQHv6wpZMi5K8PkoYUbe6v+L152a64U9 SbEP3jrhLut3lAO9VIZG/JSqaNdaC6mDRssycefkNpb173AJNkdoi55FKLcKPl3UHPNX F8+wj9e1/703h9yCSebmskPEjALCcMYqPzHcwRT+GLeRIwPnnnkcWL7OoKtI3CNQY8T7 37zYK7cINnBNTETPB4VfAA6YAhhIIGB99omyt7mC48PRXvBG8HXkyhJNvOCTe9ZbAsk5 X9Fw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rtfgn9Nl; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6eb3f01cc2fsi17528546d6.334.2025.03.21.05.58.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 21 Mar 2025 05:58:58 -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=rtfgn9Nl; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tvbwi-0007jl-5Y; Fri, 21 Mar 2025 08:57:56 -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 1tvbwe-0007j4-6q for qemu-devel@nongnu.org; Fri, 21 Mar 2025 08:57:52 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tvbwc-00030W-Lc for qemu-devel@nongnu.org; Fri, 21 Mar 2025 08:57:51 -0400 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-39133f709f5so1040543f8f.0 for ; Fri, 21 Mar 2025 05:57:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742561869; x=1743166669; 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=AO+ZUcaKZQJk5enooplb2+PJUlk54AQnNwm/1pAm8KA=; b=rtfgn9Nl5uIkp+4zLVlcf5YjdrAnvN1R+i2ITaAPHfbkdzmZU6SQSCeaFS+S4fXqFJ DmNntJSQfI7L5rSXYYUMvji+odVceT4hwIsT0O2w/ZOlzXKgF54xW4zYnJmSTKeHGeng Vmo+FH5zrf6OvpBEy45R7Ae/4h43u9YvMxCnwGQf1K4hyfkK9cYMQdUdkGLRQmdmXqRe seXHzeYw/LcIZxzyPYeR/dehjYJBTHMPr9tIXGtaFTjdsg+WdDi2jT0Tgs59dzm6a7S7 oSQICZwy0NMIys6U5Sso4LLZbDkC+/MSrqVuSVx0DuPDQEvgY20nLIl7JZvilGcAatSP +AwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742561869; x=1743166669; 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=AO+ZUcaKZQJk5enooplb2+PJUlk54AQnNwm/1pAm8KA=; b=omPFoafBXtYCzFnRjsqh9LSlnqAg7rf3ozE6Ysug1P81DelshYCipQAq0V7CPzZ5nS kMFPNtMdg3PnA7WPGouogNCj3ToEg0faNZyZo9bEoNbmASTeCGp9FlGb9PEFmmzf31mN AnIY0pUZDAIg3Afrfcnru28wcC32zTA6mPbPJCeBCvgu806LhYDyhlBIc+mTTHG0gBEH 6nVYorT44iLoOl5TDjOChLOffQ4kKubMyPH88iTBMf4WkAgD/Ww02Sy/4TaWQAmQN8HZ 9vUSIst4vK5ibM4A0+rltuQsvChjtIRVd46ZhDxS9Nvjkqy8OAw631L51MBLaTqoQW0j rniw== X-Forwarded-Encrypted: i=1; AJvYcCWWAeNSQQj10QjxuodMSxVjqQZ61abfPGeQRZqjxlHnrhfchptSCdEDGt/CQmLx4YxShhVHe6rN9586@nongnu.org X-Gm-Message-State: AOJu0Yw4QPmXBEfBv79xsRwAwgVRrZHvuGTL7zcGPVn6XIE/0aExmdaU +47wR90Qq2P/Ctx2ZpJF7DvP+AE+a8LjtUq2UUTNlqXeYwTwounOMZkTVa/Jaa8= X-Gm-Gg: ASbGncvmVSILoKDDCHsWOa7WK9qmtfsqczSMgzGvsQKfPUwKP8F5kJkmJNopY9got3n TiYYw19QDNtANQ880JKJ2PVzCb6mb6yUfUi0RRtYTRFO4+XXQhsakcUnBlX0xIXNr7UmaU4BIxF 0MuhlI9siecImxw8Ap5NCFmB9jyuxU2uBS0f6zvP8VUjpWYzLLdD2WaYHUApWywQA/WA9aJ5Skn eHpzPXqdKU0h3/all1MPSFWMga072P8XRZe6DyfpeDuhTSeovmdBeof84IP8RIzNfdB6SfrTn65 e279QQtbvfWLgVREvCGTPn8n+66uSh64iGPrkf0OG/0RRfLecZhiF3a343YzNWDjFVEDVkM30s/ 9/t/855lKfcnQsMA5CYs= X-Received: by 2002:a05:6000:156f:b0:391:ffc:2413 with SMTP id ffacd0b85a97d-3997f92d5ccmr3843398f8f.40.1742561869187; Fri, 21 Mar 2025 05:57:49 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43d43f55721sm77437695e9.20.2025.03.21.05.57.48 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 21 Mar 2025 05:57:48 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Richard Henderson , qemu-devel@nongnu.org Cc: Paolo Bonzini , Pierrick Bouvier , =?utf-8?q?Alex_Benn=C3=A9e?= , Anton Johansson , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH-for-10.1 2/4] tcg: Simplify tcg_req_mo() macro Date: Fri, 21 Mar 2025 13:57:35 +0100 Message-ID: <20250321125737.72839-3-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250321125737.72839-1-philmd@linaro.org> References: <20250321125737.72839-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.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: 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 Now that TCG_GUEST_DEFAULT_MO is always defined, simplify the tcg_req_mo() macro. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anton Johansson Reviewed-by: Richard Henderson Reviewed-by: Pierrick Bouvier --- accel/tcg/internal-target.h | 9 +-------- accel/tcg/tcg-all.c | 3 --- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/accel/tcg/internal-target.h b/accel/tcg/internal-target.h index 2cdf11c905e..1cb35dba99e 100644 --- a/accel/tcg/internal-target.h +++ b/accel/tcg/internal-target.h @@ -50,17 +50,10 @@ G_NORETURN void cpu_io_recompile(CPUState *cpu, uintptr_t retaddr); * memory ordering vs the host memory ordering. A non-zero * result indicates that some barrier is required. * - * If TCG_GUEST_DEFAULT_MO is not defined, assume that the - * guest requires strict ordering. - * * This is a macro so that it's constant even without optimization. */ -#ifdef TCG_GUEST_DEFAULT_MO -# define tcg_req_mo(type) \ +#define tcg_req_mo(type) \ ((type) & TCG_GUEST_DEFAULT_MO & ~TCG_TARGET_DEFAULT_MO) -#else -# define tcg_req_mo(type) ((type) & ~TCG_TARGET_DEFAULT_MO) -#endif /** * cpu_req_mo: diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c index c1a30b01219..cb632cc8cc7 100644 --- a/accel/tcg/tcg-all.c +++ b/accel/tcg/tcg-all.c @@ -77,9 +77,6 @@ static bool default_mttcg_enabled(void) return false; } #ifdef TARGET_SUPPORTS_MTTCG -# ifndef TCG_GUEST_DEFAULT_MO -# error "TARGET_SUPPORTS_MTTCG without TCG_GUEST_DEFAULT_MO" -# endif return true; #else return false;