diff options
author | Andi Kleen <ak@suse.de> | 2006-09-26 04:52:30 -0400 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2006-09-26 04:52:30 -0400 |
commit | dfa4698c50bf85b7927214b0e4a3dc4bc3b3c4a9 (patch) | |
tree | 5273f10e463cef99b1a3fd4d369a8a6f2f4c6dce /arch/x86_64/kernel/io_apic.c | |
parent | edd965229669f8f8dfddec8c863250440fb65ab3 (diff) |
[PATCH] Move early chipset quirks out to new file
They did not really belong into io_apic.c. Move them into a new file
and clean it up a bit.
Also remove outdated ATI quirk that was obsolete,
Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'arch/x86_64/kernel/io_apic.c')
-rw-r--r-- | arch/x86_64/kernel/io_apic.c | 101 |
1 files changed, 0 insertions, 101 deletions
diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c index a02ed17d05dc..8bbff64c20d7 100644 --- a/arch/x86_64/kernel/io_apic.c +++ b/arch/x86_64/kernel/io_apic.c | |||
@@ -280,107 +280,6 @@ static int __init setup_enable_8254_timer(char *s) | |||
280 | __setup("disable_8254_timer", setup_disable_8254_timer); | 280 | __setup("disable_8254_timer", setup_disable_8254_timer); |
281 | __setup("enable_8254_timer", setup_enable_8254_timer); | 281 | __setup("enable_8254_timer", setup_enable_8254_timer); |
282 | 282 | ||
283 | #include <asm/pci-direct.h> | ||
284 | #include <linux/pci_ids.h> | ||
285 | #include <linux/pci.h> | ||
286 | |||
287 | |||
288 | #ifdef CONFIG_ACPI | ||
289 | |||
290 | static int nvidia_hpet_detected __initdata; | ||
291 | |||
292 | static int __init nvidia_hpet_check(unsigned long phys, unsigned long size) | ||
293 | { | ||
294 | nvidia_hpet_detected = 1; | ||
295 | return 0; | ||
296 | } | ||
297 | #endif | ||
298 | |||
299 | /* Temporary Hack. Nvidia and VIA boards currently only work with IO-APIC | ||
300 | off. Check for an Nvidia or VIA PCI bridge and turn it off. | ||
301 | Use pci direct infrastructure because this runs before the PCI subsystem. | ||
302 | |||
303 | Can be overwritten with "apic" | ||
304 | |||
305 | And another hack to disable the IOMMU on VIA chipsets. | ||
306 | |||
307 | ... and others. Really should move this somewhere else. | ||
308 | |||
309 | Kludge-O-Rama. */ | ||
310 | void __init check_ioapic(void) | ||
311 | { | ||
312 | int num,slot,func; | ||
313 | /* Poor man's PCI discovery */ | ||
314 | for (num = 0; num < 32; num++) { | ||
315 | for (slot = 0; slot < 32; slot++) { | ||
316 | for (func = 0; func < 8; func++) { | ||
317 | u32 class; | ||
318 | u32 vendor; | ||
319 | u8 type; | ||
320 | class = read_pci_config(num,slot,func, | ||
321 | PCI_CLASS_REVISION); | ||
322 | if (class == 0xffffffff) | ||
323 | break; | ||
324 | |||
325 | if ((class >> 16) != PCI_CLASS_BRIDGE_PCI) | ||
326 | continue; | ||
327 | |||
328 | vendor = read_pci_config(num, slot, func, | ||
329 | PCI_VENDOR_ID); | ||
330 | vendor &= 0xffff; | ||
331 | switch (vendor) { | ||
332 | case PCI_VENDOR_ID_VIA: | ||
333 | #ifdef CONFIG_IOMMU | ||
334 | if ((end_pfn > MAX_DMA32_PFN || | ||
335 | force_iommu) && | ||
336 | !iommu_aperture_allowed) { | ||
337 | printk(KERN_INFO | ||
338 | "Looks like a VIA chipset. Disabling IOMMU. Override with \"iommu=allowed\"\n"); | ||
339 | iommu_aperture_disabled = 1; | ||
340 | } | ||
341 | #endif | ||
342 | return; | ||
343 | case PCI_VENDOR_ID_NVIDIA: | ||
344 | #ifdef CONFIG_ACPI | ||
345 | /* | ||
346 | * All timer overrides on Nvidia are | ||
347 | * wrong unless HPET is enabled. | ||
348 | */ | ||
349 | nvidia_hpet_detected = 0; | ||
350 | acpi_table_parse(ACPI_HPET, | ||
351 | nvidia_hpet_check); | ||
352 | if (nvidia_hpet_detected == 0) { | ||
353 | acpi_skip_timer_override = 1; | ||
354 | printk(KERN_INFO "Nvidia board " | ||
355 | "detected. Ignoring ACPI " | ||
356 | "timer override.\n"); | ||
357 | } | ||
358 | #endif | ||
359 | /* RED-PEN skip them on mptables too? */ | ||
360 | return; | ||
361 | |||
362 | /* This should be actually default, but | ||
363 | for 2.6.16 let's do it for ATI only where | ||
364 | it's really needed. */ | ||
365 | case PCI_VENDOR_ID_ATI: | ||
366 | if (timer_over_8254 == 1) { | ||
367 | timer_over_8254 = 0; | ||
368 | printk(KERN_INFO | ||
369 | "ATI board detected. Disabling timer routing over 8254.\n"); | ||
370 | } | ||
371 | return; | ||
372 | } | ||
373 | |||
374 | |||
375 | /* No multi-function device? */ | ||
376 | type = read_pci_config_byte(num,slot,func, | ||
377 | PCI_HEADER_TYPE); | ||
378 | if (!(type & 0x80)) | ||
379 | break; | ||
380 | } | ||
381 | } | ||
382 | } | ||
383 | } | ||
384 | 283 | ||
385 | /* | 284 | /* |
386 | * Find the IRQ entry number of a certain pin. | 285 | * Find the IRQ entry number of a certain pin. |