Lines Matching full:blocks

20 /* the struct page *blocks[] parameter passed to async_gen_syndrome()
22 * blocks[disks-2] and the 'Q' destination address at blocks[disks-1]
107 do_sync_gen_syndrome(struct page **blocks, unsigned int offset, int disks, in do_sync_gen_syndrome() argument
117 srcs = (void **) blocks; in do_sync_gen_syndrome()
120 if (blocks[i] == NULL) { in do_sync_gen_syndrome()
124 srcs[i] = page_address(blocks[i]) + offset; in do_sync_gen_syndrome()
143 * @blocks: source blocks from idx 0..disks-3, P @ disks-2 and Q @ disks-1
145 * @disks: number of blocks (including missing P or Q, see below)
153 * both) from the calculation by setting blocks[disks-2] or
154 * blocks[disks-1] to NULL. When P or Q is omitted 'len' must be <=
157 * buffers. If any source buffers (blocks[i] where i < disks - 2) are
163 async_gen_syndrome(struct page **blocks, unsigned int offset, int disks, in async_gen_syndrome() argument
168 &P(blocks, disks), 2, in async_gen_syndrome()
169 blocks, src_cnt, len); in async_gen_syndrome()
173 BUG_ON(disks > MAX_DISKS || !(P(blocks, disks) || Q(blocks, disks))); in async_gen_syndrome()
197 if (blocks[i] == NULL) in async_gen_syndrome()
199 unmap->addr[j] = dma_map_page(device->dev, blocks[i], offset, in async_gen_syndrome()
211 if (P(blocks, disks)) in async_gen_syndrome()
212 unmap->addr[j++] = dma_map_page(device->dev, P(blocks, disks), in async_gen_syndrome()
220 if (Q(blocks, disks)) in async_gen_syndrome()
221 unmap->addr[j++] = dma_map_page(device->dev, Q(blocks, disks), in async_gen_syndrome()
241 if (!P(blocks, disks)) { in async_gen_syndrome()
242 P(blocks, disks) = pq_scribble_page; in async_gen_syndrome()
245 if (!Q(blocks, disks)) { in async_gen_syndrome()
246 Q(blocks, disks) = pq_scribble_page; in async_gen_syndrome()
249 do_sync_gen_syndrome(blocks, offset, disks, len, submit); in async_gen_syndrome()
256 pq_val_chan(struct async_submit_ctl *submit, struct page **blocks, int disks, size_t len) in pq_val_chan() argument
261 return async_tx_find_channel(submit, DMA_PQ_VAL, NULL, 0, blocks, in pq_val_chan()
267 * @blocks: source blocks from idx 0..disks-3, P @ disks-2 and Q @ disks-1
269 * @disks: number of blocks (including missing P or Q, see below)
275 * The same notes from async_gen_syndrome apply to the 'blocks',
281 async_syndrome_val(struct page **blocks, unsigned int offset, int disks, in async_syndrome_val() argument
285 struct dma_chan *chan = pq_val_chan(submit, blocks, disks, len); in async_syndrome_val()
308 if (likely(blocks[i])) { in async_syndrome_val()
309 unmap->addr[j] = dma_map_page(dev, blocks[i], in async_syndrome_val()
318 if (!P(blocks, disks)) { in async_syndrome_val()
322 pq[0] = dma_map_page(dev, P(blocks, disks), in async_syndrome_val()
328 if (!Q(blocks, disks)) { in async_syndrome_val()
332 pq[1] = dma_map_page(dev, Q(blocks, disks), in async_syndrome_val()
357 struct page *p_src = P(blocks, disks); in async_syndrome_val()
358 struct page *q_src = Q(blocks, disks); in async_syndrome_val()
384 tx = async_xor(spare, blocks, offset, disks-2, len, submit); in async_syndrome_val()
392 P(blocks, disks) = NULL; in async_syndrome_val()
393 Q(blocks, disks) = spare; in async_syndrome_val()
395 tx = async_gen_syndrome(blocks, offset, disks, len, submit); in async_syndrome_val()
403 P(blocks, disks) = p_src; in async_syndrome_val()
404 Q(blocks, disks) = q_src; in async_syndrome_val()