Re: [patch] x86, voyager: fix ioremap_nocache()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: James Bottomley
Date: Sunday, April 27, 2008 - 3:34 pm

Here's another piece of the x86 API that's designed to be cached.  The
dma_declare_coherent_memory() usually represents behind bridge memory
that's fully participatory in the coherence model.

Making it uncached damages the utility of this memory because doing
cacheline sized burst cycles when needed to it is far faster than
individual byte/word/quad writes.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>

---

diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
index 388b113..df83ffd 100644
--- a/arch/x86/kernel/pci-dma.c
+++ b/arch/x86/kernel/pci-dma.c
@@ -214,7 +214,7 @@ int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr,
 
 	/* FIXME: this routine just ignores DMA_MEMORY_INCLUDES_CHILDREN */
 
-	mem_base = ioremap(bus_addr, size);
+	mem_base = ioremap_cache(bus_addr, size);
 	if (!mem_base)
 		goto out;
 


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Breakage caused by unreviewed patch in x86 tree, James Bottomley, (Sun Apr 27, 1:51 pm)
Re: Breakage caused by unreviewed patch in x86 tree, David Miller, (Sun Apr 27, 1:53 pm)
[patch] x86, voyager: fix ioremap_nocache(), Ingo Molnar, (Sun Apr 27, 2:48 pm)
Re: Breakage caused by unreviewed patch in x86 tree, H. Peter Anvin, (Sun Apr 27, 3:00 pm)
Re: [patch] x86, voyager: fix ioremap_nocache(), James Bottomley, (Sun Apr 27, 3:05 pm)
Re: Breakage caused by unreviewed patch in x86 tree, James Bottomley, (Sun Apr 27, 3:10 pm)
Re: Breakage caused by unreviewed patch in x86 tree, H. Peter Anvin, (Sun Apr 27, 3:13 pm)
Re: Breakage caused by unreviewed patch in x86 tree, James Bottomley, (Sun Apr 27, 3:18 pm)
Re: Breakage caused by unreviewed patch in x86 tree, H. Peter Anvin, (Sun Apr 27, 3:31 pm)
Re: [patch] x86, voyager: fix ioremap_nocache(), James Bottomley, (Sun Apr 27, 3:34 pm)
Re: [patch] x86, voyager: fix ioremap_nocache(), Willy Tarreau, (Sun Apr 27, 3:36 pm)
Re: [patch] x86, voyager: fix ioremap_nocache(), Jeff Garzik, (Sun Apr 27, 3:39 pm)
Re: [patch] x86, voyager: fix ioremap_nocache(), Ingo Molnar, (Sun Apr 27, 3:41 pm)
Re: [patch] x86, voyager: fix ioremap_nocache(), H. Peter Anvin, (Sun Apr 27, 3:44 pm)
Re: [patch] x86, voyager: fix ioremap_nocache(), David Miller, (Sun Apr 27, 3:46 pm)
Re: [patch] x86, voyager: fix ioremap_nocache(), H. Peter Anvin, (Sun Apr 27, 3:52 pm)
Re: [patch] x86, voyager: fix ioremap_nocache(), Jeff Garzik, (Sun Apr 27, 3:53 pm)
Re: [patch] x86, voyager: fix ioremap_nocache(), H. Peter Anvin, (Sun Apr 27, 3:56 pm)
Re: Breakage caused by unreviewed patch in x86 tree, Arjan van de Ven, (Sun Apr 27, 3:58 pm)
Re: [patch] x86, voyager: fix ioremap_nocache(), David Miller, (Sun Apr 27, 3:58 pm)
Re: [patch] x86, voyager: fix ioremap_nocache(), David Miller, (Sun Apr 27, 3:59 pm)
Re: Breakage caused by unreviewed patch in x86 tree, David Miller, (Sun Apr 27, 4:00 pm)
Re: [patch] x86, voyager: fix ioremap_nocache(), Arjan van de Ven, (Sun Apr 27, 4:01 pm)
Re: [patch] x86, voyager: fix ioremap_nocache(), Thomas Gleixner, (Sun Apr 27, 4:01 pm)
Re: [patch] x86, voyager: fix ioremap_nocache(), Jeff Garzik, (Sun Apr 27, 4:02 pm)
Re: Breakage caused by unreviewed patch in x86 tree, James Bottomley, (Sun Apr 27, 4:03 pm)
Re: [patch] x86, voyager: fix ioremap_nocache(), H. Peter Anvin, (Sun Apr 27, 4:04 pm)
Re: Breakage caused by unreviewed patch in x86 tree, Arjan van de Ven, (Sun Apr 27, 4:07 pm)
Re: Breakage caused by unreviewed patch in x86 tree, Arjan van de Ven, (Sun Apr 27, 4:11 pm)
Re: [patch] x86, voyager: fix ioremap_nocache(), Arjan van de Ven, (Sun Apr 27, 4:14 pm)
Re: Breakage caused by unreviewed patch in x86 tree, H. Peter Anvin, (Sun Apr 27, 4:17 pm)
Re: [patch] x86, voyager: fix ioremap_nocache(), Ingo Molnar, (Sun Apr 27, 4:18 pm)
Re: [patch] x86, voyager: fix ioremap_nocache(), David Miller, (Sun Apr 27, 4:31 pm)
Re: [patch] x86, voyager: fix ioremap_nocache(), Jeff Garzik, (Sun Apr 27, 4:34 pm)
Re: [patch] x86, voyager: fix ioremap_nocache(), H. Peter Anvin, (Sun Apr 27, 4:39 pm)
Re: [patch] x86, voyager: fix ioremap_nocache(), Rik van Riel, (Sun Apr 27, 5:31 pm)
Re: [patch] x86, voyager: fix ioremap_nocache(), Al Viro, (Sun Apr 27, 5:45 pm)
Re: [patch] x86, voyager: fix ioremap_nocache(), H. Peter Anvin, (Sun Apr 27, 5:52 pm)
Re: [patch] x86, voyager: fix ioremap_nocache(), Christoph Hellwig, (Sun Apr 27, 11:10 pm)
Re: [patch] x86, voyager: fix ioremap_nocache(), Alan Cox, (Mon Apr 28, 2:01 am)
Re: [patch] x86, voyager: fix ioremap_nocache(), David Miller, (Mon Apr 28, 2:17 am)
Re: [patch] x86, voyager: fix ioremap_nocache(), Adrian Bunk, (Mon Apr 28, 2:48 am)
Re: [patch] x86, voyager: fix ioremap_nocache(), Ingo Molnar, (Mon Apr 28, 4:50 am)
Re: [patch] x86, voyager: fix ioremap_nocache(), Arjan van de Ven, (Mon Apr 28, 7:10 am)
Re: [patch] x86, voyager: fix ioremap_nocache(), James Bottomley, (Mon Apr 28, 7:29 am)
Re: [patch] x86, voyager: fix ioremap_nocache(), Arjan van de Ven, (Mon Apr 28, 8:07 am)
Re: [patch] x86, voyager: fix ioremap_nocache(), H. Peter Anvin, (Mon Apr 28, 9:55 am)
Re: [patch] x86, voyager: fix ioremap_nocache(), H. Peter Anvin, (Mon Apr 28, 12:59 pm)
Re: [patch] x86, voyager: fix ioremap_nocache(), Eric W. Biederman, (Wed Apr 30, 1:35 pm)
Re: [patch] x86, voyager: fix ioremap_nocache(), James Bottomley, (Wed Apr 30, 2:44 pm)
Re: [patch] x86, voyager: fix ioremap_nocache(), H. Peter Anvin, (Wed Apr 30, 3:39 pm)