aboutsummaryrefslogtreecommitdiff
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorAshutosh Dixit2013-11-27 08:58:42 -0800
committerGreg Kroah-Hartman2013-11-27 11:03:38 -0800
commit173c07278763850bfee57eec442dce38855d6f13 (patch)
tree99b27efc221e586ae8fc6f9fcd194932c9d4de0e /include/uapi/linux
parent1e31aa9270daab40c7aef9d5488982e3475b87ef (diff)
misc: mic: Fix endianness issues.
Endianness issues are now consistent as per the documentation in host/mic_virtio.h. Sparse warnings related to endianness are also fixed. Note that the MIC driver implementation assumes that the host can be both BE or LE whereas the card is always LE. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Reviewed-by: Sudeep Dutt <sudeep.dutt@intel.com> Reviewed-by: Nikhil Rao <nikhil.rao@intel.com> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/mic_common.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/uapi/linux/mic_common.h b/include/uapi/linux/mic_common.h
index d0ec46d88d2a..6eb40244e019 100644
--- a/include/uapi/linux/mic_common.h
+++ b/include/uapi/linux/mic_common.h
@@ -43,7 +43,7 @@ struct mic_device_desc {
__u8 feature_len;
__u8 config_len;
__u8 status;
- __u64 config[0];
+ __le64 config[0];
} __attribute__ ((aligned(8)));
/**
@@ -61,7 +61,7 @@ struct mic_device_desc {
* @h2c_vdev_db: The doorbell number to be used by host. Set by guest.
*/
struct mic_device_ctrl {
- __u64 vdev;
+ __le64 vdev;
__u8 config_change;
__u8 vdev_reset;
__u8 guest_ack;
@@ -82,7 +82,7 @@ struct mic_device_ctrl {
* @shutdown_card: Set to 1 by the host when a card shutdown is initiated
*/
struct mic_bootparam {
- __u32 magic;
+ __le32 magic;
__s8 c2h_shutdown_db;
__s8 h2c_shutdown_db;
__s8 h2c_config_db;
@@ -111,9 +111,9 @@ struct mic_device_page {
* @num: The number of entries in the virtio_ring
*/
struct mic_vqconfig {
- __u64 address;
- __u64 used_address;
- __u16 num;
+ __le64 address;
+ __le64 used_address;
+ __le16 num;
} __attribute__ ((aligned(8)));
/*
@@ -149,7 +149,7 @@ struct mic_vqconfig {
*/
struct _mic_vring_info {
__u16 avail_idx;
- int magic;
+ __le32 magic;
};
/**