Lines Matching +full:32 +full:- +full:63
1 /* SPDX-License-Identifier: GPL-2.0-only */
4 * Copyright 2005-2006 Fen Systems Ltd.
5 * Copyright 2006-2013 Solarflare Communications Inc.
15 * wide. Since there is no native 128-bit datatype on most systems,
16 * and since 64-bit datatypes are inefficient on 32-bit systems and
20 * The NICs are PCI devices and therefore little-endian. Since most
23 * ef4_dword_t) to be little-endian.
34 #define EF4_DWORD_0_WIDTH 32
35 #define EF4_DWORD_1_LBN 32
36 #define EF4_DWORD_1_WIDTH 32
38 #define EF4_DWORD_2_WIDTH 32
40 #define EF4_DWORD_3_WIDTH 32
51 #define EF4_HIGH_BIT(field) (EF4_LOW_BIT(field) + EF4_WIDTH(field) - 1)
60 (((((u64) 1) << (width))) - 1))
66 * The maximum width mask that can be generated is 32 bits. Use
70 ((width) == 32 ? ~((u32) 0) : \
71 (((((u32) 1) << (width))) - 1))
73 /* A doubleword (i.e. 4 byte) datatype - little-endian in HW */
78 /* A quadword (i.e. 8 byte) datatype - little-endian in HW */
85 /* An octword (eight-word, i.e. 16 byte) datatype - little-endian in HW */
109 * Extract bit field portion [low,high) from the native-endian element
112 * For example, suppose "element" represents the high 32 bits of a
113 * 64-bit value, and we wish to extract the bits belonging to the bit
114 * field occupying bits 28-45 of this 64-bit value.
116 * Then EF4_EXTRACT ( element, 32, 63, 28, 45 ) would give
121 * [0,high-low), with garbage in bits [high-low+1,...).
126 (native_element) >> ((low) - (min)) : \
127 (native_element) << ((min) - (low)))
130 * Extract bit field portion [low,high) from the 64-bit little-endian
137 * Extract bit field portion [low,high) from the 32-bit little-endian
144 ((EF4_EXTRACT64((oword).u64[0], 0, 63, low, high) | \
146 EF4_MASK64((high) + 1 - (low)))
149 (EF4_EXTRACT64((qword).u64[0], 0, 63, low, high) & \
150 EF4_MASK64((high) + 1 - (low)))
154 EF4_EXTRACT32((oword).u32[1], 32, 63, low, high) | \
157 EF4_MASK32((high) + 1 - (low)))
161 EF4_EXTRACT32((qword).u32[1], 32, 63, low, high)) & \
162 EF4_MASK32((high) + 1 - (low)))
166 EF4_MASK32((high) + 1 - (low)))
245 (((u64) (value)) << (low - min)) : \
246 (((u64) (value)) >> (min - low))))
251 (((u32) (value)) << (low - min)) : \
252 (((u32) (value)) >> (min - low))))
255 ((((max - min) >= 32) || ((high - low) >= 32)) ? \
304 (oword).u64[0] = EF4_INSERT_FIELDS64(0, 63, __VA_ARGS__); \
309 (qword).u64[0] = EF4_INSERT_FIELDS64(0, 63, __VA_ARGS__); \
314 (oword).u32[1] = EF4_INSERT_FIELDS32(32, 63, __VA_ARGS__); \
321 (qword).u32[1] = EF4_INSERT_FIELDS32(32, 63, __VA_ARGS__); \
418 * Modify a named field within an already-populated structure. Used
419 * for read-modify-write operations.
446 EF4_INSERT64(min, max, low, high, EF4_MASK64((high) + 1 - (low)))
449 EF4_INSERT32(min, max, low, high, EF4_MASK32((high) + 1 - (low)))
453 & ~EF4_INPLACE_MASK64(0, 63, low, high)) \
454 | EF4_INSERT64(0, 63, low, high, value)); \
462 & ~EF4_INPLACE_MASK64(0, 63, low, high)) \
463 | EF4_INSERT64(0, 63, low, high, value)); \
471 & ~EF4_INPLACE_MASK32(32, 63, low, high)) \
472 | EF4_INSERT32(32, 63, low, high, value)); \
486 & ~EF4_INPLACE_MASK32(32, 63, low, high)) \
487 | EF4_INSERT32(32, 63, low, high, value)); \
527 * of the data types when dma_addr_t is only 32 bits wide.