diff options
author | Anton Blanchard <anton@samba.org> | 2006-04-07 01:23:03 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-04-22 04:45:05 -0400 |
commit | c256f4b9598c71afd8eb0b7d3d3790a38734cf43 (patch) | |
tree | 7366b0e03b5d9f1b0abfaa38230246f6d3875735 /arch/powerpc/kernel/pci_64.c | |
parent | 81bbbe92949b069c101e13d3acbd4bc7d088cb79 (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/powerpc/kernel/pci_64.c')
-rw-r--r-- | arch/powerpc/kernel/pci_64.c | 30 |
1 files changed, 3 insertions, 27 deletions
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 @@ | |||
42 | unsigned long pci_probe_only = 1; | 42 | unsigned long pci_probe_only = 1; |
43 | int pci_assign_all_buses = 0; | 43 | int 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 | */ | ||
49 | unsigned long io_page_mask; | ||
50 | |||
51 | EXPORT_SYMBOL(io_page_mask); | ||
52 | |||
53 | #ifdef CONFIG_PPC_MULTIPLATFORM | 45 | #ifdef CONFIG_PPC_MULTIPLATFORM |
54 | static void fixup_resource(struct resource *res, struct pci_dev *dev); | 46 | static void fixup_resource(struct resource *res, struct pci_dev *dev); |
55 | static void do_bus_setup(struct pci_bus *bus); | 47 | static 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) | |||
1232 | static void __devinit fixup_resource(struct resource *res, struct pci_dev *dev) | 1222 | static 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; |