提交 58fb24cb 编写于 作者: B Borislav Petkov

EDAC, i7300: Test for the second channel properly

REDMEMB[17] is the ECC_Locator bit, which, when set, identifies the
CS[3:2] as the simbols in error. And thus the second channel.

The macro computing it was wrong so get rid of it (it was used at one
place only) and get rid of the conditional too. Generates better code
this way anyway.
Signed-off-by: NBorislav Petkov <bp@suse.de>
Reported-by: NDavid Binderman <dcb314@hotmail.com>
Reviewed-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 127c1225
...@@ -304,7 +304,6 @@ static const char *ferr_global_lo_name[] = { ...@@ -304,7 +304,6 @@ static const char *ferr_global_lo_name[] = {
#define REDMEMA 0xdc #define REDMEMA 0xdc
#define REDMEMB 0x7c #define REDMEMB 0x7c
#define IS_SECOND_CH(v) ((v) * (1 << 17))
#define RECMEMA 0xe0 #define RECMEMA 0xe0
#define RECMEMA_BANK(v) (((v) >> 12) & 7) #define RECMEMA_BANK(v) (((v) >> 12) & 7)
...@@ -483,8 +482,9 @@ static void i7300_process_fbd_error(struct mem_ctl_info *mci) ...@@ -483,8 +482,9 @@ static void i7300_process_fbd_error(struct mem_ctl_info *mci)
pci_read_config_dword(pvt->pci_dev_16_1_fsb_addr_map, pci_read_config_dword(pvt->pci_dev_16_1_fsb_addr_map,
REDMEMB, &value); REDMEMB, &value);
channel = (branch << 1); channel = (branch << 1);
if (IS_SECOND_CH(value))
channel++; /* Second channel ? */
channel += !!(value & BIT(17));
/* Clear the error bit */ /* Clear the error bit */
pci_write_config_dword(pvt->pci_dev_16_1_fsb_addr_map, pci_write_config_dword(pvt->pci_dev_16_1_fsb_addr_map,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册