Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs
bitfield.h File Reference

Go to the source code of this file.

Data Structures

union  efx_dword
 
union  efx_qword
 
union  efx_oword
 

Macros

#define EFX_DUMMY_FIELD_LBN   0
 
#define EFX_DUMMY_FIELD_WIDTH   0
 
#define EFX_DWORD_0_LBN   0
 
#define EFX_DWORD_0_WIDTH   32
 
#define EFX_DWORD_1_LBN   32
 
#define EFX_DWORD_1_WIDTH   32
 
#define EFX_DWORD_2_LBN   64
 
#define EFX_DWORD_2_WIDTH   32
 
#define EFX_DWORD_3_LBN   96
 
#define EFX_DWORD_3_WIDTH   32
 
#define EFX_QWORD_0_LBN   0
 
#define EFX_QWORD_0_WIDTH   64
 
#define EFX_VAL(field, attribute)   field ## _ ## attribute
 
#define EFX_LOW_BIT(field)   EFX_VAL(field, LBN)
 
#define EFX_WIDTH(field)   EFX_VAL(field, WIDTH)
 
#define EFX_HIGH_BIT(field)   (EFX_LOW_BIT(field) + EFX_WIDTH(field) - 1)
 
#define EFX_MASK64(width)
 
#define EFX_MASK32(width)
 
#define EFX_DWORD_FMT   "%08x"
 
#define EFX_QWORD_FMT   "%08x:%08x"
 
#define EFX_OWORD_FMT   "%08x:%08x:%08x:%08x"
 
#define EFX_DWORD_VAL(dword)   ((unsigned int) le32_to_cpu((dword).u32[0]))
 
#define EFX_QWORD_VAL(qword)
 
#define EFX_OWORD_VAL(oword)
 
#define EFX_EXTRACT_NATIVE(native_element, min, max, low, high)
 
#define EFX_EXTRACT64(element, min, max, low, high)   EFX_EXTRACT_NATIVE(le64_to_cpu(element), min, max, low, high)
 
#define EFX_EXTRACT32(element, min, max, low, high)   EFX_EXTRACT_NATIVE(le32_to_cpu(element), min, max, low, high)
 
#define EFX_EXTRACT_OWORD64(oword, low, high)
 
#define EFX_EXTRACT_QWORD64(qword, low, high)
 
#define EFX_EXTRACT_OWORD32(oword, low, high)
 
#define EFX_EXTRACT_QWORD32(qword, low, high)
 
#define EFX_EXTRACT_DWORD(dword, low, high)
 
#define EFX_OWORD_FIELD64(oword, field)
 
#define EFX_QWORD_FIELD64(qword, field)
 
#define EFX_OWORD_FIELD32(oword, field)
 
#define EFX_QWORD_FIELD32(qword, field)
 
#define EFX_DWORD_FIELD(dword, field)
 
#define EFX_OWORD_IS_ZERO64(oword)   (((oword).u64[0] | (oword).u64[1]) == (__force __le64) 0)
 
#define EFX_QWORD_IS_ZERO64(qword)   (((qword).u64[0]) == (__force __le64) 0)
 
#define EFX_OWORD_IS_ZERO32(oword)
 
#define EFX_QWORD_IS_ZERO32(qword)   (((qword).u32[0] | (qword).u32[1]) == (__force __le32) 0)
 
#define EFX_DWORD_IS_ZERO(dword)   (((dword).u32[0]) == (__force __le32) 0)
 
#define EFX_OWORD_IS_ALL_ONES64(oword)   (((oword).u64[0] & (oword).u64[1]) == ~((__force __le64) 0))
 
#define EFX_QWORD_IS_ALL_ONES64(qword)   ((qword).u64[0] == ~((__force __le64) 0))
 
#define EFX_OWORD_IS_ALL_ONES32(oword)
 
#define EFX_QWORD_IS_ALL_ONES32(qword)   (((qword).u32[0] & (qword).u32[1]) == ~((__force __le32) 0))
 
#define EFX_DWORD_IS_ALL_ONES(dword)   ((dword).u32[0] == ~((__force __le32) 0))
 
#define EFX_OWORD_FIELD   EFX_OWORD_FIELD32
 
#define EFX_QWORD_FIELD   EFX_QWORD_FIELD32
 
#define EFX_OWORD_IS_ZERO   EFX_OWORD_IS_ZERO32
 
#define EFX_QWORD_IS_ZERO   EFX_QWORD_IS_ZERO32
 
#define EFX_OWORD_IS_ALL_ONES   EFX_OWORD_IS_ALL_ONES32
 
#define EFX_QWORD_IS_ALL_ONES   EFX_QWORD_IS_ALL_ONES32
 
#define EFX_INSERT_NATIVE64(min, max, low, high, value)
 
#define EFX_INSERT_NATIVE32(min, max, low, high, value)
 
#define EFX_INSERT_NATIVE(min, max, low, high, value)
 
#define EFX_INSERT_FIELD_NATIVE(min, max, field, value)
 
