diff options
author | Daniel J Blueman <daniel@numascale-asia.com> | 2012-11-27 01:32:09 -0500 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2013-01-10 10:17:58 -0500 |
commit | 772c3ff385eda0d0b4744596f87b79a17f8c9282 (patch) | |
tree | beafb4dbaafa13dc01a35acb5d8b4949bb568d0e /drivers/edac | |
parent | 9931faca02c604c22335f5a935a501bb2ace6e20 (diff) |
x86, AMD, NB: Add multi-domain support
Fix get_node_id to match northbridge IDs from the array of detected
ones, allowing multi-server support such as with Numascale's
NumaConnect, renaming to 'amd_get_node_id' for consistency.
Signed-off-by: Daniel J Blueman <daniel@numascale-asia.com>
Link: http://lkml.kernel.org/r/1353997932-8475-1-git-send-email-daniel@numascale-asia.com
[Boris: shorten lines to fit 80 cols]
Signed-off-by: Borislav Petkov <bp@alien8.de>
Diffstat (limited to 'drivers/edac')
-rw-r--r-- | drivers/edac/amd64_edac.c | 6 | ||||
-rw-r--r-- | drivers/edac/amd64_edac.h | 6 |
2 files changed, 3 insertions, 9 deletions
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index ad8bf2aa629d..a3fe39b1f78b 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c | |||
@@ -2474,7 +2474,7 @@ static int amd64_init_one_instance(struct pci_dev *F2) | |||
2474 | struct mem_ctl_info *mci = NULL; | 2474 | struct mem_ctl_info *mci = NULL; |
2475 | struct edac_mc_layer layers[2]; | 2475 | struct edac_mc_layer layers[2]; |
2476 | int err = 0, ret; | 2476 | int err = 0, ret; |
2477 | u8 nid = get_node_id(F2); | 2477 | u16 nid = amd_get_node_id(F2); |
2478 | 2478 | ||
2479 | ret = -ENOMEM; | 2479 | ret = -ENOMEM; |
2480 | pvt = kzalloc(sizeof(struct amd64_pvt), GFP_KERNEL); | 2480 | pvt = kzalloc(sizeof(struct amd64_pvt), GFP_KERNEL); |
@@ -2566,7 +2566,7 @@ err_ret: | |||
2566 | static int amd64_probe_one_instance(struct pci_dev *pdev, | 2566 | static int amd64_probe_one_instance(struct pci_dev *pdev, |
2567 | const struct pci_device_id *mc_type) | 2567 | const struct pci_device_id *mc_type) |
2568 | { | 2568 | { |
2569 | u8 nid = get_node_id(pdev); | 2569 | u16 nid = amd_get_node_id(pdev); |
2570 | struct pci_dev *F3 = node_to_amd_nb(nid)->misc; | 2570 | struct pci_dev *F3 = node_to_amd_nb(nid)->misc; |
2571 | struct ecc_settings *s; | 2571 | struct ecc_settings *s; |
2572 | int ret = 0; | 2572 | int ret = 0; |
@@ -2616,7 +2616,7 @@ static void amd64_remove_one_instance(struct pci_dev *pdev) | |||
2616 | { | 2616 | { |
2617 | struct mem_ctl_info *mci; | 2617 | struct mem_ctl_info *mci; |
2618 | struct amd64_pvt *pvt; | 2618 | struct amd64_pvt *pvt; |
2619 | u8 nid = get_node_id(pdev); | 2619 | u16 nid = amd_get_node_id(pdev); |
2620 | struct pci_dev *F3 = node_to_amd_nb(nid)->misc; | 2620 | struct pci_dev *F3 = node_to_amd_nb(nid)->misc; |
2621 | struct ecc_settings *s = ecc_stngs[nid]; | 2621 | struct ecc_settings *s = ecc_stngs[nid]; |
2622 | 2622 | ||
diff --git a/drivers/edac/amd64_edac.h b/drivers/edac/amd64_edac.h index e864f407806c..cd7845fcc272 100644 --- a/drivers/edac/amd64_edac.h +++ b/drivers/edac/amd64_edac.h | |||
@@ -292,12 +292,6 @@ | |||
292 | /* MSRs */ | 292 | /* MSRs */ |
293 | #define MSR_MCGCTL_NBE BIT(4) | 293 | #define MSR_MCGCTL_NBE BIT(4) |
294 | 294 | ||
295 | /* AMD sets the first MC device at device ID 0x18. */ | ||
296 | static inline u8 get_node_id(struct pci_dev *pdev) | ||
297 | { | ||
298 | return PCI_SLOT(pdev->devfn) - 0x18; | ||
299 | } | ||
300 | |||
301 | enum amd_families { | 295 | enum amd_families { |
302 | K8_CPUS = 0, | 296 | K8_CPUS = 0, |
303 | F10_CPUS, | 297 | F10_CPUS, |