diff --git a/Start-consolidating-AMD-specific-stuff.patch b/Start-consolidating-AMD-specific-stuff.patch index bd13015..450e870 100644 --- a/Start-consolidating-AMD-specific-stuff.patch +++ b/Start-consolidating-AMD-specific-stuff.patch @@ -10,19 +10,17 @@ Signed-off-by: Borislav Petkov --- Makefile | 2 amd.c | 282 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - amd.h | 14 +++ + amd.h | 80 +++++++++++++++++ k8.c | 281 -------------------------------------------------------------- k8.h | 11 -- - mcelog.c | 8 - - 6 files changed, 301 insertions(+), 297 deletions(-) + mcelog.c | 6 - + 6 files changed, 366 insertions(+), 296 deletions(-) rename k8.c => amd.c (97%) rename k8.h => amd.h (79%) -Index: mcelog-189/Makefile -=================================================================== ---- mcelog-189.orig/Makefile -+++ mcelog-189/Makefile -@@ -31,7 +31,7 @@ all: mcelog +--- a/Makefile ++++ b/Makefile +@@ -31,7 +31,7 @@ .PHONY: install install-nodoc clean depend FORCE @@ -31,10 +29,8 @@ Index: mcelog-189/Makefile nehalem.o dunnington.o tulsa.o config.o memutil.o msg.o \ eventloop.o leaky-bucket.o memdb.o server.o trigger.o \ client.o cache.o sysfs.o yellow.o page.o rbtree.o \ -Index: mcelog-189/amd.c -=================================================================== --- /dev/null -+++ mcelog-189/amd.c ++++ b/amd.c @@ -0,0 +1,282 @@ +/* Based on K8 decoding code written for the 2.4 kernel by Andi Kleen and + * Eric Morton. Hacked and extended for mcelog by AK. @@ -318,10 +314,8 @@ Index: mcelog-189/amd.c + } + return 1; +} -Index: mcelog-189/amd.h -=================================================================== --- /dev/null -+++ mcelog-189/amd.h ++++ b/amd.h @@ -0,0 +1,80 @@ +char *k8_bank_name(unsigned num); +void decode_amd_mc(enum cputype, struct mce *mce, int *ismemerr); @@ -403,9 +397,7 @@ Index: mcelog-189/amd.h + cputype == CPU_F14H || \ + cputype == CPU_F15H || \ + cputype == CPU_F16H) -Index: mcelog-189/k8.c -=================================================================== ---- mcelog-189.orig/k8.c +--- a/k8.c +++ /dev/null @@ -1,281 +0,0 @@ -/* Based on K8 decoding code written for the 2.4 kernel by Andi Kleen and @@ -689,9 +681,7 @@ Index: mcelog-189/k8.c - } - return 1; -} -Index: mcelog-189/k8.h -=================================================================== ---- mcelog-189.orig/k8.h +--- a/k8.h +++ /dev/null @@ -1,11 +0,0 @@ -char *k8_bank_name(unsigned num); @@ -705,10 +695,8 @@ Index: mcelog-189/k8.h -#define K8_MCELOG_THRESHOLD_LINK (4 * 9 + 1) -#define K8_MCELOG_THRESHOLD_L3_CACHE (4 * 9 + 2) -#define K8_MCELOG_THRESHOLD_FBDIMM (4 * 9 + 3) -Index: mcelog-189/mcelog.c -=================================================================== ---- mcelog-189.orig/mcelog.c -+++ mcelog-189/mcelog.c +--- a/mcelog.c ++++ b/mcelog.c @@ -41,7 +41,7 @@ #include #include "mcelog.h" @@ -718,7 +706,7 @@ Index: mcelog-189/mcelog.c #include "intel.h" #include "p4.h" #include "dmi.h" -@@ -346,8 +346,8 @@ static void dump_mce(struct mce *m, unsi +@@ -347,8 +347,8 @@ time_t t = m->time; Wprintf("TIME %llu %s", m->time, ctime(&t)); } diff --git a/_servicedata b/_servicedata index 48a2fbe..b8cd479 100644 --- a/_servicedata +++ b/_servicedata @@ -7,4 +7,4 @@ https://github.com/andikleen/mcelog.git 1f3a769c8fb736815a56ea104b7b751c5565cb88 https://git.kernel.org/pub/scm/utils/cpu/mce/mcelog.git - ad244c6b60fcbd08a5d73497bfb3487983801598 \ No newline at end of file + bcd71be7776f1fdbd043064bf3034a0cbf297666 \ No newline at end of file diff --git a/add-f10h-support.patch b/add-f10h-support.patch index 15b096e..2857ee1 100644 --- a/add-f10h-support.patch +++ b/add-f10h-support.patch @@ -3,15 +3,12 @@ Add F10h decoding support Signed-off-by: Borislav Petkov --- amd.c | 488 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---- - amd.h | 42 ++++- - mcelog.c | 26 +-- - mcelog.h | 1 - 4 files changed, 506 insertions(+), 51 deletions(-) + amd.h | 35 +++- + mcelog.c | 21 -- + 3 files changed, 497 insertions(+), 47 deletions(-) -Index: mcelog-198/amd.c -=================================================================== ---- mcelog-198.orig/amd.c -+++ mcelog-198/amd.c +--- a/amd.c ++++ b/amd.c @@ -14,7 +14,7 @@ #include "mcelog.h" #include "amd.h" @@ -21,7 +18,7 @@ Index: mcelog-198/amd.c "data cache", "instruction cache", "bus unit", -@@ -22,28 +22,34 @@ static char *k8bank[] = { +@@ -22,28 +22,34 @@ "northbridge", "fixed-issue reoder" }; @@ -65,7 +62,7 @@ Index: mcelog-198/amd.c static char *nbextendederr[] = { "RAM ECC error", "CRC error", -@@ -65,6 +71,46 @@ static char *nbextendederr[] = { +@@ -65,6 +71,46 @@ "L3 Cache Tag Error", "L3 Cache LRU Error" }; @@ -112,7 +109,7 @@ Index: mcelog-198/amd.c static char *highbits[32] = { [31] = "valid", [30] = "error overflow (multiple errors)", -@@ -100,6 +146,21 @@ static char *k8threshold[] = { +@@ -100,6 +146,21 @@ "Unknown threshold counter", }; @@ -134,7 +131,7 @@ Index: mcelog-198/amd.c static void decode_k8_generic_errcode(u64 status) { -@@ -245,21 +306,393 @@ static decoder_t decoders[] = { +@@ -245,21 +306,393 @@ [5] = decode_k8_fr_mc, }; @@ -536,7 +533,7 @@ Index: mcelog-198/amd.c if (num < NELE(k8bank)) s = k8bank[num]; else if (num >= K8_MCE_THRESHOLD_BASE && -@@ -270,13 +703,16 @@ char *k8_bank_name(unsigned num) +@@ -270,13 +703,16 @@ return buf; } @@ -561,10 +558,8 @@ Index: mcelog-198/amd.c + } + return 1; } -Index: mcelog-198/amd.h -=================================================================== ---- mcelog-198.orig/amd.h -+++ mcelog-198/amd.h +--- a/amd.h ++++ b/amd.h @@ -1,6 +1,25 @@ +#include + @@ -592,7 +587,7 @@ Index: mcelog-198/amd.h #define K8_MCE_THRESHOLD_BASE (MCE_EXTENDED_BANK + 1) /* MCE_AMD */ #define K8_MCE_THRESHOLD_TOP (K8_MCE_THRESHOLD_BASE + 6 * 9) -@@ -10,6 +29,8 @@ int mce_filter_k8(struct mce *m); +@@ -10,6 +29,8 @@ #define K8_MCELOG_THRESHOLD_L3_CACHE (4 * 9 + 2) #define K8_MCELOG_THRESHOLD_FBDIMM (4 * 9 + 3) @@ -601,7 +596,7 @@ Index: mcelog-198/amd.h #define EC(x) ((x) & 0xffff) #define XEC(x, mask) (((x) >> 16) & mask) -@@ -22,20 +43,20 @@ int mce_filter_k8(struct mce *m); +@@ -22,20 +43,20 @@ #define INT_ERROR(x) (((x) & 0xF4FF) == 0x0400) #define TT(x) (((x) >> 2) & 0x3) @@ -628,11 +623,9 @@ Index: mcelog-198/amd.h enum tt_ids { TT_INSTR = 0, -Index: mcelog-198/mcelog.c -=================================================================== ---- mcelog-198.orig/mcelog.c -+++ mcelog-198/mcelog.c -@@ -151,8 +151,8 @@ static int mce_filter(struct mce *m, uns +--- a/mcelog.c ++++ b/mcelog.c +@@ -152,8 +152,8 @@ /* Filter out known broken MCEs */ if (cputype >= CPU_INTEL) return mce_filter_intel(m, recordlen); @@ -643,7 +636,7 @@ Index: mcelog-198/mcelog.c return 1; } -@@ -283,9 +283,7 @@ static enum cputype setup_cpuid(u32 cpuv +@@ -284,9 +284,7 @@ case X86_VENDOR_INTEL: return select_intel_cputype(family, model); case X86_VENDOR_AMD: @@ -654,7 +647,7 @@ Index: mcelog-198/mcelog.c default: Eprintf("Unknown CPU type vendor %u family %u model %u", cpuvendor, family, model); -@@ -347,7 +345,7 @@ static void dump_mce(struct mce *m, unsi +@@ -348,7 +346,7 @@ Wprintf("TIME %llu %s", m->time, ctime(&t)); } if CASE_AMD_CPUS @@ -663,7 +656,7 @@ Index: mcelog-198/mcelog.c else if (cputype >= CPU_INTEL) decode_intel_mc(m, cputype, &ismemerr, recordlen); /* else add handlers for other CPUs here */ -@@ -463,14 +461,9 @@ int is_cpu_supported(void) +@@ -464,14 +462,9 @@ } if (seen == ALL) { diff --git a/email.patch b/email.patch index bfd74cf..a942724 100644 --- a/email.patch +++ b/email.patch @@ -7,18 +7,16 @@ msg.c | 8 ++ 6 files changed, 346 insertions(+), 3 deletions(-) -Index: mcelog-198/Makefile -=================================================================== ---- mcelog-198.orig/Makefile -+++ mcelog-198/Makefile +--- a/Makefile ++++ b/Makefile @@ -1,3 +1,4 @@ +CONFIG_EMAIL := 1 CFLAGS := -g -Os prefix := /usr etcprefix := -@@ -38,16 +39,24 @@ OBJ := p4.o k8.o mcelog.o dmi.o tsc.o co +@@ -39,16 +39,24 @@ broadwell_de.o broadwell_epex.o skylake_xeon.o \ - denverton.o i10nm.o sapphire.o granite.o \ + denverton.o i10nm.o sapphire.o granite.o diamond.o \ msr.o bus.o unknown.o lookup_intel_cputype.o +EMAIL_OBJ := email.o CLEAN := mcelog dmi tsc dbquery .depend .depend.X dbquery.o \ @@ -42,7 +40,7 @@ Index: mcelog-198/Makefile # dbquery intentionally not installed by default install: install-nodoc mcelog.conf.5 mcelog.triggers.5 -@@ -85,7 +94,7 @@ dbquery: db.o dbquery.o memutil.o +@@ -85,7 +94,7 @@ depend: .depend %.o: %.c @@ -51,10 +49,8 @@ Index: mcelog-198/Makefile version.tmp: FORCE ( printf "char version[] = \"" ; \ -Index: mcelog-198/email.c -=================================================================== --- /dev/null -+++ mcelog-198/email.c ++++ b/email.c @@ -0,0 +1,200 @@ +#include +#include @@ -256,10 +252,8 @@ Index: mcelog-198/email.c + smtp_destroy_session (session); + return 0; +} -Index: mcelog-198/email.h -=================================================================== --- /dev/null -+++ mcelog-198/email.h ++++ b/email.h @@ -0,0 +1,34 @@ +#ifndef _MCELOG_EMAIL_H_ +#define _MCELOG_EMAIL_H_ @@ -295,10 +289,8 @@ Index: mcelog-198/email.h +#endif + +#endif -Index: mcelog-198/mcelog.c -=================================================================== ---- mcelog-198.orig/mcelog.c -+++ mcelog-198/mcelog.c +--- a/mcelog.c ++++ b/mcelog.c @@ -37,6 +37,7 @@ #include #include @@ -317,7 +309,7 @@ Index: mcelog-198/mcelog.c enum cputype cputype = CPU_GENERIC; char *logfn = LOG_DEV_FILENAME; -@@ -70,7 +74,7 @@ static double cpumhz; +@@ -70,7 +74,7 @@ static int cpumhz_forced; int ascii_mode; int dump_raw_ascii; @@ -326,23 +318,23 @@ Index: mcelog-198/mcelog.c static char *inputfile; char *processor_flags; static int foreground; -@@ -912,6 +916,7 @@ void usage(void) - "--max-corr-err-counters Max page correctable error counters\n" - "--help Display this message.\n" +@@ -914,6 +918,7 @@ + "--binary Input is binary (e.g. from pstore)\n" + "--help Display this message.\n" ); + email_usage(); printf("\n"); print_cputypes(); } -@@ -985,6 +990,7 @@ static struct option options[] = { - { "max-corr-err-counters", 1, NULL, O_MAX_CORR_ERR_COUNTERS }, +@@ -989,6 +994,7 @@ { "help", 0, NULL, O_HELP }, + { "binary", 0, NULL, O_BINARY }, { "is-cpu-supported", 0, NULL, O_IS_CPU_SUPPORTED }, + EMAIL_OPTIONS {} }; -@@ -1179,11 +1185,86 @@ static void drop_cred(void) +@@ -1185,11 +1191,86 @@ } } @@ -429,7 +421,7 @@ Index: mcelog-198/mcelog.c if (recordlen == 0) { Wprintf("no data in mce record\n"); -@@ -1210,12 +1291,16 @@ static void process(int fd, unsigned rec +@@ -1216,12 +1297,16 @@ finish = 1; if (!mce_filter(mce, recordlen)) continue; @@ -446,7 +438,7 @@ Index: mcelog-198/mcelog.c flushlog(); } -@@ -1340,6 +1425,8 @@ int main(int ac, char **av) +@@ -1346,6 +1431,8 @@ noargs(ac, av); fprintf(stderr, "mcelog %s\n", MCELOG_VERSION); exit(0); @@ -455,7 +447,7 @@ Index: mcelog-198/mcelog.c } else if (opt == 0) break; } -@@ -1374,6 +1461,10 @@ int main(int ac, char **av) +@@ -1380,6 +1467,10 @@ usage(); exit(1); } @@ -466,11 +458,9 @@ Index: mcelog-198/mcelog.c checkdmi(); general_setup(); -Index: mcelog-198/mcelog.h -=================================================================== ---- mcelog-198.orig/mcelog.h -+++ mcelog-198/mcelog.h -@@ -118,6 +118,7 @@ extern int open_logfile(char *fn); +--- a/mcelog.h ++++ b/mcelog.h +@@ -118,6 +118,7 @@ enum option_ranges { O_COMMON = 500, O_DISKDB = 1000, @@ -478,10 +468,8 @@ Index: mcelog-198/mcelog.h }; enum syslog_opt { -Index: mcelog-198/msg.c -=================================================================== ---- mcelog-198.orig/msg.c -+++ mcelog-198/msg.c +--- a/msg.c ++++ b/msg.c @@ -8,10 +8,13 @@ #include "mcelog.h" #include "msg.h" @@ -496,7 +484,7 @@ Index: mcelog-198/msg.c static char *output_fn; int need_stdout(void) -@@ -137,6 +140,11 @@ int Wprintf(char *fmt, ...) +@@ -137,6 +140,11 @@ n = vfprintf(output_fh ? output_fh : stdout, fmt, ap); va_end(ap); } diff --git a/fix_setgroups_missing_call.patch b/fix_setgroups_missing_call.patch index 4b1049f..5be0bd5 100644 --- a/fix_setgroups_missing_call.patch +++ b/fix_setgroups_missing_call.patch @@ -2,10 +2,8 @@ mcelog.c | 9 +++++++++ 1 file changed, 9 insertions(+) -Index: mcelog-198/mcelog.c -=================================================================== ---- mcelog-198.orig/mcelog.c -+++ mcelog-198/mcelog.c +--- a/mcelog.c ++++ b/mcelog.c @@ -37,6 +37,7 @@ #include #include @@ -14,7 +12,7 @@ Index: mcelog-198/mcelog.c #include #include #include "mcelog.h" -@@ -1163,6 +1164,14 @@ static void general_setup(void) +@@ -1169,6 +1170,14 @@ static void drop_cred(void) { diff --git a/mcelog-204.obscpio b/mcelog-204.obscpio deleted file mode 100644 index d3d7abe..0000000 --- a/mcelog-204.obscpio +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d0cb481658270f4ac5871e63033ebbf62360a14a71a146b5f5cc5ed07cf44cca -size 644108 diff --git a/mcelog-207.obscpio b/mcelog-207.obscpio new file mode 100644 index 0000000..ac7d67e --- /dev/null +++ b/mcelog-207.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d13aaf3c0c02111fa9ab6687d1259b893218adf16c923dcb1f2e53a53a2a84a1 +size 655884 diff --git a/mcelog.changes b/mcelog.changes index 97e7d3a..c52f989 100644 --- a/mcelog.changes +++ b/mcelog.changes @@ -1,3 +1,42 @@ +------------------------------------------------------------------- +Wed Oct 15 06:46:11 UTC 2025 - Arvin Schnell + +- Update to version 207: + * mcelog: Add model-specific decoding for Diamond Rapids +- Refresh patches according to mainline: +M email.patch + +------------------------------------------------------------------- +Tue Sep 23 06:40:56 UTC 2025 - Thomas Renninger + +- Remove last change to revert AMD patchset (bsc#1249588) +A Start-consolidating-AMD-specific-stuff.patch +A add_new_amd_cpu_defines +A add-f10h-support.patch +A add-f11h-support.patch +A add-f12h-support.patch +A add-f14h-support.patch +A add-f15h-support.patch +A add-f16h-support.patch + +------------------------------------------------------------------- +Wed Sep 10 07:04:03 UTC 2025 - Thomas Renninger + +- Update to version 206: + * mcelog: Fix the MCCHAN bank number check for Granite Rapids + * mcelog: Don't print "arstate" when PCC=1 + * mcelog: Add a --binary option for reading records saved to pstore +- Sync with mainline and remove old AMD models which never made it mainline +D Start-consolidating-AMD-specific-stuff.patch +D add_new_amd_cpu_defines +D add-f10h-support.patch +D add-f11h-support.patch +D add-f12h-support.patch +D add-f14h-support.patch +D add-f15h-support.patch +D add-f16h-support.patch +- Fix a date issue in changelog (YEKT timezone unknown) + ------------------------------------------------------------------- Fri Apr 11 12:34:24 UTC 2025 - trenn@suse.de @@ -529,7 +568,7 @@ Wed Jul 18 12:49:43 UTC 2012 - trenn@suse.de - Also build mcelog packages for i386 (bnc#770726) ------------------------------------------------------------------- -Tue Apr 24 23:43:56 YEKT 2012 - avm-xandry@yandex.ru +Tue Apr 25 04:43:56 UTC 2012 - avm-xandry@yandex.ru - Fixed description in init-file. diff --git a/mcelog.obsinfo b/mcelog.obsinfo index 65cbde1..a3665d5 100644 --- a/mcelog.obsinfo +++ b/mcelog.obsinfo @@ -1,4 +1,4 @@ name: mcelog -version: 204 -mtime: 1739647779 -commit: ad244c6b60fcbd08a5d73497bfb3487983801598 +version: 207 +mtime: 1759421803 +commit: bcd71be7776f1fdbd043064bf3034a0cbf297666 diff --git a/mcelog.spec b/mcelog.spec index 09fd6ee..f6e6e63 100644 --- a/mcelog.spec +++ b/mcelog.spec @@ -1,7 +1,7 @@ # # spec file for package mcelog # -# Copyright (c) 2025 SUSE LLC +# Copyright (c) 2025 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -21,7 +21,7 @@ %define _fillupdir %{_localstatedir}/adm/fillup-templates %endif Name: mcelog -Version: 204 +Version: 207 Release: 0 Summary: Log Machine Check Events License: GPL-2.0-only