Skip to content

Commit

Permalink
Merge tag 'edac_urgent_for_v6.10_rc3' of git://git.kernel.org/pub/scm…
Browse files Browse the repository at this point in the history
…/linux/kernel/git/ras/ras

Pull EDAC fixes from Borislav Petkov:

 - Convert PCI core error codes to proper error numbers since latter get
   propagated all the way up to the module loading functions

* tag 'edac_urgent_for_v6.10_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras:
  EDAC/igen6: Convert PCIBIOS_* return codes to errnos
  EDAC/amd64: Convert PCIBIOS_* return codes to errnos
  • Loading branch information
torvalds committed Jun 9, 2024
2 parents 771ed66 + f8367a7 commit 637c2df
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions drivers/edac/amd64_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ int __amd64_read_pci_cfg_dword(struct pci_dev *pdev, int offset,
amd64_warn("%s: error reading F%dx%03x.\n",
func, PCI_FUNC(pdev->devfn), offset);

return err;
return pcibios_err_to_errno(err);
}

int __amd64_write_pci_cfg_dword(struct pci_dev *pdev, int offset,
Expand All @@ -94,7 +94,7 @@ int __amd64_write_pci_cfg_dword(struct pci_dev *pdev, int offset,
amd64_warn("%s: error writing to F%dx%03x.\n",
func, PCI_FUNC(pdev->devfn), offset);

return err;
return pcibios_err_to_errno(err);
}

/*
Expand Down Expand Up @@ -1025,8 +1025,10 @@ static int gpu_get_node_map(struct amd64_pvt *pvt)
}

ret = pci_read_config_dword(pdev, REG_LOCAL_NODE_TYPE_MAP, &tmp);
if (ret)
if (ret) {
ret = pcibios_err_to_errno(ret);
goto out;
}

gpu_node_map.node_count = FIELD_GET(LNTM_NODE_COUNT, tmp);
gpu_node_map.base_node_id = FIELD_GET(LNTM_BASE_NODE_ID, tmp);
Expand Down
4 changes: 2 additions & 2 deletions drivers/edac/igen6_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ static int errcmd_enable_error_reporting(bool enable)

rc = pci_read_config_word(imc->pdev, ERRCMD_OFFSET, &errcmd);
if (rc)
return rc;
return pcibios_err_to_errno(rc);

if (enable)
errcmd |= ERRCMD_CE | ERRSTS_UE;
Expand All @@ -809,7 +809,7 @@ static int errcmd_enable_error_reporting(bool enable)

rc = pci_write_config_word(imc->pdev, ERRCMD_OFFSET, errcmd);
if (rc)
return rc;
return pcibios_err_to_errno(rc);

return 0;
}
Expand Down

0 comments on commit 637c2df

Please sign in to comment.