• Yinghai Lu's avatar
    x86: fix HPET regression in 2.6.26 versus 2.6.25, check hpet against BAR, v3 · a2bd7274
    Yinghai Lu authored
    David Witbrodt tracked down (and bisected) a hpet bootup hang on his
    system to the following problem: a BIOS bug made the hpet device
    visible as a generic PCI device. If e820 reserved entries happen to
    be registered first in the resource tree [which v2.6.26 started doing],
    then the PCI code will reallocate that device's BAR to some other
    address - breaking timer IRQs and hanging the system.
    
    ( Normally hpet devices are hidden by the BIOS from the OS's PCI
      discovery via chipset magic. Sometimes the hpet is not a PCI device
      at all. )
    
    Solve this fundamental fragility by making non-PCI platform drivers
    insert resources into the resource tree even if it overlaps the e820
    reserved entry, to keep the resource manager from updating the BAR.
    
    Also do these checks for the ioapic and mmconfig addresses, and emit
    a warning if this happens.
    Bisected-by: default avatarDavid Witbrodt <dawitbro@sbcglobal.net>
    Signed-off-by: default avatarYinghai Lu <yhlu.kernel@gmail.com>
    Tested-by: default avatarDavid Witbrodt <dawitbro@sbcglobal.net>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    a2bd7274
i386.c 11.3 KB