提交 80671708 编写于 作者: M Mika Westerberg 提交者: David S. Miller

thunderbolt: Remove __packed from ICM message structures

These messages are all 32-bit aligned and they should be packed without
the __packed attribute just fine. It also allows compiler to generate
better code on some architectures.
Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: NMichael Jamet <michael.jamet@intel.com>
Reviewed-by: NYehezkel Bernat <yehezkel.bernat@intel.com>
Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 f2f2efb8
......@@ -130,7 +130,7 @@ struct icm_pkg_header {
u8 flags;
u8 packet_id;
u8 total_packets;
} __packed;
};
#define ICM_FLAGS_ERROR BIT(0)
#define ICM_FLAGS_NO_KEY BIT(1)
......@@ -139,20 +139,20 @@ struct icm_pkg_header {
struct icm_pkg_driver_ready {
struct icm_pkg_header hdr;
} __packed;
};
struct icm_pkg_driver_ready_response {
struct icm_pkg_header hdr;
u8 romver;
u8 ramver;
u16 security_level;
} __packed;
};
/* Falcon Ridge & Alpine Ridge common messages */
struct icm_fr_pkg_get_topology {
struct icm_pkg_header hdr;
} __packed;
};
#define ICM_GET_TOPOLOGY_PACKETS 14
......@@ -167,7 +167,7 @@ struct icm_fr_pkg_get_topology_response {
u32 reserved[2];
u32 ports[16];
u32 port_hop_info[16];
} __packed;
};
#define ICM_SWITCH_USED BIT(0)
#define ICM_SWITCH_UPSTREAM_PORT_MASK GENMASK(7, 1)
......@@ -184,7 +184,7 @@ struct icm_fr_event_device_connected {
u8 connection_id;
u16 link_info;
u32 ep_name[55];
} __packed;
};
#define ICM_LINK_INFO_LINK_MASK 0x7
#define ICM_LINK_INFO_DEPTH_SHIFT 4
......@@ -197,13 +197,13 @@ struct icm_fr_pkg_approve_device {
u8 connection_key;
u8 connection_id;
u16 reserved;
} __packed;
};
struct icm_fr_event_device_disconnected {
struct icm_pkg_header hdr;
u16 reserved;
u16 link_info;
} __packed;
};
struct icm_fr_pkg_add_device_key {
struct icm_pkg_header hdr;
......@@ -212,7 +212,7 @@ struct icm_fr_pkg_add_device_key {
u8 connection_id;
u16 reserved;
u32 key[8];
} __packed;
};
struct icm_fr_pkg_add_device_key_response {
struct icm_pkg_header hdr;
......@@ -220,7 +220,7 @@ struct icm_fr_pkg_add_device_key_response {
u8 connection_key;
u8 connection_id;
u16 reserved;
} __packed;
};
struct icm_fr_pkg_challenge_device {
struct icm_pkg_header hdr;
......@@ -229,7 +229,7 @@ struct icm_fr_pkg_challenge_device {
u8 connection_id;
u16 reserved;
u32 challenge[8];
} __packed;
};
struct icm_fr_pkg_challenge_device_response {
struct icm_pkg_header hdr;
......@@ -239,7 +239,7 @@ struct icm_fr_pkg_challenge_device_response {
u16 reserved;
u32 challenge[8];
u32 response[8];
} __packed;
};
/* Alpine Ridge only messages */
......@@ -247,7 +247,7 @@ struct icm_ar_pkg_get_route {
struct icm_pkg_header hdr;
u16 reserved;
u16 link_info;
} __packed;
};
struct icm_ar_pkg_get_route_response {
struct icm_pkg_header hdr;
......@@ -255,6 +255,6 @@ struct icm_ar_pkg_get_route_response {
u16 link_info;
u32 route_hi;
u32 route_lo;
} __packed;
};
#endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册