[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 0/7] Implement byteswap and update references


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Lin Liu <lin.liu@xxxxxxxxxx>
  • Date: Fri, 22 Oct 2021 10:47:21 +0000
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Lin Liu <lin.liu@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>, "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, "Ian Jackson" <iwj@xxxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Fri, 22 Oct 2021 10:48:12 +0000
  • Ironport-data: A9a23:1hiUSqM7bU9zSEHvrR3KkcFynXyQoLVcMsEvi/4bfWQNrUpz12ACy GtKUG7Vbv7YZ2r1KNwna9mw90tQ6pDWy4NgHgto+SlhQUwRpJueD7x1DKtR0wB+jCHnZBg6h ynLQoCYdKjYdpJYz/uUGuCJQUNUjMlkfZKhTr6bUsxNbVU8En540Ug5w7RRbrNA2rBVPSvc4 bsenOWHULOV82Yc3rU8sv/rRLtH5ZweiRtA1rAMTakjUGz2zhH5OKk3N6CpR0YUd6EPdgKMq 0Qv+5nilo/R109F5tpICd8XeGVSKlLZFVDmZna7x8FOK/WNz8A/+v9TCRYSVatYoxaNoPRxz dpdib2hcQM2b6HDstwPVzANRkmSPYUekFPGCX22sMjVxEzaaX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9TepmlPps+9v1qrZG5Q14B3GXPU+zA7ZtLyDej8lCv6FA3JFDvg6yV h7d89VWI+zRasjkDEQQNEwuaeHajaMYnTzb7PIUJkTm5XAooOrbABsKZxTV0X5TNrp4No8h0 NwNgs9O5lztkAcuP/aHkjtQqzaGIEsfXvh1rZodGoLq1FYmkwkQfZzGBybqy5iTcNEQYFIyK zqZiaee1bRRwk3OLyg6GXTXhLcPgJ0PvFZBzUMYJkTPkd3A36dl0BpU+DUxbwJU0hQYjL4jZ jk1bxV4dfeU4jNlpMlfRGT9SQhOCSqQ9lH111ZUxnbSSFOlVzCVIWAwUQpXEJv1L46IkuBnw Yyl
  • Ironport-hdrordr: A9a23:K087u6qLDI6xqR7B7gn+Fj4aV5oneYIsimQD101hICG8cqSj+f xG+85rsiMc6QxhPE3I9urhBEDtex/hHP1OkOws1NWZLWrbUQKTRekIh+bfKlXbakvDH4VmtJ uIHZIQNDSJNykZsfrH
  • Ironport-sdr: Fx7NTsVq5WQr3Y2Q0sk06Jet0f+0FOvd65lKHSqNX5FBe4kBmI/llBnQFjK27SXTwH0WqmRz/w 3eUTQ7JN3H4FS4yhsQYcHixbLDaYNgBInv/6vOpzvxjneYK2k8hr27zYB/8yZLdahAON4ugzDa VQNwsPIlSfk8hVY1I8Yz9EPRS5rg3I2PNXsSPw/cVUfQAiBzhfTH0BYHQPOjcAhXd4cXarkSgH HwpoTbVLSGDFk16t/hQtrJQX50uKvyaiZTDTH2HSu9xeBgA3hDlhCAU9qHV5c5cir4a5+xaVZ9 yrwcEa6EPmqXv0pyO6a5fcop
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.