Lines Matching refs:n_subbufs
171 buf->padding = kmalloc(chan->n_subbufs * sizeof(size_t *), GFP_KERNEL); in relay_create_buf()
257 return (ready >= buf->chan->n_subbufs) ? 1 : 0; in relay_buf_full()
366 for (i = 0; i < buf->chan->n_subbufs; i++) in __relay_reset()
568 size_t n_subbufs, in relay_open() argument
575 if (!(subbuf_size && n_subbufs)) in relay_open()
583 chan->n_subbufs = n_subbufs; in relay_open()
585 chan->alloc_size = FIX_SIZE(subbuf_size * n_subbufs); in relay_open()
726 old_subbuf = buf->subbufs_produced % buf->chan->n_subbufs; in relay_switch_subbuf()
748 new_subbuf = buf->subbufs_produced % buf->chan->n_subbufs; in relay_switch_subbuf()
792 subbufs_consumed > chan->n_subbufs) in relay_subbufs_consumed()
938 size_t n_subbufs = buf->chan->n_subbufs; in relay_file_read_consume() local
952 read_subbuf = buf->subbufs_consumed % n_subbufs; in relay_file_read_consume()
956 if ((read_subbuf == buf->subbufs_produced % n_subbufs) && in relay_file_read_consume()
970 size_t n_subbufs = buf->chan->n_subbufs; in relay_file_read_avail() local
984 if (unlikely(produced - consumed >= n_subbufs)) { in relay_file_read_avail()
985 consumed = produced - n_subbufs + 1; in relay_file_read_avail()
990 produced = (produced % n_subbufs) * subbuf_size + buf->offset; in relay_file_read_avail()
991 consumed = (consumed % n_subbufs) * subbuf_size + buf->bytes_consumed; in relay_file_read_avail()
994 produced += n_subbufs * subbuf_size; in relay_file_read_avail()
1047 size_t n_subbufs = buf->chan->n_subbufs; in relay_file_read_start_pos() local
1048 size_t consumed = buf->subbufs_consumed % n_subbufs; in relay_file_read_start_pos()
1057 read_subbuf = (read_subbuf + 1) % n_subbufs; in relay_file_read_start_pos()
1076 size_t n_subbufs = buf->chan->n_subbufs; in relay_file_read_end_pos() local
1084 if (end_pos >= subbuf_size * n_subbufs) in relay_file_read_end_pos()