From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Thomas Huth" <thuth@redhat.com>,
"Daniel Henrique Barboza" <danielhb413@gmail.com>,
"BALATON Zoltan" <balaton@eik.bme.hu>,
"Nicholas Piggin" <npiggin@gmail.com>,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
qemu-ppc@nongnu.org, "Anton Johansson" <anjo@rev.ng>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PATCH 1/3] target/ppc: Expose ppc_cpu_is_big_endian() prototype in 'cpu.h'
Date: Mon, 30 Sep 2024 14:53:21 +0200 [thread overview]
Message-ID: <20240930125323.54671-2-philmd@linaro.org> (raw)
In-Reply-To: <20240930125323.54671-1-philmd@linaro.org>
Expose ppc_cpu_is_big_endian() so it can be used by hw/ code.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/ppc/cpu.h | 2 ++
target/ppc/cpu_init.c | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h
index 321ed2da75..4a4911502d 100644
--- a/target/ppc/cpu.h
+++ b/target/ppc/cpu.h
@@ -3007,6 +3007,8 @@ static inline bool ppc_interrupts_little_endian(PowerPCCPU *cpu, bool hv)
return ile;
}
+
+bool ppc_cpu_is_big_endian(CPUState *cs);
#endif
void dump_mmu(CPUPPCState *env);
diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c
index 23881d09e9..00e0a8bf2c 100644
--- a/target/ppc/cpu_init.c
+++ b/target/ppc/cpu_init.c
@@ -7343,7 +7343,7 @@ static void ppc_cpu_reset_hold(Object *obj, ResetType type)
#ifndef CONFIG_USER_ONLY
-static bool ppc_cpu_is_big_endian(CPUState *cs)
+bool ppc_cpu_is_big_endian(CPUState *cs)
{
cpu_synchronize_state(cs);
--
2.45.2
next prev parent reply other threads:[~2024-09-30 12:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-30 12:53 [PATCH 0/3] hw/ppc: Replace tswap32() by stl_endian_p() Philippe Mathieu-Daudé
2024-09-30 12:53 ` Philippe Mathieu-Daudé [this message]
2024-09-30 12:53 ` [PATCH 2/3] hw/ppc/sam460ex: " Philippe Mathieu-Daudé
2024-09-30 13:49 ` BALATON Zoltan
2024-09-30 12:53 ` [PATCH 3/3] hw/ppc/virtex_ml507: " Philippe Mathieu-Daudé
2024-09-30 13:50 ` BALATON Zoltan
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=20240930125323.54671-2-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=anjo@rev.ng \
--cc=balaton@eik.bme.hu \
--cc=danielhb413@gmail.com \
--cc=edgar.iglesias@gmail.com \
--cc=npiggin@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=thuth@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).