Lines Matching refs:st_bp
3958 static void clear_buffer(struct st_buffer * st_bp) in clear_buffer() argument
3962 for (i=0; i < st_bp->frp_segs; i++) in clear_buffer()
3963 memset(page_address(st_bp->reserved_pages[i]), 0, in clear_buffer()
3964 PAGE_SIZE << st_bp->reserved_page_order); in clear_buffer()
3965 st_bp->cleared = 1; in clear_buffer()
3987 static int append_to_buffer(const char __user *ubp, struct st_buffer * st_bp, int do_count) in append_to_buffer() argument
3990 int length = PAGE_SIZE << st_bp->reserved_page_order; in append_to_buffer()
3992 for (i = 0, offset = st_bp->buffer_bytes; in append_to_buffer()
3993 i < st_bp->frp_segs && offset >= length; i++) in append_to_buffer()
3995 if (i == st_bp->frp_segs) { /* Should never happen */ in append_to_buffer()
3999 for (; i < st_bp->frp_segs && do_count > 0; i++) { in append_to_buffer()
4000 struct page *page = st_bp->reserved_pages[i]; in append_to_buffer()
4006 st_bp->buffer_bytes += cnt; in append_to_buffer()
4019 static int from_buffer(struct st_buffer * st_bp, char __user *ubp, int do_count) in from_buffer() argument
4022 int length = PAGE_SIZE << st_bp->reserved_page_order; in from_buffer()
4024 for (i = 0, offset = st_bp->read_pointer; in from_buffer()
4025 i < st_bp->frp_segs && offset >= length; i++) in from_buffer()
4027 if (i == st_bp->frp_segs) { /* Should never happen */ in from_buffer()
4031 for (; i < st_bp->frp_segs && do_count > 0; i++) { in from_buffer()
4032 struct page *page = st_bp->reserved_pages[i]; in from_buffer()
4038 st_bp->buffer_bytes -= cnt; in from_buffer()
4039 st_bp->read_pointer += cnt; in from_buffer()
4051 static void move_buffer_data(struct st_buffer * st_bp, int offset) in move_buffer_data() argument
4055 int length = PAGE_SIZE << st_bp->reserved_page_order; in move_buffer_data()
4060 total=st_bp->buffer_bytes - offset; in move_buffer_data()
4061 for (src_seg=0; src_seg < st_bp->frp_segs; src_seg++) { in move_buffer_data()
4068 st_bp->buffer_bytes = st_bp->read_pointer = total; in move_buffer_data()
4070 struct page *dpage = st_bp->reserved_pages[dst_seg]; in move_buffer_data()
4071 struct page *spage = st_bp->reserved_pages[src_seg]; in move_buffer_data()