54 lines
2.1 KiB
Diff
54 lines
2.1 KiB
Diff
|
## DP: Fix build error on processors that don's support copy-on-write
|
||
|
## DP: Patch author: Ralf Baechle <ralf@linux-mips.org>
|
||
|
## DP: Upstream status: in Linus git (went in after rc5)
|
||
|
|
||
|
From: Ralf Baechle <ralf@linux-mips.org>
|
||
|
Date: Tue, 28 Feb 2006 17:04:20 +0000 (+0000)
|
||
|
Subject: [MIPS] Fix build error on processors that don's support copy-on-write.
|
||
|
X-Git-Url: http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=778e2ac5970e445f8c6b7d8aa597ac162afe270a
|
||
|
|
||
|
[MIPS] Fix build error on processors that don's support copy-on-write.
|
||
|
|
||
|
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
||
|
---
|
||
|
|
||
|
--- a/arch/mips/lib/iomap.c
|
||
|
+++ b/arch/mips/lib/iomap.c
|
||
|
@@ -63,7 +63,7 @@ void __iomem *pci_iomap(struct pci_dev *
|
||
|
return ioport_map(start, len);
|
||
|
if (flags & IORESOURCE_MEM) {
|
||
|
if (flags & IORESOURCE_CACHEABLE)
|
||
|
- return ioremap_cacheable_cow(start, len);
|
||
|
+ return ioremap_cachable(start, len);
|
||
|
return ioremap_nocache(start, len);
|
||
|
}
|
||
|
|
||
|
--- a/include/asm-mips/io.h
|
||
|
+++ b/include/asm-mips/io.h
|
||
|
@@ -283,6 +283,24 @@ static inline void __iomem * __ioremap_m
|
||
|
__ioremap_mode((offset), (size), _CACHE_UNCACHED)
|
||
|
|
||
|
/*
|
||
|
+ * ioremap_cachable - map bus memory into CPU space
|
||
|
+ * @offset: bus address of the memory
|
||
|
+ * @size: size of the resource to map
|
||
|
+ *
|
||
|
+ * ioremap_nocache performs a platform specific sequence of operations to
|
||
|
+ * make bus memory CPU accessible via the readb/readw/readl/writeb/
|
||
|
+ * writew/writel functions and the other mmio helpers. The returned
|
||
|
+ * address is not guaranteed to be usable directly as a virtual
|
||
|
+ * address.
|
||
|
+ *
|
||
|
+ * This version of ioremap ensures that the memory is marked cachable by
|
||
|
+ * the CPU. Also enables full write-combining. Useful for some
|
||
|
+ * memory-like regions on I/O busses.
|
||
|
+ */
|
||
|
+#define ioremap_cachable(offset, size) \
|
||
|
+ __ioremap_mode((offset), (size), PAGE_CACHABLE_DEFAULT)
|
||
|
+
|
||
|
+/*
|
||
|
* These two are MIPS specific ioremap variant. ioremap_cacheable_cow
|
||
|
* requests a cachable mapping, ioremap_uncached_accelerated requests a
|
||
|
* mapping using the uncached accelerated mode which isn't supported on
|
||
|
|