search for: be16_to_cpu

Displaying 20 results from an estimated 45 matches for "be16_to_cpu".

Did you mean: le16_to_cpu
2015 Dec 15
8
[PATCH] xfs: Add support for v3 directories
...XFS_DATA_FORK) + be32_to_cpu(core->di_nextents) - 1); leaf_blk = fsblock_to_bytes(parent->fs, irec.br_startblock) >> BLOCK_SHIFT(parent->fs); - leaf = (xfs_dir2_leaf_t *)xfs_dir2_dirblks_get_cached(parent->fs, leaf_blk, - irec.br_blockcount); - if (be16_to_cpu(leaf->hdr.info.magic) != XFS_DIR2_LEAF1_MAGIC) { + hdr = xfs_dir2_dirblks_get_cached(parent->fs, leaf_blk, + irec.br_blockcount); + if (!hdr) + return NULL; + + if (be16_to_cpu(hdr->info.magic) == XFS_DIR2_LEAF1_MAGIC) { + count = be16_to_cpu(hdr->count); + ents...
2016 Jan 18
1
[PATCH] xfs: Add support for v3 directories
...> *dname, struct inode *parent, >> xfs_dinode_t *core) >> { > >> - uint32_t hash = 0; >> + uint32_t hash; > >> + uint16_t count; > >> - int mid = 0; >> + int mid; > > >> + if (be16_to_cpu(lhdr->info.magic) == XFS_DIR2_LEAFN_MAGIC) { >> + count = be16_to_cpu(lhdr->count); >> + ents = (xfs_dir2_leaf_entry_t *)((uint8_t *)lhdr + >> + sizeof(struct >> xfs_dir2_leaf_hdr)); >> + } else if (be16_to_cp...
2016 Jan 18
0
[PATCH] xfs: Add support for v3 directories
...,99 @@ struct inode *xfs_dir2_node_find_entry(const char *dname, struct inode *parent, > xfs_dinode_t *core) > { > - uint32_t hash = 0; > + uint32_t hash; > + uint16_t count; > - int mid = 0; > + int mid; > + if (be16_to_cpu(lhdr->info.magic) == XFS_DIR2_LEAFN_MAGIC) { > + count = be16_to_cpu(lhdr->count); > + ents = (xfs_dir2_leaf_entry_t *)((uint8_t *)lhdr + > + sizeof(struct xfs_dir2_leaf_hdr)); > + } else if (be16_to_cpu(lhdr->info.magic) ==...
2012 Sep 03
1
[GIT-PULL] XFS filesystem driver
...32_t)val & (uint32_t)0x0000ff00UL) << 8) | + (((uint32_t)val & (uint32_t)0x00ff0000UL) >> 8) | + (((uint32_t)val & (uint32_t)0xff000000UL) >> 24)); +} + +/* Return a 16-bit litte-endian value from a given 16-bit big-endian one */ +static inline uint16_t be16_to_cpu(uint16_t val) +{ + return (uint16_t)((((uint16_t)val & (uint16_t)0x00ffU) << 8) | + (((uint16_t)val & (uint16_t)0xff00U) >> 8)); +} + +#endif /* MISC_H_ */ diff --git a/core/fs/xfs/xfs.c b/core/fs/xfs/xfs.c new file mode 100644 index 0000000..98d6255 --- /dev/null +++...
2015 Jul 18
1
[PATCH 1/2] xfs: rename xfs_is_valid_magicnum to xfs_is_valid_sb
xfs_is_valid_magicnum is not actually a generic function that checks for magic numbers, instead it checks only for superblock's one. Signed-off-by: Paulo Alcantara <pcacjr at zytor.com> --- core/fs/xfs/xfs.c | 13 +++++-------- core/fs/xfs/xfs.h | 19 ++++++++++--------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/core/fs/xfs/xfs.c b/core/fs/xfs/xfs.c index
2015 Apr 07
1
[PATCH v3 6/7] virtio: add explicit big-endian support to memory accessors
...t; + return true; > +#else > + return false; > +#endif > +} > > static inline u16 __virtio16_to_cpu(bool little_endian, __virtio16 val) > { > if (little_endian) > return le16_to_cpu((__force __le16)val); > else > - return (__force u16)val; > + return be16_to_cpu((__force __be16)val); > } > > static inline __virtio16 __cpu_to_virtio16(bool little_endian, u16 val) > @@ -21,7 +25,7 @@ static inline __virtio16 __cpu_to_virtio16(bool little_endian, u16 val) > if (little_endian) > return (__force __virtio16)cpu_to_le16(val); > els...
2015 Apr 07
1
[PATCH v3 6/7] virtio: add explicit big-endian support to memory accessors
...t; + return true; > +#else > + return false; > +#endif > +} > > static inline u16 __virtio16_to_cpu(bool little_endian, __virtio16 val) > { > if (little_endian) > return le16_to_cpu((__force __le16)val); > else > - return (__force u16)val; > + return be16_to_cpu((__force __be16)val); > } > > static inline __virtio16 __cpu_to_virtio16(bool little_endian, u16 val) > @@ -21,7 +25,7 @@ static inline __virtio16 __cpu_to_virtio16(bool little_endian, u16 val) > if (little_endian) > return (__force __virtio16)cpu_to_le16(val); > els...
2015 Apr 21
1
[PATCH v4 6/8] virtio: add explicit big-endian support to memory accessors
...t; + return true; > +#else > + return false; > +#endif > +} > > static inline u16 __virtio16_to_cpu(bool little_endian, __virtio16 val) > { > if (little_endian) > return le16_to_cpu((__force __le16)val); > else > - return (__force u16)val; > + return be16_to_cpu((__force __be16)val); > } > > static inline __virtio16 __cpu_to_virtio16(bool little_endian, u16 val) > @@ -21,7 +25,7 @@ static inline __virtio16 __cpu_to_virtio16(bool little_endian, u16 val) > if (little_endian) > return (__force __virtio16)cpu_to_le16(val); > els...
2015 Apr 21
1
[PATCH v4 6/8] virtio: add explicit big-endian support to memory accessors
...t; + return true; > +#else > + return false; > +#endif > +} > > static inline u16 __virtio16_to_cpu(bool little_endian, __virtio16 val) > { > if (little_endian) > return le16_to_cpu((__force __le16)val); > else > - return (__force u16)val; > + return be16_to_cpu((__force __be16)val); > } > > static inline __virtio16 __cpu_to_virtio16(bool little_endian, u16 val) > @@ -21,7 +25,7 @@ static inline __virtio16 __cpu_to_virtio16(bool little_endian, u16 val) > if (little_endian) > return (__force __virtio16)cpu_to_le16(val); > els...
2020 Jan 07
0
[RFT 03/13] sh: Constify ioreadX() iomem argument (as in generic implementation)
...readb(addr); } EXPORT_SYMBOL(ioread8); -unsigned int ioread16(void __iomem *addr) +unsigned int ioread16(const void __iomem *addr) { return readw(addr); } EXPORT_SYMBOL(ioread16); -unsigned int ioread16be(void __iomem *addr) +unsigned int ioread16be(const void __iomem *addr) { return be16_to_cpu(__raw_readw(addr)); } EXPORT_SYMBOL(ioread16be); -unsigned int ioread32(void __iomem *addr) +unsigned int ioread32(const void __iomem *addr) { return readl(addr); } EXPORT_SYMBOL(ioread32); -unsigned int ioread32be(void __iomem *addr) +unsigned int ioread32be(const void __iomem *addr) {...
2011 Mar 11
1
[PATH 9/12] VTPM mini-os: New stubdom applications
This patch ports 5 new applications to the stubdom makefile structure for inclusion into stubdom domains. While these are required for vtpm-stubdom and vtpmmgrdom they could be used with other stubdom applications. -libgmp 4.3.2 -openssl 1.0.0a -polarssl 0.12.1 -berlios tpm_emulator 0.6.1 -vtpm_manager (from the tools directory) Signed off by: Matthew Fioravante
2015 Apr 07
0
[PATCH v3 6/7] virtio: add explicit big-endian support to memory accessors
...irtio_legacy_is_little_endian(void) +{ +#ifdef __LITTLE_ENDIAN + return true; +#else + return false; +#endif +} static inline u16 __virtio16_to_cpu(bool little_endian, __virtio16 val) { if (little_endian) return le16_to_cpu((__force __le16)val); else - return (__force u16)val; + return be16_to_cpu((__force __be16)val); } static inline __virtio16 __cpu_to_virtio16(bool little_endian, u16 val) @@ -21,7 +25,7 @@ static inline __virtio16 __cpu_to_virtio16(bool little_endian, u16 val) if (little_endian) return (__force __virtio16)cpu_to_le16(val); else - return (__force __virtio16)val...
2015 Apr 10
0
[PATCH v4 6/8] virtio: add explicit big-endian support to memory accessors
...irtio_legacy_is_little_endian(void) +{ +#ifdef __LITTLE_ENDIAN + return true; +#else + return false; +#endif +} static inline u16 __virtio16_to_cpu(bool little_endian, __virtio16 val) { if (little_endian) return le16_to_cpu((__force __le16)val); else - return (__force u16)val; + return be16_to_cpu((__force __be16)val); } static inline __virtio16 __cpu_to_virtio16(bool little_endian, u16 val) @@ -21,7 +25,7 @@ static inline __virtio16 __cpu_to_virtio16(bool little_endian, u16 val) if (little_endian) return (__force __virtio16)cpu_to_le16(val); else - return (__force __virtio16)val...
2015 Apr 24
0
[PATCH v6 6/8] virtio: add explicit big-endian support to memory accessors
...irtio_legacy_is_little_endian(void) +{ +#ifdef __LITTLE_ENDIAN + return true; +#else + return false; +#endif +} static inline u16 __virtio16_to_cpu(bool little_endian, __virtio16 val) { if (little_endian) return le16_to_cpu((__force __le16)val); else - return (__force u16)val; + return be16_to_cpu((__force __be16)val); } static inline __virtio16 __cpu_to_virtio16(bool little_endian, u16 val) @@ -21,7 +25,7 @@ static inline __virtio16 __cpu_to_virtio16(bool little_endian, u16 val) if (little_endian) return (__force __virtio16)cpu_to_le16(val); else - return (__force __virtio16)val...
2015 Apr 23
0
[PATCH v5 6/8] virtio: add explicit big-endian support to memory accessors
...irtio_legacy_is_little_endian(void) +{ +#ifdef __LITTLE_ENDIAN + return true; +#else + return false; +#endif +} static inline u16 __virtio16_to_cpu(bool little_endian, __virtio16 val) { if (little_endian) return le16_to_cpu((__force __le16)val); else - return (__force u16)val; + return be16_to_cpu((__force __be16)val); } static inline __virtio16 __cpu_to_virtio16(bool little_endian, u16 val) @@ -21,7 +25,7 @@ static inline __virtio16 __cpu_to_virtio16(bool little_endian, u16 val) if (little_endian) return (__force __virtio16)cpu_to_le16(val); else - return (__force __virtio16)val...
2007 Aug 22
1
mount.ocfs2: Value too large ...
Hallo, I have two servers and both are connected to external array, each by own SAS connection. I need these servers to work simultaneously with data on array and I think that ocfs2 is suitable for this purpose. One server is P4 Xeon (Gentoo linux, i386, 2.6.22-r2) and second is Opteron (Gentoo linux, x86_64, 2.6.22-r2). Servers are connected by ethernet, adapters are both Intel
2015 Apr 07
13
[PATCH v3 0/7] vhost: support for cross endian guests
Hi, This patchset allows vhost to be used with legacy virtio when guest and host have a different endianness. Patches 1-6 remain the same as the previous post. Patch 7 was heavily changed according to MST's comments. --- Greg Kurz (7): virtio: introduce virtio_is_little_endian() helper tun: add tun_is_little_endian() helper macvtap: introduce macvtap_is_little_endian()
2015 Apr 07
13
[PATCH v3 0/7] vhost: support for cross endian guests
Hi, This patchset allows vhost to be used with legacy virtio when guest and host have a different endianness. Patches 1-6 remain the same as the previous post. Patch 7 was heavily changed according to MST's comments. --- Greg Kurz (7): virtio: introduce virtio_is_little_endian() helper tun: add tun_is_little_endian() helper macvtap: introduce macvtap_is_little_endian()
2015 Sep 24
2
[PATCH v2] Fix AF_PACKET ABI breakage in 4.2
On Wed, 23 Sep 2015 19:45:08 +0100 David Woodhouse <dwmw2 at infradead.org> wrote: > Commit 7d82410950aa ("virtio: add explicit big-endian support to memory > accessors") accidentally changed the virtio_net header used by > AF_PACKET with PACKET_VNET_HDR from host-endian to big-endian. > Hi David, Oops my bad... I obviously overlooked this one when adding
2015 Sep 24
2
[PATCH v2] Fix AF_PACKET ABI breakage in 4.2
On Wed, 23 Sep 2015 19:45:08 +0100 David Woodhouse <dwmw2 at infradead.org> wrote: > Commit 7d82410950aa ("virtio: add explicit big-endian support to memory > accessors") accidentally changed the virtio_net header used by > AF_PACKET with PACKET_VNET_HDR from host-endian to big-endian. > Hi David, Oops my bad... I obviously overlooked this one when adding