From 748cea18814f0025f7d5b24e58750d85df0563e6 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 5 Oct 2009 15:11:29 +0000 Subject: [PATCH] - Update to 0.9pre1 - Update URL - Add patch to update mcelog kernel record length (bug #507026) --- .cvsignore | 3 +- mcelog-0.9-pre1-record-length.patch | 89 +++++++++++++++++++++++++++++ mcelog.spec | 17 ++++-- sources | 2 +- 4 files changed, 103 insertions(+), 8 deletions(-) create mode 100644 mcelog-0.9-pre1-record-length.patch diff --git a/.cvsignore b/.cvsignore index f30fc3b..d5c7eac 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1 @@ -mcelog-0.7.tar.gz -mcelog-0.7 +mcelog-0.9pre1.tar.gz diff --git a/mcelog-0.9-pre1-record-length.patch b/mcelog-0.9-pre1-record-length.patch new file mode 100644 index 0000000..ab70720 --- /dev/null +++ b/mcelog-0.9-pre1-record-length.patch @@ -0,0 +1,89 @@ +--- mcelog-0.9-pre1/mcelog.h.record-length 2009-02-20 15:56:08.000000000 -0700 ++++ mcelog-0.9-pre1/mcelog.h 2009-10-05 09:01:24.308477671 -0600 +@@ -11,26 +11,29 @@ + + /* kernel structure: */ + +-/* Fields are zero when not available */ + struct mce { +- __u64 status; +- __u64 misc; +- __u64 addr; +- __u64 mcgstatus; +- __u64 rip; +- __u64 tsc; /* cpu time stamp counter */ +- __u64 time; /* wall time_t when error was detected */ +- __u8 cpuvendor; /* cpu vendor as encoded in system.h */ +- __u8 pad1; +- __u16 pad2; +- __u32 cpuid; /* CPUID 1 EAX */ +- __u8 cs; /* code segment */ +- __u8 bank; /* machine check bank */ +- __u8 cpu; /* cpu that raised the error */ +- __u8 finished; /* entry is valid */ +- __u32 extcpu; /* extended CPU number */ ++ __u64 status; ++ __u64 misc; ++ __u64 addr; ++ __u64 mcgstatus; ++ __u64 ip; ++ __u64 tsc; /* cpu time stamp counter */ ++ __u64 time; /* wall time_t when error was detected */ ++ __u8 cpuvendor; /* cpu vendor as encoded in system.h */ ++ __u8 pad1; ++ __u16 pad2; ++ __u32 cpuid; /* CPUID 1 EAX */ ++ __u8 cs; /* code segment */ ++ __u8 bank; /* machine check bank */ ++ __u8 cpu; /* cpu number; obsolete; use extcpu now */ ++ __u8 finished; /* entry is valid */ ++ __u32 extcpu; /* linux cpu number that detected the error */ ++ __u32 socketid; /* CPU socket ID */ ++ __u32 apicid; /* CPU initial apic ID */ ++ __u64 mcgcap; /* MCGCAP MSR: machine check capabilities of CPU */ + }; + ++ + #define X86_VENDOR_INTEL 0 + #define X86_VENDOR_CYRIX 1 + #define X86_VENDOR_AMD 2 +--- mcelog-0.9-pre1/mcelog.c.record-length 2009-02-20 15:56:08.000000000 -0700 ++++ mcelog-0.9-pre1/mcelog.c 2009-10-05 09:01:24.307479137 -0600 +@@ -341,15 +341,15 @@ + Wprintf(" (upper bound, found by polled driver)"); + Wprintf("\n"); + } +- if (m->rip) +- Wprintf("RIP%s %02x:%Lx ", ++ if (m->ip) ++ Wprintf("RIP%s %02x:%llx ", + !(m->mcgstatus & MCG_STATUS_EIPV) ? " !INEXACT!" : "", +- m->cs, m->rip); ++ m->cs, m->ip); + if (m->misc) + Wprintf("MISC %Lx ", m->misc); + if (m->addr) + Wprintf("ADDR %Lx ", m->addr); +- if (m->rip | m->misc | m->addr) ++ if (m->ip | m->misc | m->addr) + Wprintf("\n"); + switch (cputype) { + case CPU_K8: +@@ -387,7 +387,7 @@ + Wprintf("CPU %u\n", m->extcpu ? m->extcpu : m->cpu); + Wprintf("BANK %d\n", m->bank); + Wprintf("TSC 0x%Lx\n", m->tsc); +- Wprintf("RIP 0x%02x:0x%Lx\n", m->cs, m->rip); ++ Wprintf("RIP 0x%02x:0x%llx\n", m->cs, m->ip); + Wprintf("MISC 0x%Lx\n", m->misc); + Wprintf("ADDR 0x%Lx\n", m->addr); + Wprintf("STATUS 0x%Lx\n", m->status); +@@ -543,7 +543,7 @@ + + n = sscanf(s, "%02x:<%016Lx> {%100s}%n", + &cs, +- &m.rip, ++ &m.ip, + symbol, &next); + m.cs = cs; + if (n < 2) diff --git a/mcelog.spec b/mcelog.spec index 3ca6de9..663aa20 100644 --- a/mcelog.spec +++ b/mcelog.spec @@ -1,12 +1,13 @@ Summary: Tool to translate x86-64 CPU Machine Check Exception data. Name: mcelog -Version: 0.7 -Release: 5%{?dist} +Version: 0.9pre1 +Release: 0.1%{?dist} Epoch: 1 Group: System Environment/Base License: GPLv2 -Source0: ftp://ftp.x86-64.org/pub/linux/tools/mcelog/mcelog-%{version}.tar.gz -URL: ftp://ftp.x86-64.org/pub/linux/tools/mcelog/ +Source0: http://www.kernel.org/pub/linux/utils/cpu/mce/mcelog-%{version}.tar.gz +Patch0: mcelog-0.9-pre1-record-length.patch +URL: http://www.kernel.org/pub/linux/utils/cpu/mce/ Buildroot: %{_tmppath}/%{name}-%{version}-root ExclusiveArch: x86_64 @@ -15,7 +16,8 @@ mcelog is a daemon that collects and decodes Machine Check Exception data on x86-64 machines. %prep -%setup -q +%setup -q -n %{name}-0.9-pre1 +%patch0 -p1 -b .record-length %build rm -rf %{buildroot} @@ -45,6 +47,11 @@ rm -rf %{buildroot} %attr(0644,root,root) %{_mandir}/*/* %changelog +* Mon Oct 05 2009 Orion Poplawski - 1:0.9pre1-0.1 +- Update to 0.9pre1 +- Update URL +- Add patch to update mcelog kernel record length (bug #507026) + * Tue Aug 04 2009 Adam Jackson 0.7-5 - Fix %%install for new buildroot cleanout. diff --git a/sources b/sources index 524d935..ba3c5ea 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -21ba1a4d748c71c28f212ea57a7be7a1 mcelog-0.7.tar.gz +7ba2ef16429641e013bceb8b138762af mcelog-0.9pre1.tar.gz