Lines Matching +full:len +full:- +full:or +full:- +full:limit
1 /* SPDX-License-Identifier: GPL-2.0-only */
4 * The term "Broadcom" refers to Broadcom Limited and/or its subsidiaries.
7 * linux-drivers@broadcom.com
32 u16 len; member
40 static inline u32 MODULO(u16 val, u16 limit) in MODULO() argument
42 WARN_ON(limit & (limit - 1)); in MODULO()
43 return val & (limit - 1); in MODULO()
46 static inline void index_inc(u16 *index, u16 limit) in index_inc() argument
48 *index = MODULO((*index + 1), limit); in index_inc()
53 return q->dma_mem.va + q->head * q->entry_size; in queue_head_node()
58 return q->dma_mem.va + wrb_num * q->entry_size; in queue_get_wrb()
63 return q->dma_mem.va + q->tail * q->entry_size; in queue_tail_node()
68 index_inc(&q->head, q->len); in queue_head_inc()
73 index_inc(&q->tail, q->len); in queue_tail_inc()
144 #define MCC_Q_CMD_TAG_MASK ((MAX_MCC_CMD << 1) - 1)
151 ((u32)((((size_t)(_address) & (PAGE_SIZE_4K - 1)) + \
152 (size) + (PAGE_SIZE_4K - 1)) >> PAGE_SHIFT_4K))
156 (((size_t)&(((_struct *)0)->field))%32)
161 return (bitsize == 32 ? 0xFFFFFFFF : (1 << bitsize) - 1); in amap_mask()
175 amap_mask(sizeof(((_struct *)0)->field)), \
188 amap_mask(sizeof(((_struct *)0)->field)), \
191 #define be_dws_cpu_to_le(wrb, len) swap_dws(wrb, len) argument
192 #define be_dws_le_to_cpu(wrb, len) swap_dws(wrb, len) argument
193 static inline void swap_dws(void *wrb, int len) in swap_dws() argument
197 WARN_ON(len % 4); in swap_dws()
201 len -= 4; in swap_dws()
202 } while (len); in swap_dws()