Lines Matching full:blocks
36 /* the struct page *blocks[] parameter passed to async_gen_syndrome()
38 * blocks[disks-2] and the 'Q' destination address at blocks[disks-1]
123 do_sync_gen_syndrome(struct page **blocks, unsigned int offset, int disks, in do_sync_gen_syndrome() argument
133 srcs = (void **) blocks; in do_sync_gen_syndrome()
136 if (blocks[i] == NULL) { in do_sync_gen_syndrome()
140 srcs[i] = page_address(blocks[i]) + offset; in do_sync_gen_syndrome()
159 * @blocks: source blocks from idx 0..disks-3, P @ disks-2 and Q @ disks-1
161 * @disks: number of blocks (including missing P or Q, see below)
169 * both) from the calculation by setting blocks[disks-2] or
170 * blocks[disks-1] to NULL. When P or Q is omitted 'len' must be <=
173 * buffers. If any source buffers (blocks[i] where i < disks - 2) are
179 async_gen_syndrome(struct page **blocks, unsigned int offset, int disks, in async_gen_syndrome() argument
184 &P(blocks, disks), 2, in async_gen_syndrome()
185 blocks, src_cnt, len); in async_gen_syndrome()
189 BUG_ON(disks > MAX_DISKS || !(P(blocks, disks) || Q(blocks, disks))); in async_gen_syndrome()
213 if (blocks[i] == NULL) in async_gen_syndrome()
215 unmap->addr[j] = dma_map_page(device->dev, blocks[i], offset, in async_gen_syndrome()
227 if (P(blocks, disks)) in async_gen_syndrome()
228 unmap->addr[j++] = dma_map_page(device->dev, P(blocks, disks), in async_gen_syndrome()
236 if (Q(blocks, disks)) in async_gen_syndrome()
237 unmap->addr[j++] = dma_map_page(device->dev, Q(blocks, disks), in async_gen_syndrome()
257 if (!P(blocks, disks)) { in async_gen_syndrome()
258 P(blocks, disks) = pq_scribble_page; in async_gen_syndrome()
261 if (!Q(blocks, disks)) { in async_gen_syndrome()
262 Q(blocks, disks) = pq_scribble_page; in async_gen_syndrome()
265 do_sync_gen_syndrome(blocks, offset, disks, len, submit); in async_gen_syndrome()
272 pq_val_chan(struct async_submit_ctl *submit, struct page **blocks, int disks, size_t len) in pq_val_chan() argument
277 return async_tx_find_channel(submit, DMA_PQ_VAL, NULL, 0, blocks, in pq_val_chan()
283 * @blocks: source blocks from idx 0..disks-3, P @ disks-2 and Q @ disks-1
285 * @disks: number of blocks (including missing P or Q, see below)
291 * The same notes from async_gen_syndrome apply to the 'blocks',
297 async_syndrome_val(struct page **blocks, unsigned int offset, int disks, in async_syndrome_val() argument
301 struct dma_chan *chan = pq_val_chan(submit, blocks, disks, len); in async_syndrome_val()
324 if (likely(blocks[i])) { in async_syndrome_val()
325 unmap->addr[j] = dma_map_page(dev, blocks[i], in async_syndrome_val()
334 if (!P(blocks, disks)) { in async_syndrome_val()
338 pq[0] = dma_map_page(dev, P(blocks, disks), in async_syndrome_val()
344 if (!Q(blocks, disks)) { in async_syndrome_val()
348 pq[1] = dma_map_page(dev, Q(blocks, disks), in async_syndrome_val()
373 struct page *p_src = P(blocks, disks); in async_syndrome_val()
374 struct page *q_src = Q(blocks, disks); in async_syndrome_val()
400 tx = async_xor(spare, blocks, offset, disks-2, len, submit); in async_syndrome_val()
408 P(blocks, disks) = NULL; in async_syndrome_val()
409 Q(blocks, disks) = spare; in async_syndrome_val()
411 tx = async_gen_syndrome(blocks, offset, disks, len, submit); in async_syndrome_val()
419 P(blocks, disks) = p_src; in async_syndrome_val()
420 Q(blocks, disks) = q_src; in async_syndrome_val()