diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2010-05-10 11:59:37 +0200 | 
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2010-05-10 14:20:42 +0200 | 
| commit | dbb6be6d5e974c42bbecd183effaa0df69e1dd8b (patch) | |
| tree | 5735cb47e70853d057a9881dd0ce44b83e88fa63 /crypto/async_tx | |
| parent | 6a867a395558a7f882d041783e4cdea6744ca2bf (diff) | |
| parent | b57f95a38233a2e73b679bea4a5453a1cc2a1cc9 (diff) | |
| download | olio-linux-3.10-dbb6be6d5e974c42bbecd183effaa0df69e1dd8b.tar.xz olio-linux-3.10-dbb6be6d5e974c42bbecd183effaa0df69e1dd8b.zip  | |
Merge branch 'linus' into timers/core
Reason: Further posix_cpu_timer patches depend on mainline changes
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'crypto/async_tx')
| -rw-r--r-- | crypto/async_tx/async_pq.c | 1 | ||||
| -rw-r--r-- | crypto/async_tx/async_raid6_recov.c | 21 | ||||
| -rw-r--r-- | crypto/async_tx/raid6test.c | 1 | 
3 files changed, 15 insertions, 8 deletions
diff --git a/crypto/async_tx/async_pq.c b/crypto/async_tx/async_pq.c index ec87f53d505..fdd8257d35d 100644 --- a/crypto/async_tx/async_pq.c +++ b/crypto/async_tx/async_pq.c @@ -24,6 +24,7 @@  #include <linux/dma-mapping.h>  #include <linux/raid/pq.h>  #include <linux/async_tx.h> +#include <linux/gfp.h>  /**   * pq_scribble_page - space to hold throwaway P or Q buffer for diff --git a/crypto/async_tx/async_raid6_recov.c b/crypto/async_tx/async_raid6_recov.c index 943f2abac9b..ce038d861eb 100644 --- a/crypto/async_tx/async_raid6_recov.c +++ b/crypto/async_tx/async_raid6_recov.c @@ -324,6 +324,7 @@ struct dma_async_tx_descriptor *  async_raid6_2data_recov(int disks, size_t bytes, int faila, int failb,  			struct page **blocks, struct async_submit_ctl *submit)  { +	void *scribble = submit->scribble;  	int non_zero_srcs, i;  	BUG_ON(faila == failb); @@ -332,11 +333,13 @@ async_raid6_2data_recov(int disks, size_t bytes, int faila, int failb,  	pr_debug("%s: disks: %d len: %zu\n", __func__, disks, bytes); -	/* we need to preserve the contents of 'blocks' for the async -	 * case, so punt to synchronous if a scribble buffer is not available +	/* if a dma resource is not available or a scribble buffer is not +	 * available punt to the synchronous path.  In the 'dma not +	 * available' case be sure to use the scribble buffer to +	 * preserve the content of 'blocks' as the caller intended.  	 */ -	if (!submit->scribble) { -		void **ptrs = (void **) blocks; +	if (!async_dma_find_channel(DMA_PQ) || !scribble) { +		void **ptrs = scribble ? scribble : (void **) blocks;  		async_tx_quiesce(&submit->depend_tx);  		for (i = 0; i < disks; i++) @@ -406,11 +409,13 @@ async_raid6_datap_recov(int disks, size_t bytes, int faila,  	pr_debug("%s: disks: %d len: %zu\n", __func__, disks, bytes); -	/* we need to preserve the contents of 'blocks' for the async -	 * case, so punt to synchronous if a scribble buffer is not available +	/* if a dma resource is not available or a scribble buffer is not +	 * available punt to the synchronous path.  In the 'dma not +	 * available' case be sure to use the scribble buffer to +	 * preserve the content of 'blocks' as the caller intended.  	 */ -	if (!scribble) { -		void **ptrs = (void **) blocks; +	if (!async_dma_find_channel(DMA_PQ) || !scribble) { +		void **ptrs = scribble ? scribble : (void **) blocks;  		async_tx_quiesce(&submit->depend_tx);  		for (i = 0; i < disks; i++) diff --git a/crypto/async_tx/raid6test.c b/crypto/async_tx/raid6test.c index f84f6b4301d..c1321935ebc 100644 --- a/crypto/async_tx/raid6test.c +++ b/crypto/async_tx/raid6test.c @@ -20,6 +20,7 @@   *   */  #include <linux/async_tx.h> +#include <linux/gfp.h>  #include <linux/random.h>  #undef pr  |