search for: __define_virtio_xx_to_cpu

Displaying 3 results from an estimated 3 matches for "__define_virtio_xx_to_cpu".

2014 Oct 22
2
[PATCH RFC v3 01/16] virtio: memory access APIs
...byteorder.h @@ -0,0 +1,29 @@ +#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 big endian format. */ + +#define __DEFINE_VIRTIO_XX_TO_CPU(bits) \ +static inline u##bits __virtio##bits##_to_cpu(bool little_endian, __virtio##bits val) \ +{ \ + if (little_endian) \ + return le##bits##_to_cpu((__force __le##bits)val); \ + else \ + return (__force u##bits)val; \ +} \ +static inline __virtio##bits __cpu_to_virtio##bits(bool little_endian...
2014 Oct 22
2
[PATCH RFC v3 01/16] virtio: memory access APIs
...byteorder.h @@ -0,0 +1,29 @@ +#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 big endian format. */ + +#define __DEFINE_VIRTIO_XX_TO_CPU(bits) \ +static inline u##bits __virtio##bits##_to_cpu(bool little_endian, __virtio##bits val) \ +{ \ + if (little_endian) \ + return le##bits##_to_cpu((__force __le##bits)val); \ + else \ + return (__force u##bits)val; \ +} \ +static inline __virtio##bits __cpu_to_virtio##bits(bool little_endian...
2014 Oct 23
0
[PATCH RFC v3 01/16] virtio: memory access APIs
...ORDER_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 big endian format. */ s/big/native/ > + > +#define __DEFINE_VIRTIO_XX_TO_CPU(bits) \ > +static inline u##bits __virtio##bits##_to_cpu(bool little_endian, __virtio##bits val) \ > +{ \ > + if (little_endian) \ > + return le##bits##_to_cpu((__force __le##bits)val); \ > + else \ > + return (__force u##bits)val; \ > +} \ > +static inline __virtio##bits...