diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-29 17:38:03 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-29 17:46:05 -0400 |
commit | b4609472116bb806a95e98d04767189406c74c70 (patch) | |
tree | e61ad5389ab8576ac4e87eefdff8f2a3cba0abc2 /arch | |
parent | 24342c34a022ee90839873d91396045e12ef1090 (diff) |
Revert "x86: fix HPET regression in 2.6.26 versus 2.6.25, check hpet against BAR, v3"
This reverts commit a2bd7274b47124d2fc4dfdb8c0591f545ba749dd.
It wasn't really right to begin with (there's a better fix for the
problem with e820 reservations clashing with PCI BAR's pending), but it
also actually causes more regressions, so it should be reverted even
before the better fix is finalized.
Rafael reports that this commit broke AHCI detection, and thus causes
the kernel to not boot on his quad core test box.
Reported-and-bisected-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: David Witbrodt <dawitbro@sbcglobal.net>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/pci/i386.c | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c index d765da913842..5807d1bc73f7 100644 --- a/arch/x86/pci/i386.c +++ b/arch/x86/pci/i386.c | |||
@@ -31,11 +31,8 @@ | |||
31 | #include <linux/ioport.h> | 31 | #include <linux/ioport.h> |
32 | #include <linux/errno.h> | 32 | #include <linux/errno.h> |
33 | #include <linux/bootmem.h> | 33 | #include <linux/bootmem.h> |
34 | #include <linux/acpi.h> | ||
35 | 34 | ||
36 | #include <asm/pat.h> | 35 | #include <asm/pat.h> |
37 | #include <asm/hpet.h> | ||
38 | #include <asm/io_apic.h> | ||
39 | 36 | ||
40 | #include "pci.h" | 37 | #include "pci.h" |
41 | 38 | ||
@@ -80,77 +77,6 @@ pcibios_align_resource(void *data, struct resource *res, | |||
80 | } | 77 | } |
81 | EXPORT_SYMBOL(pcibios_align_resource); | 78 | EXPORT_SYMBOL(pcibios_align_resource); |
82 | 79 | ||
83 | static int check_res_with_valid(struct pci_dev *dev, struct resource *res) | ||
84 | { | ||
85 | unsigned long base; | ||
86 | unsigned long size; | ||
87 | int i; | ||
88 | |||
89 | base = res->start; | ||
90 | size = (res->start == 0 && res->end == res->start) ? 0 : | ||
91 | (res->end - res->start + 1); | ||
92 | |||
93 | if (!base || !size) | ||
94 | return 0; | ||
95 | |||
96 | #ifdef CONFIG_HPET_TIMER | ||
97 | /* for hpet */ | ||
98 | if (base == hpet_address && (res->flags & IORESOURCE_MEM)) { | ||
99 | dev_info(&dev->dev, "BAR has HPET at %08lx-%08lx\n", | ||
100 | base, base + size - 1); | ||
101 | return 1; | ||
102 | } | ||
103 | #endif | ||
104 | |||
105 | #ifdef CONFIG_X86_IO_APIC | ||
106 | for (i = 0; i < nr_ioapics; i++) { | ||
107 | unsigned long ioapic_phys = mp_ioapics[i].mp_apicaddr; | ||
108 | |||
109 | if (base == ioapic_phys && (res->flags & IORESOURCE_MEM)) { | ||
110 | dev_info(&dev->dev, "BAR has ioapic at %08lx-%08lx\n", | ||
111 | base, base + size - 1); | ||
112 | return 1; | ||
113 | } | ||
114 | } | ||
115 | #endif | ||
116 | |||
117 | #ifdef CONFIG_PCI_MMCONFIG | ||
118 | for (i = 0; i < pci_mmcfg_config_num; i++) { | ||
119 | unsigned long addr; | ||
120 | |||
121 | addr = pci_mmcfg_config[i].address; | ||
122 | if (base == addr && (res->flags & IORESOURCE_MEM)) { | ||
123 | dev_info(&dev->dev, "BAR has MMCONFIG at %08lx-%08lx\n", | ||
124 | base, base + size - 1); | ||
125 | return 1; | ||
126 | } | ||
127 | } | ||
128 | #endif | ||
129 | |||
130 | return 0; | ||
131 | } | ||
132 | |||
133 | static int check_platform(struct pci_dev *dev, struct resource *res) | ||
134 | { | ||
135 | struct resource *root = NULL; | ||
136 | |||
137 | /* | ||
138 | * forcibly insert it into the | ||
139 | * resource tree | ||
140 | */ | ||
141 | if (res->flags & IORESOURCE_MEM) | ||
142 | root = &iomem_resource; | ||
143 | else if (res->flags & IORESOURCE_IO) | ||
144 | root = &ioport_resource; | ||
145 | |||
146 | if (root && check_res_with_valid(dev, res)) { | ||
147 | insert_resource(root, res); | ||
148 | |||
149 | return 1; | ||
150 | } | ||
151 | |||
152 | return 0; | ||
153 | } | ||
154 | /* | 80 | /* |
155 | * Handle resources of PCI devices. If the world were perfect, we could | 81 | * Handle resources of PCI devices. If the world were perfect, we could |
156 | * just allocate all the resource regions and do nothing more. It isn't. | 82 | * just allocate all the resource regions and do nothing more. It isn't. |
@@ -202,8 +128,6 @@ static void __init pcibios_allocate_bus_resources(struct list_head *bus_list) | |||
202 | pr = pci_find_parent_resource(dev, r); | 128 | pr = pci_find_parent_resource(dev, r); |
203 | if (!r->start || !pr || | 129 | if (!r->start || !pr || |
204 | request_resource(pr, r) < 0) { | 130 | request_resource(pr, r) < 0) { |
205 | if (check_platform(dev, r)) | ||
206 | continue; | ||
207 | dev_err(&dev->dev, "BAR %d: can't " | 131 | dev_err(&dev->dev, "BAR %d: can't " |
208 | "allocate resource\n", idx); | 132 | "allocate resource\n", idx); |
209 | /* | 133 | /* |
@@ -247,8 +171,6 @@ static void __init pcibios_allocate_resources(int pass) | |||
247 | r->flags, disabled, pass); | 171 | r->flags, disabled, pass); |
248 | pr = pci_find_parent_resource(dev, r); | 172 | pr = pci_find_parent_resource(dev, r); |
249 | if (!pr || request_resource(pr, r) < 0) { | 173 | if (!pr || request_resource(pr, r) < 0) { |
250 | if (check_platform(dev, r)) | ||
251 | continue; | ||
252 | dev_err(&dev->dev, "BAR %d: can't " | 174 | dev_err(&dev->dev, "BAR %d: can't " |
253 | "allocate resource\n", idx); | 175 | "allocate resource\n", idx); |
254 | /* We'll assign a new address later */ | 176 | /* We'll assign a new address later */ |