#define EFX_INSERT_FIELDS_NATIVE(min, max,field1, value1,field2, value2,field3, value3,field4, value4,field5, value5,field6, value6,field7, value7,field8, value8,field9, value9,field10, value10)
 
#define EFX_INSERT_FIELDS64(...)   cpu_to_le64(EFX_INSERT_FIELDS_NATIVE(__VA_ARGS__))
 
#define EFX_INSERT_FIELDS32(...)   cpu_to_le32(EFX_INSERT_FIELDS_NATIVE(__VA_ARGS__))
 
#define EFX_POPULATE_OWORD64(oword,...)
 
#define EFX_POPULATE_QWORD64(qword,...)
 
#define EFX_POPULATE_OWORD32(oword,...)
 
#define EFX_POPULATE_QWORD32(qword,...)
 
#define EFX_POPULATE_DWORD(dword,...)
 
#define EFX_POPULATE_OWORD   EFX_POPULATE_OWORD32
 
#define EFX_POPULATE_QWORD   EFX_POPULATE_QWORD32
 
#define EFX_POPULATE_OWORD_10   EFX_POPULATE_OWORD
 
#define EFX_POPULATE_OWORD_9(oword,...)   EFX_POPULATE_OWORD_10(oword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)
 
#define EFX_POPULATE_OWORD_8(oword,...)   EFX_POPULATE_OWORD_9(oword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)
 
#define EFX_POPULATE_OWORD_7(oword,...)   EFX_POPULATE_OWORD_8(oword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)
 
#define EFX_POPULATE_OWORD_6(oword,...)   EFX_POPULATE_OWORD_7(oword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)
 
#define EFX_POPULATE_OWORD_5(oword,...)   EFX_POPULATE_OWORD_6(oword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)
 
#define EFX_POPULATE_OWORD_4(oword,...)   EFX_POPULATE_OWORD_5(oword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)
 
#define EFX_POPULATE_OWORD_3(oword,...)   EFX_POPULATE_OWORD_4(oword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)
 
#define EFX_POPULATE_OWORD_2(oword,...)   EFX_POPULATE_OWORD_3(oword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)
 
#define EFX_POPULATE_OWORD_1(oword,...)   EFX_POPULATE_OWORD_2(oword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)
 
#define EFX_ZERO_OWORD(oword)   EFX_POPULATE_OWORD_1(oword, EFX_DUMMY_FIELD, 0)
 
#define EFX_SET_OWORD(oword)
 
#define EFX_POPULATE_QWORD_10   EFX_POPULATE_QWORD
 
#define EFX_POPULATE_QWORD_9(qword,...)   EFX_POPULATE_QWORD_10(qword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)
 
#define EFX_POPULATE_QWORD_8(qword,...)   EFX_POPULATE_QWORD_9(qword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)
 
#define EFX_POPULATE_QWORD_7(qword,...)   EFX_POPULATE_QWORD_8(qword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)
 
#define EFX_POPULATE_QWORD_6(qword,...)   EFX_POPULATE_QWORD_7(qword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)
 
#define EFX_POPULATE_QWORD_5(qword,...)   EFX_POPULATE_QWORD_6(qword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)
 
#define EFX_POPULATE_QWORD_4(qword,...)   EFX_POPULATE_QWORD_5(qword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)
 
#define EFX_POPULATE_QWORD_3(qword,...)   EFX_POPULATE_QWORD_4(qword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)
 
#define EFX_POPULATE_QWORD_2(qword,...)   EFX_POPULATE_QWORD_3(qword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)
 
#define EFX_POPULATE_QWORD_1(qword,...)   EFX_POPULATE_QWORD_2(qword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)
 
#define EFX_ZERO_QWORD(qword)   EFX_POPULATE_QWORD_1(qword, EFX_DUMMY_FIELD, 0)
 
#define EFX_SET_QWORD(qword)
 
#define EFX_POPULATE_DWORD_10   EFX_POPULATE_DWORD
 
#define EFX_POPULATE_DWORD_9(dword,...)   EFX_POPULATE_DWORD_10(dword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)
 
#define EFX_POPULATE_DWORD_8(dword,...)   EFX_POPULATE_DWORD_9(dword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)
 
#define EFX_POPULATE_DWORD_7(dword,...)   EFX_POPULATE_DWORD_8(dword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)
 
#define EFX_POPULATE_DWORD_6(dword,...)   EFX_POPULATE_DWORD_7(dword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)
 
#define EFX_POPULATE_DWORD_5(dword,...)   EFX_POPULATE_DWORD_6(dword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)
 
#define EFX_POPULATE_DWORD_4(dword,...)   EFX_POPULATE_DWORD_5(dword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)
 
#define EFX_POPULATE_DWORD_3(dword,...)   EFX_POPULATE_DWORD_4(dword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)
 
#define EFX_POPULATE_DWORD_2(dword,...)   EFX_POPULATE_DWORD_3(dword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)
 
