• S
    EDAC, sb_edac: Fix TAD presence check for sbridge_mci_bind_devs() · 2900ea60
    Seth Jennings 提交于
    In commit
    
      7d375bff ("sb_edac: Fix support for systems with two home agents per socket")
    
    NUM_CHANNELS was changed to 8 and the channel space was renumerated to
    handle EN, EP, and EX configurations.
    
    The *_mci_bind_devs() functions - except for sbridge_mci_bind_devs() -
    got a new device presence check in the form of saw_chan_mask. However,
    sbridge_mci_bind_devs() still uses the NUM_CHANNELS for loop.
    
    With the increase in NUM_CHANNELS, this loop fails at index 4 since
    SB only has 4 TADs.  This results in the following error on SB machines:
    
      EDAC sbridge: Some needed devices are missing
      EDAC sbridge: Couldn't find mci handler
      EDAC sbridge: Couldn't find mci handle
    
    This patch adapts the saw_chan_mask logic for sbridge_mci_bind_devs() as
    well.
    
    After this patch:
    
      EDAC MC0: Giving out device to module sbridge_edac.c controller Sandy Bridge Socket#0: DEV 0000:3f:0e.0 (POLLED)
      EDAC MC1: Giving out device to module sbridge_edac.c controller Sandy Bridge Socket#1: DEV 0000:7f:0e.0 (POLLED)
    Signed-off-by: NSeth Jennings <sjenning@redhat.com>
    Acked-by: NAristeu Rozanski <aris@redhat.com>
    Acked-by: NTony Luck <tony.luck@intel.com>
    Tested-by: NBorislav Petkov <bp@suse.de>
    Cc: <stable@vger.kernel.org> # v4.2
    Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
    Cc: linux-edac <linux-edac@vger.kernel.org>
    Link: http://lkml.kernel.org/r/1438798561-10180-1-git-send-email-sjenning@redhat.comSigned-off-by: NBorislav Petkov <bp@suse.de>
    2900ea60
sb_edac.c 69.4 KB