• T
    EDAC, sb_edac: Use cpu family/model in driver detection · 2c1ea4c7
    Tony Luck 提交于
    Instead of picking a random PCI ID from the dozen or so we need to
    access, just use x86_match_cpu() to pick based on CPU model number. The
    choosing of PCI devices has been problematic in the past, see
    
      11249e73 ("sb_edac: Fix detection on SNB machines")
    
    which fixed problems introduced by
    
      d0585cd8 ("sb_edac: Claim a different PCI device").
    
    This is especially ugly if future hardware might not even have
    EDAC-relevant registers in PCI config space and we would still be
    required to choose some "random" PCI devices to scan for just so our
    driver loads.
    
    Is this cleaner/clearer? It deletes much more code than it adds. Only
    tested on Broadwell. The driver loads/unloads and loads again. Still
    decodes errors too.
    Signed-off-by: NTony Luck <tony.luck@intel.com>
    Suggested-by: NBorislav Petkov <bp@alien8.de>
    Signed-off-by: NBorislav Petkov <bp@suse.de>
    2c1ea4c7
sb_edac.c 90.5 KB