diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-27 11:49:07 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-27 11:49:07 -0400 |
commit | b98adfccdf5f8dd34ae56a2d5adbe2c030bd4674 (patch) | |
tree | 1807a029520f550dd4f90c95ad0063bceb00d645 /arch/sh/mm/ioremap.c | |
parent | ba21fe71725f94792330ebc3034ef2b35a36276f (diff) | |
parent | 33573c0e3243aaa38b6ad96942de85a1b713c2ff (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6: (108 commits)
sh: Fix occasional flush_cache_4096() stack corruption.
sh: Calculate shm alignment at runtime.
sh: dma-mapping compile fixes.
sh: Initial vsyscall page support.
sh: Clean up PAGE_SIZE definition for assembly use.
sh: Selective flush_cache_mm() flushing.
sh: More intelligent entry_mask/way_size calculation.
sh: Support for L2 cache on newer SH-4A CPUs.
sh: Update kexec support for API changes.
sh: Optimized readsl()/writesl() support.
sh: Report movli.l/movco.l capabilities.
sh: CPU flags in AT_HWCAP in ELF auxvt.
sh: Add support for 4K stacks.
sh: Enable /proc/kcore support.
sh: stack debugging support.
sh: select CONFIG_EMBEDDED.
sh: machvec rework.
sh: Solution Engine SH7343 board support.
sh: SH7710VoIPGW board support.
sh: Enable verbose BUG() support.
...
Diffstat (limited to 'arch/sh/mm/ioremap.c')
-rw-r--r-- | arch/sh/mm/ioremap.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/arch/sh/mm/ioremap.c b/arch/sh/mm/ioremap.c index 96fa4a999e2a..a9fe80cfc233 100644 --- a/arch/sh/mm/ioremap.c +++ b/arch/sh/mm/ioremap.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/vmalloc.h> | 15 | #include <linux/vmalloc.h> |
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
18 | #include <linux/pci.h> | ||
18 | #include <asm/io.h> | 19 | #include <asm/io.h> |
19 | #include <asm/page.h> | 20 | #include <asm/page.h> |
20 | #include <asm/pgalloc.h> | 21 | #include <asm/pgalloc.h> |
@@ -135,6 +136,20 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size, | |||
135 | return (void __iomem *)phys_to_virt(phys_addr); | 136 | return (void __iomem *)phys_to_virt(phys_addr); |
136 | 137 | ||
137 | /* | 138 | /* |
139 | * If we're on an SH7751 or SH7780 PCI controller, PCI memory is | ||
140 | * mapped at the end of the address space (typically 0xfd000000) | ||
141 | * in a non-translatable area, so mapping through page tables for | ||
142 | * this area is not only pointless, but also fundamentally | ||
143 | * broken. Just return the physical address instead. | ||
144 | * | ||
145 | * For boards that map a small PCI memory aperture somewhere in | ||
146 | * P1/P2 space, ioremap() will already do the right thing, | ||
147 | * and we'll never get this far. | ||
148 | */ | ||
149 | if (is_pci_memaddr(phys_addr) && is_pci_memaddr(last_addr)) | ||
150 | return (void __iomem *)phys_addr; | ||
151 | |||
152 | /* | ||
138 | * Don't allow anybody to remap normal RAM that we're using.. | 153 | * Don't allow anybody to remap normal RAM that we're using.. |
139 | */ | 154 | */ |
140 | if (phys_addr < virt_to_phys(high_memory)) | 155 | if (phys_addr < virt_to_phys(high_memory)) |
@@ -192,7 +207,7 @@ void __iounmap(void __iomem *addr) | |||
192 | unsigned long vaddr = (unsigned long __force)addr; | 207 | unsigned long vaddr = (unsigned long __force)addr; |
193 | struct vm_struct *p; | 208 | struct vm_struct *p; |
194 | 209 | ||
195 | if (PXSEG(vaddr) < P3SEG) | 210 | if (PXSEG(vaddr) < P3SEG || is_pci_memaddr(vaddr)) |
196 | return; | 211 | return; |
197 | 212 | ||
198 | #ifdef CONFIG_32BIT | 213 | #ifdef CONFIG_32BIT |