mbox series

[v5,00/16] xen: Centralise byteswap infrastructure

Message ID 20250328134427.874848-1-andrew.cooper3@citrix.com (mailing list archive)
Headers show
Series xen: Centralise byteswap infrastructure | expand

Message

Andrew Cooper March 28, 2025, 1:44 p.m. UTC
The diffstat speaks for itself.

This is a follow-up to Lin's years-old series, rebased to account for RISC-V
and PPC, and simplified owing to our new compiler baseline.

Andrew Cooper (8):
  xen/lzo: Remove more remanants of TMEM
  xen: Remove __{BIG,LITTLE}_ENDIAN_BITFIELD
  xsm/flask: Switch {asm -> xen}/byteorder.h
  xen/common: Switch {asm -> xen}/byteorder.h
  arm: Remove asm/byteorder.h
  ppc: Drop asm/byteorder.h
  riscv: Remove asm/byteorder.h
  x86: Drop asm/byteorder.h

Lin Liu (8):
  xen: Implement common byte{order,swap}.h
  xen/lib: Switch to xen/byteorder.h
  xen/device-tree: Remove use of *_to_cpup() helpers
  xen/decompressors: Remove use of *_to_cpup() helpers
  xen/arch: Switch to new byteorder infrastructure
  xen/decompressors: Use new byteorder infrastructure
  xen: Remove old byteorder infrastructure
  crypto/vmac: Switch to xen/byteswap.h

 .../libs/guest/xg_dom_decompress_unsafe_xz.c  |  13 +-
 .../guest/xg_dom_decompress_unsafe_zstd.c     |   3 +-
 xen/arch/arm/alternative.c                    |   6 +-
 xen/arch/arm/arm64/livepatch.c                |   2 +-
 xen/arch/arm/include/asm/arm32/io.h           |   3 +-
 xen/arch/arm/include/asm/arm64/io.h           |   3 +-
 xen/arch/arm/include/asm/byteorder.h          |  16 --
 xen/arch/arm/kernel.c                         |   2 +-
 xen/arch/arm/vgic/vgic-mmio.c                 |   3 +-
 xen/arch/ppc/include/asm/byteorder.h          |  12 --
 xen/arch/ppc/include/asm/page.h               |   4 +-
 xen/arch/ppc/mm-radix.c                       |   2 +-
 xen/arch/riscv/include/asm/byteorder.h        |  16 --
 xen/arch/riscv/include/asm/io.h               |   3 +-
 xen/arch/x86/include/asm/byteorder.h          |  29 ---
 xen/arch/x86/include/asm/msi.h                |   1 -
 xen/common/bitmap.c                           |   5 +-
 xen/common/device-tree/device-tree.c          |  44 ++---
 xen/common/grant_table.c                      |   4 +-
 xen/common/libelf/libelf-private.h            |   9 +-
 xen/common/lz4/defs.h                         |   7 +-
 xen/common/lzo.c                              |  22 ---
 xen/common/unlzo.c                            |   1 -
 xen/common/xz/private.h                       |  13 +-
 xen/crypto/vmac.c                             |  76 +-------
 xen/drivers/char/ehci-dbgp.c                  |   4 +-
 xen/include/xen/bitmap.h                      |   2 +-
 xen/include/xen/byteorder.h                   |  44 +++++
 xen/include/xen/byteorder/big_endian.h        | 102 ----------
 xen/include/xen/byteorder/generic.h           |  68 -------
 xen/include/xen/byteorder/little_endian.h     | 102 ----------
 xen/include/xen/byteorder/swab.h              | 179 ------------------
 xen/include/xen/byteswap.h                    |  15 ++
 xen/include/xen/config.h                      |   6 +
 xen/include/xen/device_tree.h                 |   3 +-
 xen/include/xen/libfdt/libfdt_env.h           |   3 +-
 xen/include/xen/unaligned.h                   |   3 +-
 xen/lib/divmod.c                              |   5 +-
 xen/lib/find-next-bit.c                       |  39 +---
 xen/xsm/flask/ss/avtab.c                      |   4 +-
 xen/xsm/flask/ss/conditional.c                |   9 +-
 xen/xsm/flask/ss/ebitmap.c                    |   9 +-
 xen/xsm/flask/ss/policydb.c                   |   7 +-
 43 files changed, 166 insertions(+), 737 deletions(-)
 delete mode 100644 xen/arch/arm/include/asm/byteorder.h
 delete mode 100644 xen/arch/ppc/include/asm/byteorder.h
 delete mode 100644 xen/arch/riscv/include/asm/byteorder.h
 delete mode 100644 xen/arch/x86/include/asm/byteorder.h
 create mode 100644 xen/include/xen/byteorder.h
 delete mode 100644 xen/include/xen/byteorder/big_endian.h
 delete mode 100644 xen/include/xen/byteorder/generic.h
 delete mode 100644 xen/include/xen/byteorder/little_endian.h
 delete mode 100644 xen/include/xen/byteorder/swab.h
 create mode 100644 xen/include/xen/byteswap.h


base-commit: eecb9f437b2c3e2d22d0af93dc6b1f4d978313a7