From patchwork Wed Jan 24 07:56:07 2024 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: 765623 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:10c4:b0:337:62d3:c6d5 with SMTP id b4csp1993179wrx; Tue, 23 Jan 2024 23:57:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IEBa+a7RKqWN4fVwxXvUmhgCLxE0NoHxsy2MzuFteINmyEsncTIQbZwU+mJ/8xC6fIBBmMk X-Received: by 2002:a05:622a:1052:b0:42a:5ad0:526f with SMTP id f18-20020a05622a105200b0042a5ad0526fmr1078553qte.128.1706083042268; Tue, 23 Jan 2024 23:57:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1706083042; cv=none; d=google.com; s=arc-20160816; b=Boo6eugf9yrmaTmKiiuYHEbW5wEUW17W8KIuvo2nry7v/y8JvfLIwjI7RBYXMcthB2 wdaROYQiuZfkQPR9TBsiX8dzukXIZFx0U18oHeP99N0vtPCqcGJ7oyDU/fP6gNGHuL5v 9doKMIwpVlpQTV917UIe8D0tMyICuIXp+fD97kQxx1qiBdrvmcKp1rFPXJ0GqPEVykow aW0vhXbVGIVSPCbza3Kodrd6sRXosNjwU1E9nMG9sklMLk56QgsqBu6OaMfOAkO4LIsH oxcA57EMDEkwCQnby3LovUBeZ0RPzZEAhNaA52nhLM72U7pvZHQrlzHoValGNXUgzA12 gARQ== 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=6Drmyx0qOiBJ43sKodMFw/w/dHE5bFgKE64dzRkcfNQ=; fh=gHzvNH+WnbQB64KCr0AUnCYaI0U0xtxKJ+NqKEVRr9w=; b=xBnY+vfj4gb+ce0ES3rOH1L4FEx8k8dWS3pZ8e0ylQ/G1wTPJyPHt/O6Dg46/DaO7d e1kk6VGK8JzK/lvoOlhfJR0XOmWi6QcRTDxq6UM4rF24JFDToPDvAHnsORmyDf5N5qMO wRfwd2KLfbkjIXu5JmiBp1sEOBtGZlBmoM/1fq0J4pOqddo4F0IOhGK/JKS7otba8IQI vqLAv6KAUJN0CprSbrvyXj6AvX+HvIvzdqVYHwGcqTMpEGU4Kj+7NK+vyNxjD6uME1n8 E7eBPkaUR/gK1ojNIAVj9bO69juyQErYIHr+EeROX4fLuYVZuc/XxLIj9wplhCpRmJwr NkWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ivr8NvxF; 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 o13-20020ac87c4d000000b0042a3c36f800si6725724qtv.457.2024.01.23.23.57.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 Jan 2024 23:57:22 -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=Ivr8NvxF; 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 1rSY7b-0001SU-3Q; Wed, 24 Jan 2024 02:56:31 -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 1rSY7W-0001SH-Sj for qemu-devel@nongnu.org; Wed, 24 Jan 2024 02:56:26 -0500 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rSY7V-0005Sj-Bc for qemu-devel@nongnu.org; Wed, 24 Jan 2024 02:56:26 -0500 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-55a8fd60af0so4390194a12.1 for ; Tue, 23 Jan 2024 23:56:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706082984; x=1706687784; 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=6Drmyx0qOiBJ43sKodMFw/w/dHE5bFgKE64dzRkcfNQ=; b=Ivr8NvxFdNyxe9zIYlg8y3HCo/4CYMAb04NjFJy5vssEC0rcuz63QH3zMNC9nU68sw jVtOAm3atgrfqlBwSb25S7aqoVHFU+rAA5l/yd1Dgco5IxVJn21JLwFqF8TVgW3LbWJp 2l3Zzw6imSJQkQMInF2iM4MN32d7CpmyaZ6c1/ulK4xlh05wS2vUdU+7+3aWSHhrOzhr M9K7okqLwtlvHru+/UAd0sFK5harHx+5sNNlpw0quhYAIe0Fygu0a5lIDeRRpysI/nCp Ti8Y4Q5cnmJJCDmNJdLkRUq7PcNIHgT6rJs5axXv/oMB7MTx77f6YcvOvbYjjPAr9JK7 YI6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706082984; x=1706687784; 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=6Drmyx0qOiBJ43sKodMFw/w/dHE5bFgKE64dzRkcfNQ=; b=IqekxSB3yCtAhGpE1bPIl0N3U0DjjaqIeCGf1mDy9z3KGqLOr68EOvmgx1OjpeD5pu sj9H0B/gkxi2J5NrBhJHoUT0vT4OGjosWpNnwXZz01zqSOpfqpIgcLSlwjebTckkQfNa rgwSaRLVPQhQbNmgFXIkhTbjZZmb2QaUWfUM5bXgKMstLn2f24wCBNTI7zp35Iw5xDES SOVGJ4cK+davsYqVYWu5v9p5gdtjQoBVeoAJXjqBbb/Lck4F1ye5AfANKrjRHdxyE5+o NAKxehjCiVg0hmnt+TL0/X3bj1UX4nCKoJf9uGm0lYS2XGM/eeU7yUxyEsrmCPPoumW7 KXmg== X-Gm-Message-State: AOJu0YygGjR3PUEJl41ghQ+s/qz8OXJ5RrpvS8byFJ+JNzJZZBg140cX XtawQ3d3kfg5vA8jvnKD/4uzMa1NBAHB+G9psUm1COsD/xkrKmtN/2z46DW7AqgIplyKc+cwrsH o X-Received: by 2002:a17:907:8b95:b0:a31:10c3:ecae with SMTP id tb21-20020a1709078b9500b00a3110c3ecaemr233942ejc.64.1706082983578; Tue, 23 Jan 2024 23:56:23 -0800 (PST) Received: from m1x-phil.lan (lgp44-h02-176-184-8-67.dsl.sta.abo.bbox.fr. [176.184.8.67]) by smtp.gmail.com with ESMTPSA id a13-20020a170906274d00b00a2b608ad048sm15118462ejd.28.2024.01.23.23.56.22 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 23 Jan 2024 23:56:23 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , Ilya Leoshkevich , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v5 2/4] tcg: Make tb_cflags() usable from target-agnostic code Date: Wed, 24 Jan 2024 08:56:07 +0100 Message-ID: <20240124075609.14756-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240124075609.14756-1-philmd@linaro.org> References: <20240124075609.14756-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::536; envelope-from=philmd@linaro.org; helo=mail-ed1-x536.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 From: Ilya Leoshkevich Currently tb_cflags() is defined in exec-all.h, which is not usable from target-agnostic code. Move it to translation-block.h, which is. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Ilya Leoshkevich Message-ID: <20231208003754.3688038-3-iii@linux.ibm.com> Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- include/exec/exec-all.h | 6 ------ include/exec/translation-block.h | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index df3d93a2e2..ce36bb10d4 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -459,12 +459,6 @@ int probe_access_full_mmu(CPUArchState *env, vaddr addr, int size, #endif -/* Hide the qatomic_read to make code a little easier on the eyes */ -static inline uint32_t tb_cflags(const TranslationBlock *tb) -{ - return qatomic_read(&tb->cflags); -} - static inline tb_page_addr_t tb_page_addr0(const TranslationBlock *tb) { #ifdef CONFIG_USER_ONLY diff --git a/include/exec/translation-block.h b/include/exec/translation-block.h index e2b26e16da..48211c890a 100644 --- a/include/exec/translation-block.h +++ b/include/exec/translation-block.h @@ -145,4 +145,10 @@ struct TranslationBlock { /* The alignment given to TranslationBlock during allocation. */ #define CODE_GEN_ALIGN 16 +/* Hide the qatomic_read to make code a little easier on the eyes */ +static inline uint32_t tb_cflags(const TranslationBlock *tb) +{ + return qatomic_read(&tb->cflags); +} + #endif /* EXEC_TRANSLATION_BLOCK_H */