aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorAshutosh Dixit <ashutosh.dixit@intel.com>2013-11-27 11:58:42 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-11-27 14:03:38 -0500
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 {
43 __u8 feature_len; 43 __u8 feature_len;
44 __u8 config_len; 44 __u8 config_len;
45 __u8 status; 45 __u8 status;
46 __u64 config[0]; 46 __le64 config[0];
47} __attribute__ ((aligned(8))); 47} __attribute__ ((aligned(8)));
48 48
49/** 49/**
@@ -61,7 +61,7 @@ struct mic_device_desc {
61 * @h2c_vdev_db: The doorbell number to be used by host. Set by guest. 61 * @h2c_vdev_db: The doorbell number to be used by host. Set by guest.
62 */ 62 */
63struct mic_device_ctrl { 63struct mic_device_ctrl {
64 __u64 vdev; 64 __le64 vdev;
65 __u8 config_change; 65 __u8 config_change;
66 __u8 vdev_reset; 66 __u8 vdev_reset;
67 __u8 guest_ack; 67 __u8 guest_ack;
@@ -82,7 +82,7 @@ struct mic_device_ctrl {
82 * @shutdown_card: Set to 1 by the host when a card shutdown is initiated 82 * @shutdown_card: Set to 1 by the host when a card shutdown is initiated
83 */ 83 */
84struct mic_bootparam { 84struct mic_bootparam {
85 __u32 magic; 85 __le32 magic;
86 __s8 c2h_shutdown_db; 86 __s8 c2h_shutdown_db;
87 __s8 h2c_shutdown_db; 87 __s8 h2c_shutdown_db;
88 __s8 h2c_config_db; 88 __s8 h2c_config_db;
@@ -111,9 +111,9 @@ struct mic_device_page {
111 * @num: The number of entries in the virtio_ring 111 * @num: The number of entries in the virtio_ring
112 */ 112 */
113struct mic_vqconfig { 113struct mic_vqconfig {
114 __u64 address; 114 __le64 address;
115 __u64 used_address; 115 __le64 used_address;
116 __u16 num; 116 __le16 num;
117} __attribute__ ((aligned(8))); 117} __attribute__ ((aligned(8)));
118 118
119/* 119/*
@@ -149,7 +149,7 @@ struct mic_vqconfig {
149 */ 149 */
150struct _mic_vring_info { 150struct _mic_vring_info {
151 __u16 avail_idx; 151 __u16 avail_idx;
152 int magic; 152 __le32 magic;
153}; 153};
154 154
155/** 155/**