Lines Matching refs:ptr
12 static inline u32 _iba_get8(const u8 *ptr) in _iba_get8() argument
14 return *ptr; in _iba_get8()
17 static inline void _iba_set8(u8 *ptr, u32 mask, u32 prep_value) in _iba_set8() argument
19 *ptr = (*ptr & ~mask) | prep_value; in _iba_set8()
22 static inline u16 _iba_get16(const __be16 *ptr) in _iba_get16() argument
24 return be16_to_cpu(*ptr); in _iba_get16()
27 static inline void _iba_set16(__be16 *ptr, u16 mask, u16 prep_value) in _iba_set16() argument
29 *ptr = cpu_to_be16((be16_to_cpu(*ptr) & ~mask) | prep_value); in _iba_set16()
32 static inline u32 _iba_get32(const __be32 *ptr) in _iba_get32() argument
34 return be32_to_cpu(*ptr); in _iba_get32()
37 static inline void _iba_set32(__be32 *ptr, u32 mask, u32 prep_value) in _iba_set32() argument
39 *ptr = cpu_to_be32((be32_to_cpu(*ptr) & ~mask) | prep_value); in _iba_set32()
42 static inline u64 _iba_get64(const __be64 *ptr) in _iba_get64() argument
48 return be64_to_cpu(get_unaligned(ptr)); in _iba_get64()
51 static inline void _iba_set64(__be64 *ptr, u64 mask, u64 prep_value) in _iba_set64() argument
53 put_unaligned(cpu_to_be64((_iba_get64(ptr) & ~mask) | prep_value), ptr); in _iba_set64()
56 #define _IBA_SET(field_struct, field_offset, field_mask, num_bits, ptr, value) \ argument
58 field_struct *_ptr = ptr; \
62 #define IBA_SET(field, ptr, value) _IBA_SET(field, ptr, value) argument
64 #define _IBA_GET_MEM_PTR(field_struct, field_offset, type, num_bits, ptr) \ argument
66 field_struct *_ptr = ptr; \
69 #define IBA_GET_MEM_PTR(field, ptr) _IBA_GET_MEM_PTR(field, ptr) argument
72 #define _IBA_SET_MEM(field_struct, field_offset, type, num_bits, ptr, in, \ argument
79 type, num_bits, ptr), \
82 #define IBA_SET_MEM(field, ptr, in, bytes) _IBA_SET_MEM(field, ptr, in, bytes) argument
84 #define _IBA_GET(field_struct, field_offset, field_mask, num_bits, ptr) \ argument
86 const field_struct *_ptr = ptr; \
91 #define IBA_GET(field, ptr) _IBA_GET(field, ptr) argument
93 #define _IBA_GET_MEM(field_struct, field_offset, type, num_bits, ptr, out, \ argument
101 type, num_bits, ptr), \
104 #define IBA_GET_MEM(field, ptr, out, bytes) _IBA_GET_MEM(field, ptr, out, bytes) argument