#define EFX_POPULATE_DWORD_1(dword,...)   EFX_POPULATE_DWORD_2(dword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)
 
#define EFX_ZERO_DWORD(dword)   EFX_POPULATE_DWORD_1(dword, EFX_DUMMY_FIELD, 0)
 
#define EFX_SET_DWORD(dword)   EFX_POPULATE_DWORD_1(dword, EFX_DWORD_0, 0xffffffff)
 
#define EFX_INVERT_OWORD(oword)
 
#define EFX_AND_OWORD(oword, from, mask)
 
#define EFX_OR_OWORD(oword, from, mask)
 
#define EFX_INSERT64(min, max, low, high, value)   cpu_to_le64(EFX_INSERT_NATIVE(min, max, low, high, value))
 
#define EFX_INSERT32(min, max, low, high, value)   cpu_to_le32(EFX_INSERT_NATIVE(min, max, low, high, value))
 
#define EFX_INPLACE_MASK64(min, max, low, high)   EFX_INSERT64(min, max, low, high, EFX_MASK64((high) + 1 - (low)))
 
#define EFX_INPLACE_MASK32(min, max, low, high)   EFX_INSERT32(min, max, low, high, EFX_MASK32((high) + 1 - (low)))
 
#define EFX_SET_OWORD64(oword, low, high, value)
 
#define EFX_SET_QWORD64(qword, low, high, value)
 
#define EFX_SET_OWORD32(oword, low, high, value)
 
#define EFX_SET_QWORD32(qword, low, high, value)
 
#define EFX_SET_DWORD32(dword, low, high, value)
 
#define EFX_SET_OWORD_FIELD64(oword, field, value)
 
#define EFX_SET_QWORD_FIELD64(qword, field, value)
 
#define EFX_SET_OWORD_FIELD32(oword, field, value)
 
#define EFX_SET_QWORD_FIELD32(qword, field, value)
 
#define EFX_SET_DWORD_FIELD(dword, field, value)
 
#define EFX_SET_OWORD_FIELD   EFX_SET_OWORD_FIELD32
 
#define EFX_SET_QWORD_FIELD   EFX_SET_QWORD_FIELD32
 
#define DMA_ADDR_T_WIDTH   (8 * sizeof(dma_addr_t))
 
#define EFX_DMA_TYPE_WIDTH(width)   (((width) < DMA_ADDR_T_WIDTH) ? (width) : DMA_ADDR_T_WIDTH)
 
#define EFX_OWORD32(a, b, c, d)
 

Typedefs

typedef union efx_dword efx_dword_t
 
typedef union efx_qword efx_qword_t
 
typedef union efx_oword efx_oword_t
 

Macro Definition Documentation

#define DMA_ADDR_T_WIDTH   (8 * sizeof(dma_addr_t))

Definition at line 528 of file bitfield.h.

#define EFX_AND_OWORD (   oword,
  from,
  mask 
)
Value:
do { \
(oword).u64[0] = (from).u64[0] & (mask).u64[0]; \
(oword).u64[1] = (from).u64[1] & (mask).u64[1]; \
} while (0)

Definition at line 426 of file bitfield.h.

#define EFX_DMA_TYPE_WIDTH (   width)    (((width) < DMA_ADDR_T_WIDTH) ? (width) : DMA_ADDR_T_WIDTH)

Definition at line 529 of file bitfield.h.

#define EFX_DUMMY_FIELD_LBN   0

Definition at line 30 of file bitfield.h.

#define EFX_DUMMY_FIELD_WIDTH   0

Definition at line 31 of file bitfield.h.

#define EFX_DWORD_0_LBN   0

Definition at line 32 of file bitfield.h.

#define EFX_DWORD_0_WIDTH   32

Definition at line 33 of file bitfield.h.

#define EFX_DWORD_1_LBN   32

Definition at line 34 of file bitfield.h.

#define EFX_DWORD_1_WIDTH   32

Definition at line 35 of file bitfield.h.

#define EFX_DWORD_2_LBN   64

Definition at line 36 of file bitfield.h.

#define EFX_DWORD_2_WIDTH   32

Definition at line 37 of file bitfield.h.

#define EFX_DWORD_3_LBN   96

Definition at line 38 of file bitfield.h.

#define EFX_DWORD_3_WIDTH   32

Definition at line 39 of file bitfield.h.

#define EFX_DWORD_FIELD (   dword,
  field 
)
Value:

Definition at line 183 of file bitfield.h.

#define EFX_DWORD_FMT   "%08x"

Definition at line 93 of file bitfield.h.

#define EFX_DWORD_IS_ALL_ONES (   dword)    ((dword).u32[0] == ~((__force __le32) 0))

Definition at line 216 of file bitfield.h.

#define EFX_DWORD_IS_ZERO (   dword)    (((dword).u32[0]) == (__force __le32) 0)

Definition at line 200 of file bitfield.h.

#define EFX_DWORD_VAL (   dword)    ((unsigned int) le32_to_cpu((dword).u32[0]))

