From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
qemu-ppc@nongnu.org,
"Richard Henderson" <richard.henderson@linaro.org>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PATCH 1/4] target/ppc: Include missing headers in mmu-hash[32,64].h
Date: Wed, 18 Dec 2024 16:51:59 +0100 [thread overview]
Message-ID: <20241218155202.71931-2-philmd@linaro.org> (raw)
In-Reply-To: <20241218155202.71931-1-philmd@linaro.org>
CPUState* is dereferenced, so we need the structure definition
from "cpu.h". PowerPCCPU is declared in "cpu-qom.h". Include
them in order to avoid when refactoring:
In file included from ../../target/ppc/cpu_init.c:27:
target/ppc/mmu-hash32.h:6:23: error: unknown type name 'PowerPCCPU'
6 | bool ppc_hash32_xlate(PowerPCCPU *cpu, vaddr eaddr, MMUAccessType access_type,
| ^
target/ppc/mmu-hash32.h:66:15: error: incomplete definition of type 'struct ArchCPU'
66 | return cpu->env.spr[SPR_SDR1] & SDR_32_HTABORG;
| ~~~^
target/ppc/mmu-hash64.h:173:36: error: unknown type name ‘PowerPCCPU’; did you mean ‘PowerPCCPUAlias’?
173 | static inline void ppc_hash64_init(PowerPCCPU *cpu)
| ^~~~~~~~~~
| PowerPCCPUAlias
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/ppc/mmu-hash32.h | 3 +++
target/ppc/mmu-hash64.h | 2 ++
2 files changed, 5 insertions(+)
diff --git a/target/ppc/mmu-hash32.h b/target/ppc/mmu-hash32.h
index 2838de031c7..abbff206d4e 100644
--- a/target/ppc/mmu-hash32.h
+++ b/target/ppc/mmu-hash32.h
@@ -3,6 +3,9 @@
#ifndef CONFIG_USER_ONLY
+#include "target/ppc/cpu-qom.h"
+#include "cpu.h"
+
bool ppc_hash32_xlate(PowerPCCPU *cpu, vaddr eaddr, MMUAccessType access_type,
hwaddr *raddrp, int *psizep, int *protp, int mmu_idx,
bool guest_visible);
diff --git a/target/ppc/mmu-hash64.h b/target/ppc/mmu-hash64.h
index ae8d4b37aed..b32e17c2c58 100644
--- a/target/ppc/mmu-hash64.h
+++ b/target/ppc/mmu-hash64.h
@@ -3,6 +3,8 @@
#ifndef CONFIG_USER_ONLY
+#include "target/ppc/cpu-qom.h"
+
#ifdef TARGET_PPC64
void dump_slb(PowerPCCPU *cpu);
int ppc_store_slb(PowerPCCPU *cpu, target_ulong slot,
--
2.45.2
next prev parent reply other threads:[~2024-12-18 15:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-18 15:51 [PATCH 0/4] include: Header cleanups around "cpu.h" Philippe Mathieu-Daudé
2024-12-18 15:51 ` Philippe Mathieu-Daudé [this message]
2024-12-18 16:41 ` [PATCH 1/4] target/ppc: Include missing headers in mmu-hash[32,64].h Richard Henderson
2024-12-18 17:02 ` Philippe Mathieu-Daudé
2024-12-18 15:52 ` [PATCH 2/4] tcg/tci: Include missing 'disas/dis-asm.h' header Philippe Mathieu-Daudé
2024-12-18 15:52 ` [PATCH 3/4] exec/ram_addr: Include missing 'exec/hwaddr.h' and 'exec/cpu-common.h' Philippe Mathieu-Daudé
2024-12-18 15:52 ` [PATCH 4/4] exec/cpu-all: Include 'cpu.h' earlier so MMU_USER_IDX is always defined Philippe Mathieu-Daudé
2024-12-18 16:42 ` [PATCH 0/4] include: Header cleanups around "cpu.h" Richard Henderson
2024-12-19 17:18 ` Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241218155202.71931-2-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.