From nobody Mon Feb 9 10:39:47 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1634899723; cv=none; d=zohomail.com; s=zohoarc; b=QK8g/+k5GGGekm/idqQVA/zIjvlsRfSx2t8CD0oKDM3Z+mHXYq1yTG095lgfG26lpCDoCBBZi7vxwpHvIYrY2jKMc8ZUJ0d8MTanWD8N7fBDjsDUES9YnhaqAepKxZkNAHrN+m7HbWy/IqoCN1svL66uw1R1ly0EaGR5+Y0esp8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634899723; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=BbKJt00U4G0ugeFSjdkWZlfqhX8KbSoy9pw9jZ7C2wM=; b=ZnLtJBHTkEM9HrroUhqDsCOtSIbyWqM5stprLA333FOeP+U4QJvyKMRMgMBUwWzWt4aE5QeWOR5r8ZZg8hl0RXzhSI7KXjUaU+UgYqrh8hfDh5i6TT2KD6qcTfdvGqFdoodM+f2G7Um1oHGjbRSOgRzGmA3w1JNaHSM2+RF+JOI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 163489972344589.37029853955357; Fri, 22 Oct 2021 03:48:43 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.214955.373899 (Exim 4.92) (envelope-from ) id 1mds68-0000EL-5l; Fri, 22 Oct 2021 10:48:28 +0000 Received: by outflank-mailman (output) from mailman id 214955.373899; Fri, 22 Oct 2021 10:48:28 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mds68-0000D6-0z; Fri, 22 Oct 2021 10:48:28 +0000 Received: by outflank-mailman (input) for mailman id 214955; Fri, 22 Oct 2021 10:48:26 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mds66-00063m-Sr for xen-devel@lists.xenproject.org; Fri, 22 Oct 2021 10:48:26 +0000 Received: from esa6.hc3370-68.iphmx.com (unknown [216.71.155.175]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 28c6be87-f6ea-42ef-9151-413cd568356b; Fri, 22 Oct 2021 10:48:08 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 28c6be87-f6ea-42ef-9151-413cd568356b DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1634899688; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=k/jOhLHPZRA8Ag0Zx9f8hcyG0uLCD9lIG9NbqTmotxQ=; b=P5LLaymYDDd7YPzHgw8VO//tiGscp2o2P63uah3hGxrvsMT55ARBFp/p 9vY++0HNE+WxlPloQuix8r0ZSKovztZH3SQURBpBSCitVnWMzF8/t5gji o5PNHYYJU8oLOkSz4/gkHNbReHFwYtR4FnEcJHreivFJ12K1q0Nu9die6 Q=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: FVYnoo/wTcjQj0Hr19f8bSUOfLUjj69j01RWR4xcgBFEKEIcjAhmQYdt6l3l+wjkD6bnW9NPSo RCKh2amD6+7hRLEkbwzHJgxBzhwDseJ7E0zbajPN+p73WzP9ErRyq8ztPTUa9rOajkNVLfTE51 OweUEt8q13ibX5emWvJ2XXWdP8ck9PQCqaX1C2+RwTdBEB/B9t7CQF8ESe24tWbpeluKD/QS3q jsBtQgykNf6n/q/n5xcvJlskC5/Rw8Jz2G5lWc+SB1kokBJVWhLrKC8EZolGDmtlbw/Aopu+nB lBxSz3aKH919eiSMYH/tCb+6 X-SBRS: 5.1 X-MesageID: 55807254 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:7ljUfaiBYtUcWl1AmEunBh4yX1615BcKZh0ujC45NGQN5FlHY01je htvWGyAPPzbZWuhf99xbdu1o08H6JSBmIc1QARv+XtkFyIb9cadCdqndUqhZCn6wu8v7a5EA 2fyTvGacajYm1eF/k/F3oAMKRCQ7InQLlbGILes1htZGEk0F0/NtTo5w7Rg29Yy24Dja++wk YiaT/P3aQfNNwFcagr424rbwP+4lK2v0N+wlgVWicFj5DcypVFMZH4sDfjZw0/DaptVBoaHq 9Prl9lVyI97EyAFUbtJmp6jGqEDryW70QKm0hK6UID66vROS7BbPg/W+5PwZG8O4whlkeydx /1D7t+pTToxZ5fqt707Cj1RFSBhMqNvreqvzXiX6aR/zmXDenrohf5vEFs3LcsT/eMf7WNmr KJCbmpXN1ba2rzwkOnTpupE36zPKOHvPYVZvnB95TrYEewnUdbIRKCiCdpwgWpg3p8UQKq2i 8wxWGssbAnGOExzGVoFJ88En+KlnVTSfGgNwL6SjfVuuDWCpOBr65D2K8bccNGOQcRTn26bq 3jA8mC/BQsVXPSd1D6E/3SEluLJ2y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Tg== IronPort-HdrOrdr: A9a23:Rh3HMaB6h2VVMLvlHemW55DYdb4zR+YMi2TC1yhKKCC9Ffbo7/ xG/c5rrCMc5wxhO03I9eruBEDEewK5yXcX2/h2AV7BZniFhILAFugLhuGOrwEIWReOkdK1vZ 0QCJSWY+eRMbEVt6jHCXGDYrMd/OU= X-IronPort-AV: E=Sophos;i="5.87,172,1631592000"; d="scan'208";a="55807254" From: Lin Liu To: CC: Lin Liu , Andrew Cooper , George Dunlap , Ian Jackson , Jan Beulich , Julien Grall , "Stefano Stabellini" , Wei Liu , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [PATCH v2 6/7] xen: Switch to byteswap.h Date: Fri, 22 Oct 2021 10:47:27 +0000 Message-ID: X-Mailer: git-send-email 2.27.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1634899724566100001 Update to use byteswap.h to swap bytes. No functional chagne. Signed-off-by: Lin Liu --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Julien Grall Cc: Stefano Stabellini Cc: Wei Liu Cc: "Roger Pau Monn=C3=A9" --- 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/drivers/char/ehci-dbgp.c | 2 +- xen/include/asm-x86/msi.h | 2 +- xen/include/xen/bitmap.h | 2 +- xen/include/xen/device_tree.h | 2 +- xen/include/xen/unaligned.h | 14 +++++++------- xen/lib/divmod.c | 2 +- 13 files changed, 23 insertions(+), 23 deletions(-) diff --git a/xen/common/bitmap.c b/xen/common/bitmap.c index 7d4551f782..be274ca04a 100644 --- a/xen/common/bitmap.c +++ b/xen/common/bitmap.c @@ -9,10 +9,10 @@ #include #include #include +#include #include #include #include -#include =20 /* * bitmaps provide an array of bits, implemented using an an diff --git a/xen/common/gdbstub.c b/xen/common/gdbstub.c index 848c1f4327..3c8ed52d6b 100644 --- a/xen/common/gdbstub.c +++ b/xen/common/gdbstub.c @@ -33,6 +33,7 @@ /* Resuming after we've stopped used to work, but more through luck than any actual intention. It doesn't at the moment. */ =20 +#include #include #include #include @@ -45,7 +46,6 @@ #include #include #include -#include =20 /* Printk isn't particularly safe just after we've trapped to the debugger. so avoid it. */ diff --git a/xen/common/libelf/libelf-private.h b/xen/common/libelf/libelf-= private.h index 47db679966..b7089cb31b 100644 --- a/xen/common/libelf/libelf-private.h +++ b/xen/common/libelf/libelf-private.h @@ -17,10 +17,10 @@ =20 #ifdef __XEN__ =20 +#include #include #include #include -#include #include =20 /* we would like to use elf->log_callback but we can't because @@ -31,9 +31,9 @@ printk(fmt, ## args ) =20 #define strtoull(str, end, base) simple_strtoull(str, end, base) -#define bswap_16(x) swab16(x) -#define bswap_32(x) swab32(x) -#define bswap_64(x) swab64(x) +#define bswap_16(x) bswap16(x) +#define bswap_32(x) bswap32(x) +#define bswap_64(x) bswap64(x) =20 #else /* !__XEN__ */ =20 diff --git a/xen/common/lz4/defs.h b/xen/common/lz4/defs.h index 10609f5a53..1ce4476478 100644 --- a/xen/common/lz4/defs.h +++ b/xen/common/lz4/defs.h @@ -9,7 +9,7 @@ */ =20 #ifdef __XEN__ -#include +#include #include #else =20 diff --git a/xen/common/lzo.c b/xen/common/lzo.c index a87c76dded..17be9675f4 100644 --- a/xen/common/lzo.c +++ b/xen/common/lzo.c @@ -96,7 +96,7 @@ =20 #ifdef __XEN__ #include -#include +#include #include #else #define get_unaligned_le16(_p) (*(u16 *)(_p)) diff --git a/xen/common/unlzo.c b/xen/common/unlzo.c index 74056778eb..f908d2a61f 100644 --- a/xen/common/unlzo.c +++ b/xen/common/unlzo.c @@ -33,7 +33,7 @@ #include =20 #ifdef __XEN__ -#include +#include #include #else =20 diff --git a/xen/common/xz/private.h b/xen/common/xz/private.h index 511343fcc2..647f9699a7 100644 --- a/xen/common/xz/private.h +++ b/xen/common/xz/private.h @@ -12,7 +12,7 @@ =20 #ifdef __XEN__ #include -#include +#include #include #else =20 @@ -28,7 +28,7 @@ static inline void put_unaligned_le32(u32 val, void *p) =20 #endif =20 -#define get_le32(p) le32_to_cpup((const uint32_t *)(p)) +#define get_le32(p) le32_to_cpu(*(const uint32_t *)(p)) =20 #define false 0 #define true 1 diff --git a/xen/drivers/char/ehci-dbgp.c b/xen/drivers/char/ehci-dbgp.c index c893d246de..8412da1b11 100644 --- a/xen/drivers/char/ehci-dbgp.c +++ b/xen/drivers/char/ehci-dbgp.c @@ -5,13 +5,13 @@ * Linux; see the Linux source for authorship and copyrights. */ =20 +#include #include #include #include #include #include #include -#include #include #include #include diff --git a/xen/include/asm-x86/msi.h b/xen/include/asm-x86/msi.h index e228b0f3f3..277375183c 100644 --- a/xen/include/asm-x86/msi.h +++ b/xen/include/asm-x86/msi.h @@ -1,9 +1,9 @@ #ifndef __ASM_MSI_H #define __ASM_MSI_H =20 +#include #include #include -#include #include =20 /* diff --git a/xen/include/xen/bitmap.h b/xen/include/xen/bitmap.h index e9175ab54a..c44a1cb63c 100644 --- a/xen/include/xen/bitmap.h +++ b/xen/include/xen/bitmap.h @@ -229,7 +229,7 @@ static inline int bitmap_weight(const unsigned long *sr= c, int nbits) return __bitmap_weight(src, nbits); } =20 -#include +#include =20 #ifdef __LITTLE_ENDIAN #define BITMAP_MEM_ALIGNMENT 8 diff --git a/xen/include/xen/device_tree.h b/xen/include/xen/device_tree.h index fd6cd00b43..4921e6b142 100644 --- a/xen/include/xen/device_tree.h +++ b/xen/include/xen/device_tree.h @@ -10,10 +10,10 @@ #ifndef __XEN_DEVICE_TREE_H__ #define __XEN_DEVICE_TREE_H__ =20 -#include #include #include #include +#include #include #include #include diff --git a/xen/include/xen/unaligned.h b/xen/include/xen/unaligned.h index 0a2b16d05d..8a9ec8a0ac 100644 --- a/xen/include/xen/unaligned.h +++ b/xen/include/xen/unaligned.h @@ -11,8 +11,8 @@ #define __XEN_UNALIGNED_H__ =20 #ifdef __XEN__ +#include #include -#include #endif =20 #define get_unaligned(p) (*(p)) @@ -20,7 +20,7 @@ =20 static inline uint16_t get_unaligned_be16(const void *p) { - return be16_to_cpup(p); + return be16_to_cpu(*(uint16_t*)p); } =20 static inline void put_unaligned_be16(uint16_t val, void *p) @@ -30,7 +30,7 @@ static inline void put_unaligned_be16(uint16_t val, void = *p) =20 static inline uint32_t get_unaligned_be32(const void *p) { - return be32_to_cpup(p); + return be32_to_cpu(*(uint32_t*)p); } =20 static inline void put_unaligned_be32(uint32_t val, void *p) @@ -40,7 +40,7 @@ static inline void put_unaligned_be32(uint32_t val, void = *p) =20 static inline uint64_t get_unaligned_be64(const void *p) { - return be64_to_cpup(p); + return be64_to_cpu(*(uint64_t*)p); } =20 static inline void put_unaligned_be64(uint64_t val, void *p) @@ -50,7 +50,7 @@ static inline void put_unaligned_be64(uint64_t val, void = *p) =20 static inline uint16_t get_unaligned_le16(const void *p) { - return le16_to_cpup(p); + return le16_to_cpu(*(uint16_t*)p); } =20 static inline void put_unaligned_le16(uint16_t val, void *p) @@ -60,7 +60,7 @@ static inline void put_unaligned_le16(uint16_t val, void = *p) =20 static inline uint32_t get_unaligned_le32(const void *p) { - return le32_to_cpup(p); + return le32_to_cpu(*(uint32_t*)p); } =20 static inline void put_unaligned_le32(uint32_t val, void *p) @@ -70,7 +70,7 @@ static inline void put_unaligned_le32(uint32_t val, void = *p) =20 static inline uint64_t get_unaligned_le64(const void *p) { - return le64_to_cpup(p); + return le64_to_cpu(*(uint64_t*)p); } =20 static inline void put_unaligned_le64(uint64_t val, void *p) diff --git a/xen/lib/divmod.c b/xen/lib/divmod.c index 0be6ccc700..dfc1129cfe 100644 --- a/xen/lib/divmod.c +++ b/xen/lib/divmod.c @@ -1,6 +1,6 @@ +#include #include #include -#include =20 /* * A couple of 64 bit operations ported from FreeBSD. --=20 2.27.0