Definition at line 96 of file bitfield.h.

#define EFX_EXTRACT32 (   element,
  min,
  max,
  low,
  high 
)    EFX_EXTRACT_NATIVE(le32_to_cpu(element), min, max, low, high)

Definition at line 139 of file bitfield.h.

#define EFX_EXTRACT64 (   element,
  min,
  max,
  low,
  high 
)    EFX_EXTRACT_NATIVE(le64_to_cpu(element), min, max, low, high)

Definition at line 132 of file bitfield.h.

#define EFX_EXTRACT_DWORD (   dword,
  low,
  high 
)
Value:
(EFX_EXTRACT32((dword).u32[0], 0, 31, low, high) & \
EFX_MASK32((high) + 1 - (low)))

Definition at line 163 of file bitfield.h.

#define EFX_EXTRACT_NATIVE (   native_element,
  min,
  max,
  low,
  high 
)
Value:
((low) > (max) || (high) < (min) ? 0 : \
(low) > (min) ? \
(native_element) >> ((low) - (min)) : \
(native_element) << ((min) - (low)))

Definition at line 122 of file bitfield.h.

#define EFX_EXTRACT_OWORD32 (   oword,
  low,
  high 
)
Value:
((EFX_EXTRACT32((oword).u32[0], 0, 31, low, high) | \
EFX_EXTRACT32((oword).u32[1], 32, 63, low, high) | \
EFX_EXTRACT32((oword).u32[2], 64, 95, low, high) | \
EFX_EXTRACT32((oword).u32[3], 96, 127, low, high)) & \
EFX_MASK32((high) + 1 - (low)))

Definition at line 151 of file bitfield.h.

#define EFX_EXTRACT_OWORD64 (   oword,
  low,
  high 
)
Value:
((EFX_EXTRACT64((oword).u64[0], 0, 63, low, high) | \
EFX_EXTRACT64((oword).u64[1], 64, 127, low, high)) & \
EFX_MASK64((high) + 1 - (low)))

Definition at line 142 of file bitfield.h.

#define EFX_EXTRACT_QWORD32 (   qword,
  low,
  high 
)
Value:
((EFX_EXTRACT32((qword).u32[0], 0, 31, low, high) | \
EFX_EXTRACT32((qword).u32[1], 32, 63, low, high)) & \
EFX_MASK32((high) + 1 - (low)))

Definition at line 158 of file bitfield.h.

#define EFX_EXTRACT_QWORD64 (   qword,
  low,
  high 
)
Value:
(EFX_EXTRACT64((qword).u64[0], 0, 63, low, high) & \
EFX_MASK64((high) + 1 - (low)))

Definition at line 147 of file bitfield.h.

#define EFX_HIGH_BIT (   field)    (EFX_LOW_BIT(field) + EFX_WIDTH(field) - 1)

Definition at line 50 of file bitfield.h.

#define EFX_INPLACE_MASK32 (   min,
  max,
  low,
  high 
)    EFX_INSERT32(min, max, low, high, EFX_MASK32((high) + 1 - (low)))

Definition at line 447 of file bitfield.h.

#define EFX_INPLACE_MASK64 (   min,
  max,
  low,
  high 
)    EFX_INSERT64(min, max, low, high, EFX_MASK64((high) + 1 - (low)))

Definition at line 444 of file bitfield.h.

#define EFX_INSERT32 (   min,
  max,
  low,
  high,
  value 
)    cpu_to_le32(EFX_INSERT_NATIVE(min, max, low, high, value))

Definition at line 441 of file bitfield.h.

#define EFX_INSERT64 (   min,
  max,
  low,
  high,
  value 
)    cpu_to_le64(EFX_INSERT_NATIVE(min, max, low, high, value))

Definition at line 438 of file bitfield.h.

#define EFX_INSERT_FIELD_NATIVE (   min,
  max,
  field,
  value 
)
Value:

Definition at line 264 of file bitfield.h.

#define EFX_INSERT_FIELDS32 (   ...)    cpu_to_le32(EFX_INSERT_FIELDS_NATIVE(__VA_ARGS__))

Definition at line 299 of file bitfield.h.

#define EFX_INSERT_FIELDS64 (   ...)    cpu_to_le64(EFX_INSERT_FIELDS_NATIVE(__VA_ARGS__))

Definition at line 296 of file bitfield.h.

#define EFX_INSERT_FIELDS_NATIVE (   min,
  max,
  field1,
  value1,
  field2,
  value2,
  field3,
  value3,
  field4,
  value4,
  field5,
  value5,
  field6,
  value6,
  field7,
  value7,
  field8,
  value8,
  field9,
  value9,
  field10,
  value10 
)
Value:
(EFX_INSERT_FIELD_NATIVE((min), (max), field1, (value1)) | \
EFX_INSERT_FIELD_NATIVE((min), (max), field2, (value2)) | \
EFX_INSERT_FIELD_NATIVE((min), (max), field3, (value3)) | \
EFX_INSERT_FIELD_NATIVE((min), (max), field4, (value4)) | \
EFX_INSERT_FIELD_NATIVE((min), (max), field5, (value5)) | \
EFX_INSERT_FIELD_NATIVE((min), (max), field6, (value6)) | \
EFX_INSERT_FIELD_NATIVE((min), (max), field7, (value7)) | \
EFX_INSERT_FIELD_NATIVE((min), (max), field8, (value8)) | \
EFX_INSERT_FIELD_NATIVE((min), (max), field9, (value9)) | \
EFX_INSERT_FIELD_NATIVE((min), (max), field10, (value10)))

