aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2006-04-07 01:23:03 -0400
committerPaul Mackerras <paulus@samba.org>2006-04-22 04:45:05 -0400
commitc256f4b9598c71afd8eb0b7d3d3790a38734cf43 (patch)
tree7366b0e03b5d9f1b0abfaa38230246f6d3875735 /arch
parent81bbbe92949b069c101e13d3acbd4bc7d088cb79 (diff)
[PATCH] powerpc: remove io_page_mask
Cleanup patch which removes the io_page_mask. It fixes the reset on some e1000 devices which is needed for clean kexec reboots. The legacy devices which broke with this patch (parallel port and PC speaker) have now been fixed in Linus' tree. Signed-off-by: Anton Blanchard <anton@samba.org> Acked-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/kernel/iomap.c2
-rw-r--r--arch/powerpc/kernel/pci_64.c30
-rw-r--r--arch/powerpc/platforms/iseries/pci.c3
-rw-r--r--arch/powerpc/platforms/maple/pci.c3
-rw-r--r--arch/powerpc/platforms/powermac/pci.c3
5 files changed, 3 insertions, 38 deletions
diff --git a/arch/powerpc/kernel/iomap.c b/arch/powerpc/kernel/iomap.c
index fd8214caedee..a13a93dfc655 100644
--- a/arch/powerpc/kernel/iomap.c
+++ b/arch/powerpc/kernel/iomap.c
@@ -106,8 +106,6 @@ EXPORT_SYMBOL(iowrite32_rep);
106 106
107void __iomem *ioport_map(unsigned long port, unsigned int len) 107void __iomem *ioport_map(unsigned long port, unsigned int len)
108{ 108{
109 if (!_IO_IS_VALID(port))
110 return NULL;
111 return (void __iomem *) (port+pci_io_base); 109 return (void __iomem *) (port+pci_io_base);
112} 110}
113 111
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index 4c4449be81ce..18cc15468fd6 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -42,14 +42,6 @@
42unsigned long pci_probe_only = 1; 42unsigned long pci_probe_only = 1;
43int pci_assign_all_buses = 0; 43int pci_assign_all_buses = 0;
44 44
45/*
46 * legal IO pages under MAX_ISA_PORT. This is to ensure we don't touch
47 * devices we don't have access to.
48 */
49unsigned long io_page_mask;
50
51EXPORT_SYMBOL(io_page_mask);
52
53#ifdef CONFIG_PPC_MULTIPLATFORM 45#ifdef CONFIG_PPC_MULTIPLATFORM
54static void fixup_resource(struct resource *res, struct pci_dev *dev); 46static void fixup_resource(struct resource *res, struct pci_dev *dev);
55static void do_bus_setup(struct pci_bus *bus); 47static void do_bus_setup(struct pci_bus *bus);
@@ -1104,8 +1096,6 @@ void __init pci_setup_phb_io(struct pci_controller *hose, int primary)
1104 pci_process_ISA_OF_ranges(isa_dn, hose->io_base_phys, 1096 pci_process_ISA_OF_ranges(isa_dn, hose->io_base_phys,
1105 hose->io_base_virt); 1097 hose->io_base_virt);
1106 of_node_put(isa_dn); 1098 of_node_put(isa_dn);
1107 /* Allow all IO */
1108 io_page_mask = -1;
1109 } 1099 }
1110 } 1100 }
1111 1101
@@ -1232,27 +1222,13 @@ static void phbs_remap_io(void)
1232static void __devinit fixup_resource(struct resource *res, struct pci_dev *dev) 1222static void __devinit fixup_resource(struct resource *res, struct pci_dev *dev)
1233{ 1223{
1234 struct pci_controller *hose = pci_bus_to_host(dev->bus); 1224 struct pci_controller *hose = pci_bus_to_host(dev->bus);
1235 unsigned long start, end, mask, offset; 1225 unsigned long offset;
1236 1226
1237 if (res->flags & IORESOURCE_IO) { 1227 if (res->flags & IORESOURCE_IO) {
1238 offset = (unsigned long)hose->io_base_virt - pci_io_base; 1228 offset = (unsigned long)hose->io_base_virt - pci_io_base;
1239 1229
1240 start = res->start += offset; 1230 res->start += offset;
1241 end = res->end += offset; 1231 res->end += offset;
1242
1243 /* Need to allow IO access to pages that are in the
1244 ISA range */
1245 if (start < MAX_ISA_PORT) {
1246 if (end > MAX_ISA_PORT)
1247 end = MAX_ISA_PORT;
1248
1249 start >>= PAGE_SHIFT;
1250 end >>= PAGE_SHIFT;
1251
1252 /* get the range of pages for the map */
1253 mask = ((1 << (end+1)) - 1) ^ ((1 << start) - 1);
1254 io_page_mask |= mask;
1255 }
1256 } else if (res->flags & IORESOURCE_MEM) { 1232 } else if (res->flags & IORESOURCE_MEM) {
1257 res->start += hose->pci_mem_offset; 1233 res->start += hose->pci_mem_offset;
1258 res->end += hose->pci_mem_offset; 1234 res->end += hose->pci_mem_offset;
diff --git a/arch/powerpc/platforms/iseries/pci.c b/arch/powerpc/platforms/iseries/pci.c
index a19833b880e4..5a61c6fdb33a 100644
--- a/arch/powerpc/platforms/iseries/pci.c
+++ b/arch/powerpc/platforms/iseries/pci.c
@@ -45,8 +45,6 @@
45#include "call_pci.h" 45#include "call_pci.h"
46#include "iommu.h" 46#include "iommu.h"
47 47
48extern unsigned long io_page_mask;
49
50/* 48/*
51 * Forward declares of prototypes. 49 * Forward declares of prototypes.
52 */ 50 */
@@ -277,7 +275,6 @@ void iSeries_pcibios_init(void)
277{ 275{
278 iomm_table_initialize(); 276 iomm_table_initialize();
279 find_and_init_phbs(); 277 find_and_init_phbs();
280 io_page_mask = -1;
281} 278}
282 279
283/* 280/*
diff --git a/arch/powerpc/platforms/maple/pci.c b/arch/powerpc/platforms/maple/pci.c
index 85d6c93659cc..9a4efc0c3b29 100644
--- a/arch/powerpc/platforms/maple/pci.c
+++ b/arch/powerpc/platforms/maple/pci.c
@@ -437,9 +437,6 @@ void __init maple_pci_init(void)
437 437
438 /* Tell pci.c to not change any resource allocations. */ 438 /* Tell pci.c to not change any resource allocations. */
439 pci_probe_only = 1; 439 pci_probe_only = 1;
440
441 /* Allow all IO */
442 io_page_mask = -1;
443} 440}
444 441
445int maple_pci_get_legacy_ide_irq(struct pci_dev *pdev, int channel) 442int maple_pci_get_legacy_ide_irq(struct pci_dev *pdev, int channel)
diff --git a/arch/powerpc/platforms/powermac/pci.c b/arch/powerpc/platforms/powermac/pci.c
index f5d8d15d74fa..3212618e7909 100644
--- a/arch/powerpc/platforms/powermac/pci.c
+++ b/arch/powerpc/platforms/powermac/pci.c
@@ -1068,9 +1068,6 @@ void __init pmac_pci_init(void)
1068 /* Tell pci.c to not use the common resource allocation mechanism */ 1068 /* Tell pci.c to not use the common resource allocation mechanism */
1069 pci_probe_only = 1; 1069 pci_probe_only = 1;
1070 1070
1071 /* Allow all IO */
1072 io_page_mask = -1;
1073
1074#else /* CONFIG_PPC64 */ 1071#else /* CONFIG_PPC64 */
1075 init_p2pbridge(); 1072 init_p2pbridge();
1076 fixup_nec_usb2(); 1073 fixup_nec_usb2();