The swab() is massively over complicated Simplify it with compiler builtins and fallback to plain C function if undefined. Update components to switch to this new swap bytes.
Lin Liu (7): xen: implement byteswap.h crypto/vmac: Simplify code with byteswap.h arm64/find_next_bit: Remove ext2_swab() arm: Switch to byteswap.h xen/xsm: Switch to byteswap.h xen: Switch to byteswap.h byteorder: Remove byteorder xen/arch/arm/alternative.c | 2 +- xen/arch/arm/arm64/lib/find_next_bit.c | 40 +---- xen/arch/arm/arm64/livepatch.c | 2 +- xen/arch/arm/kernel.c | 2 +- xen/arch/arm/vgic/vgic-mmio.c | 2 +- xen/common/bitmap.c | 2 +- xen/common/gdbstub.c | 2 +- xen/common/libelf/libelf-private.h | 8 +- xen/common/lz4/defs.h | 2 +- xen/common/lzo.c | 2 +- xen/common/unlzo.c | 2 +- xen/common/xz/private.h | 4 +- xen/crypto/vmac.c | 76 +-------- xen/drivers/char/ehci-dbgp.c | 2 +- xen/include/asm-arm/arm32/io.h | 2 +- xen/include/asm-arm/arm64/io.h | 2 +- xen/include/asm-arm/byteorder.h | 16 -- xen/include/asm-x86/byteorder.h | 36 ----- xen/include/asm-x86/msi.h | 2 +- xen/include/xen/bitmap.h | 2 +- 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 | 183 ---------------------- xen/include/xen/byteswap.h | 93 +++++++++++ xen/include/xen/compiler.h | 12 ++ xen/include/xen/device_tree.h | 2 +- xen/include/xen/libfdt/libfdt_env.h | 2 +- xen/include/xen/unaligned.h | 14 +- xen/lib/divmod.c | 2 +- xen/xsm/flask/ss/avtab.c | 2 +- xen/xsm/flask/ss/conditional.c | 2 +- xen/xsm/flask/ss/ebitmap.c | 2 +- xen/xsm/flask/ss/policydb.c | 2 +- 34 files changed, 150 insertions(+), 646 deletions(-) delete mode 100644 xen/include/asm-arm/byteorder.h delete mode 100644 xen/include/asm-x86/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 -- 2.27.0
