[RFC PATCH-for-8.0 0/3] hw/ppc: Remove tswap() calls

Philippe Mathieu-Daudé posted 3 patches 1 year, 4 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20221213125218.39868-1-philmd@linaro.org
Maintainers: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Alistair Francis <alistair@alistair23.me>, Peter Maydell <peter.maydell@linaro.org>, Jason Wang <jasowang@redhat.com>, BALATON Zoltan <balaton@eik.bme.hu>, Daniel Henrique Barboza <danielhb413@gmail.com>, "Cédric Le Goater" <clg@kaod.org>, David Gibson <david@gibson.dropbear.id.au>, Greg Kurz <groug@kaod.org>
hw/net/xilinx_ethlite.c | 10 +++++-----
hw/ppc/sam460ex.c       |  3 ++-
hw/ppc/spapr.c          |  9 +++++----
hw/ppc/virtex_ml507.c   |  3 ++-
4 files changed, 14 insertions(+), 11 deletions(-)
[RFC PATCH-for-8.0 0/3] hw/ppc: Remove tswap() calls
Posted by Philippe Mathieu-Daudé 1 year, 4 months ago
Hi,

I am trying to remove the tswap() API from system
emulation and replace it by more meaningful calls,
because tswap depends on the host endianness, and
this detail should be irrelevant from the system
emulation PoV.

In this RFC series I'm trying to convert the PPC
calls.

Any help in understanding what was the original
author intention is welcomed :)

Thanks,

Phil.

Philippe Mathieu-Daudé (3):
  hw/ppc: Replace tswap32() by const_le32()
  hw/ppc/spapr: Replace tswap64(HPTE) by cpu_to_be64(HPTE)
  hw/net/xilinx_ethlite: Replace tswap32() by be32_to_cpu()

 hw/net/xilinx_ethlite.c | 10 +++++-----
 hw/ppc/sam460ex.c       |  3 ++-
 hw/ppc/spapr.c          |  9 +++++----
 hw/ppc/virtex_ml507.c   |  3 ++-
 4 files changed, 14 insertions(+), 11 deletions(-)

-- 
2.38.1


Re: [RFC PATCH-for-8.0 0/3] hw/ppc: Remove tswap() calls
Posted by Cédric Le Goater 1 year, 4 months ago
On 12/13/22 13:52, Philippe Mathieu-Daudé wrote:
> Hi,
> 
> I am trying to remove the tswap() API from system
> emulation and replace it by more meaningful calls,
> because tswap depends on the host endianness, and
> this detail should be irrelevant from the system
> emulation PoV.
> 
> In this RFC series I'm trying to convert the PPC
> calls.

Here are some simple images for tests:

   https://github.com/legoater/qemu-ppc-boot/tree/main/buildroot

Cheers,

C.


> 
> Any help in understanding what was the original
> author intention is welcomed :)
> 
> Thanks,
> 
> Phil.
> 
> Philippe Mathieu-Daudé (3):
>    hw/ppc: Replace tswap32() by const_le32()
>    hw/ppc/spapr: Replace tswap64(HPTE) by cpu_to_be64(HPTE)
>    hw/net/xilinx_ethlite: Replace tswap32() by be32_to_cpu()
> 
>   hw/net/xilinx_ethlite.c | 10 +++++-----
>   hw/ppc/sam460ex.c       |  3 ++-
>   hw/ppc/spapr.c          |  9 +++++----
>   hw/ppc/virtex_ml507.c   |  3 ++-
>   4 files changed, 14 insertions(+), 11 deletions(-)
>