Skip to content

Commit 14646de

Browse files
qzhuo2aegl
authored andcommitted
EDAC/skx_common: Add ChipSelect ADXL component
Each pseudo channel of HBM has its own retry_rd_err_log registers. The bit 0 of ChipSelect ADXL component encodes the pseudo channel number of HBM memory. So add ChipSelect ADXL component to get HBM pseudo channel number. Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com> Signed-off-by: Tony Luck <tony.luck@intel.com> Link: https://lore.kernel.org/all/20220722233338.341567-1-tony.luck@intel.com
1 parent d5e4eee commit 14646de

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

drivers/edac/skx_common.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ static const char * const component_names[] = {
2727
[INDEX_MEMCTRL] = "MemoryControllerId",
2828
[INDEX_CHANNEL] = "ChannelId",
2929
[INDEX_DIMM] = "DimmSlotId",
30+
[INDEX_CS] = "ChipSelect",
3031
[INDEX_NM_MEMCTRL] = "NmMemoryControllerId",
3132
[INDEX_NM_CHANNEL] = "NmChannelId",
3233
[INDEX_NM_DIMM] = "NmDimmSlotId",
34+
[INDEX_NM_CS] = "NmChipSelect",
3335
};
3436

3537
static int component_indices[ARRAY_SIZE(component_names)];
@@ -139,10 +141,13 @@ static bool skx_adxl_decode(struct decoded_addr *res, bool error_in_1st_level_me
139141
(int)adxl_values[component_indices[INDEX_NM_CHANNEL]] : -1;
140142
res->dimm = (adxl_nm_bitmap & BIT_NM_DIMM) ?
141143
(int)adxl_values[component_indices[INDEX_NM_DIMM]] : -1;
144+
res->cs = (adxl_nm_bitmap & BIT_NM_CS) ?
145+
(int)adxl_values[component_indices[INDEX_NM_CS]] : -1;
142146
} else {
143147
res->imc = (int)adxl_values[component_indices[INDEX_MEMCTRL]];
144148
res->channel = (int)adxl_values[component_indices[INDEX_CHANNEL]];
145149
res->dimm = (int)adxl_values[component_indices[INDEX_DIMM]];
150+
res->cs = (int)adxl_values[component_indices[INDEX_CS]];
146151
}
147152

148153
if (res->imc > NUM_IMC - 1 || res->imc < 0) {

drivers/edac/skx_common.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,16 +112,19 @@ enum {
112112
INDEX_MEMCTRL,
113113
INDEX_CHANNEL,
114114
INDEX_DIMM,
115+
INDEX_CS,
115116
INDEX_NM_FIRST,
116117
INDEX_NM_MEMCTRL = INDEX_NM_FIRST,
117118
INDEX_NM_CHANNEL,
118119
INDEX_NM_DIMM,
120+
INDEX_NM_CS,
119121
INDEX_MAX
120122
};
121123

122124
#define BIT_NM_MEMCTRL BIT_ULL(INDEX_NM_MEMCTRL)
123125
#define BIT_NM_CHANNEL BIT_ULL(INDEX_NM_CHANNEL)
124126
#define BIT_NM_DIMM BIT_ULL(INDEX_NM_DIMM)
127+
#define BIT_NM_CS BIT_ULL(INDEX_NM_CS)
125128

126129
struct decoded_addr {
127130
struct mce *mce;
@@ -134,6 +137,7 @@ struct decoded_addr {
134137
int sktways;
135138
int chanways;
136139
int dimm;
140+
int cs;
137141
int rank;
138142
int channel_rank;
139143
u64 rank_address;

0 commit comments

Comments
 (0)