dm writecache: add cond_resched to loop in persistent_memory_claim()
[linux/fpc-iii.git] / drivers / infiniband / hw / efa / efa_common_defs.h
blob90af1c82c9c62794ef862384960fd0252417fd9b
1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */
2 /*
3 * Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All rights reserved.
4 */
6 #ifndef _EFA_COMMON_H_
7 #define _EFA_COMMON_H_
9 #include <linux/bitfield.h>
11 #define EFA_COMMON_SPEC_VERSION_MAJOR 2
12 #define EFA_COMMON_SPEC_VERSION_MINOR 0
14 #define EFA_GET(ptr, mask) FIELD_GET(mask##_MASK, *(ptr))
16 #define EFA_SET(ptr, mask, value) \
17 ({ \
18 typeof(ptr) _ptr = ptr; \
19 *_ptr = (*_ptr & ~(mask##_MASK)) | \
20 FIELD_PREP(mask##_MASK, value); \
23 struct efa_common_mem_addr {
24 u32 mem_addr_low;
26 u32 mem_addr_high;
29 #endif /* _EFA_COMMON_H_ */