Definition at line 274 of file bitfield.h.

#define EFX_INSERT_NATIVE (   min,
  max,
  low,
  high,
  value 
)
Value:
((((max - min) >= 32) || ((high - low) >= 32)) ? \
EFX_INSERT_NATIVE32(min, max, low, high, value))

Definition at line 253 of file bitfield.h.

#define EFX_INSERT_NATIVE32 (   min,
  max,
  low,
  high,
  value 
)
Value:
(((low > max) || (high < min)) ? 0 : \
((low > min) ? \
(((u32) (value)) << (low - min)) : \
(((u32) (value)) >> (min - low))))

Definition at line 247 of file bitfield.h.

#define EFX_INSERT_NATIVE64 (   min,
  max,
  low,
  high,
  value 
)
Value:
(((low > max) || (high < min)) ? 0 : \
((low > min) ? \
(((u64) (value)) << (low - min)) : \
(((u64) (value)) >> (min - low))))

Definition at line 241 of file bitfield.h.

#define EFX_INVERT_OWORD (   oword)
Value:
do { \
(oword).u64[0] = ~((oword).u64[0]); \
(oword).u64[1] = ~((oword).u64[1]); \
} while (0)

Definition at line 421 of file bitfield.h.

#define EFX_LOW_BIT (   field)    EFX_VAL(field, LBN)

Definition at line 46 of file bitfield.h.

#define EFX_MASK32 (   width)
Value:
((width) == 32 ? ~((u32) 0) : \
(((((u32) 1) << (width))) - 1))

Definition at line 68 of file bitfield.h.

#define EFX_MASK64 (   width)
Value:
((width) == 64 ? ~((u64) 0) : \
(((((u64) 1) << (width))) - 1))

Definition at line 57 of file bitfield.h.

#define EFX_OR_OWORD (   oword,
  from,
  mask 
)
Value:
do { \
(oword).u64[0] = (from).u64[0] | (mask).u64[0]; \
(oword).u64[1] = (from).u64[1] | (mask).u64[1]; \
} while (0)

Definition at line 432 of file bitfield.h.

#define EFX_OWORD32 (   a,
  b,
  c,
  d 
)
Value:
{ .u32 = { cpu_to_le32(a), cpu_to_le32(b), \
cpu_to_le32(c), cpu_to_le32(d) } }

Definition at line 534 of file bitfield.h.

#define EFX_OWORD_FIELD   EFX_OWORD_FIELD32

Definition at line 227 of file bitfield.h.

#define EFX_OWORD_FIELD32 (   oword,
  field 
)
Value:

Definition at line 175 of file bitfield.h.

#define EFX_OWORD_FIELD64 (   oword,
  field 
)
Value:

Definition at line 167 of file bitfield.h.

#define EFX_OWORD_FMT   "%08x:%08x:%08x:%08x"

Definition at line 95 of file bitfield.h.

#define EFX_OWORD_IS_ALL_ONES   EFX_OWORD_IS_ALL_ONES32

Definition at line 231 of file bitfield.h.

#define EFX_OWORD_IS_ALL_ONES32 (   oword)
Value:
(((oword).u32[0] & (oword).u32[1] & (oword).u32[2] & (oword).u32[3]) \
== ~((__force __le32) 0))

Definition at line 209 of file bitfield.h.

#define EFX_OWORD_IS_ALL_ONES64 (   oword)    (((oword).u64[0] & (oword).u64[1]) == ~((__force __le64) 0))

Definition at line 203 of file bitfield.h.

#define EFX_OWORD_IS_ZERO   EFX_OWORD_IS_ZERO32

Definition at line 229 of file bitfield.h.

#define EFX_OWORD_IS_ZERO32 (   oword)
Value:
(((oword).u32[0] | (oword).u32[1] | (oword).u32[2] | (oword).u32[3]) \
== (__force __le32) 0)

Definition at line 193 of file bitfield.h.

#define EFX_OWORD_IS_ZERO64 (   oword)    (((oword).u64[0] | (oword).u64[1]) == (__force __le64) 0)

Definition at line 187 of file bitfield.h.

#define EFX_OWORD_VAL (   oword)
Value:
((unsigned int) le32_to_cpu((oword).u32[3])), \
((unsigned int) le32_to_cpu((oword).u32[2])), \
((unsigned int) le32_to_cpu((oword).u32[1])), \
((unsigned int) le32_to_cpu((oword).u32[0]))

