1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */
3 * Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All rights reserved.
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) \
18 typeof(ptr) _ptr = ptr; \
19 *_ptr = (*_ptr & ~(mask##_MASK)) | \
20 FIELD_PREP(mask##_MASK, value); \
23 struct efa_common_mem_addr
{
29 #endif /* _EFA_COMMON_H_ */