mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-03-24 04:08:00 +08:00
A fix to sb_edac correcting channel reporting on Knights Landing.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJXsXlZAAoJEBLB8Bhh3lVK9S0P/RfY0tNtBRvEkiqpCiCFEIWI WWnYpkCbCCw5UdC3Mj+ZZ+kcTLRsI+4cS+Ij5u2OO7OnLYyVbazrOCejm7EDgZaI PoDoF5YNFdn2RzYYv+u+I0AB4e8s8VE/Wcv4w1nURjSDu6kG3DKN4vSrNDe0GqIn HmLaDpfqp1GPGP+V8u+2PbkL4lGlI6Y2Ck11m7EiUwoNpPOEW2JSCl84U2vcGXOj AzdbEpQbEiD8oLx0EaUAbjCYVK4vQNQLszSEbfYGIv6ciAKgUpeIQWIiVTKH03tp KzqZK0sXQde6RcOTLAJ3bx9sdf7FzjQplKVa3B/PMzR/nHABZGttJ77rcQzMASZ2 haMjkMgi92ZxsvDqepnp2Ow/DFg8rbJJBe0qWURyihVLmJlFs4If63V35tqXCPiz XJJL/gUXqE61t3O/Ram5yEN7LxtlHDTysQk3qRg97yI9VOzMRP2boH0Nr9avExzQ caPu2zpZg8YapDFLyV8ymo37lHarFAq7JxYjjWM7nc0EFc9wvu28I6je8diQ5tOP QeuMk2/FKcEUFCzmkkNsFItQ0JaWfmA4DiPZ4kQe2omJdxDtj5wLTuJ5uLOyFiT5 gA/hIY2+fzSsBhVlph56hKhchytQ3LW+DrBgWmKk7ZWIdzTrDzJcCLdUDNM/Na+o noBQim+ucSI0pk/pe4ER =Frui -----END PGP SIGNATURE----- Merge tag 'edac_fixes_for_4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp Pull EDAC fix from Borislav Petkov: "A fix to sb_edac correcting channel reporting on Knights Landing" * tag 'edac_fixes_for_4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp: EDAC, sb_edac: Fix channel reporting on Knights Landing
This commit is contained in:
commit
f2fa30a8b8
@ -552,9 +552,9 @@ static const struct pci_id_table pci_dev_descr_haswell_table[] = {
|
||||
/* Knight's Landing Support */
|
||||
/*
|
||||
* KNL's memory channels are swizzled between memory controllers.
|
||||
* MC0 is mapped to CH3,5,6 and MC1 is mapped to CH0,1,2
|
||||
* MC0 is mapped to CH3,4,5 and MC1 is mapped to CH0,1,2
|
||||
*/
|
||||
#define knl_channel_remap(channel) ((channel + 3) % 6)
|
||||
#define knl_channel_remap(mc, chan) ((mc) ? (chan) : (chan) + 3)
|
||||
|
||||
/* Memory controller, TAD tables, error injection - 2-8-0, 2-9-0 (2 of these) */
|
||||
#define PCI_DEVICE_ID_INTEL_KNL_IMC_MC 0x7840
|
||||
@ -1286,7 +1286,7 @@ static u32 knl_get_mc_route(int entry, u32 reg)
|
||||
mc = GET_BITFIELD(reg, entry*3, (entry*3)+2);
|
||||
chan = GET_BITFIELD(reg, (entry*2) + 18, (entry*2) + 18 + 1);
|
||||
|
||||
return knl_channel_remap(mc*3 + chan);
|
||||
return knl_channel_remap(mc, chan);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -2997,8 +2997,15 @@ static void sbridge_mce_output_error(struct mem_ctl_info *mci,
|
||||
} else {
|
||||
char A = *("A");
|
||||
|
||||
channel = knl_channel_remap(channel);
|
||||
/*
|
||||
* Reported channel is in range 0-2, so we can't map it
|
||||
* back to mc. To figure out mc we check machine check
|
||||
* bank register that reported this error.
|
||||
* bank15 means mc0 and bank16 means mc1.
|
||||
*/
|
||||
channel = knl_channel_remap(m->bank == 16, channel);
|
||||
channel_mask = 1 << channel;
|
||||
|
||||
snprintf(msg, sizeof(msg),
|
||||
"%s%s err_code:%04x:%04x channel:%d (DIMM_%c)",
|
||||
overflow ? " OVERFLOW" : "",
|
||||
|
Loading…
x
Reference in New Issue
Block a user