Definition at line 101 of file bitfield.h.

#define EFX_POPULATE_DWORD (   dword,
  ... 
)
Value:
do { \
(dword).u32[0] = EFX_INSERT_FIELDS32(0, 31, __VA_ARGS__); \
} while (0)

Definition at line 323 of file bitfield.h.

#define EFX_POPULATE_DWORD_1 (   dword,
  ... 
)    EFX_POPULATE_DWORD_2(dword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)

Definition at line 409 of file bitfield.h.

#define EFX_POPULATE_DWORD_10   EFX_POPULATE_DWORD

Definition at line 392 of file bitfield.h.

#define EFX_POPULATE_DWORD_2 (   dword,
  ... 
)    EFX_POPULATE_DWORD_3(dword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)

Definition at line 407 of file bitfield.h.

#define EFX_POPULATE_DWORD_3 (   dword,
  ... 
)    EFX_POPULATE_DWORD_4(dword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)

Definition at line 405 of file bitfield.h.

#define EFX_POPULATE_DWORD_4 (   dword,
  ... 
)    EFX_POPULATE_DWORD_5(dword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)

Definition at line 403 of file bitfield.h.

#define EFX_POPULATE_DWORD_5 (   dword,
  ... 
)    EFX_POPULATE_DWORD_6(dword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)

Definition at line 401 of file bitfield.h.

#define EFX_POPULATE_DWORD_6 (   dword,
  ... 
)    EFX_POPULATE_DWORD_7(dword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)

Definition at line 399 of file bitfield.h.

#define EFX_POPULATE_DWORD_7 (   dword,
  ... 
)    EFX_POPULATE_DWORD_8(dword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)

Definition at line 397 of file bitfield.h.

#define EFX_POPULATE_DWORD_8 (   dword,
  ... 
)    EFX_POPULATE_DWORD_9(dword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)

Definition at line 395 of file bitfield.h.

#define EFX_POPULATE_DWORD_9 (   dword,
  ... 
)    EFX_POPULATE_DWORD_10(dword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)

Definition at line 393 of file bitfield.h.

#define EFX_POPULATE_OWORD   EFX_POPULATE_OWORD32

Definition at line 331 of file bitfield.h.

#define EFX_POPULATE_OWORD32 (   oword,
  ... 
)
Value:
do { \
(oword).u32[0] = EFX_INSERT_FIELDS32(0, 31, __VA_ARGS__); \
(oword).u32[1] = EFX_INSERT_FIELDS32(32, 63, __VA_ARGS__); \
(oword).u32[2] = EFX_INSERT_FIELDS32(64, 95, __VA_ARGS__); \
(oword).u32[3] = EFX_INSERT_FIELDS32(96, 127, __VA_ARGS__); \
} while (0)

Definition at line 311 of file bitfield.h.

#define EFX_POPULATE_OWORD64 (   oword,
  ... 
)
Value:
do { \
(oword).u64[0] = EFX_INSERT_FIELDS64(0, 63, __VA_ARGS__); \
(oword).u64[1] = EFX_INSERT_FIELDS64(64, 127, __VA_ARGS__); \
} while (0)

Definition at line 302 of file bitfield.h.

#define EFX_POPULATE_OWORD_1 (   oword,
  ... 
)    EFX_POPULATE_OWORD_2(oword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)

Definition at line 353 of file bitfield.h.

#define EFX_POPULATE_OWORD_10   EFX_POPULATE_OWORD

Definition at line 336 of file bitfield.h.

#define EFX_POPULATE_OWORD_2 (   oword,
  ... 
)    EFX_POPULATE_OWORD_3(oword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)

Definition at line 351 of file bitfield.h.

#define EFX_POPULATE_OWORD_3 (   oword,
  ... 
)    EFX_POPULATE_OWORD_4(oword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)

Definition at line 349 of file bitfield.h.

#define EFX_POPULATE_OWORD_4 (   oword,
  ... 
)    EFX_POPULATE_OWORD_5(oword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)

Definition at line 347 of file bitfield.h.

#define EFX_POPULATE_OWORD_5 (   oword,
  ... 
)    EFX_POPULATE_OWORD_6(oword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)

Definition at line 345 of file bitfield.h.

#define EFX_POPULATE_OWORD_6 (   oword,
  ... 
)    EFX_POPULATE_OWORD_7(oword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)

Definition at line 343 of file bitfield.h.

#define EFX_POPULATE_OWORD_7 (   oword,
  ... 
)    EFX_POPULATE_OWORD_8(oword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)

Definition at line 341 of file bitfield.h.

#define EFX_POPULATE_OWORD_8 (   oword,
  ... 
)    EFX_POPULATE_OWORD_9(oword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)

Definition at line 339 of file bitfield.h.

#define EFX_POPULATE_OWORD_9 (   oword,
  ... 
)    EFX_POPULATE_OWORD_10(oword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)

Definition at line 337 of file bitfield.h.

