Lines Matching refs:min
126 #define EFX_EXTRACT_NATIVE(native_element, min, max, low, high) \ argument
127 ((low) > (max) || (high) < (min) ? 0 : \
128 (low) > (min) ? \
129 (native_element) >> ((low) - (min)) : \
130 (native_element) << ((min) - (low)))
136 #define EFX_EXTRACT64(element, min, max, low, high) \ argument
137 EFX_EXTRACT_NATIVE(le64_to_cpu(element), min, max, low, high)
143 #define EFX_EXTRACT32(element, min, max, low, high) \ argument
144 EFX_EXTRACT_NATIVE(le32_to_cpu(element), min, max, low, high)
245 #define EFX_INSERT_NATIVE64(min, max, low, high, value) \ argument
246 (((low > max) || (high < min)) ? 0 : \
247 ((low > min) ? \
248 (((u64) (value)) << (low - min)) : \
249 (((u64) (value)) >> (min - low))))
251 #define EFX_INSERT_NATIVE32(min, max, low, high, value) \ argument
252 (((low > max) || (high < min)) ? 0 : \
253 ((low > min) ? \
254 (((u32) (value)) << (low - min)) : \
255 (((u32) (value)) >> (min - low))))
257 #define EFX_INSERT_NATIVE(min, max, low, high, value) \ argument
258 ((((max - min) >= 32) || ((high - low) >= 32)) ? \
259 EFX_INSERT_NATIVE64(min, max, low, high, value) : \
260 EFX_INSERT_NATIVE32(min, max, low, high, value))
268 #define EFX_INSERT_FIELD_NATIVE(min, max, field, value) \ argument
269 EFX_INSERT_NATIVE(min, max, EFX_LOW_BIT(field), \
278 #define EFX_INSERT_FIELDS_NATIVE(min, max, \ argument
289 (EFX_INSERT_FIELD_NATIVE((min), (max), field1, (value1)) | \
290 EFX_INSERT_FIELD_NATIVE((min), (max), field2, (value2)) | \
291 EFX_INSERT_FIELD_NATIVE((min), (max), field3, (value3)) | \
292 EFX_INSERT_FIELD_NATIVE((min), (max), field4, (value4)) | \
293 EFX_INSERT_FIELD_NATIVE((min), (max), field5, (value5)) | \
294 EFX_INSERT_FIELD_NATIVE((min), (max), field6, (value6)) | \
295 EFX_INSERT_FIELD_NATIVE((min), (max), field7, (value7)) | \
296 EFX_INSERT_FIELD_NATIVE((min), (max), field8, (value8)) | \
297 EFX_INSERT_FIELD_NATIVE((min), (max), field9, (value9)) | \
298 EFX_INSERT_FIELD_NATIVE((min), (max), field10, (value10)))
445 #define EFX_INSERT64(min, max, low, high, value) \ argument
446 cpu_to_le64(EFX_INSERT_NATIVE(min, max, low, high, value))
448 #define EFX_INSERT32(min, max, low, high, value) \ argument
449 cpu_to_le32(EFX_INSERT_NATIVE(min, max, low, high, value))
451 #define EFX_INPLACE_MASK64(min, max, low, high) \ argument
452 EFX_INSERT64(min, max, low, high, EFX_MASK64((high) + 1 - (low)))
454 #define EFX_INPLACE_MASK32(min, max, low, high) \ argument
455 EFX_INSERT32(min, max, low, high, EFX_MASK32((high) + 1 - (low)))