Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

misc: smpro-errmon: Add DIMM 2x Refresh rate event

In high temperature condition, JEDEC spec requires memory controller to
double the refresh rate. This commit adds event_dimm_2x_refresh sysfs
to report that events for all memory channels.

Signed-off-by: Quan Nguyen <quan@os.amperecomputing.com>
Link: https://lore.kernel.org/r/20230310083416.3670980-2-quan@os.amperecomputing.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Quan Nguyen and committed by
Greg Kroah-Hartman
b0f64c80 f0312cbd

+11 -3
+6 -3
Documentation/ABI/testing/sysfs-bus-platform-devices-ampere-smpro
··· 234 234 For details, see section `5.10 RAS Internal Error Register Definitions, 235 235 Altra Family Soc BMC Interface Specification`. 236 236 237 - What: /sys/bus/platform/devices/smpro-errmon.*/event_[vrd_warn_fault|vrd_hot|dimm_hot] 238 - KernelVersion: 6.1 237 + What: /sys/bus/platform/devices/smpro-errmon.*/event_[vrd_warn_fault|vrd_hot|dimm_hot|dimm_2x_refresh] 238 + KernelVersion: 6.1 (event_[vrd_warn_fault|vrd_hot|dimm_hot]), 6.4 (event_dimm_2x_refresh) 239 239 Contact: Quan Nguyen <quan@os.amperecomputing.com> 240 240 Description: 241 241 (RO) Contains the detail information in case of VRD/DIMM warning/hot events ··· 258 258 +---------------+---------------------------------------------------------------+---------------------+ 259 259 | DIMM HOT | /sys/bus/platform/devices/smpro-errmon.*/event_dimm_hot | DIMM Hot | 260 260 +---------------+---------------------------------------------------------------+---------------------+ 261 + | DIMM 2X | /sys/bus/platform/devices/smpro-errmon.*/event_dimm_2x_refresh| DIMM 2x refresh rate| 262 + | REFRESH RATE | | event in high temp | 263 + +---------------+---------------------------------------------------------------+---------------------+ 261 264 262 - For more details, see section `5.7 GPI Status Registers, 265 + For more details, see section `5.7 GPI Status Registers and 5.9 Memory Error Register Definitions, 263 266 Altra Family Soc BMC Interface Specification`. 264 267 265 268 What: /sys/bus/platform/devices/smpro-misc.*/boot_progress
+5
drivers/misc/smpro-errmon.c
··· 67 67 #define VRD_WARN_FAULT_EVENT_DATA 0x78 68 68 #define VRD_HOT_EVENT_DATA 0x79 69 69 #define DIMM_HOT_EVENT_DATA 0x7A 70 + #define DIMM_2X_REFRESH_EVENT_DATA 0x96 70 71 71 72 #define MAX_READ_BLOCK_LENGTH 48 72 73 ··· 191 190 VRD_WARN_FAULT_EVENT, 192 191 VRD_HOT_EVENT, 193 192 DIMM_HOT_EVENT, 193 + DIMM_2X_REFRESH_EVENT, 194 194 NUM_EVENTS_TYPE, 195 195 }; 196 196 ··· 200 198 VRD_WARN_FAULT_EVENT_DATA, 201 199 VRD_HOT_EVENT_DATA, 202 200 DIMM_HOT_EVENT_DATA, 201 + DIMM_2X_REFRESH_EVENT_DATA, 203 202 }; 204 203 205 204 static ssize_t smpro_event_data_read(struct device *dev, ··· 466 463 EVENT_RO(vrd_warn_fault, VRD_WARN_FAULT_EVENT); 467 464 EVENT_RO(vrd_hot, VRD_HOT_EVENT); 468 465 EVENT_RO(dimm_hot, DIMM_HOT_EVENT); 466 + EVENT_RO(dimm_2x_refresh, DIMM_2X_REFRESH_EVENT); 469 467 470 468 static struct attribute *smpro_errmon_attrs[] = { 471 469 &dev_attr_overflow_core_ce.attr, ··· 492 488 &dev_attr_event_vrd_warn_fault.attr, 493 489 &dev_attr_event_vrd_hot.attr, 494 490 &dev_attr_event_dimm_hot.attr, 491 + &dev_attr_event_dimm_2x_refresh.attr, 495 492 NULL 496 493 }; 497 494