qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] target/arm/common-semi-target.h: Remove unnecessary boot.h include
@ 2023-09-25 11:22 Peter Maydell
  2023-09-28 19:47 ` Richard Henderson
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Maydell @ 2023-09-25 11:22 UTC (permalink / raw)
  To: qemu-arm, qemu-devel

The hw/arm/boot.h include in common-semi-target.h is not actually
needed, and it's a bit odd because it pulls a hw/arm header into a
target/arm file.

This include was originally needed because the semihosting code used
the arm_boot_info struct to get the base address of the RAM in system
emulation, to use in a (bad) heuristic for the return values for the
SYS_HEAPINFO semihosting call.  We've since overhauled how we
calculate the HEAPINFO values in system emulation, and the code no
longer uses the arm_boot_info struct.

Remove the now-redundant include line, and instead directly include
the cpu-qom.h header that we were previously getting via boot.h.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 target/arm/common-semi-target.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/target/arm/common-semi-target.h b/target/arm/common-semi-target.h
index 629d75ca5a7..fa00c7fabb6 100644
--- a/target/arm/common-semi-target.h
+++ b/target/arm/common-semi-target.h
@@ -10,9 +10,7 @@
 #ifndef TARGET_ARM_COMMON_SEMI_TARGET_H
 #define TARGET_ARM_COMMON_SEMI_TARGET_H
 
-#ifndef CONFIG_USER_ONLY
-#include "hw/arm/boot.h"
-#endif
+#include "target/arm/cpu-qom.h"
 
 static inline target_ulong common_semi_arg(CPUState *cs, int argno)
 {
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] target/arm/common-semi-target.h: Remove unnecessary boot.h include
  2023-09-25 11:22 [PATCH] target/arm/common-semi-target.h: Remove unnecessary boot.h include Peter Maydell
@ 2023-09-28 19:47 ` Richard Henderson
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 2023-09-28 19:47 UTC (permalink / raw)
  To: Peter Maydell, qemu-arm, qemu-devel

On 9/25/23 07:22, Peter Maydell wrote:
> The hw/arm/boot.h include in common-semi-target.h is not actually
> needed, and it's a bit odd because it pulls a hw/arm header into a
> target/arm file.
> 
> This include was originally needed because the semihosting code used
> the arm_boot_info struct to get the base address of the RAM in system
> emulation, to use in a (bad) heuristic for the return values for the
> SYS_HEAPINFO semihosting call.  We've since overhauled how we
> calculate the HEAPINFO values in system emulation, and the code no
> longer uses the arm_boot_info struct.
> 
> Remove the now-redundant include line, and instead directly include
> the cpu-qom.h header that we were previously getting via boot.h.
> 
> Signed-off-by: Peter Maydell<peter.maydell@linaro.org>
> ---
>   target/arm/common-semi-target.h | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-09-28 19:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-25 11:22 [PATCH] target/arm/common-semi-target.h: Remove unnecessary boot.h include Peter Maydell
2023-09-28 19:47 ` Richard Henderson

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).