EDAC, sb_edac: Use cpu family/model in driver detection
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>
Showing
想要评论请 注册 或 登录