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.
36 #define EFX_DWORD_0_WIDTH 32
37 #define EFX_DWORD_1_LBN 32
38 #define EFX_DWORD_1_WIDTH 32
40 #define EFX_DWORD_2_WIDTH 32
42 #define EFX_DWORD_3_WIDTH 32
53 #define EFX_HIGH_BIT(field) (EFX_LOW_BIT(field) + EFX_WIDTH(field) - 1)
62 (((((u64) 1) << (width))) - 1))
68 * The maximum width mask that can be generated is 32 bits. Use
72 ((width) == 32 ? ~((u32) 0) : \
73 (((((u32) 1) << (width))) - 1))
75 /* A doubleword (i.e. 4 byte) datatype - little-endian in HW */
80 /* A quadword (i.e. 8 byte) datatype - little-endian in HW */
87 /* An octword (eight-word, i.e. 16 byte) datatype - little-endian in HW */
111 * Extract bit field portion [low,high) from the native-endian element
114 * For example, suppose "element" represents the high 32 bits of a
115 * 64-bit value, and we wish to extract the bits belonging to the bit
116 * field occupying bits 28-45 of this 64-bit value.
118 * Then EFX_EXTRACT ( element, 32, 63, 28, 45 ) would give
123 * [0,high-low), with garbage in bits [high-low+1,...).
128 (native_element) >> ((low) - (min)) : \
129 (native_element) << ((min) - (low)))
132 * Extract bit field portion [low,high) from the 64-bit little-endian
139 * Extract bit field portion [low,high) from the 32-bit little-endian
146 ((EFX_EXTRACT64((oword).u64[0], 0, 63, low, high) | \
148 EFX_MASK64((high) + 1 - (low)))
151 (EFX_EXTRACT64((qword).u64[0], 0, 63, low, high) & \
152 EFX_MASK64((high) + 1 - (low)))
156 EFX_EXTRACT32((oword).u32[1], 32, 63, low, high) | \
159 EFX_MASK32((high) + 1 - (low)))
163 EFX_EXTRACT32((qword).u32[1], 32, 63, low, high)) & \
164 EFX_MASK32((high) + 1 - (low)))
168 EFX_MASK32((high) + 1 - (low)))
247 (((u64) (value)) << (low - min)) : \
248 (((u64) (value)) >> (min - low))))
253 (((u32) (value)) << (low - min)) : \
254 (((u32) (value)) >> (min - low))))
257 ((((max - min) >= 32) || ((high - low) >= 32)) ? \
324 (oword).u64[0] = EFX_INSERT_FIELDS64(0, 63, __VA_ARGS__); \
329 (qword).u64[0] = EFX_INSERT_FIELDS64(0, 63, __VA_ARGS__); \
334 (oword).u32[1] = EFX_INSERT_FIELDS32(32, 63, __VA_ARGS__); \
341 (qword).u32[1] = EFX_INSERT_FIELDS32(32, 63, __VA_ARGS__); \
492 * Modify a named field within an already-populated structure. Used
493 * for read-modify-write operations.
523 EFX_INSERT64(min, max, low, high, EFX_MASK64((high) + 1 - (low)))
526 EFX_INSERT32(min, max, low, high, EFX_MASK32((high) + 1 - (low)))
530 & ~EFX_INPLACE_MASK64(0, 63, low, high)) \
531 | EFX_INSERT64(0, 63, low, high, value)); \
539 & ~EFX_INPLACE_MASK64(0, 63, low, high)) \
540 | EFX_INSERT64(0, 63, low, high, value)); \
548 & ~EFX_INPLACE_MASK32(32, 63, low, high)) \
549 | EFX_INSERT32(32, 63, low, high, value)); \
563 & ~EFX_INPLACE_MASK32(32, 63, low, high)) \
564 | EFX_INSERT32(32, 63, low, high, value)); \
604 * of the data types when dma_addr_t is only 32 bits wide.