#define EFX_POPULATE_QWORD   EFX_POPULATE_QWORD32

Definition at line 332 of file bitfield.h.

#define EFX_POPULATE_QWORD32 (   qword,
  ... 
)
Value:
do { \
(qword).u32[0] = EFX_INSERT_FIELDS32(0, 31, __VA_ARGS__); \
(qword).u32[1] = EFX_INSERT_FIELDS32(32, 63, __VA_ARGS__); \
} while (0)

Definition at line 318 of file bitfield.h.

#define EFX_POPULATE_QWORD64 (   qword,
  ... 
)
Value:
do { \
(qword).u64[0] = EFX_INSERT_FIELDS64(0, 63, __VA_ARGS__); \
} while (0)

Definition at line 307 of file bitfield.h.

#define EFX_POPULATE_QWORD_1 (   qword,
  ... 
)    EFX_POPULATE_QWORD_2(qword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)

Definition at line 382 of file bitfield.h.

#define EFX_POPULATE_QWORD_10   EFX_POPULATE_QWORD

Definition at line 365 of file bitfield.h.

#define EFX_POPULATE_QWORD_2 (   qword,
  ... 
)    EFX_POPULATE_QWORD_3(qword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)

Definition at line 380 of file bitfield.h.

#define EFX_POPULATE_QWORD_3 (   qword,
  ... 
)    EFX_POPULATE_QWORD_4(qword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)

Definition at line 378 of file bitfield.h.

#define EFX_POPULATE_QWORD_4 (   qword,
  ... 
)    EFX_POPULATE_QWORD_5(qword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)

Definition at line 376 of file bitfield.h.

#define EFX_POPULATE_QWORD_5 (   qword,
  ... 
)    EFX_POPULATE_QWORD_6(qword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)

Definition at line 374 of file bitfield.h.

#define EFX_POPULATE_QWORD_6 (   qword,
  ... 
)    EFX_POPULATE_QWORD_7(qword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)

Definition at line 372 of file bitfield.h.

#define EFX_POPULATE_QWORD_7 (   qword,
  ... 
)    EFX_POPULATE_QWORD_8(qword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)

Definition at line 370 of file bitfield.h.

#define EFX_POPULATE_QWORD_8 (   qword,
  ... 
)    EFX_POPULATE_QWORD_9(qword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)

Definition at line 368 of file bitfield.h.

#define EFX_POPULATE_QWORD_9 (   qword,
  ... 
)    EFX_POPULATE_QWORD_10(qword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)

Definition at line 366 of file bitfield.h.

#define EFX_QWORD_0_LBN   0

Definition at line 40 of file bitfield.h.

#define EFX_QWORD_0_WIDTH   64

Definition at line 41 of file bitfield.h.

#define EFX_QWORD_FIELD   EFX_QWORD_FIELD32

Definition at line 228 of file bitfield.h.

#define EFX_QWORD_FIELD32 (   qword,
  field 
)
Value:

Definition at line 179 of file bitfield.h.

#define EFX_QWORD_FIELD64 (   qword,
  field 
)
Value:

Definition at line 171 of file bitfield.h.

#define EFX_QWORD_FMT   "%08x:%08x"

Definition at line 94 of file bitfield.h.

#define EFX_QWORD_IS_ALL_ONES   EFX_QWORD_IS_ALL_ONES32

Definition at line 232 of file bitfield.h.

#define EFX_QWORD_IS_ALL_ONES32 (   qword)    (((qword).u32[0] & (qword).u32[1]) == ~((__force __le32) 0))

Definition at line 213 of file bitfield.h.

#define EFX_QWORD_IS_ALL_ONES64 (   qword)    ((qword).u64[0] == ~((__force __le64) 0))

Definition at line 206 of file bitfield.h.

#define EFX_QWORD_IS_ZERO   EFX_QWORD_IS_ZERO32

Definition at line 230 of file bitfield.h.

#define EFX_QWORD_IS_ZERO32 (   qword)    (((qword).u32[0] | (qword).u32[1]) == (__force __le32) 0)

Definition at line 197 of file bitfield.h.

#define EFX_QWORD_IS_ZERO64 (   qword)    (((qword).u64[0]) == (__force __le64) 0)

Definition at line 190 of file bitfield.h.

#define EFX_QWORD_VAL (   qword)
Value:
((unsigned int) le32_to_cpu((qword).u32[1])), \
((unsigned int) le32_to_cpu((qword).u32[0]))

Definition at line 98 of file bitfield.h.

#define EFX_SET_DWORD (   dword)    EFX_POPULATE_DWORD_1(dword, EFX_DWORD_0, 0xffffffff)

Definition at line 413 of file bitfield.h.

#define EFX_SET_DWORD32 (   dword,
  low,
  high,
  value 
)
Value:
do { \
(dword).u32[0] = (((dword).u32[0] \
& ~EFX_INPLACE_MASK32(0, 31, low, high)) \
| EFX_INSERT32(0, 31, low, high, value)); \
} while (0)

