Lines Matching refs:min
126 #define EF4_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 EF4_EXTRACT64(element, min, max, low, high) \ argument
137 EF4_EXTRACT_NATIVE(le64_to_cpu(element), min, max, low, high)
143 #define EF4_EXTRACT32(element, min, max, low, high) \ argument
144 EF4_EXTRACT_NATIVE(le32_to_cpu(element), min, max, low, high)
245 #define EF4_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 EF4_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 EF4_INSERT_NATIVE(min, max, low, high, value) \ argument
258 ((((max - min) >= 32) || ((high - low) >= 32)) ? \
259 EF4_INSERT_NATIVE64(min, max, low, high, value) : \
260 EF4_INSERT_NATIVE32(min, max, low, high, value))
268 #define EF4_INSERT_FIELD_NATIVE(min, max, field, value) \ argument
269 EF4_INSERT_NATIVE(min, max, EF4_LOW_BIT(field), \
278 #define EF4_INSERT_FIELDS_NATIVE(min, max, \ argument
289 (EF4_INSERT_FIELD_NATIVE((min), (max), field1, (value1)) | \
290 EF4_INSERT_FIELD_NATIVE((min), (max), field2, (value2)) | \
291 EF4_INSERT_FIELD_NATIVE((min), (max), field3, (value3)) | \
292 EF4_INSERT_FIELD_NATIVE((min), (max), field4, (value4)) | \
293 EF4_INSERT_FIELD_NATIVE((min), (max), field5, (value5)) | \
294 EF4_INSERT_FIELD_NATIVE((min), (max), field6, (value6)) | \
295 EF4_INSERT_FIELD_NATIVE((min), (max), field7, (value7)) | \
296 EF4_INSERT_FIELD_NATIVE((min), (max), field8, (value8)) | \
297 EF4_INSERT_FIELD_NATIVE((min), (max), field9, (value9)) | \
298 EF4_INSERT_FIELD_NATIVE((min), (max), field10, (value10)))
442 #define EF4_INSERT64(min, max, low, high, value) \ argument
443 cpu_to_le64(EF4_INSERT_NATIVE(min, max, low, high, value))
445 #define EF4_INSERT32(min, max, low, high, value) \ argument
446 cpu_to_le32(EF4_INSERT_NATIVE(min, max, low, high, value))
448 #define EF4_INPLACE_MASK64(min, max, low, high) \ argument
449 EF4_INSERT64(min, max, low, high, EF4_MASK64((high) + 1 - (low)))
451 #define EF4_INPLACE_MASK32(min, max, low, high) \ argument
452 EF4_INSERT32(min, max, low, high, EF4_MASK32((high) + 1 - (low)))