Lines Matching refs:size
25 #define scif_rb_ring_cnt(head, tail, size) CIRC_CNT(head, tail, size) argument
26 #define scif_rb_ring_space(head, tail, size) CIRC_SPACE(head, tail, size) argument
37 void *rb_base, u8 size) in scif_rb_init() argument
40 rb->size = (1 << size); in scif_rb_init()
49 void *msg, u32 size) in memcpy_torb() argument
53 if (header + size >= rb->rb_base + rb->size) { in memcpy_torb()
55 size1 = (u32)(rb->rb_base + rb->size - header); in memcpy_torb()
56 size2 = size - size1; in memcpy_torb()
61 memcpy_toio((void __iomem __force *)header, msg, size); in memcpy_torb()
67 void *msg, u32 size) in memcpy_fromrb() argument
71 if (header + size >= rb->rb_base + rb->size) { in memcpy_fromrb()
73 size1 = (u32)(rb->rb_base + rb->size - header); in memcpy_fromrb()
74 size2 = size - size1; in memcpy_fromrb()
79 memcpy_fromio(msg, (void __iomem __force *)header, size); in memcpy_fromrb()
99 rb->current_read_offset, rb->size); in scif_rb_space()
111 int scif_rb_write(struct scif_rb *rb, void *msg, u32 size) in scif_rb_write() argument
115 if (scif_rb_space(rb) < size) in scif_rb_write()
118 memcpy_torb(rb, header, msg, size); in scif_rb_write()
124 (rb->current_write_offset + size) & (rb->size - 1); in scif_rb_write()
162 static void *scif_rb_get(struct scif_rb *rb, u32 size) in scif_rb_get() argument
166 if (scif_rb_count(rb, size) >= size) in scif_rb_get()
180 u32 scif_rb_get_next(struct scif_rb *rb, void *msg, u32 size) in scif_rb_get_next() argument
185 header = scif_rb_get(rb, size); in scif_rb_get_next()
188 (rb->current_read_offset + size) & (rb->size - 1); in scif_rb_get_next()
190 read_size = size; in scif_rb_get_next()
192 memcpy_fromrb(rb, header, msg, size); in scif_rb_get_next()
233 u32 scif_rb_count(struct scif_rb *rb, u32 size) in scif_rb_count() argument
237 rb->size) < size) { in scif_rb_count()
248 rb->size); in scif_rb_count()