Skip to content

Commit

Permalink
EDAC, thunderx: Change LMC index calculation
Browse files Browse the repository at this point in the history
Shift the node number by 3 bits instead of 8 allowing proper functioning
with default EDAC_MAX_MCS.

Signed-off-by: Sergey Temerkhanov <s.temerkhanov@gmail.com>
Cc: David Daney <david.daney@cavium.com>
Cc: Jan.Glauber@cavium.com
Cc: linux-edac <linux-edac@vger.kernel.org>
Link: http://lkml.kernel.org/r/20170406113755.17082-1-s.temerkhanov@gmail.com
Signed-off-by: Borislav Petkov <bp@suse.de>
  • Loading branch information
Sergey Temerkhanov authored and Borislav Petkov committed Apr 7, 2017
1 parent 25b223d commit 3d2d8c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/edac/thunderx_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ static inline int pci_dev_to_mc_idx(struct pci_dev *pdev)
int node = dev_to_node(&pdev->dev);
int ret = PCI_FUNC(pdev->devfn);

ret += max(node, 0) << 8;
ret += max(node, 0) << 3;

return ret;
}
Expand Down

0 comments on commit 3d2d8c0

Please sign in to comment.