Lines Matching full:low

46 /* Low bit number of the specified field */
109 * Extract bit field portion [low,high) from the native-endian element
121 * [0,high-low), with garbage in bits [high-low+1,...).
123 #define EFX_EXTRACT_NATIVE(native_element, min, max, low, high) \ argument
124 ((low) > (max) || (high) < (min) ? 0 : \
125 (low) > (min) ? \
126 (native_element) >> ((low) - (min)) : \
127 (native_element) << ((min) - (low)))
130 * Extract bit field portion [low,high) from the 64-bit little-endian
133 #define EFX_EXTRACT64(element, min, max, low, high) \ argument
134 EFX_EXTRACT_NATIVE(le64_to_cpu(element), min, max, low, high)
137 * Extract bit field portion [low,high) from the 32-bit little-endian
140 #define EFX_EXTRACT32(element, min, max, low, high) \ argument
141 EFX_EXTRACT_NATIVE(le32_to_cpu(element), min, max, low, high)
143 #define EFX_EXTRACT_OWORD64(oword, low, high) \ argument
144 ((EFX_EXTRACT64((oword).u64[0], 0, 63, low, high) | \
145 EFX_EXTRACT64((oword).u64[1], 64, 127, low, high)) & \
146 EFX_MASK64((high) + 1 - (low)))
148 #define EFX_EXTRACT_QWORD64(qword, low, high) \ argument
149 (EFX_EXTRACT64((qword).u64[0], 0, 63, low, high) & \
150 EFX_MASK64((high) + 1 - (low)))
152 #define EFX_EXTRACT_OWORD32(oword, low, high) \ argument
153 ((EFX_EXTRACT32((oword).u32[0], 0, 31, low, high) | \
154 EFX_EXTRACT32((oword).u32[1], 32, 63, low, high) | \
155 EFX_EXTRACT32((oword).u32[2], 64, 95, low, high) | \
156 EFX_EXTRACT32((oword).u32[3], 96, 127, low, high)) & \
157 EFX_MASK32((high) + 1 - (low)))
159 #define EFX_EXTRACT_QWORD32(qword, low, high) \ argument
160 ((EFX_EXTRACT32((qword).u32[0], 0, 31, low, high) | \
161 EFX_EXTRACT32((qword).u32[1], 32, 63, low, high)) & \
162 EFX_MASK32((high) + 1 - (low)))
164 #define EFX_EXTRACT_DWORD(dword, low, high) \ argument
165 (EFX_EXTRACT32((dword).u32[0], 0, 31, low, high) & \
166 EFX_MASK32((high) + 1 - (low)))
239 * Creates the portion of the bit field [low,high) that lies within
242 #define EFX_INSERT_NATIVE64(min, max, low, high, value) \ argument
243 (((low > max) || (high < min)) ? 0 : \
244 ((low > min) ? \
245 (((u64) (value)) << (low - min)) : \
246 (((u64) (value)) >> (min - low))))
248 #define EFX_INSERT_NATIVE32(min, max, low, high, value) \ argument
249 (((low > max) || (high < min)) ? 0 : \
250 ((low > min) ? \
251 (((u32) (value)) << (low - min)) : \
252 (((u32) (value)) >> (min - low))))
254 #define EFX_INSERT_NATIVE(min, max, low, high, value) \ argument
255 ((((max - min) >= 32) || ((high - low) >= 32)) ? \
256 EFX_INSERT_NATIVE64(min, max, low, high, value) : \
257 EFX_INSERT_NATIVE32(min, max, low, high, value))
466 #define EFX_INSERT64(min, max, low, high, value) \ argument
467 cpu_to_le64(EFX_INSERT_NATIVE(min, max, low, high, value))
469 #define EFX_INSERT32(min, max, low, high, value) \ argument
470 cpu_to_le32(EFX_INSERT_NATIVE(min, max, low, high, value))
472 #define EFX_INPLACE_MASK64(min, max, low, high) \ argument
473 EFX_INSERT64(min, max, low, high, EFX_MASK64((high) + 1 - (low)))
475 #define EFX_INPLACE_MASK32(min, max, low, high) \ argument
476 EFX_INSERT32(min, max, low, high, EFX_MASK32((high) + 1 - (low)))
478 #define EFX_SET_OWORD64(oword, low, high, value) do { \ argument
480 & ~EFX_INPLACE_MASK64(0, 63, low, high)) \
481 | EFX_INSERT64(0, 63, low, high, value)); \
483 & ~EFX_INPLACE_MASK64(64, 127, low, high)) \
484 | EFX_INSERT64(64, 127, low, high, value)); \
487 #define EFX_SET_QWORD64(qword, low, high, value) do { \ argument
489 & ~EFX_INPLACE_MASK64(0, 63, low, high)) \
490 | EFX_INSERT64(0, 63, low, high, value)); \
493 #define EFX_SET_OWORD32(oword, low, high, value) do { \ argument
495 & ~EFX_INPLACE_MASK32(0, 31, low, high)) \
496 | EFX_INSERT32(0, 31, low, high, value)); \
498 & ~EFX_INPLACE_MASK32(32, 63, low, high)) \
499 | EFX_INSERT32(32, 63, low, high, value)); \
501 & ~EFX_INPLACE_MASK32(64, 95, low, high)) \
502 | EFX_INSERT32(64, 95, low, high, value)); \
504 & ~EFX_INPLACE_MASK32(96, 127, low, high)) \
505 | EFX_INSERT32(96, 127, low, high, value)); \
508 #define EFX_SET_QWORD32(qword, low, high, value) do { \ argument
510 & ~EFX_INPLACE_MASK32(0, 31, low, high)) \
511 | EFX_INSERT32(0, 31, low, high, value)); \
513 & ~EFX_INPLACE_MASK32(32, 63, low, high)) \
514 | EFX_INSERT32(32, 63, low, high, value)); \
517 #define EFX_SET_DWORD32(dword, low, high, value) do { \ argument
519 & ~EFX_INPLACE_MASK32(0, 31, low, high)) \
520 | EFX_INSERT32(0, 31, low, high, value)); \