diff options
author | Tony Luck <tony.luck@intel.com> | 2023-06-12 21:23:32 -0700 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2023-06-12 21:23:32 -0700 |
commit | 7f52fe31180e3ffb2378e929d3f4b464f0d48717 (patch) | |
tree | d1e763abf9cecc285b39cebf5e57abfaf3dba27b | |
parent | 36a2fc8e6665f7c385e49b47da2ee467e78b7261 (diff) | |
download | ras-tools-7f52fe31180e3ffb2378e929d3f4b464f0d48717.tar.gz |
einj_mem_uc: Delete the checks for "advanced RAS" CPU models
These made sense in the early days of this tool when only a
few CPU models supported recovery from poisoned memory consumption.
But more new models support recovery than do not.
Signed-off-by: Tony Luck <tony.luck@intel.com>
-rw-r--r-- | einj_mem_uc.c | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/einj_mem_uc.c b/einj_mem_uc.c index 279fd11..72e26df 100644 --- a/einj_mem_uc.c +++ b/einj_mem_uc.c @@ -231,27 +231,6 @@ static void inject_smmu_tbu_fatal(unsigned long long addr, void *vaddr, int notr #ifdef __x86_64__ -static int is_advanced_ras(char *model, int modelnum) -{ - switch (modelnum) { - case 108: /* Ice Lake Xeon */ - return 1; - } - - if (strstr(model, "E7-")) - return 1; - if (strstr(model, "Platinum")) - return 1; - if (strstr(model, "Gold")) - return 1; - - /* AMD EPYC, e.g. Milan, Genoa */ - if (strstr(model, "EPYC")) - return 1; - - return 0; -} - static void check_configuration(void) { char model[512]; @@ -271,42 +250,13 @@ static void check_configuration(void) exit(1); } lcpus_persocket = ncpus / nsockets; - if (!force_flag && !is_advanced_ras(model, modelnum)) { - fprintf(stderr, "%s: warning: cpu may not support recovery\n", progname); - exit(1); - } } #elif __aarch64__ -static int is_advanced_ras(void) -{ - FILE *fp = fopen(EINJ_VENDOR, "r"); - struct vendor_error_type_extension v; - int8_t domain, bus, dev, func; - int ret; - - ret = fscanf(fp, "%x:%x:%x.%x vendor_id=%x device_id=%x rev_id=%x\n", - &domain, &bus, &dev, &func, - &v.vendor_id, &v.device_id, &v.rev_id); - - if (ret != 7) - exit(1); - - switch (v.vendor_id) { - case 0x1ded: /* Alibaba (China) Co., Ltd. */ - return 1; - default: - fprintf(stderr, "%s: warning: unknown vendor, cpu may not support recovery\n", progname); - return 1; - } -} - static void check_configuration(void) { if (!is_privileged() || !is_einj_support()) exit(1); - if (!is_advanced_ras()) - exit(1); } #endif |