Definition at line 489 of file bitfield.h.

#define EFX_SET_DWORD_FIELD (   dword,
  field,
  value 
)
Value:

Definition at line 511 of file bitfield.h.

#define EFX_SET_OWORD (   oword)
Value:
EFX_DWORD_0, 0xffffffff, \
EFX_DWORD_1, 0xffffffff, \
EFX_DWORD_2, 0xffffffff, \
EFX_DWORD_3, 0xffffffff)

Definition at line 357 of file bitfield.h.

#define EFX_SET_OWORD32 (   oword,
  low,
  high,
  value 
)
Value:
do { \
(oword).u32[0] = (((oword).u32[0] \
& ~EFX_INPLACE_MASK32(0, 31, low, high)) \
| EFX_INSERT32(0, 31, low, high, value)); \
(oword).u32[1] = (((oword).u32[1] \
& ~EFX_INPLACE_MASK32(32, 63, low, high)) \
| EFX_INSERT32(32, 63, low, high, value)); \
(oword).u32[2] = (((oword).u32[2] \
& ~EFX_INPLACE_MASK32(64, 95, low, high)) \
| EFX_INSERT32(64, 95, low, high, value)); \
(oword).u32[3] = (((oword).u32[3] \
& ~EFX_INPLACE_MASK32(96, 127, low, high)) \
| EFX_INSERT32(96, 127, low, high, value)); \
} while (0)

Definition at line 465 of file bitfield.h.

#define EFX_SET_OWORD64 (   oword,
  low,
  high,
  value 
)
Value:
do { \
(oword).u64[0] = (((oword).u64[0] \
& ~EFX_INPLACE_MASK64(0, 63, low, high)) \
| EFX_INSERT64(0, 63, low, high, value)); \
(oword).u64[1] = (((oword).u64[1] \
& ~EFX_INPLACE_MASK64(64, 127, low, high)) \
| EFX_INSERT64(64, 127, low, high, value)); \
} while (0)

Definition at line 450 of file bitfield.h.

#define EFX_SET_OWORD_FIELD   EFX_SET_OWORD_FIELD32

Definition at line 521 of file bitfield.h.

#define EFX_SET_OWORD_FIELD32 (   oword,
  field,
  value 
)
Value:

Definition at line 503 of file bitfield.h.

#define EFX_SET_OWORD_FIELD64 (   oword,
  field,
  value 
)
Value:

Definition at line 495 of file bitfield.h.

#define EFX_SET_QWORD (   qword)
Value:
EFX_DWORD_0, 0xffffffff, \
EFX_DWORD_1, 0xffffffff)

Definition at line 386 of file bitfield.h.

#define EFX_SET_QWORD32 (   qword,
  low,
  high,
  value 
)
Value:
do { \
(qword).u32[0] = (((qword).u32[0] \
& ~EFX_INPLACE_MASK32(0, 31, low, high)) \
| EFX_INSERT32(0, 31, low, high, value)); \
(qword).u32[1] = (((qword).u32[1] \
& ~EFX_INPLACE_MASK32(32, 63, low, high)) \
| EFX_INSERT32(32, 63, low, high, value)); \
} while (0)

Definition at line 480 of file bitfield.h.

#define EFX_SET_QWORD64 (   qword,
  low,
  high,
  value 
)
Value:
do { \
(qword).u64[0] = (((qword).u64[0] \
& ~EFX_INPLACE_MASK64(0, 63, low, high)) \
| EFX_INSERT64(0, 63, low, high, value)); \
} while (0)

Definition at line 459 of file bitfield.h.

#define EFX_SET_QWORD_FIELD   EFX_SET_QWORD_FIELD32

Definition at line 522 of file bitfield.h.

#define EFX_SET_QWORD_FIELD32 (   qword,
  field,
  value 
)
Value:

Definition at line 507 of file bitfield.h.

#define EFX_SET_QWORD_FIELD64 (   qword,
  field,
  value 
)
Value:

Definition at line 499 of file bitfield.h.

#define EFX_VAL (   field,
  attribute 
)    field ## _ ## attribute

Definition at line 44 of file bitfield.h.

#define EFX_WIDTH (   field)    EFX_VAL(field, WIDTH)

Definition at line 48 of file bitfield.h.

#define EFX_ZERO_DWORD (   dword)    EFX_POPULATE_DWORD_1(dword, EFX_DUMMY_FIELD, 0)

Definition at line 411 of file bitfield.h.

#define EFX_ZERO_OWORD (   oword)    EFX_POPULATE_OWORD_1(oword, EFX_DUMMY_FIELD, 0)

Definition at line 355 of file bitfield.h.

#define EFX_ZERO_QWORD (   qword)    EFX_POPULATE_QWORD_1(qword, EFX_DUMMY_FIELD, 0)

Definition at line 384 of file bitfield.h.

Typedef Documentation

typedef union efx_dword efx_dword_t
typedef union efx_oword efx_oword_t
typedef union efx_qword efx_qword_t