search for: to_cpu

Displaying 7 results from an estimated 7 matches for "to_cpu".

Did you mean: ti_cpu
2014 Nov 24
2
[PATCH v3 04/41] virtio: memory access APIs
...nd act accordingly. > > > diff --git a/include/linux/virtio_byteorder.h b/include/linux/virtio_byteorder.h > > new file mode 100644 > > index 0000000..824ed0b > > --- /dev/null > > +++ b/include/linux/virtio_byteorder.h > > > +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; > > +} > > What's wrong with just using le16-to_cpu() ....
2014 Nov 24
2
[PATCH v3 04/41] virtio: memory access APIs
...nd act accordingly. > > > diff --git a/include/linux/virtio_byteorder.h b/include/linux/virtio_byteorder.h > > new file mode 100644 > > index 0000000..824ed0b > > --- /dev/null > > +++ b/include/linux/virtio_byteorder.h > > > +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; > > +} > > What's wrong with just using le16-to_cpu() ....
2012 Oct 12
13
Dom0 physical networking/swiotlb/something issue in 3.7-rc1
Hi Konrad, The following patch causes fairly large packet loss when transmitting from dom0 to the physical network, at least with my tg3 hardware, but I assume it can impact anything which uses this interface. I suspect that the issue is that the compound pages allocated in this way are not backed by contiguous mfns and so things fall apart when the driver tries to do DMA. However I
2014 Nov 24
0
[PATCH v3 04/41] virtio: memory access APIs
...gt;> > diff --git a/include/linux/virtio_byteorder.h b/include/linux/virtio_byteorder.h >> > new file mode 100644 >> > index 0000000..824ed0b >> > --- /dev/null >> > +++ b/include/linux/virtio_byteorder.h >> >> > +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; >> > +} >> >> What's wrong...
2014 Nov 24
2
[PATCH v3 04/41] virtio: memory access APIs
...#ifndef _LINUX_VIRTIO_BYTEORDER_H +#define _LINUX_VIRTIO_BYTEORDER_H +#include <linux/types.h> +#include <uapi/linux/virtio_types.h> + +/* + * Memory accessors for handling virtio in modern little endian and in + * compatibility native endian format. + */ + +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; +} + +static inline __virtio16 __cpu_to_virtio16(bool little_endian, u16 val) +{ + if (little_endian) + return (__force __virtio16)cpu_to_le16(val); + else +...
2014 Nov 24
2
[PATCH v3 04/41] virtio: memory access APIs
...#ifndef _LINUX_VIRTIO_BYTEORDER_H +#define _LINUX_VIRTIO_BYTEORDER_H +#include <linux/types.h> +#include <uapi/linux/virtio_types.h> + +/* + * Memory accessors for handling virtio in modern little endian and in + * compatibility native endian format. + */ + +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; +} + +static inline __virtio16 __cpu_to_virtio16(bool little_endian, u16 val) +{ + if (little_endian) + return (__force __virtio16)cpu_to_le16(val); + else +...
2014 Nov 24
0
[PATCH v3 04/41] virtio: memory access APIs
...ers that > query device endian-ness and act accordingly. > diff --git a/include/linux/virtio_byteorder.h b/include/linux/virtio_byteorder.h > new file mode 100644 > index 0000000..824ed0b > --- /dev/null > +++ b/include/linux/virtio_byteorder.h > +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; > +} What's wrong with just using le16-to_cpu() ... > --- a/include/uapi/linux/virtio...