From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: philmd@linaro.org, alex.bennee@linaro.org
Subject: [PATCH v2 7/9] buildsys: Remove support for 32-bit PPC hosts
Date: Wed, 15 Oct 2025 14:38:41 -0700 [thread overview]
Message-ID: <20251015213843.14277-8-richard.henderson@linaro.org> (raw)
In-Reply-To: <20251015213843.14277-1-richard.henderson@linaro.org>
From: Philippe Mathieu-Daudé <philmd@linaro.org>
Stop detecting 32-bit PPC host as supported.
See previous commit for rationale.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
[rth: Retain _ARCH_PPC64 check in udiv_qrnnd]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20251014173900.87497-4-philmd@linaro.org>
---
include/qemu/timer.h | 13 +------------
disas/disas-host.c | 4 +---
util/cacheflush.c | 4 ++--
configure | 19 +++++--------------
4 files changed, 9 insertions(+), 31 deletions(-)
diff --git a/include/qemu/timer.h b/include/qemu/timer.h
index aec730ac25..406d741120 100644
--- a/include/qemu/timer.h
+++ b/include/qemu/timer.h
@@ -850,12 +850,11 @@ static inline int64_t get_clock(void)
/*******************************************/
/* host CPU ticks (if available) */
-#if defined(_ARCH_PPC)
+#if defined(_ARCH_PPC64)
static inline int64_t cpu_get_host_ticks(void)
{
int64_t retval;
-#ifdef _ARCH_PPC64
/* This reads timebase in one 64bit go and includes Cell workaround from:
http://ozlabs.org/pipermail/linuxppc-dev/2006-October/027052.html
*/
@@ -863,16 +862,6 @@ static inline int64_t cpu_get_host_ticks(void)
"cmpwi %0,0\n\t"
"beq- $-8"
: "=r" (retval));
-#else
- /* http://ozlabs.org/pipermail/linuxppc-dev/1999-October/003889.html */
- unsigned long junk;
- __asm__ __volatile__ ("mfspr %1,269\n\t" /* mftbu */
- "mfspr %L0,268\n\t" /* mftb */
- "mfspr %0,269\n\t" /* mftbu */
- "cmpw %0,%1\n\t"
- "bne $-16"
- : "=r" (retval), "=r" (junk));
-#endif
return retval;
}
diff --git a/disas/disas-host.c b/disas/disas-host.c
index 8146fafe80..4b06f41fa6 100644
--- a/disas/disas-host.c
+++ b/disas/disas-host.c
@@ -56,11 +56,9 @@ static void initialize_debug_host(CPUDebug *s)
s->info.cap_mode = CS_MODE_64;
s->info.cap_insn_unit = 1;
s->info.cap_insn_split = 8;
-#elif defined(_ARCH_PPC)
+#elif defined(_ARCH_PPC64)
s->info.cap_arch = CS_ARCH_PPC;
-# ifdef _ARCH_PPC64
s->info.cap_mode = CS_MODE_64;
-# endif
#elif defined(__riscv)
#if defined(_ILP32) || (__riscv_xlen == 32)
s->info.print_insn = print_insn_riscv32;
diff --git a/util/cacheflush.c b/util/cacheflush.c
index 17c58918de..69c9614e2c 100644
--- a/util/cacheflush.c
+++ b/util/cacheflush.c
@@ -153,7 +153,7 @@ static void arch_cache_info(int *isize, int *dsize)
}
}
-#elif defined(_ARCH_PPC) && defined(__linux__)
+#elif defined(_ARCH_PPC64) && defined(__linux__)
# include "elf.h"
static void arch_cache_info(int *isize, int *dsize)
@@ -187,7 +187,7 @@ static void fallback_cache_info(int *isize, int *dsize)
} else if (*dsize) {
*isize = *dsize;
} else {
-#if defined(_ARCH_PPC)
+#if defined(_ARCH_PPC64)
/*
* For PPC, we're going to use the cache sizes computed for
* flush_idcache_range. Which means that we must use the
diff --git a/configure b/configure
index 8263f81370..a2f66f7ff9 100755
--- a/configure
+++ b/configure
@@ -391,15 +391,11 @@ elif check_define __sparc__ ; then
else
cpu="sparc"
fi
-elif check_define _ARCH_PPC ; then
- if check_define _ARCH_PPC64 ; then
- if check_define _LITTLE_ENDIAN ; then
- cpu="ppc64le"
- else
- cpu="ppc64"
- fi
+elif check_define _ARCH_PPC64 ; then
+ if check_define _LITTLE_ENDIAN ; then
+ cpu="ppc64le"
else
- cpu="ppc"
+ cpu="ppc64"
fi
elif check_define __mips__ ; then
if check_define __mips64 ; then
@@ -472,11 +468,6 @@ case "$cpu" in
linux_arch=mips
;;
- ppc)
- host_arch=ppc
- linux_arch=powerpc
- CPU_CFLAGS="-m32"
- ;;
ppc64)
host_arch=ppc64
linux_arch=powerpc
@@ -1471,7 +1462,7 @@ probe_target_compiler() {
container_image=debian-all-test-cross
container_cross_prefix=mips64-linux-gnuabi64-
;;
- ppc|ppc64|ppc64le)
+ ppc64|ppc64le)
container_image=debian-all-test-cross
container_cross_prefix=powerpc${target_arch#ppc}-linux-gnu-
;;
--
2.43.0
next prev parent reply other threads:[~2025-10-15 21:39 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-15 21:38 [PATCH v2 0/9] tcg: Remove support for 32-bit mips/ppc hosts Richard Henderson
2025-10-15 21:38 ` [PATCH v2 1/9] gitlab: Stop cross-testing for 32-bit MIPS hosts Richard Henderson
2025-10-16 7:59 ` Daniel P. Berrangé
2025-10-16 20:49 ` Richard Henderson
2025-10-15 21:38 ` [PATCH v2 2/9] buildsys: Remove support " Richard Henderson
2025-10-15 21:38 ` [PATCH v2 3/9] kvm/mips: Remove support for 32-bit hosts Richard Henderson
2025-10-15 21:38 ` [PATCH v2 4/9] tcg/mips: Remove support for O32 and N32 ABIs Richard Henderson
2025-10-16 5:54 ` Philippe Mathieu-Daudé
2025-10-15 21:38 ` [PATCH v2 5/9] tcg/mips: Remove support for 32-bit hosts Richard Henderson
2025-10-15 21:38 ` [PATCH v2 6/9] tcg/mips: Remove ALIAS_PADD, ALIAS_PADDI Richard Henderson
2025-10-16 5:53 ` Philippe Mathieu-Daudé
2025-10-16 6:28 ` Thomas Huth
2025-10-15 21:38 ` Richard Henderson [this message]
2025-10-16 6:30 ` [PATCH v2 7/9] buildsys: Remove support for 32-bit PPC hosts Thomas Huth
2025-10-15 21:38 ` [PATCH v2 8/9] tcg/ppc: Remove support for 32-bit hosts Richard Henderson
2025-10-15 22:04 ` Richard Henderson
2025-10-15 21:38 ` [PATCH v2 9/9] tcg/ppc: Remove dead cases from tcg_target_op_def Richard Henderson
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=20251015213843.14277-8-richard.henderson@linaro.org \
--to=richard.henderson@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.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 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).