* [PATCH 0/3] Generic dma-coherent updates
@ 2008-07-18 9:28 Dmitry Baryshkov
2008-07-18 9:29 ` [PATCH 1/3] Generic dma-coherent: fix DMA_MEMORY_EXCLUSIVE Dmitry Baryshkov
0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Baryshkov @ 2008-07-18 9:28 UTC (permalink / raw)
To: linux-kernel; +Cc: Ingo Molnar, Jesse Barnes, H. Peter Anvin, Thomas Gleixner
Hi,
Here are some patches for the tip core/generic-dma-coherent branch.
The first one fixes dma allocation from DMA_MEMORY_EXCLUSIVE memory
areas. Second adds per-device coherent mem to arm and third one
replaces SH per-device coherent memory allocations with generic version.
I've tried updating Cris, but failed to even compile the kernel.
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 1/3] Generic dma-coherent: fix DMA_MEMORY_EXCLUSIVE
2008-07-18 9:28 [PATCH 0/3] Generic dma-coherent updates Dmitry Baryshkov
@ 2008-07-18 9:29 ` Dmitry Baryshkov
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Baryshkov @ 2008-07-18 9:29 UTC (permalink / raw)
To: linux-kernel; +Cc: Ingo Molnar, Jesse Barnes, H. Peter Anvin, Thomas Gleixner
Don't rewrite successfull allocation return values
in case the memory was marked with DMA_MEMORY_EXCLUSIVE.
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
---
kernel/dma-coherent.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/kernel/dma-coherent.c b/kernel/dma-coherent.c
index 89a554c..56dff5c 100644
--- a/kernel/dma-coherent.c
+++ b/kernel/dma-coherent.c
@@ -105,8 +105,7 @@ int dma_alloc_from_coherent(struct device *dev, ssize_t size,
*dma_handle = mem->device_base + (page << PAGE_SHIFT);
*ret = mem->virt_base + (page << PAGE_SHIFT);
memset(*ret, 0, size);
- }
- if (mem->flags & DMA_MEMORY_EXCLUSIVE)
+ } else if (mem->flags & DMA_MEMORY_EXCLUSIVE)
*ret = NULL;
}
return (mem != NULL);
--
1.5.6.2
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-07-18 9:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-18 9:28 [PATCH 0/3] Generic dma-coherent updates Dmitry Baryshkov
2008-07-18 9:29 ` [PATCH 1/3] Generic dma-coherent: fix DMA_MEMORY_EXCLUSIVE Dmitry Baryshkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®