aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/edac')
-rw-r--r--drivers/edac/amd64_edac.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index 86742aaa5e55..202f08e543e3 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -1117,7 +1117,7 @@ static void k8_read_dram_base_limit(struct amd64_pvt *pvt, int dram)
1117 1117
1118static void k8_map_sysaddr_to_csrow(struct mem_ctl_info *mci, 1118static void k8_map_sysaddr_to_csrow(struct mem_ctl_info *mci,
1119 struct err_regs *info, 1119 struct err_regs *info,
1120 u64 SystemAddress) 1120 u64 sys_addr)
1121{ 1121{
1122 struct mem_ctl_info *src_mci; 1122 struct mem_ctl_info *src_mci;
1123 unsigned short syndrome; 1123 unsigned short syndrome;
@@ -1152,28 +1152,28 @@ static void k8_map_sysaddr_to_csrow(struct mem_ctl_info *mci,
1152 * was obtained from email communication with someone at AMD. 1152 * was obtained from email communication with someone at AMD.
1153 * (Wish the email was placed in this comment - norsk) 1153 * (Wish the email was placed in this comment - norsk)
1154 */ 1154 */
1155 channel = ((SystemAddress & BIT(3)) != 0); 1155 channel = ((sys_addr & BIT(3)) != 0);
1156 } 1156 }
1157 1157
1158 /* 1158 /*
1159 * Find out which node the error address belongs to. This may be 1159 * Find out which node the error address belongs to. This may be
1160 * different from the node that detected the error. 1160 * different from the node that detected the error.
1161 */ 1161 */
1162 src_mci = find_mc_by_sys_addr(mci, SystemAddress); 1162 src_mci = find_mc_by_sys_addr(mci, sys_addr);
1163 if (!src_mci) { 1163 if (!src_mci) {
1164 amd64_mc_printk(mci, KERN_ERR, 1164 amd64_mc_printk(mci, KERN_ERR,
1165 "failed to map error address 0x%lx to a node\n", 1165 "failed to map error address 0x%lx to a node\n",
1166 (unsigned long)SystemAddress); 1166 (unsigned long)sys_addr);
1167 edac_mc_handle_ce_no_info(mci, EDAC_MOD_STR); 1167 edac_mc_handle_ce_no_info(mci, EDAC_MOD_STR);
1168 return; 1168 return;
1169 } 1169 }
1170 1170
1171 /* Now map the SystemAddress to a CSROW */ 1171 /* Now map the sys_addr to a CSROW */
1172 csrow = sys_addr_to_csrow(src_mci, SystemAddress); 1172 csrow = sys_addr_to_csrow(src_mci, sys_addr);
1173 if (csrow < 0) { 1173 if (csrow < 0) {
1174 edac_mc_handle_ce_no_info(src_mci, EDAC_MOD_STR); 1174 edac_mc_handle_ce_no_info(src_mci, EDAC_MOD_STR);
1175 } else { 1175 } else {
1176 error_address_to_page_and_offset(SystemAddress, &page, &offset); 1176 error_address_to_page_and_offset(sys_addr, &page, &offset);
1177 1177
1178 edac_mc_handle_ce(src_mci, page, offset, syndrome, csrow, 1178 edac_mc_handle_ce(src_mci, page, offset, syndrome, csrow,
1179 channel, EDAC_MOD_STR); 1179 channel, EDAC_MOD_STR);
@@ -2108,7 +2108,7 @@ static void amd64_handle_ce(struct mem_ctl_info *mci,
2108 struct err_regs *info) 2108 struct err_regs *info)
2109{ 2109{
2110 struct amd64_pvt *pvt = mci->pvt_info; 2110 struct amd64_pvt *pvt = mci->pvt_info;
2111 u64 SystemAddress; 2111 u64 sys_addr;
2112 2112
2113 /* Ensure that the Error Address is VALID */ 2113 /* Ensure that the Error Address is VALID */
2114 if ((info->nbsh & K8_NBSH_VALID_ERROR_ADDR) == 0) { 2114 if ((info->nbsh & K8_NBSH_VALID_ERROR_ADDR) == 0) {
@@ -2118,12 +2118,12 @@ static void amd64_handle_ce(struct mem_ctl_info *mci,
2118 return; 2118 return;
2119 } 2119 }
2120 2120
2121 SystemAddress = extract_error_address(mci, info); 2121 sys_addr = extract_error_address(mci, info);
2122 2122
2123 amd64_mc_printk(mci, KERN_ERR, 2123 amd64_mc_printk(mci, KERN_ERR,
2124 "CE ERROR_ADDRESS= 0x%llx\n", SystemAddress); 2124 "CE ERROR_ADDRESS= 0x%llx\n", sys_addr);
2125 2125
2126 pvt->ops->map_sysaddr_to_csrow(mci, info, SystemAddress); 2126 pvt->ops->map_sysaddr_to_csrow(mci, info, sys_addr);
2127} 2127}
2128 2128
2129/* Handle any Un-correctable Errors (UEs) */ 2129/* Handle any Un-correctable Errors (UEs) */
@@ -2131,7 +2131,7 @@ static void amd64_handle_ue(struct mem_ctl_info *mci,
2131 struct err_regs *info) 2131 struct err_regs *info)
2132{ 2132{
2133 int csrow; 2133 int csrow;
2134 u64 SystemAddress; 2134 u64 sys_addr;
2135 u32 page, offset; 2135 u32 page, offset;
2136 struct mem_ctl_info *log_mci, *src_mci = NULL; 2136 struct mem_ctl_info *log_mci, *src_mci = NULL;
2137 2137
@@ -2144,31 +2144,31 @@ static void amd64_handle_ue(struct mem_ctl_info *mci,
2144 return; 2144 return;
2145 } 2145 }
2146 2146
2147 SystemAddress = extract_error_address(mci, info); 2147 sys_addr = extract_error_address(mci, info);
2148 2148
2149 /* 2149 /*
2150 * Find out which node the error address belongs to. This may be 2150 * Find out which node the error address belongs to. This may be
2151 * different from the node that detected the error. 2151 * different from the node that detected the error.
2152 */ 2152 */
2153 src_mci = find_mc_by_sys_addr(mci, SystemAddress); 2153 src_mci = find_mc_by_sys_addr(mci, sys_addr);
2154 if (!src_mci) { 2154 if (!src_mci) {
2155 amd64_mc_printk(mci, KERN_CRIT, 2155 amd64_mc_printk(mci, KERN_CRIT,
2156 "ERROR ADDRESS (0x%lx) value NOT mapped to a MC\n", 2156 "ERROR ADDRESS (0x%lx) value NOT mapped to a MC\n",
2157 (unsigned long)SystemAddress); 2157 (unsigned long)sys_addr);
2158 edac_mc_handle_ue_no_info(log_mci, EDAC_MOD_STR); 2158 edac_mc_handle_ue_no_info(log_mci, EDAC_MOD_STR);
2159 return; 2159 return;
2160 } 2160 }
2161 2161
2162 log_mci = src_mci; 2162 log_mci = src_mci;
2163 2163
2164 csrow = sys_addr_to_csrow(log_mci, SystemAddress); 2164 csrow = sys_addr_to_csrow(log_mci, sys_addr);
2165 if (csrow < 0) { 2165 if (csrow < 0) {
2166 amd64_mc_printk(mci, KERN_CRIT, 2166 amd64_mc_printk(mci, KERN_CRIT,
2167 "ERROR_ADDRESS (0x%lx) value NOT mapped to 'csrow'\n", 2167 "ERROR_ADDRESS (0x%lx) value NOT mapped to 'csrow'\n",
2168 (unsigned long)SystemAddress); 2168 (unsigned long)sys_addr);
2169 edac_mc_handle_ue_no_info(log_mci, EDAC_MOD_STR); 2169 edac_mc_handle_ue_no_info(log_mci, EDAC_MOD_STR);
2170 } else { 2170 } else {
2171 error_address_to_page_and_offset(SystemAddress, &page, &offset); 2171 error_address_to_page_and_offset(sys_addr, &page, &offset);
2172 edac_mc_handle_ue(log_mci, page, offset, csrow, EDAC_MOD_STR); 2172 edac_mc_handle_ue(log_mci, page, offset, csrow, EDAC_MOD_STR);
2173 } 2173 }
2174} 2174}