Skip to content

Commit

Permalink
EDAC, skx, i10nm: Fix source ID register offset
Browse files Browse the repository at this point in the history
The source ID register offset for Skylake server is 0xf0, while for
Icelake server is 0xf8. Pass the correct offset to get the source ID.

Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
  • Loading branch information
qzhuo2 authored and aegl committed Jun 26, 2019
1 parent c4a1dd9 commit 1dc78f1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion drivers/edac/i10nm_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ static int __init i10nm_init(void)
goto fail;

list_for_each_entry(d, i10nm_edac_list, list) {
rc = skx_get_src_id(d, &src_id);
rc = skx_get_src_id(d, 0xf8, &src_id);
if (rc < 0)
goto fail;

Expand Down
2 changes: 1 addition & 1 deletion drivers/edac/skx_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ static int __init skx_init(void)
}

list_for_each_entry(d, skx_edac_list, list) {
rc = skx_get_src_id(d, &src_id);
rc = skx_get_src_id(d, 0xf0, &src_id);
if (rc < 0)
goto fail;
rc = skx_get_node_id(d, &node_id);
Expand Down
4 changes: 2 additions & 2 deletions drivers/edac/skx_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,11 @@ void skx_set_decode(skx_decode_f decode)
skx_decode = decode;
}

int skx_get_src_id(struct skx_dev *d, u8 *id)
int skx_get_src_id(struct skx_dev *d, int off, u8 *id)
{
u32 reg;

if (pci_read_config_dword(d->util_all, 0xf0, &reg)) {
if (pci_read_config_dword(d->util_all, off, &reg)) {
skx_printk(KERN_ERR, "Failed to read src id\n");
return -ENODEV;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/edac/skx_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ int __init skx_adxl_get(void);
void __exit skx_adxl_put(void);
void skx_set_decode(skx_decode_f decode);

int skx_get_src_id(struct skx_dev *d, u8 *id);
int skx_get_src_id(struct skx_dev *d, int off, u8 *id);
int skx_get_node_id(struct skx_dev *d, u8 *id);

int skx_get_all_bus_mappings(unsigned int did, int off, enum type,
Expand Down

0 comments on commit 1dc78f1

Please sign in to comment.