summaryrefslogtreecommitdiffstats
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorTimo Suoranta <tsuoranta@nvidia.com>2018-05-08 07:50:04 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-06-06 14:26:06 -0400
commitee98782e6e5b9dbf2b56b3c933c63056bbf15d15 (patch)
tree0e3053a16d56d6c430b0fa7a86a6af8c1dd3a4d8 /include/uapi/linux
parent3ded185377a4d5b7c7e5535da52f39bd12cb57f4 (diff)
nvlink: Improve MISRA compliance with U suffix
tegra-nvlink-uapi.h is used by nvrm_gpu, and is causing some MISRA violations. A number of MISRA C++ 2008 rules require U suffix for unsigned numbers. 2-13-3 A "U" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type. 5-0-4 An implicit integral conversion shall not change the signedness of the underlying type. 5-0-21 Bitwise operators shall only be applied to operands of unsigned underlying type. Bug 1777616 Change-Id: I02f8b8798b6cc223e0708ff16cef0a18c80856be Signed-off-by: Timo Suoranta <tsuoranta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1710529 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Adeel Raza <araza@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/tegra-nvlink-uapi.h222
1 files changed, 111 insertions, 111 deletions
diff --git a/include/uapi/linux/tegra-nvlink-uapi.h b/include/uapi/linux/tegra-nvlink-uapi.h
index 4511a187c..099ecaeb0 100644
--- a/include/uapi/linux/tegra-nvlink-uapi.h
+++ b/include/uapi/linux/tegra-nvlink-uapi.h
@@ -35,33 +35,33 @@
35 35
36/* TEGRA_CTRL_CMD_NVLINK_GET_NVLINK_CAPS */ 36/* TEGRA_CTRL_CMD_NVLINK_GET_NVLINK_CAPS */
37 37
38#define TEGRA_NVLINK_VERSION_10 0x00000001 38#define TEGRA_NVLINK_VERSION_10 0x00000001U
39#define TEGRA_NVLINK_VERSION_20 0x00000002 39#define TEGRA_NVLINK_VERSION_20 0x00000002U
40#define TEGRA_NVLINK_VERSION_22 0x00000004 40#define TEGRA_NVLINK_VERSION_22 0x00000004U
41 41
42#define TEGRA_CTRL_NVLINK_CAPS_NVLINK_VERSION_INVALID (0x00000000) 42#define TEGRA_CTRL_NVLINK_CAPS_NVLINK_VERSION_INVALID (0x00000000U)
43#define TEGRA_CTRL_NVLINK_CAPS_NVLINK_VERSION_1_0 (0x00000001) 43#define TEGRA_CTRL_NVLINK_CAPS_NVLINK_VERSION_1_0 (0x00000001U)
44#define TEGRA_CTRL_NVLINK_CAPS_NVLINK_VERSION_2_0 (0x00000002) 44#define TEGRA_CTRL_NVLINK_CAPS_NVLINK_VERSION_2_0 (0x00000002U)
45#define TEGRA_CTRL_NVLINK_CAPS_NVLINK_VERSION_2_2 (0x00000004) 45#define TEGRA_CTRL_NVLINK_CAPS_NVLINK_VERSION_2_2 (0x00000004U)
46 46
47#define TEGRA_CTRL_NVLINK_CAPS_NCI_VERSION_INVALID (0x00000000) 47#define TEGRA_CTRL_NVLINK_CAPS_NCI_VERSION_INVALID (0x00000000U)
48#define TEGRA_CTRL_NVLINK_CAPS_NCI_VERSION_1_0 (0x00000001) 48#define TEGRA_CTRL_NVLINK_CAPS_NCI_VERSION_1_0 (0x00000001U)
49#define TEGRA_CTRL_NVLINK_CAPS_NCI_VERSION_2_0 (0x00000002) 49#define TEGRA_CTRL_NVLINK_CAPS_NCI_VERSION_2_0 (0x00000002U)
50#define TEGRA_CTRL_NVLINK_CAPS_NCI_VERSION_2_2 (0x00000004) 50#define TEGRA_CTRL_NVLINK_CAPS_NCI_VERSION_2_2 (0x00000004U)
51 51
52#define TEGRA_CTRL_NVLINK_CAPS_SUPPORTED BIT(0) 52#define TEGRA_CTRL_NVLINK_CAPS_SUPPORTED BIT(0U)
53#define TEGRA_CTRL_NVLINK_CAPS_P2P_SUPPORTED BIT(1) 53#define TEGRA_CTRL_NVLINK_CAPS_P2P_SUPPORTED BIT(1U)
54#define TEGRA_CTRL_NVLINK_CAPS_SYSMEM_ACCESS BIT(2) 54#define TEGRA_CTRL_NVLINK_CAPS_SYSMEM_ACCESS BIT(2U)
55#define TEGRA_CTRL_NVLINK_CAPS_P2P_ATOMICS BIT(3) 55#define TEGRA_CTRL_NVLINK_CAPS_P2P_ATOMICS BIT(3U)
56#define TEGRA_CTRL_NVLINK_CAPS_SYSMEM_ATOMICS BIT(4) 56#define TEGRA_CTRL_NVLINK_CAPS_SYSMEM_ATOMICS BIT(4U)
57#define TEGRA_CTRL_NVLINK_CAPS_PEX_TUNNELING BIT(5) 57#define TEGRA_CTRL_NVLINK_CAPS_PEX_TUNNELING BIT(5U)
58#define TEGRA_CTRL_NVLINK_CAPS_SLI_BRIDGE BIT(6) 58#define TEGRA_CTRL_NVLINK_CAPS_SLI_BRIDGE BIT(6U)
59#define TEGRA_CTRL_NVLINK_CAPS_SLI_BRIDGE_SENSABLE BIT(7) 59#define TEGRA_CTRL_NVLINK_CAPS_SLI_BRIDGE_SENSABLE BIT(7U)
60#define TEGRA_CTRL_NVLINK_CAPS_POWER_STATE_L0 BIT(8) 60#define TEGRA_CTRL_NVLINK_CAPS_POWER_STATE_L0 BIT(8U)
61#define TEGRA_CTRL_NVLINK_CAPS_POWER_STATE_L1 BIT(9) 61#define TEGRA_CTRL_NVLINK_CAPS_POWER_STATE_L1 BIT(9U)
62#define TEGRA_CTRL_NVLINK_CAPS_POWER_STATE_L2 BIT(10) 62#define TEGRA_CTRL_NVLINK_CAPS_POWER_STATE_L2 BIT(10U)
63#define TEGRA_CTRL_NVLINK_CAPS_POWER_STATE_L3 BIT(11) 63#define TEGRA_CTRL_NVLINK_CAPS_POWER_STATE_L3 BIT(11U)
64#define TEGRA_CTRL_NVLINK_CAPS_VALID BIT(12) 64#define TEGRA_CTRL_NVLINK_CAPS_VALID BIT(12U)
65 65
66struct tegra_nvlink_caps { 66struct tegra_nvlink_caps {
67 __u16 nvlink_caps; 67 __u16 nvlink_caps;
@@ -78,78 +78,78 @@ struct tegra_nvlink_caps {
78/* TEGRA_CTRL_CMD_NVLINK_GET_NVLINK_STATUS */ 78/* TEGRA_CTRL_CMD_NVLINK_GET_NVLINK_STATUS */
79 79
80/* NVLink link states */ 80/* NVLink link states */
81#define TEGRA_CTRL_NVLINK_STATUS_LINK_STATE_INIT (0x00000000) 81#define TEGRA_CTRL_NVLINK_STATUS_LINK_STATE_INIT (0x00000000U)
82#define TEGRA_CTRL_NVLINK_STATUS_LINK_STATE_HWCFG (0x00000001) 82#define TEGRA_CTRL_NVLINK_STATUS_LINK_STATE_HWCFG (0x00000001U)
83#define TEGRA_CTRL_NVLINK_STATUS_LINK_STATE_SWCFG (0x00000002) 83#define TEGRA_CTRL_NVLINK_STATUS_LINK_STATE_SWCFG (0x00000002U)
84#define TEGRA_CTRL_NVLINK_STATUS_LINK_STATE_ACTIVE (0x00000003) 84#define TEGRA_CTRL_NVLINK_STATUS_LINK_STATE_ACTIVE (0x00000003U)
85#define TEGRA_CTRL_NVLINK_STATUS_LINK_STATE_FAULT (0x00000004) 85#define TEGRA_CTRL_NVLINK_STATUS_LINK_STATE_FAULT (0x00000004U)
86#define TEGRA_CTRL_NVLINK_STATUS_LINK_STATE_RECOVERY (0x00000006) 86#define TEGRA_CTRL_NVLINK_STATUS_LINK_STATE_RECOVERY (0x00000006U)
87#define TEGRA_CTRL_NVLINK_STATUS_LINK_STATE_INVALID (0xFFFFFFFF) 87#define TEGRA_CTRL_NVLINK_STATUS_LINK_STATE_INVALID (0xFFFFFFFFU)
88 88
89/* NVLink Tx sublink states */ 89/* NVLink Tx sublink states */
90#define TEGRA_CTRL_NVLINK_STATUS_SUBLINK_RX_STATE_HIGH_SPEED_1 (0x00000000) 90#define TEGRA_CTRL_NVLINK_STATUS_SUBLINK_RX_STATE_HIGH_SPEED_1 (0x00000000U)
91#define TEGRA_CTRL_NVLINK_STATUS_SUBLINK_RX_STATE_SINGLE_LANE (0x00000004) 91#define TEGRA_CTRL_NVLINK_STATUS_SUBLINK_RX_STATE_SINGLE_LANE (0x00000004U)
92#define TEGRA_CTRL_NVLINK_STATUS_SUBLINK_RX_STATE_TRAINING (0x00000005) 92#define TEGRA_CTRL_NVLINK_STATUS_SUBLINK_RX_STATE_TRAINING (0x00000005U)
93#define TEGRA_CTRL_NVLINK_STATUS_SUBLINK_RX_STATE_SAFE_MODE (0x00000006) 93#define TEGRA_CTRL_NVLINK_STATUS_SUBLINK_RX_STATE_SAFE_MODE (0x00000006U)
94#define TEGRA_CTRL_NVLINK_STATUS_SUBLINK_RX_STATE_OFF (0x00000007) 94#define TEGRA_CTRL_NVLINK_STATUS_SUBLINK_RX_STATE_OFF (0x00000007U)
95#define TEGRA_CTRL_NVLINK_STATUS_SUBLINK_RX_STATE_INVALID (0x000000FF) 95#define TEGRA_CTRL_NVLINK_STATUS_SUBLINK_RX_STATE_INVALID (0x000000FFU)
96 96
97/* NVLink Rx sublink states */ 97/* NVLink Rx sublink states */
98#define TEGRA_CTRL_NVLINK_STATUS_SUBLINK_TX_STATE_HIGH_SPEED_1 (0x00000000) 98#define TEGRA_CTRL_NVLINK_STATUS_SUBLINK_TX_STATE_HIGH_SPEED_1 (0x00000000U)
99#define TEGRA_CTRL_NVLINK_STATUS_SUBLINK_TX_STATE_SINGLE_LANE (0x00000004) 99#define TEGRA_CTRL_NVLINK_STATUS_SUBLINK_TX_STATE_SINGLE_LANE (0x00000004U)
100#define TEGRA_CTRL_NVLINK_STATUS_SUBLINK_TX_STATE_TRAINING (0x00000005) 100#define TEGRA_CTRL_NVLINK_STATUS_SUBLINK_TX_STATE_TRAINING (0x00000005U)
101#define TEGRA_CTRL_NVLINK_STATUS_SUBLINK_TX_STATE_SAFE_MODE (0x00000006) 101#define TEGRA_CTRL_NVLINK_STATUS_SUBLINK_TX_STATE_SAFE_MODE (0x00000006U)
102#define TEGRA_CTRL_NVLINK_STATUS_SUBLINK_TX_STATE_OFF (0x00000007) 102#define TEGRA_CTRL_NVLINK_STATUS_SUBLINK_TX_STATE_OFF (0x00000007U)
103#define TEGRA_CTRL_NVLINK_STATUS_SUBLINK_TX_STATE_INVALID (0x000000FF) 103#define TEGRA_CTRL_NVLINK_STATUS_SUBLINK_TX_STATE_INVALID (0x000000FFU)
104 104
105#define TEGRA_CTRL_NVLINK_STATUS_PHY_NVHS (0x00000001) 105#define TEGRA_CTRL_NVLINK_STATUS_PHY_NVHS (0x00000001U)
106#define TEGRA_CTRL_NVLINK_STATUS_PHY_GRS (0x00000002) 106#define TEGRA_CTRL_NVLINK_STATUS_PHY_GRS (0x00000002U)
107#define TEGRA_CTRL_NVLINK_STATUS_PHY_INVALID (0x000000FF) 107#define TEGRA_CTRL_NVLINK_STATUS_PHY_INVALID (0x000000FFU)
108 108
109/* Version information */ 109/* Version information */
110#define TEGRA_CTRL_NVLINK_STATUS_NVLINK_VERSION_1_0 (0x00000001) 110#define TEGRA_CTRL_NVLINK_STATUS_NVLINK_VERSION_1_0 (0x00000001U)
111#define TEGRA_CTRL_NVLINK_STATUS_NVLINK_VERSION_2_0 (0x00000002) 111#define TEGRA_CTRL_NVLINK_STATUS_NVLINK_VERSION_2_0 (0x00000002U)
112#define TEGRA_CTRL_NVLINK_STATUS_NVLINK_VERSION_2_2 (0x00000004) 112#define TEGRA_CTRL_NVLINK_STATUS_NVLINK_VERSION_2_2 (0x00000004U)
113#define TEGRA_CTRL_NVLINK_STATUS_NVLINK_VERSION_INVALID (0x000000FF) 113#define TEGRA_CTRL_NVLINK_STATUS_NVLINK_VERSION_INVALID (0x000000FFU)
114 114
115#define TEGRA_CTRL_NVLINK_STATUS_NCI_VERSION_1_0 (0x00000001) 115#define TEGRA_CTRL_NVLINK_STATUS_NCI_VERSION_1_0 (0x00000001U)
116#define TEGRA_CTRL_NVLINK_STATUS_NCI_VERSION_2_0 (0x00000002) 116#define TEGRA_CTRL_NVLINK_STATUS_NCI_VERSION_2_0 (0x00000002U)
117#define TEGRA_CTRL_NVLINK_STATUS_NCI_VERSION_2_2 (0x00000004) 117#define TEGRA_CTRL_NVLINK_STATUS_NCI_VERSION_2_2 (0x00000004U)
118#define TEGRA_CTRL_NVLINK_STATUS_NCI_VERSION_INVALID (0x000000FF) 118#define TEGRA_CTRL_NVLINK_STATUS_NCI_VERSION_INVALID (0x000000FFU)
119 119
120#define TEGRA_CTRL_NVLINK_STATUS_NVHS_VERSION_1_0 (0x00000001) 120#define TEGRA_CTRL_NVLINK_STATUS_NVHS_VERSION_1_0 (0x00000001U)
121#define TEGRA_CTRL_NVLINK_STATUS_NVHS_VERSION_INVALID (0x000000FF) 121#define TEGRA_CTRL_NVLINK_STATUS_NVHS_VERSION_INVALID (0x000000FFU)
122 122
123#define TEGRA_CTRL_NVLINK_STATUS_GRS_VERSION_1_0 (0x00000001) 123#define TEGRA_CTRL_NVLINK_STATUS_GRS_VERSION_1_0 (0x00000001U)
124#define TEGRA_CTRL_NVLINK_STATUS_GRS_VERSION_INVALID (0x000000FF) 124#define TEGRA_CTRL_NVLINK_STATUS_GRS_VERSION_INVALID (0x000000FFU)
125 125
126/* Connection properties */ 126/* Connection properties */
127#define TEGRA_CTRL_NVLINK_STATUS_CONNECTED_TRUE (0x00000001) 127#define TEGRA_CTRL_NVLINK_STATUS_CONNECTED_TRUE (0x00000001U)
128#define TEGRA_CTRL_NVLINK_STATUS_CONNECTED_FALSE (0x00000000) 128#define TEGRA_CTRL_NVLINK_STATUS_CONNECTED_FALSE (0x00000000U)
129 129
130#define TEGRA_CTRL_NVLINK_STATUS_LOOP_PROPERTY_LOOPBACK (0x00000001) 130#define TEGRA_CTRL_NVLINK_STATUS_LOOP_PROPERTY_LOOPBACK (0x00000001U)
131#define TEGRA_CTRL_NVLINK_STATUS_LOOP_PROPERTY_LOOPOUT (0x00000002) 131#define TEGRA_CTRL_NVLINK_STATUS_LOOP_PROPERTY_LOOPOUT (0x00000002U)
132#define TEGRA_CTRL_NVLINK_STATUS_LOOP_PROPERTY_NONE (0x00000000) 132#define TEGRA_CTRL_NVLINK_STATUS_LOOP_PROPERTY_NONE (0x00000000U)
133 133
134#define TEGRA_CTRL_NVLINK_STATUS_REMOTE_LINK_NUMBER_INVALID (0x000000FF) 134#define TEGRA_CTRL_NVLINK_STATUS_REMOTE_LINK_NUMBER_INVALID (0x000000FFU)
135 135
136/* NVLink REFCLK types */ 136/* NVLink REFCLK types */
137#define TEGRA_CTRL_NVLINK_REFCLK_TYPE_INVALID (0x00) 137#define TEGRA_CTRL_NVLINK_REFCLK_TYPE_INVALID (0x00U)
138#define TEGRA_CTRL_NVLINK_REFCLK_TYPE_NVHS (0x01) 138#define TEGRA_CTRL_NVLINK_REFCLK_TYPE_NVHS (0x01U)
139#define TEGRA_CTRL_NVLINK_REFCLK_TYPE_PEX (0x02) 139#define TEGRA_CTRL_NVLINK_REFCLK_TYPE_PEX (0x02U)
140 140
141#define TEGRA_CTRL_NVLINK_DEVICE_INFO_DEVICE_ID_FLAGS_NONE (0x00000000) 141#define TEGRA_CTRL_NVLINK_DEVICE_INFO_DEVICE_ID_FLAGS_NONE (0x00000000U)
142#define TEGRA_CTRL_NVLINK_DEVICE_INFO_DEVICE_ID_FLAGS_PCI (0x00000001) 142#define TEGRA_CTRL_NVLINK_DEVICE_INFO_DEVICE_ID_FLAGS_PCI (0x00000001U)
143#define TEGRA_CTRL_NVLINK_DEVICE_INFO_DEVICE_ID_FLAGS_UUID (0x00000002) 143#define TEGRA_CTRL_NVLINK_DEVICE_INFO_DEVICE_ID_FLAGS_UUID (0x00000002U)
144 144
145#define TEGRA_CTRL_NVLINK_DEVICE_INFO_DEVICE_TYPE_EBRIDGE (0x00000000) 145#define TEGRA_CTRL_NVLINK_DEVICE_INFO_DEVICE_TYPE_EBRIDGE (0x00000000U)
146#define TEGRA_CTRL_NVLINK_DEVICE_INFO_DEVICE_TYPE_NPU (0x00000001) 146#define TEGRA_CTRL_NVLINK_DEVICE_INFO_DEVICE_TYPE_NPU (0x00000001U)
147#define TEGRA_CTRL_NVLINK_DEVICE_INFO_DEVICE_TYPE_GPU (0x00000002) 147#define TEGRA_CTRL_NVLINK_DEVICE_INFO_DEVICE_TYPE_GPU (0x00000002U)
148#define TEGRA_CTRL_NVLINK_DEVICE_INFO_DEVICE_TYPE_SWITCH (0x00000003) 148#define TEGRA_CTRL_NVLINK_DEVICE_INFO_DEVICE_TYPE_SWITCH (0x00000003U)
149#define TEGRA_CTRL_NVLINK_DEVICE_INFO_DEVICE_TYPE_TEGRA (0x00000004) 149#define TEGRA_CTRL_NVLINK_DEVICE_INFO_DEVICE_TYPE_TEGRA (0x00000004U)
150#define TEGRA_CTRL_NVLINK_DEVICE_INFO_DEVICE_TYPE_NONE (0x000000FF) 150#define TEGRA_CTRL_NVLINK_DEVICE_INFO_DEVICE_TYPE_NONE (0x000000FFU)
151 151
152#define TEGRA_CTRL_NVLINK_DEVICE_INFO_DEVICE_UUID_INVALID (0xFFFFFFFF) 152#define TEGRA_CTRL_NVLINK_DEVICE_INFO_DEVICE_UUID_INVALID (0xFFFFFFFFU)
153 153
154struct tegra_nvlink_device_info { 154struct tegra_nvlink_device_info {
155 /* ID Flags */ 155 /* ID Flags */
@@ -216,30 +216,30 @@ struct tegra_nvlink_status {
216/* TEGRA_CTRL_CMD_NVLINK_CLEAR_COUNTERS */ 216/* TEGRA_CTRL_CMD_NVLINK_CLEAR_COUNTERS */
217 217
218/* These are the bitmask definitions for different counter types */ 218/* These are the bitmask definitions for different counter types */
219#define TEGRA_CTRL_NVLINK_COUNTER_INVALID 0x00000000 219#define TEGRA_CTRL_NVLINK_COUNTER_INVALID 0x00000000U
220 220
221#define TEGRA_CTRL_NVLINK_COUNTER_TL_TX0 0x00000001 221#define TEGRA_CTRL_NVLINK_COUNTER_TL_TX0 0x00000001U
222#define TEGRA_CTRL_NVLINK_COUNTER_TL_TX1 0x00000002 222#define TEGRA_CTRL_NVLINK_COUNTER_TL_TX1 0x00000002U
223#define TEGRA_CTRL_NVLINK_COUNTER_TL_RX0 0x00000004 223#define TEGRA_CTRL_NVLINK_COUNTER_TL_RX0 0x00000004U
224#define TEGRA_CTRL_NVLINK_COUNTER_TL_RX1 0x00000008 224#define TEGRA_CTRL_NVLINK_COUNTER_TL_RX1 0x00000008U
225 225
226#define TEGRA_CTRL_NVLINK_COUNTER_DL_RX_ERR_CRC_FLIT 0x00010000 226#define TEGRA_CTRL_NVLINK_COUNTER_DL_RX_ERR_CRC_FLIT 0x00010000U
227 227
228#define TEGRA_CTRL_NVLINK_COUNTER_DL_RX_ERR_CRC_LANE_L(i) (1 << (i + 17)) 228#define TEGRA_CTRL_NVLINK_COUNTER_DL_RX_ERR_CRC_LANE_L(i) (1U << (i + 17U))
229#define TEGRA_CTRL_NVLINK_COUNTER_DL_RX_ERR_CRC_LANE_SIZE 8 229#define TEGRA_CTRL_NVLINK_COUNTER_DL_RX_ERR_CRC_LANE_SIZE 8U
230#define TEGRA_CTRL_NVLINK_COUNTER_DL_RX_ERR_CRC_LANE_L0 0x00020000 230#define TEGRA_CTRL_NVLINK_COUNTER_DL_RX_ERR_CRC_LANE_L0 0x00020000U
231#define TEGRA_CTRL_NVLINK_COUNTER_DL_RX_ERR_CRC_LANE_L1 0x00040000 231#define TEGRA_CTRL_NVLINK_COUNTER_DL_RX_ERR_CRC_LANE_L1 0x00040000U
232#define TEGRA_CTRL_NVLINK_COUNTER_DL_RX_ERR_CRC_LANE_L2 0x00080000 232#define TEGRA_CTRL_NVLINK_COUNTER_DL_RX_ERR_CRC_LANE_L2 0x00080000U
233#define TEGRA_CTRL_NVLINK_COUNTER_DL_RX_ERR_CRC_LANE_L3 0x00100000 233#define TEGRA_CTRL_NVLINK_COUNTER_DL_RX_ERR_CRC_LANE_L3 0x00100000U
234#define TEGRA_CTRL_NVLINK_COUNTER_DL_RX_ERR_CRC_LANE_L4 0x00200000 234#define TEGRA_CTRL_NVLINK_COUNTER_DL_RX_ERR_CRC_LANE_L4 0x00200000U
235#define TEGRA_CTRL_NVLINK_COUNTER_DL_RX_ERR_CRC_LANE_L5 0x00400000 235#define TEGRA_CTRL_NVLINK_COUNTER_DL_RX_ERR_CRC_LANE_L5 0x00400000U
236#define TEGRA_CTRL_NVLINK_COUNTER_DL_RX_ERR_CRC_LANE_L6 0x00800000 236#define TEGRA_CTRL_NVLINK_COUNTER_DL_RX_ERR_CRC_LANE_L6 0x00800000U
237#define TEGRA_CTRL_NVLINK_COUNTER_DL_RX_ERR_CRC_LANE_L7 0x01000000 237#define TEGRA_CTRL_NVLINK_COUNTER_DL_RX_ERR_CRC_LANE_L7 0x01000000U
238 238
239#define TEGRA_CTRL_NVLINK_COUNTER_DL_TX_ERR_REPLAY 0x02000000 239#define TEGRA_CTRL_NVLINK_COUNTER_DL_TX_ERR_REPLAY 0x02000000U
240#define TEGRA_CTRL_NVLINK_COUNTER_DL_TX_ERR_RECOVERY 0x04000000 240#define TEGRA_CTRL_NVLINK_COUNTER_DL_TX_ERR_RECOVERY 0x04000000U
241 241
242#define TEGRA_CTRL_NVLINK_COUNTER_MAX_TYPES 32 242#define TEGRA_CTRL_NVLINK_COUNTER_MAX_TYPES 32U
243 243
244/* 244/*
245 * Return index of the bit that is set in 'n'. This assumes there is only 245 * Return index of the bit that is set in 'n'. This assumes there is only
@@ -247,11 +247,11 @@ struct tegra_nvlink_status {
247 * result is in range of 0-31. 247 * result is in range of 0-31.
248 */ 248 */
249#define TEGRA_BIT_IDX_32(n) \ 249#define TEGRA_BIT_IDX_32(n) \
250 ((((n) & 0xFFFF0000) ? 0x10 : 0) | \ 250 ((((n) & 0xFFFF0000U) ? 0x10U : 0U) | \
251 (((n) & 0xFF00FF00) ? 0x08 : 0) | \ 251 (((n) & 0xFF00FF00U) ? 0x08U : 0U) | \
252 (((n) & 0xF0F0F0F0) ? 0x04 : 0) | \ 252 (((n) & 0xF0F0F0F0U) ? 0x04U : 0U) | \
253 (((n) & 0xCCCCCCCC) ? 0x02 : 0) | \ 253 (((n) & 0xCCCCCCCCU) ? 0x02U : 0U) | \
254 (((n) & 0xAAAAAAAA) ? 0x01 : 0)) 254 (((n) & 0xAAAAAAAAU) ? 0x01U : 0U))
255 255
256struct tegra_nvlink_clear_counters { 256struct tegra_nvlink_clear_counters {
257 __u32 link_mask; 257 __u32 link_mask;
@@ -368,7 +368,7 @@ struct tegra_nvlink_link_state {
368}; 368};
369 369
370enum tegra_nvlink_conn_train_type { 370enum tegra_nvlink_conn_train_type {
371 tegra_nvlink_train_conn_off_to_swcfg = 0, 371 tegra_nvlink_train_conn_off_to_swcfg = 0U,
372 tegra_nvlink_train_conn_swcfg_to_active, 372 tegra_nvlink_train_conn_swcfg_to_active,
373 tegra_nvlink_train_conn_to_off, 373 tegra_nvlink_train_conn_to_off,
374 tegra_nvlink_train_conn_active_to_swcfg, 374 tegra_nvlink_train_conn_active_to_swcfg,
@@ -388,12 +388,12 @@ struct tegra_nvlink_train_intranode_conn {
388}; 388};
389 389
390/* TEGRA_CTRL_CMD_NVLINK_GET_LP_COUNTERS */ 390/* TEGRA_CTRL_CMD_NVLINK_GET_LP_COUNTERS */
391#define TEGRA_CTRL_NVLINK_GET_LP_COUNTERS_COUNT_TX_NVHS 0 391#define TEGRA_CTRL_NVLINK_GET_LP_COUNTERS_COUNT_TX_NVHS 0U
392#define TEGRA_CTRL_NVLINK_GET_LP_COUNTERS_COUNT_TX_EIGHTH 1 392#define TEGRA_CTRL_NVLINK_GET_LP_COUNTERS_COUNT_TX_EIGHTH 1U
393#define TEGRA_CTRL_NVLINK_GET_LP_COUNTERS_COUNT_TX_OTHER 2 393#define TEGRA_CTRL_NVLINK_GET_LP_COUNTERS_COUNT_TX_OTHER 2U
394#define TEGRA_CTRL_NVLINK_GET_LP_COUNTERS_NUM_TX_LP_ENTER 3 394#define TEGRA_CTRL_NVLINK_GET_LP_COUNTERS_NUM_TX_LP_ENTER 3U
395#define TEGRA_CTRL_NVLINK_GET_LP_COUNTERS_NUM_TX_LP_EXIT 4 395#define TEGRA_CTRL_NVLINK_GET_LP_COUNTERS_NUM_TX_LP_EXIT 4U
396#define TEGRA_CTRL_NVLINK_GET_LP_COUNTERS_MAX_COUNTERS 5 396#define TEGRA_CTRL_NVLINK_GET_LP_COUNTERS_MAX_COUNTERS 5U
397 397
398struct tegra_nvlink_get_lp_counters { 398struct tegra_nvlink_get_lp_counters {
399 /* input field */ 399 /* input field */