[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 15/23] exec: Declare target_words_bigendian() in 'exec/tsw
From: |
Anton Johansson |
Subject: |
Re: [PATCH v2 15/23] exec: Declare target_words_bigendian() in 'exec/tswap.h' |
Date: |
Wed, 13 Dec 2023 12:20:15 +0100 |
On 12/12/23, Philippe Mathieu-Daudé wrote:
> We usually check target endianess before swapping values,
> so target_words_bigendian() declaration makes sense in
> "exec/tswap.h" with the target swapping helpers.
>
> Remove "hw/core/cpu.h" when it was only included to get
> the target_words_bigendian() declaration.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> include/exec/tswap.h | 12 +++++++++++-
> include/hw/core/cpu.h | 11 -----------
> cpu-target.c | 1 +
> disas/disas.c | 1 +
> hw/audio/virtio-snd.c | 2 +-
> hw/core/cpu-sysemu.c | 2 +-
> hw/core/generic-loader.c | 2 +-
> hw/display/vga.c | 2 +-
> hw/virtio/virtio.c | 1 +
> 9 files changed, 18 insertions(+), 16 deletions(-)
>
> diff --git a/include/exec/tswap.h b/include/exec/tswap.h
> index 68944a880b..77954bbc2b 100644
> --- a/include/exec/tswap.h
> +++ b/include/exec/tswap.h
> @@ -8,9 +8,19 @@
> #ifndef TSWAP_H
> #define TSWAP_H
>
> -#include "hw/core/cpu.h"
> #include "qemu/bswap.h"
This breaks system/qtest.c which gets first_cpu from hw/core/cpu.h
through the inclusion of tswap.h...
../system/qtest.c:548:33: error: ‘first_cpu’ undeclared (first use in this
function);
548 | address_space_write(first_cpu->as, addr,
MEMTXATTRS_UNSPECIFIED,
| ^~~~~~~~~
Adding hw/core/cpu.h to system/qtest.c seems sufficient.
Otherwise,
Reviewed-by: Anton Johansson <anjo@rev.ng>
- Re: [PATCH v2 08/23] host/load-extract: Include missing 'qemu/atomic.h' and 'qemu/int128.h', (continued)
- [PATCH v2 10/23] target/i386: Include missing 'exec/exec-all.h' header, Philippe Mathieu-Daudé, 2023/12/12
- [PATCH v2 11/23] accel/tcg: Include missing 'hw/core/cpu.h' header, Philippe Mathieu-Daudé, 2023/12/12
- [PATCH v2 09/23] host/atomic128: Include missing 'qemu/atomic.h' header, Philippe Mathieu-Daudé, 2023/12/12
- [PATCH v2 13/23] exec/cpu-all: Reduce 'qemu/rcu.h' header inclusion, Philippe Mathieu-Daudé, 2023/12/12
- [PATCH v2 12/23] exec/cpu-all: Remove unused 'qemu/thread.h' header, Philippe Mathieu-Daudé, 2023/12/12
- [PATCH v2 15/23] exec: Declare target_words_bigendian() in 'exec/tswap.h', Philippe Mathieu-Daudé, 2023/12/12
- Re: [PATCH v2 15/23] exec: Declare target_words_bigendian() in 'exec/tswap.h',
Anton Johansson <=
- [PATCH v2 14/23] exec/cpu-all: Remove unused tswapls() definitions, Philippe Mathieu-Daudé, 2023/12/12
- [PATCH v2 16/23] exec: Move [b]tswapl() declarations to 'exec/user/tswap-target.h', Philippe Mathieu-Daudé, 2023/12/12
- [PATCH v2 18/23] accel/tcg: Un-inline retaddr helpers to 'user-retaddr.h', Philippe Mathieu-Daudé, 2023/12/12
- [PATCH v2 17/23] target/ppc/excp_helper: Avoid 'abi_ptr' in system emulation, Philippe Mathieu-Daudé, 2023/12/12
- [PATCH v2 19/23] exec/user: Do not include 'cpu.h' in 'abitypes.h', Philippe Mathieu-Daudé, 2023/12/12