brintos

brintos / linux-shallow public Read only

0
0
Text · 828 B · 90af1c8 Raw
30 lines · c
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 */5 6#ifndef _EFA_COMMON_H_7#define _EFA_COMMON_H_8 9#include <linux/bitfield.h>10 11#define EFA_COMMON_SPEC_VERSION_MAJOR        212#define EFA_COMMON_SPEC_VERSION_MINOR        013 14#define EFA_GET(ptr, mask) FIELD_GET(mask##_MASK, *(ptr))15 16#define EFA_SET(ptr, mask, value)                                              \17	({                                                                     \18		typeof(ptr) _ptr = ptr;                                        \19		*_ptr = (*_ptr & ~(mask##_MASK)) |                             \20			FIELD_PREP(mask##_MASK, value);                        \21	})22 23struct efa_common_mem_addr {24	u32 mem_addr_low;25 26	u32 mem_addr_high;27};28 29#endif /* _EFA_COMMON_H_ */30