Commit 1a6775c1 authored by Aravind Gopalakrishnan's avatar Aravind Gopalakrishnan Committed by Ingo Molnar

x86/amd_nb, EDAC: Rename amd_get_node_id()

This function doesn't give us the "Node ID" as the function name
suggests. Rather, it receives a PCI device as argument, checks
the available F3 PCI device IDs in the system and returns the
index of the matching Bus/Device IDs.

Rename it to amd_pci_dev_to_node_id().

No functional change is introduced.
Suggested-by: default avatarIngo Molnar <mingo@kernel.org>
Signed-off-by: default avatarAravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-edac <linux-edac@vger.kernel.org>
Link: http://lkml.kernel.org/r/1445246268-26285-3-git-send-email-bp@alien8.deSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent eb6db83d
...@@ -81,7 +81,7 @@ static inline struct amd_northbridge *node_to_amd_nb(int node) ...@@ -81,7 +81,7 @@ static inline struct amd_northbridge *node_to_amd_nb(int node)
return (node < amd_northbridges.num) ? &amd_northbridges.nb[node] : NULL; return (node < amd_northbridges.num) ? &amd_northbridges.nb[node] : NULL;
} }
static inline u16 amd_get_node_id(struct pci_dev *pdev) static inline u16 amd_pci_dev_to_node_id(struct pci_dev *pdev)
{ {
struct pci_dev *misc; struct pci_dev *misc;
int i; int i;
......
...@@ -2770,7 +2770,7 @@ static int init_one_instance(struct pci_dev *F2) ...@@ -2770,7 +2770,7 @@ static int init_one_instance(struct pci_dev *F2)
struct mem_ctl_info *mci = NULL; struct mem_ctl_info *mci = NULL;
struct edac_mc_layer layers[2]; struct edac_mc_layer layers[2];
int err = 0, ret; int err = 0, ret;
u16 nid = amd_get_node_id(F2); u16 nid = amd_pci_dev_to_node_id(F2);
ret = -ENOMEM; ret = -ENOMEM;
pvt = kzalloc(sizeof(struct amd64_pvt), GFP_KERNEL); pvt = kzalloc(sizeof(struct amd64_pvt), GFP_KERNEL);
...@@ -2860,7 +2860,7 @@ static int init_one_instance(struct pci_dev *F2) ...@@ -2860,7 +2860,7 @@ static int init_one_instance(struct pci_dev *F2)
static int probe_one_instance(struct pci_dev *pdev, static int probe_one_instance(struct pci_dev *pdev,
const struct pci_device_id *mc_type) const struct pci_device_id *mc_type)
{ {
u16 nid = amd_get_node_id(pdev); u16 nid = amd_pci_dev_to_node_id(pdev);
struct pci_dev *F3 = node_to_amd_nb(nid)->misc; struct pci_dev *F3 = node_to_amd_nb(nid)->misc;
struct ecc_settings *s; struct ecc_settings *s;
int ret = 0; int ret = 0;
...@@ -2910,7 +2910,7 @@ static void remove_one_instance(struct pci_dev *pdev) ...@@ -2910,7 +2910,7 @@ static void remove_one_instance(struct pci_dev *pdev)
{ {
struct mem_ctl_info *mci; struct mem_ctl_info *mci;
struct amd64_pvt *pvt; struct amd64_pvt *pvt;
u16 nid = amd_get_node_id(pdev); u16 nid = amd_pci_dev_to_node_id(pdev);
struct pci_dev *F3 = node_to_amd_nb(nid)->misc; struct pci_dev *F3 = node_to_amd_nb(nid)->misc;
struct ecc_settings *s = ecc_stngs[nid]; struct ecc_settings *s = ecc_stngs[nid];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment