From patchwork Tue Mar 11 04:08:25 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 872423 Delivered-To: patch@linaro.org Received: by 2002:a5d:64ce:0:b0:38f:210b:807b with SMTP id f14csp1300517wri; Mon, 10 Mar 2025 21:10:27 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVj9A34FfOmzu107SLrEg18TX5NKNqNaYsUeenGGQFwIo7jG0r76YOppiW2FqpDkQKoeD0S9g==@linaro.org X-Google-Smtp-Source: AGHT+IE5M8+Uc3W7hA1fBScpYc/6J1/GCM0Yoo2PtHp2TIq7nuE5FK/DLMnakneOImwjO+MCjJTr X-Received: by 2002:a05:622a:1983:b0:476:6d30:8aed with SMTP id d75a77b69052e-4769965c5cbmr36586271cf.49.1741666226933; Mon, 10 Mar 2025 21:10:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1741666226; cv=none; d=google.com; s=arc-20240605; b=J+Xxsa8K/Ec7JKwaQeM7uiuAJ9reVv704LHp99+ZllQSbFjEq9HaA9sxOV6zBkRsA2 AiPGQfvPLp0/ZPu+zLaT1CmBIb7wtqucmFihhX2wSAqidOsXxwelguCkXyVY4jCxrKqb wZJKHD3ckdihpwZOHNydb13vCa2jSdTtlbLazhfkpYCMTap7UbuQvmmsm3e9+cFhe5Wl dKxhn82T7ggaM4jgzh7G+p2xLcNezYCvU7hivBuCc1vnqZy3WGF65biBRUloqnKjC/Ol q90zyJp1gb5RGxQrKUFMa0kxPzuVSR0OBB9nFjZJRAXZyf5MzqZQW4/0eJT17ZnF+L9q duEw== 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=KTcsPgfp4qWHKI5IiGC/xRJnn7HmZtcbIn5ZIF7f/ys=; fh=8iGvHhDGxI79y3+vtwcOV7/KUtMLTW09ehmikEFqvLw=; b=ikaILlVAq+nSR9DJ8fsZGp8OFmkJQZ5FOimv0xuOKQ3v7BhfW25zFqdmDyYz1IqK3j dijAbm2k7ioCGe394KH5IG0a8cUyVy45r/mkGU8sZNxClbbsDnwonduinGRrdjnp64Vf 59Qaal1vSP3AqNXUtPIsq4/FiTnFCDXT8fkW+95YrjErMkaKzupcbUwGjmWiVfkzZB7H symk1HuHaAoDfeDdM49S7McezKhNCpp4l3ucxzRESVbhQsw/tE18voTN9uXp4TTfF/Mq g1Qhxzb8NGfzHD4DvVcVzMxgp38z+yDfoIX9Fn4MFQ3ruYOh1YZyuGl4hk44axEWH0Fr 0NuA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MeHZdvfc; 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 d75a77b69052e-4767bdc80a0si45564291cf.128.2025.03.10.21.10.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Mar 2025 21:10:26 -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=MeHZdvfc; 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 1trqwT-0003nt-8g; Tue, 11 Mar 2025 00:10:10 -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 1trqvT-0003J8-23 for qemu-devel@nongnu.org; Tue, 11 Mar 2025 00:09:08 -0400 Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1trqvO-0006Q2-Ui for qemu-devel@nongnu.org; Tue, 11 Mar 2025 00:09:05 -0400 Received: by mail-pj1-x1031.google.com with SMTP id 98e67ed59e1d1-2fec13a4067so7695675a91.2 for ; Mon, 10 Mar 2025 21:09:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741666141; x=1742270941; 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=KTcsPgfp4qWHKI5IiGC/xRJnn7HmZtcbIn5ZIF7f/ys=; b=MeHZdvfcVoAs6k4sTWtn1uowH9CceIKI0ogUH4PNDDE4OnT+rchLrvBg3rIlJc+/td WSg1Ap4MbjmryKSLVQJW2mWcelxtiqosYMgFVq4qKPDTBlzchJE33ZuB7CqhR1obZNA0 fQZSqpWyU1t9sDT5uyWLMr25fIqM5PxRaRWPN3rmbuMp+ee2pxChX6AylG7C8N/nQEhM 5cgPvSCrifmoBJ9Fqlcrmty7m7v8yVt/ETv6tSqHbHMwFUg4expI36Il/p8DfQFCUuGy rptfBgyncV8fuDB7qgNj78Jl5vOJYkirh6/+e3IwTjIhKrGpbeM00T2SN/4aCdPNRviX r/uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741666141; x=1742270941; 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=KTcsPgfp4qWHKI5IiGC/xRJnn7HmZtcbIn5ZIF7f/ys=; b=i87gViZnK7h2ReikT1kPo18RYZQtwWAZREVFAvF95QUbObBmdy8lWQtBOMXOO5axBG fiAAAEMXu2C91fo4VZfhvvsvthvFWqGZhQJgsBNClOdfzRGrxkzCAS4uWNMqsYX0coNt fyWWNfXT6eIrw25M0iUJkPrP5NSri3pbtgSskOSatlz8Mi8iRQKie/zsDv5wHJNR/f6F Pp1L7Q+idj/PAvUORd/DQ9hK7R4vRgBPynwXno5YwcRa5+cRogkj9JKcOvtvUxW4ynFU YTcqa/4+wuhZxV3SAntpAvxs1M17gOG6sdEcZoDKsXmw92inH5ipuGkV93mKJQB13tGa loMA== X-Gm-Message-State: AOJu0YyFmZPXgk/MMuY0PS4nWQ7FvZM/GBMgqlp1n7lRZ5LKNUeBIq+1 3YSfuyASBNRoAdSVgoKLLWZV+wtPUb/ks+s0tZh+ZKGisy2GDy/q80za8xoO4wsm8/MhsRmj5dU aOtw= X-Gm-Gg: ASbGncu/L2dB0jvmGVYQm5KF9rIGxnZEH1ZIfuGIwPQkxO+bPfD8m8nCuTwHAp7y09M cezZnhHxznka5vumzdCI/OHMlsk6et14j4iidbYWeaOobFF4cGd3g/3GXPjf2SqFhjsUlnvzxGO mWFs9ss/0/PvwNJ9lMLqcxCDFjOWW2YyfILIu/Fvs2Gejb4P1efZ8Rpvp5vwIDzJ9ashy1u0C20 zZjVuC2oCs2l3WTIfbS3HQYebKK08BGrNOJQKNFkLVxm/R/yP62khvLLkj2lRdD6QnyRtPCv/SF oszjrDo/E4LcovFs4PcVlGNwJLTb6Vo9VyPpHUQfRgc6mGlvd+NjE1U= X-Received: by 2002:a05:6a21:6b18:b0:1ee:c7c8:ca4 with SMTP id adf61e73a8af0-1f58cbef8a4mr4223140637.36.1741666140734; Mon, 10 Mar 2025 21:09:00 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af28c0339cesm7324454a12.46.2025.03.10.21.08.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Mar 2025 21:09:00 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Paul Durrant , Liu Zhiwei , David Hildenbrand , Weiwei Li , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , xen-devel@lists.xenproject.org, Paolo Bonzini , Richard Henderson , Peter Xu , Nicholas Piggin , kvm@vger.kernel.org, qemu-ppc@nongnu.org, Alistair Francis , "Edgar E. Iglesias" , Stefano Stabellini , Harsh Prateek Bora , alex.bennee@linaro.org, qemu-riscv@nongnu.org, manos.pitsidianakis@linaro.org, Yoshinori Sato , Palmer Dabbelt , Daniel Henrique Barboza , Anthony PERARD , Pierrick Bouvier Subject: [PATCH v2 03/16] exec/memory_ldst: extract memory_ldst declarations from cpu-all.h Date: Mon, 10 Mar 2025 21:08:25 -0700 Message-Id: <20250311040838.3937136-4-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250311040838.3937136-1-pierrick.bouvier@linaro.org> References: <20250311040838.3937136-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1031; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pj1-x1031.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 They are now accessible through exec/memory.h instead, and we make sure all variants are available for common or target dependent code. Signed-off-by: Pierrick Bouvier Reviewed-by: Richard Henderson Reviewed-by: Richard Henderson --- include/exec/cpu-all.h | 12 ------------ include/exec/memory_ldst.h.inc | 4 ---- 2 files changed, 16 deletions(-) diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index e56c064d46f..0e8205818a4 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -44,18 +44,6 @@ #include "exec/hwaddr.h" -#define SUFFIX -#define ARG1 as -#define ARG1_DECL AddressSpace *as -#define TARGET_ENDIANNESS -#include "exec/memory_ldst.h.inc" - -#define SUFFIX _cached_slow -#define ARG1 cache -#define ARG1_DECL MemoryRegionCache *cache -#define TARGET_ENDIANNESS -#include "exec/memory_ldst.h.inc" - static inline void stl_phys_notdirty(AddressSpace *as, hwaddr addr, uint32_t val) { address_space_stl_notdirty(as, addr, val, diff --git a/include/exec/memory_ldst.h.inc b/include/exec/memory_ldst.h.inc index 92ad74e9560..7270235c600 100644 --- a/include/exec/memory_ldst.h.inc +++ b/include/exec/memory_ldst.h.inc @@ -19,7 +19,6 @@ * License along with this library; if not, see . */ -#ifdef TARGET_ENDIANNESS uint16_t glue(address_space_lduw, SUFFIX)(ARG1_DECL, hwaddr addr, MemTxAttrs attrs, MemTxResult *result); uint32_t glue(address_space_ldl, SUFFIX)(ARG1_DECL, @@ -34,7 +33,6 @@ void glue(address_space_stl, SUFFIX)(ARG1_DECL, hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result); void glue(address_space_stq, SUFFIX)(ARG1_DECL, hwaddr addr, uint64_t val, MemTxAttrs attrs, MemTxResult *result); -#else uint8_t glue(address_space_ldub, SUFFIX)(ARG1_DECL, hwaddr addr, MemTxAttrs attrs, MemTxResult *result); uint16_t glue(address_space_lduw_le, SUFFIX)(ARG1_DECL, @@ -63,9 +61,7 @@ void glue(address_space_stq_le, SUFFIX)(ARG1_DECL, hwaddr addr, uint64_t val, MemTxAttrs attrs, MemTxResult *result); void glue(address_space_stq_be, SUFFIX)(ARG1_DECL, hwaddr addr, uint64_t val, MemTxAttrs attrs, MemTxResult *result); -#endif #undef ARG1_DECL #undef ARG1 #undef SUFFIX -#undef TARGET_ENDIANNESS