diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-07-18 16:00:54 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-18 16:00:54 -0400 |
commit | bb2c018b09b681d43f5e08124b83e362647ea82b (patch) | |
tree | d794902c78f9fdd04ed88a4b8d451ed6f9292ec0 /arch/powerpc/lib/dma-noncoherent.c | |
parent | 82638844d9a8581bbf33201cc209a14876eca167 (diff) | |
parent | 5b664cb235e97afbf34db9c4d77f08ebd725335e (diff) |
Merge branch 'linus' into cpus4096
Conflicts:
drivers/acpi/processor_throttling.c
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/powerpc/lib/dma-noncoherent.c')
-rw-r--r-- | arch/powerpc/lib/dma-noncoherent.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/powerpc/lib/dma-noncoherent.c b/arch/powerpc/lib/dma-noncoherent.c index 6656d47841d0..5d83907f6591 100644 --- a/arch/powerpc/lib/dma-noncoherent.c +++ b/arch/powerpc/lib/dma-noncoherent.c | |||
@@ -348,8 +348,15 @@ void __dma_sync(void *vaddr, size_t size, int direction) | |||
348 | switch (direction) { | 348 | switch (direction) { |
349 | case DMA_NONE: | 349 | case DMA_NONE: |
350 | BUG(); | 350 | BUG(); |
351 | case DMA_FROM_DEVICE: /* invalidate only */ | 351 | case DMA_FROM_DEVICE: |
352 | invalidate_dcache_range(start, end); | 352 | /* |
353 | * invalidate only when cache-line aligned otherwise there is | ||
354 | * the potential for discarding uncommitted data from the cache | ||
355 | */ | ||
356 | if ((start & (L1_CACHE_BYTES - 1)) || (size & (L1_CACHE_BYTES - 1))) | ||
357 | flush_dcache_range(start, end); | ||
358 | else | ||
359 | invalidate_dcache_range(start, end); | ||
353 | break; | 360 | break; |
354 | case DMA_TO_DEVICE: /* writeback only */ | 361 | case DMA_TO_DEVICE: /* writeback only */ |
355 | clean_dcache_range(start, end); | 362 | clean_dcache_range(start, end); |