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 * efx_dword_t) to be little-endian.
34 #define EFX_DWORD_0_WIDTH 32
35 #define EFX_DWORD_1_LBN 32
36 #define EFX_DWORD_1_WIDTH 32
38 #define EFX_DWORD_2_WIDTH 32
40 #define EFX_DWORD_3_WIDTH 32
51 #define EFX_HIGH_BIT(field) (EFX_LOW_BIT(field) + EFX_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 EFX_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 ((EFX_EXTRACT64((oword).u64[0], 0, 63, low, high) | \
146 EFX_MASK64((high) + 1 - (low)))
149 (EFX_EXTRACT64((qword).u64[0], 0, 63, low, high) & \
150 EFX_MASK64((high) + 1 - (low)))
154 EFX_EXTRACT32((oword).u32[1], 32, 63, low, high) | \
157 EFX_MASK32((high) + 1 - (low)))
161 EFX_EXTRACT32((qword).u32[1], 32, 63, low, high)) & \
162 EFX_MASK32((high) + 1 - (low)))
166 EFX_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)) ? \
322 (oword).u64[0] = EFX_INSERT_FIELDS64(0, 63, __VA_ARGS__); \
327 (qword).u64[0] = EFX_INSERT_FIELDS64(0, 63, __VA_ARGS__); \
332 (oword).u32[1] = EFX_INSERT_FIELDS32(32, 63, __VA_ARGS__); \
339 (qword).u32[1] = EFX_INSERT_FIELDS32(32, 63, __VA_ARGS__); \
490 * Modify a named field within an already-populated structure. Used
491 * for read-modify-write operations.
521 EFX_INSERT64(min, max, low, high, EFX_MASK64((high) + 1 - (low)))
524 EFX_INSERT32(min, max, low, high, EFX_MASK32((high) + 1 - (low)))
528 & ~EFX_INPLACE_MASK64(0, 63, low, high)) \
529 | EFX_INSERT64(0, 63, low, high, value)); \
537 & ~EFX_INPLACE_MASK64(0, 63, low, high)) \
538 | EFX_INSERT64(0, 63, low, high, value)); \
546 & ~EFX_INPLACE_MASK32(32, 63, low, high)) \
547 | EFX_INSERT32(32, 63, low, high, value)); \
561 & ~EFX_INPLACE_MASK32(32, 63, low, high)) \
562 | EFX_INSERT32(32, 63, low, high, value)); \
602 * of the data types when dma_addr_t is only 32 bits wide.