summaryrefslogtreecommitdiffstats
path: root/include/asm-sh/fixmap.h
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2007-07-24 13:28:26 +0900
committerPaul Mundt <lethal@linux-sh.org>2007-07-24 13:28:26 +0900
commit8cf1a74305688c85fc8d23ab7432a0c447ee6413 (patch)
treed43af5f2515db35ef6a705e5929780f91d34e898 /include/asm-sh/fixmap.h
parentf695baf2df9e0413d3521661070103711545207a (diff)
downloadop-kernel-dev-8cf1a74305688c85fc8d23ab7432a0c447ee6413.zip
op-kernel-dev-8cf1a74305688c85fc8d23ab7432a0c447ee6413.tar.gz
sh: Add kmap_coherent()/kunmap_coherent() interface for SH-4.
This wires up kmap_coherent() and kunmap_coherent() on SH-4, and moves away from the p3map_mutex and reserved P3 space, opting to use fixmaps for colouring instead. The copy_user_page()/clear_user_page() implementations are moved to this, which fixes the nasty blowups with spinlock debugging as a result of having some of these calls nested under the page table lock. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/asm-sh/fixmap.h')
-rw-r--r--include/asm-sh/fixmap.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/asm-sh/fixmap.h b/include/asm-sh/fixmap.h
index 458e9fa..8a56617 100644
--- a/include/asm-sh/fixmap.h
+++ b/include/asm-sh/fixmap.h
@@ -46,6 +46,9 @@
* fix-mapped?
*/
enum fixed_addresses {
+#define FIX_N_COLOURS 16
+ FIX_CMAP_BEGIN,
+ FIX_CMAP_END = FIX_CMAP_BEGIN + FIX_N_COLOURS,
#ifdef CONFIG_HIGHMEM
FIX_KMAP_BEGIN, /* reserved pte's for temporary kernel mappings */
FIX_KMAP_END = FIX_KMAP_BEGIN+(KM_TYPE_NR*NR_CPUS)-1,
@@ -53,8 +56,8 @@ enum fixed_addresses {
__end_of_fixed_addresses
};
-extern void __set_fixmap (enum fixed_addresses idx,
- unsigned long phys, pgprot_t flags);
+extern void __set_fixmap(enum fixed_addresses idx,
+ unsigned long phys, pgprot_t flags);
#define set_fixmap(idx, phys) \
__set_fixmap(idx, phys, PAGE_KERNEL)
@@ -106,5 +109,4 @@ static inline unsigned long virt_to_fix(const unsigned long vaddr)
BUG_ON(vaddr >= FIXADDR_TOP || vaddr < FIXADDR_START);
return __virt_to_fix(vaddr);
}
-
#endif
OpenPOWER on IntegriCloud