public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dmatest: add ability to disable pq and xor
@ 2013-05-17 17:54 Jon Mason
  2013-05-31  8:22 ` Andy Shevchenko
  0 siblings, 1 reply; 6+ messages in thread
From: Jon Mason @ 2013-05-17 17:54 UTC (permalink / raw)
  To: Dan Williams; +Cc: linux-kernel, Dave Jiang, Vinod Koul

dmatest would create a thread to stress XOR and PQ, if the capability is
present in the hardware.  Add the ability to disable XOR and PQ by
disabling it if *_sources are set to zero.

Signed-off-by: Jon Mason <jon.mason@intel.com>
---
 drivers/dma/dmatest.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c
index d8ce4ec..7de610d 100644
--- a/drivers/dma/dmatest.c
+++ b/drivers/dma/dmatest.c
@@ -904,11 +904,11 @@ static int dmatest_add_channel(struct dmatest_info *info,
 		cnt = dmatest_add_threads(info, dtc, DMA_MEMCPY);
 		thread_count += cnt > 0 ? cnt : 0;
 	}
-	if (dma_has_cap(DMA_XOR, dma_dev->cap_mask)) {
+	if (dma_has_cap(DMA_XOR, dma_dev->cap_mask) && xor_sources) {
 		cnt = dmatest_add_threads(info, dtc, DMA_XOR);
 		thread_count += cnt > 0 ? cnt : 0;
 	}
-	if (dma_has_cap(DMA_PQ, dma_dev->cap_mask)) {
+	if (dma_has_cap(DMA_PQ, dma_dev->cap_mask) && pq_sources) {
 		cnt = dmatest_add_threads(info, dtc, DMA_PQ);
 		thread_count += cnt > 0 ? cnt : 0;
 	}
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-06-09 19:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-17 17:54 [PATCH] dmatest: add ability to disable pq and xor Jon Mason
2013-05-31  8:22 ` Andy Shevchenko
2013-06-03 23:29   ` Jon Mason
2013-06-04  7:25     ` Andy Shevchenko
2013-06-04 17:11       ` Dan Williams
2013-06-09 19:21         ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox