diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2005-04-16 15:24:33 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 15:24:33 -0700 |
commit | dfbacdc1a0b568dfa69fb2c1b39b608074001083 (patch) | |
tree | f63fdb5db967253e46472ff776d1e22c38cee16e /arch/ppc64/kernel | |
parent | 7bbd827750e630003896c96d0212962276ee5d91 (diff) | |
download | op-kernel-dev-dfbacdc1a0b568dfa69fb2c1b39b608074001083.zip op-kernel-dev-dfbacdc1a0b568dfa69fb2c1b39b608074001083.tar.gz |
[PATCH] ppc64: Fix semantics of __ioremap
This patch fixes ppc64 __ioremap() so that it stops adding implicitely
_PAGE_GUARDED when the cache is not writeback, and instead, let the callers
provide the flag they want here. This allows things like framebuffers to
explicitely request a non-cacheable and non-guarded mapping which is more
efficient for that type of memory without side effects. The patch also
fixes all current callers to add _PAGE_GUARDED except btext, which is fine
without it.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/ppc64/kernel')
-rw-r--r-- | arch/ppc64/kernel/maple_setup.c | 2 | ||||
-rw-r--r-- | arch/ppc64/kernel/pSeries_setup.c | 2 | ||||
-rw-r--r-- | arch/ppc64/kernel/pci.c | 12 |
3 files changed, 9 insertions, 7 deletions
diff --git a/arch/ppc64/kernel/maple_setup.c b/arch/ppc64/kernel/maple_setup.c index 1db6ea0..8cf95a2 100644 --- a/arch/ppc64/kernel/maple_setup.c +++ b/arch/ppc64/kernel/maple_setup.c @@ -142,7 +142,7 @@ static void __init maple_init_early(void) if (physport) { void *comport; /* Map the uart for udbg. */ - comport = (void *)__ioremap(physport, 16, _PAGE_NO_CACHE); + comport = (void *)ioremap(physport, 16); udbg_init_uart(comport, default_speed); ppc_md.udbg_putc = udbg_putc; diff --git a/arch/ppc64/kernel/pSeries_setup.c b/arch/ppc64/kernel/pSeries_setup.c index 06536de..6c0d1d5 100644 --- a/arch/ppc64/kernel/pSeries_setup.c +++ b/arch/ppc64/kernel/pSeries_setup.c @@ -363,7 +363,7 @@ static void __init pSeries_init_early(void) find_udbg_vterm(); else if (physport) { /* Map the uart for udbg. */ - comport = (void *)__ioremap(physport, 16, _PAGE_NO_CACHE); + comport = (void *)ioremap(physport, 16); udbg_init_uart(comport, default_speed); ppc_md.udbg_putc = udbg_putc; diff --git a/arch/ppc64/kernel/pci.c b/arch/ppc64/kernel/pci.c index fdd8f78..be3cc38 100644 --- a/arch/ppc64/kernel/pci.c +++ b/arch/ppc64/kernel/pci.c @@ -547,8 +547,9 @@ static void __devinit pci_process_ISA_OF_ranges(struct device_node *isa_node, if (range == NULL || (rlen < sizeof(struct isa_range))) { printk(KERN_ERR "no ISA ranges or unexpected isa range size," "mapping 64k\n"); - __ioremap_explicit(phb_io_base_phys, (unsigned long)phb_io_base_virt, - 0x10000, _PAGE_NO_CACHE); + __ioremap_explicit(phb_io_base_phys, + (unsigned long)phb_io_base_virt, + 0x10000, _PAGE_NO_CACHE | _PAGE_GUARDED); return; } @@ -576,7 +577,7 @@ static void __devinit pci_process_ISA_OF_ranges(struct device_node *isa_node, __ioremap_explicit(phb_io_base_phys, (unsigned long) phb_io_base_virt, - size, _PAGE_NO_CACHE); + size, _PAGE_NO_CACHE | _PAGE_GUARDED); } } @@ -692,7 +693,7 @@ void __devinit pci_setup_phb_io_dynamic(struct pci_controller *hose, struct resource *res; hose->io_base_virt = __ioremap(hose->io_base_phys, size, - _PAGE_NO_CACHE); + _PAGE_NO_CACHE | _PAGE_GUARDED); DBG("phb%d io_base_phys 0x%lx io_base_virt 0x%lx\n", hose->global_number, hose->io_base_phys, (unsigned long) hose->io_base_virt); @@ -780,7 +781,8 @@ int remap_bus_range(struct pci_bus *bus) if (get_bus_io_range(bus, &start_phys, &start_virt, &size)) return 1; printk("mapping IO %lx -> %lx, size: %lx\n", start_phys, start_virt, size); - if (__ioremap_explicit(start_phys, start_virt, size, _PAGE_NO_CACHE)) + if (__ioremap_explicit(start_phys, start_virt, size, + _PAGE_NO_CACHE | _PAGE_GUARDED)) return 1; return 0; |