|
@@ -280,107 +280,6 @@ static int __init setup_enable_8254_timer(char *s)
|
|
__setup("disable_8254_timer", setup_disable_8254_timer);
|
|
__setup("disable_8254_timer", setup_disable_8254_timer);
|
|
__setup("enable_8254_timer", setup_enable_8254_timer);
|
|
__setup("enable_8254_timer", setup_enable_8254_timer);
|
|
|
|
|
|
-#include <asm/pci-direct.h>
|
|
|
|
-#include <linux/pci_ids.h>
|
|
|
|
-#include <linux/pci.h>
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-#ifdef CONFIG_ACPI
|
|
|
|
-
|
|
|
|
-static int nvidia_hpet_detected __initdata;
|
|
|
|
-
|
|
|
|
-static int __init nvidia_hpet_check(unsigned long phys, unsigned long size)
|
|
|
|
-{
|
|
|
|
- nvidia_hpet_detected = 1;
|
|
|
|
- return 0;
|
|
|
|
-}
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
-/* Temporary Hack. Nvidia and VIA boards currently only work with IO-APIC
|
|
|
|
- off. Check for an Nvidia or VIA PCI bridge and turn it off.
|
|
|
|
- Use pci direct infrastructure because this runs before the PCI subsystem.
|
|
|
|
-
|
|
|
|
- Can be overwritten with "apic"
|
|
|
|
-
|
|
|
|
- And another hack to disable the IOMMU on VIA chipsets.
|
|
|
|
-
|
|
|
|
- ... and others. Really should move this somewhere else.
|
|
|
|
-
|
|
|
|
- Kludge-O-Rama. */
|
|
|
|
-void __init check_ioapic(void)
|
|
|
|
-{
|
|
|
|
- int num,slot,func;
|
|
|
|
- /* Poor man's PCI discovery */
|
|
|
|
- for (num = 0; num < 32; num++) {
|
|
|
|
- for (slot = 0; slot < 32; slot++) {
|
|
|
|
- for (func = 0; func < 8; func++) {
|
|
|
|
- u32 class;
|
|
|
|
- u32 vendor;
|
|
|
|
- u8 type;
|
|
|
|
- class = read_pci_config(num,slot,func,
|
|
|
|
- PCI_CLASS_REVISION);
|
|
|
|
- if (class == 0xffffffff)
|
|
|
|
- break;
|
|
|
|
-
|
|
|
|
- if ((class >> 16) != PCI_CLASS_BRIDGE_PCI)
|
|
|
|
- continue;
|
|
|
|
-
|
|
|
|
- vendor = read_pci_config(num, slot, func,
|
|
|
|
- PCI_VENDOR_ID);
|
|
|
|
- vendor &= 0xffff;
|
|
|
|
- switch (vendor) {
|
|
|
|
- case PCI_VENDOR_ID_VIA:
|
|
|
|
-#ifdef CONFIG_IOMMU
|
|
|
|
- if ((end_pfn > MAX_DMA32_PFN ||
|
|
|
|
- force_iommu) &&
|
|
|
|
- !iommu_aperture_allowed) {
|
|
|
|
- printk(KERN_INFO
|
|
|
|
- "Looks like a VIA chipset. Disabling IOMMU. Override with \"iommu=allowed\"\n");
|
|
|
|
- iommu_aperture_disabled = 1;
|
|
|
|
- }
|
|
|
|
-#endif
|
|
|
|
- return;
|
|
|
|
- case PCI_VENDOR_ID_NVIDIA:
|
|
|
|
-#ifdef CONFIG_ACPI
|
|
|
|
- /*
|
|
|
|
- * All timer overrides on Nvidia are
|
|
|
|
- * wrong unless HPET is enabled.
|
|
|
|
- */
|
|
|
|
- nvidia_hpet_detected = 0;
|
|
|
|
- acpi_table_parse(ACPI_HPET,
|
|
|
|
- nvidia_hpet_check);
|
|
|
|
- if (nvidia_hpet_detected == 0) {
|
|
|
|
- acpi_skip_timer_override = 1;
|
|
|
|
- printk(KERN_INFO "Nvidia board "
|
|
|
|
- "detected. Ignoring ACPI "
|
|
|
|
- "timer override.\n");
|
|
|
|
- }
|
|
|
|
-#endif
|
|
|
|
- /* RED-PEN skip them on mptables too? */
|
|
|
|
- return;
|
|
|
|
-
|
|
|
|
- /* This should be actually default, but
|
|
|
|
- for 2.6.16 let's do it for ATI only where
|
|
|
|
- it's really needed. */
|
|
|
|
- case PCI_VENDOR_ID_ATI:
|
|
|
|
- if (timer_over_8254 == 1) {
|
|
|
|
- timer_over_8254 = 0;
|
|
|
|
- printk(KERN_INFO
|
|
|
|
- "ATI board detected. Disabling timer routing over 8254.\n");
|
|
|
|
- }
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- /* No multi-function device? */
|
|
|
|
- type = read_pci_config_byte(num,slot,func,
|
|
|
|
- PCI_HEADER_TYPE);
|
|
|
|
- if (!(type & 0x80))
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
* Find the IRQ entry number of a certain pin.
|
|
* Find the IRQ entry number of a certain pin.
|