[PATCH] x86: protect hpet in BAR for one ATI chipset v3 so avoid kernel don't allocate nre resource for it because it can not allocate the old address from BIOS. the same way like some IO APIC address in BAR handling Signed-off-by: Yinghai Lu --- drivers/pci/quirks.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) Index: linux-2.6/drivers/pci/quirks.c =================================================================== --- linux-2.6.orig/drivers/pci/quirks.c +++ linux-2.6/drivers/pci/quirks.c @@ -1918,6 +1918,22 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_B PCI_DEVICE_ID_NX2_5709S, quirk_brcm_570x_limit_vpd); +static void __init quirk_hpet_in_bar(struct pci_dev *pdev) +{ + int i; + u64 base, size; + + /* the BAR1 is the location of the HPET...we must + * not touch this, so forcibly insert it into the resource tree */ + base = pci_resource_start(pdev, 1); + size = pci_resource_len(pdev, 1); + if (base && size) { + insert_resource(&iomem_resource, &pdev->resource[1]); + dev_info(&pdev->dev, "HPET at %08llx-%08llx\n", base, base + size - 1); + } +} +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, 0x4385, quirk_hpet_in_bar); + #ifdef CONFIG_PCI_MSI /* Some chipsets do not support MSI. We cannot easily rely on setting * PCI_BUS_FLAGS_NO_MSI in its bus flags because there are actually