]> www.infradead.org Git - users/mchehab/rasdaemon.git/log
users/mchehab/rasdaemon.git
12 years agoras-mce-handler: Fix /proc/cpuinfo parser
Mauro Carvalho Chehab [Tue, 28 May 2013 10:47:53 +0000 (07:47 -0300)]
ras-mce-handler: Fix /proc/cpuinfo parser

The test for the parsing completion is wrong. Fix it.

While here, change the namespace to avoid latter
conflicts.

Reported-by: Chen Gong <gong.chen@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoras-mce-handler: Fix a warning
Mauro Carvalho Chehab [Mon, 27 May 2013 21:19:08 +0000 (18:19 -0300)]
ras-mce-handler: Fix a warning

ras-mce-handler.c: In function ‘register_mce_handler’:
ras-mce-handler.c:200:13: warning: ‘mce’ may be used uninitialized in this function [-Wuninitialized]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoEnable MCE parsing at RPM files
Mauro Carvalho Chehab [Mon, 27 May 2013 20:47:15 +0000 (17:47 -0300)]
Enable MCE parsing at RPM files

As this is known to work, enable it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoREADME: update to reflect the current status
Mauro Carvalho Chehab [Mon, 27 May 2013 20:46:56 +0000 (17:46 -0300)]
README: update to reflect the current status

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoUpdate TODO list
Mauro Carvalho Chehab [Mon, 27 May 2013 20:26:04 +0000 (17:26 -0300)]
Update TODO list

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agomce-intel-sb: add memory controller decoding
Mauro Carvalho Chehab [Mon, 27 May 2013 20:23:48 +0000 (17:23 -0300)]
mce-intel-sb: add memory controller decoding

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoAdd support to decode memory controller data on Nehalem
Mauro Carvalho Chehab [Mon, 27 May 2013 20:19:11 +0000 (17:19 -0300)]
Add support to decode memory controller data on Nehalem

xeon75xx code can be dropped as it doesn't exist anyway on
mcelog. According to the code there, it lacks support for it
to work at the Kernel.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agomce-intel: Enable iMC log where available
Mauro Carvalho Chehab [Mon, 27 May 2013 19:46:12 +0000 (16:46 -0300)]
mce-intel: Enable iMC log where available

Add a code to enable iMC log where available.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agomce-intel-ivb: enable the code that parses memory controller errors
Mauro Carvalho Chehab [Mon, 27 May 2013 18:50:51 +0000 (15:50 -0300)]
mce-intel-ivb: enable the code that parses memory controller errors

Enable the code that parses the memory controller errors.
This code assumes that iMC log is already enabled.

A latter patch will add support for enabling it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agospelling: Fix spelling in ras-record.c
Tony Luck [Fri, 24 May 2013 16:55:40 +0000 (09:55 -0700)]
spelling: Fix spelling in ras-record.c

s/interted/inserted/

Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoconfigure: Fix help string for sqlite3
Tony Luck [Fri, 24 May 2013 16:29:06 +0000 (09:29 -0700)]
configure: Fix help string for sqlite3

The AS_HELP_STRING has a typo and says to use "--enable-sqlite" when
it should say "-enable-sqlite3"

Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agomce: Some improvements at the output format
Mauro Carvalho Chehab [Fri, 24 May 2013 14:21:32 +0000 (11:21 -0300)]
mce: Some improvements at the output format

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoras-mce-handler: fix /proc/cpuinfo parser
Mauro Carvalho Chehab [Fri, 24 May 2013 11:21:51 +0000 (08:21 -0300)]
ras-mce-handler: fix /proc/cpuinfo parser

The scanf parsers for /proc/cpuinfo were broken, as they
got a "mce->" prefix by mistake. Remove it to fix.

With that, MCE parser will successfully register.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoevent-parse: Remove a temporary debug message
Mauro Carvalho Chehab [Fri, 24 May 2013 11:18:48 +0000 (08:18 -0300)]
event-parse: Remove a temporary debug message

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoDon't require that all tracing types to be supported
Mauro Carvalho Chehab [Fri, 24 May 2013 11:16:57 +0000 (08:16 -0300)]
Don't require that all tracing types to be supported

Not all systems support all 3 types of RAS (EDAC, PCIe AER, MCELOG).
Don't bail out if at least one of them is supported.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoUpdate edac-tests to use ras-mc-ctl instead of ./edac-ctl
Mauro Carvalho Chehab [Fri, 24 May 2013 10:37:06 +0000 (07:37 -0300)]
Update edac-tests to use ras-mc-ctl instead of ./edac-ctl

All functionalities previously found on my test version of
edac-ctl is present on ras-mc-ctl. So, let's rename it.

The test code still tries to run edac-util. This tool,
which is part of edac-utils, use the edac error counters to
check the errors. For now, let's keep it, as it might be useful,
although this will likely be removed on future versions of this
testing script.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoras-events: Fix the logic that retrieves the debugfs mount point
Mauro Carvalho Chehab [Fri, 24 May 2013 09:18:54 +0000 (06:18 -0300)]
ras-events: Fix the logic that retrieves the debugfs mount point

While on Fedora/RHEL the mount device for debugfs is called "debugfs",
it is usual to use "none" on some other distros or for manually
mounted debugfs.

So, fix the logic to look at the filesystem type, instead, as it should
always be "debugfs", on both cases.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoras-record: Avoid NULL pointer when running without sqlite
Tony Luck [Thu, 23 May 2013 20:27:31 +0000 (13:27 -0700)]
ras-record: Avoid NULL pointer when running without sqlite

When running "rasdaemon -f" we can dereference a NULL pointer in
ras_store_mc_event() since "ras->db_priv" is NULL.

Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoras-events: Fix MCE binding
Mauro Carvalho Chehab [Thu, 23 May 2013 19:42:08 +0000 (16:42 -0300)]
ras-events: Fix MCE binding

The #ifdef for detecting MCE was wrong. Due to that, the MCE
handler was not being enabled.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoMake the enable function more generic
Mauro Carvalho Chehab [Thu, 23 May 2013 19:37:54 +0000 (16:37 -0300)]
Make the enable function more generic

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoGet rid of ras-record warnings
Mauro Carvalho Chehab [Thu, 23 May 2013 17:58:21 +0000 (14:58 -0300)]
Get rid of ras-record warnings

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoget rid of MCE warnings
Mauro Carvalho Chehab [Thu, 23 May 2013 17:44:36 +0000 (14:44 -0300)]
get rid of MCE warnings

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoCleanup warnings at ras-aer-handler.c
Mauro Carvalho Chehab [Thu, 23 May 2013 17:26:07 +0000 (14:26 -0300)]
Cleanup warnings at ras-aer-handler.c

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoFix event handler parser logic
Mauro Carvalho Chehab [Thu, 23 May 2013 16:35:07 +0000 (13:35 -0300)]
Fix event handler parser logic

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoras-events: Add some hacks to make it work with 3.6.10-rc2
Mauro Carvalho Chehab [Thu, 23 May 2013 14:48:02 +0000 (11:48 -0300)]
ras-events: Add some hacks to make it work with 3.6.10-rc2

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agolibtrace: sync with the latest code from trace-cmd
Mauro Carvalho Chehab [Thu, 23 May 2013 14:07:29 +0000 (11:07 -0300)]
libtrace: sync with the latest code from trace-cmd

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoedac-fake-inject: Check if the Kernel supports error injection
Mauro Carvalho Chehab [Thu, 23 May 2013 13:24:03 +0000 (10:24 -0300)]
edac-fake-inject: Check if the Kernel supports error injection

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoGet rid of mc_event_error_type
Mauro Carvalho Chehab [Thu, 23 May 2013 12:35:38 +0000 (09:35 -0300)]
Get rid of mc_event_error_type

Somehow, the tracing library is not finding it on some systems:
overriding event (710) ras:mc_event with new print handler
trace-cmd: File exists
  function mc_event_error_type not defined

Let's just get rid of it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoBetter handle parser errors with MC events
Mauro Carvalho Chehab [Thu, 23 May 2013 12:09:19 +0000 (09:09 -0300)]
Better handle parser errors with MC events

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoedac-fake-inject: Make it more generic
Mauro Carvalho Chehab [Thu, 23 May 2013 12:01:10 +0000 (09:01 -0300)]
edac-fake-inject: Make it more generic

The tool used to support only 2 or 3 layer memory controllers,
faling with edac_ghes driver. Make it more generic to also work
there.

Also, don't assume that the SYSFS is mounted at /sys/kernel/debug,
but look at its mount location via /proc/mounts.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoFix rasdaemon -d
Mauro Carvalho Chehab [Thu, 23 May 2013 11:21:55 +0000 (08:21 -0300)]
Fix rasdaemon -d

We need to get the debugfs pointer in order to toggle the MC events.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoGet rid of the remaining warnings
Mauro Carvalho Chehab [Thu, 23 May 2013 10:25:54 +0000 (07:25 -0300)]
Get rid of the remaining warnings

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agolibtrace: get rid of breakpoint() function
Mauro Carvalho Chehab [Thu, 23 May 2013 10:23:11 +0000 (07:23 -0300)]
libtrace: get rid of breakpoint() function

This isn't used anywhere.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoGet rid of most warnings at libtrace
Mauro Carvalho Chehab [Thu, 23 May 2013 10:22:40 +0000 (07:22 -0300)]
Get rid of most warnings at libtrace

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoFix usage of toggle_ras_mc_event() by -d parameter
Mauro Carvalho Chehab [Thu, 23 May 2013 10:10:53 +0000 (07:10 -0300)]
Fix usage of toggle_ras_mc_event() by -d parameter

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoEnable gcc warnings
Mauro Carvalho Chehab [Thu, 23 May 2013 10:07:44 +0000 (07:07 -0300)]
Enable gcc warnings

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agorasdaemon.spec: specify the root directory on a consistent way v0.3.0
Mauro Carvalho Chehab [Tue, 21 May 2013 02:37:23 +0000 (23:37 -0300)]
rasdaemon.spec: specify the root directory on a consistent way

As fedora-review tool complained:

- Package consistently uses macro is (instead of hard-coded directory names).
  Note: Using both %{buildroot} and $RPM_BUILD_ROOT
  See: http://fedoraproject.org/wiki/Packaging/Guidelines#macros

Let's just use %{buildroot}.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoUpdate it to point it to fedorapeople
Mauro Carvalho Chehab [Tue, 21 May 2013 02:24:09 +0000 (23:24 -0300)]
Update it to point it to fedorapeople

The tarball used to generate the src.rpm is the one produced
by "make dist-bz2", with doesn't contain .gitignore files,
while fedorahosted only generates an snapshot with them.

That makes its hash to not match the one used at .src.rpm.

Fix it by using the uploaded file.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoAdd a target to upload a new version
Mauro Carvalho Chehab [Tue, 21 May 2013 01:54:54 +0000 (22:54 -0300)]
Add a target to upload a new version

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoUpdate the spec file to require autotools for building it
Mauro Carvalho Chehab [Tue, 21 May 2013 01:51:05 +0000 (22:51 -0300)]
Update the spec file to require autotools for building it

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agorasdaemon.spec: Don't install INSTALL file
Mauro Carvalho Chehab [Tue, 21 May 2013 01:00:50 +0000 (22:00 -0300)]
rasdaemon.spec: Don't install INSTALL file

rpmlint complains with that:
rasdaemon.x86_64: W: install-file-in-docs /usr/share/doc/rasdaemon-0.3.0/INSTALL

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agorpmlint: fix version compliant
Mauro Carvalho Chehab [Tue, 21 May 2013 00:45:04 +0000 (21:45 -0300)]
rpmlint: fix version compliant

rasdaemon.x86_64: W: incoherent-version-in-changelog 0.2.0-1 ['0.3.0-1.fc18', '0.3.0-1']

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoras-mc-ctl.8.in: fix rpmlint compliants
Mauro Carvalho Chehab [Tue, 21 May 2013 00:40:01 +0000 (21:40 -0300)]
ras-mc-ctl.8.in: fix rpmlint compliants

rasdaemon.x86_64: W: manual-page-warning /usr/share/man/man8/ras-mc-ctl.8.gz 79: a space character is not allowed in an escape name
rasdaemon.x86_64: W: manual-page-warning /usr/share/man/man8/ras-mc-ctl.8.gz 122: warning: macro `EL' not defined

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoWhitespace cleanups
Mauro Carvalho Chehab [Tue, 21 May 2013 00:34:17 +0000 (21:34 -0300)]
Whitespace cleanups

No functional changes here, just whitespacing cleanups.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agorpmlint target: RPMS files are wrong. Fix it.
Mauro Carvalho Chehab [Tue, 21 May 2013 00:30:54 +0000 (21:30 -0300)]
rpmlint target: RPMS files are wrong. Fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoFix rpmlint check line
Mauro Carvalho Chehab [Tue, 21 May 2013 00:28:26 +0000 (21:28 -0300)]
Fix rpmlint check line

It should not be checking the .tar.bz2, but, instead, the generated
rpm files.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoAdd missing header files to Makefile.am
Mauro Carvalho Chehab [Tue, 21 May 2013 00:03:53 +0000 (21:03 -0300)]
Add missing header files to Makefile.am

This is needed, in order to generate the proper dist tar files.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoBump it to version 0.3.0
Mauro Carvalho Chehab [Mon, 20 May 2013 23:53:09 +0000 (20:53 -0300)]
Bump it to version 0.3.0

As we now have initial mcelog/PCEe AER parsing, bump version
to 0.3.0.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoAdd a rule to build a source rpm file
Mauro Carvalho Chehab [Mon, 20 May 2013 23:52:40 +0000 (20:52 -0300)]
Add a rule to build a source rpm file

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoAuto-fill the rasdaemon.spec version
Mauro Carvalho Chehab [Mon, 20 May 2013 22:28:34 +0000 (19:28 -0300)]
Auto-fill the rasdaemon.spec version

Instead of keeping it static, let ./configure to fill the
version of the rasdaemon.spec. That makes it a little easier
to be used on rpm-based distros.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoAdd decoder for Ivy Bridge
Mauro Carvalho Chehab [Sat, 18 May 2013 19:49:33 +0000 (16:49 -0300)]
Add decoder for Ivy Bridge

The code came from mcelog. For now, let's disable the part that
handles the memory controller.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoAdd decoder for Sandy Bridge
Mauro Carvalho Chehab [Sat, 18 May 2013 19:43:58 +0000 (16:43 -0300)]
Add decoder for Sandy Bridge

The code came from mcelog. For now, let's disable the part that
handles the memory controller.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoAdd decoder for Intel MCE tulsa
Mauro Carvalho Chehab [Sat, 18 May 2013 15:16:46 +0000 (12:16 -0300)]
Add decoder for Intel MCE tulsa

The code came almost as-is from mcelog.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoAdd decoder for Intel Dunnington CPUs
Mauro Carvalho Chehab [Sat, 18 May 2013 15:10:53 +0000 (12:10 -0300)]
Add decoder for Intel Dunnington CPUs

The code came almost as-is from mcelog.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoAdd a decoder for Nehalem-specific types
Mauro Carvalho Chehab [Sat, 18 May 2013 14:35:55 +0000 (11:35 -0300)]
Add a decoder for Nehalem-specific types

Note: Memory Controller-specific decoding was excluded.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoAdd a parser for Intel P4/P6 specific CPU error messages
Mauro Carvalho Chehab [Sat, 18 May 2013 14:20:37 +0000 (11:20 -0300)]
Add a parser for Intel P4/P6 specific CPU error messages

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoAdd a parser for Intel P4/P6 processors
Mauro Carvalho Chehab [Sat, 18 May 2013 14:13:07 +0000 (11:13 -0300)]
Add a parser for Intel P4/P6 processors

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agomce-intel: Add support to decode MCI/MCA
Mauro Carvalho Chehab [Sat, 18 May 2013 09:26:01 +0000 (06:26 -0300)]
mce-intel: Add support to decode MCI/MCA

As almost all mce decoding code, those code came from Andi Kleen's
mcelog application.

While the code added there came from p4.c and nehalem.c, they're
used by all Intel CPUs so far.

Intel CPU-specific code parsing is still not implemented.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agomce-intel: simplify code and add an user_action field
Mauro Carvalho Chehab [Sat, 18 May 2013 08:23:48 +0000 (05:23 -0300)]
mce-intel: simplify code and add an user_action field

While for pure print messages, the user recommended action can be
together with the error message, having it in a separate field
helps to latter handle the error. So, split it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agomce-amd-k8: Code cleanups
Mauro Carvalho Chehab [Sat, 18 May 2013 08:15:30 +0000 (05:15 -0300)]
mce-amd-k8: Code cleanups

Instead of doing the error_msg buffer filling logic everywhere,
move it to a common routine.

That cleans up the code a lot, and makes easier to use the same
code to also handle other *_msg fields on latter patches.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agomce-intel: add support to decode termal bank and mcg
Mauro Carvalho Chehab [Thu, 16 May 2013 14:54:13 +0000 (11:54 -0300)]
mce-intel: add support to decode termal bank and mcg

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoImprove MCE parser for AMD k8
Mauro Carvalho Chehab [Thu, 16 May 2013 11:16:12 +0000 (08:16 -0300)]
Improve MCE parser for AMD k8

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agomce-amd-k8: add status decoding logic
Mauro Carvalho Chehab [Wed, 15 May 2013 20:43:32 +0000 (17:43 -0300)]
mce-amd-k8: add status decoding logic

Add the status decoding logic from mcelog's k8.c file.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoAdd per-cpu-type handlers for MCE log
Mauro Carvalho Chehab [Wed, 15 May 2013 19:34:49 +0000 (16:34 -0300)]
Add per-cpu-type handlers for MCE log

For now, only the bank information is handled.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoAdd a basic handler for MCE logs
Mauro Carvalho Chehab [Wed, 15 May 2013 18:16:53 +0000 (15:16 -0300)]
Add a basic handler for MCE logs

For now, this handler just detects the CPU type and parses all
fields at the MCE event trace.

Latter patches will add decoding capabilities to the event.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoras-events: prepare to handle MCE events
Mauro Carvalho Chehab [Wed, 15 May 2013 11:56:25 +0000 (08:56 -0300)]
ras-events: prepare to handle MCE events

Parsing MCE events is hard, as it requires per-cpu-type parsing.
We can at least get those events and send them to syslog/journald.

So, ask tracing to collect them as well and add a hook for the
future mcelog parsing code.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoAdd support for PCIe AER events
Mauro Carvalho Chehab [Wed, 15 May 2013 11:07:08 +0000 (08:07 -0300)]
Add support for PCIe AER events

The code is currently untested, as I'm missing a testing
system where I could inject PCIe AER events.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoFix dummy function arguments when compiled without sqlite3 support
Mauro Carvalho Chehab [Wed, 15 May 2013 11:27:06 +0000 (08:27 -0300)]
Fix dummy function arguments when compiled without sqlite3 support

That shuts up a warning.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoras-mc-handler: remove some unused headers
Mauro Carvalho Chehab [Wed, 15 May 2013 10:24:56 +0000 (07:24 -0300)]
ras-mc-handler: remove some unused headers

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agorasdaemon: Better handle error conditions
Mauro Carvalho Chehab [Fri, 10 May 2013 19:07:15 +0000 (16:07 -0300)]
rasdaemon: Better handle error conditions

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoPrint cpu number at event records log
Mauro Carvalho Chehab [Fri, 10 May 2013 14:35:36 +0000 (11:35 -0300)]
Print cpu number at event records log

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoras-record: retry open if busy
Mauro Carvalho Chehab [Fri, 10 May 2013 14:28:59 +0000 (11:28 -0300)]
ras-record: retry open if busy

As we'll have several concurrent opens at the same time, we
need to retry if race conditions happen.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoras-events: make the error patch to do the right thing
Mauro Carvalho Chehab [Fri, 10 May 2013 14:23:56 +0000 (11:23 -0300)]
ras-events: make the error patch to do the right thing

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoREADME: add project goals
Mauro Carvalho Chehab [Fri, 10 May 2013 13:49:56 +0000 (10:49 -0300)]
README: add project goals

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoUpdate README
Mauro Carvalho Chehab [Fri, 10 May 2013 13:11:26 +0000 (10:11 -0300)]
Update README

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoras-events: open database on each thread
Mauro Carvalho Chehab [Thu, 9 May 2013 16:11:26 +0000 (13:11 -0300)]
ras-events: open database on each thread

sqlite3 is only able to prevent race issues between different
threads if each thread opens its own connection to the database.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoUpdate tarball URL
Mauro Carvalho Chehab [Wed, 8 May 2013 18:17:03 +0000 (15:17 -0300)]
Update tarball URL

That makes rpmlint happy

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoFix make dist-* targets v0.2.0
Mauro Carvalho Chehab [Wed, 8 May 2013 18:14:31 +0000 (15:14 -0300)]
Fix make dist-* targets

Those targets require to know what are the header files.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoAdd a RPM spec file to build it with rpmbuild
Mauro Carvalho Chehab [Wed, 8 May 2013 17:52:05 +0000 (14:52 -0300)]
Add a RPM spec file to build it with rpmbuild

Add a rasdaemon.spec template file useful for compiling it with
Fedora. It may require changes to work with other distributions
that also use rpm files, as each distro has their own rules for
rpm's, but at least this file can be used as a reference.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoAdd a service to register EDAC labels
Mauro Carvalho Chehab [Wed, 8 May 2013 17:35:57 +0000 (14:35 -0300)]
Add a service to register EDAC labels

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoAdd a manpage for the rasdaemon
Mauro Carvalho Chehab [Wed, 8 May 2013 15:24:36 +0000 (12:24 -0300)]
Add a manpage for the rasdaemon

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoModify the ras-mc-ctl manpage to reflect the current tool
Mauro Carvalho Chehab [Wed, 8 May 2013 15:12:56 +0000 (12:12 -0300)]
Modify the ras-mc-ctl manpage to reflect the current tool

Several changes happened at the tool, since when it was
part of edac-utils. Also, a few new options got added there.

Add the missing parts and change it to reflect its new name.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoAdd a man page for ras-mc-ctl
Mauro Carvalho Chehab [Wed, 8 May 2013 14:30:44 +0000 (11:30 -0300)]
Add a man page for ras-mc-ctl

This is currently the same as edac-utils, but needs to be
re-written.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoParse ras-mc-ctl via autoconf tools
Mauro Carvalho Chehab [Wed, 8 May 2013 14:24:43 +0000 (11:24 -0300)]
Parse ras-mc-ctl via autoconf tools

Instead of using fixed directory prefixes, let the building
system to tell them, via ./configure.

This uses the very same solution as edac-utils do.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoAdd more autotools stuff into .gitignore
Mauro Carvalho Chehab [Wed, 8 May 2013 11:42:35 +0000 (08:42 -0300)]
Add more autotools stuff into .gitignore

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agorasdaemon: change it to version 0.2.0
Mauro Carvalho Chehab [Wed, 8 May 2013 11:35:57 +0000 (08:35 -0300)]
rasdaemon: change it to version 0.2.0

There are too many changes there, and it is now on a more functional
state. So, bump it to version 0.2.0.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoras-daemon: make sqlite3 code optional
Mauro Carvalho Chehab [Wed, 8 May 2013 11:33:05 +0000 (08:33 -0300)]
ras-daemon: make sqlite3 code optional

The sqlite3 code is experimental and currently having some issues
with multi-threading. Convert it into an optional feature that
it is only explicitly enabled.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoUpdate TODO file
Mauro Carvalho Chehab [Mon, 6 May 2013 19:39:15 +0000 (16:39 -0300)]
Update TODO file

ras-mc-ctl is the tool that allows inspecting/modifying the EDAC
data on sysfs. Remove it from the TODO file.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoras-mc-ctl: update copyright file
Mauro Carvalho Chehab [Mon, 6 May 2013 19:38:21 +0000 (16:38 -0300)]
ras-mc-ctl: update copyright file

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoras-mc-ctl: rename edac-ctl to ras-mc-ctl
Mauro Carvalho Chehab [Mon, 6 May 2013 19:27:56 +0000 (16:27 -0300)]
ras-mc-ctl: rename edac-ctl to ras-mc-ctl

In order to allow both EDAC and rasdaemon to be installed
at the same system, rename the control tool to ras-mc-ctl.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoedac-ctl: drop support for legacy EDAC nodes
Mauro Carvalho Chehab [Mon, 6 May 2013 19:27:25 +0000 (16:27 -0300)]
edac-ctl: drop support for legacy EDAC nodes

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoedac-ctl: Convert it to use EDAC version 3.0.0 (HERM)
Mauro Carvalho Chehab [Mon, 6 May 2013 19:25:19 +0000 (16:25 -0300)]
edac-ctl: Convert it to use EDAC version 3.0.0 (HERM)

EDAC version 3.0.0 (HERM) added a new set of sysfs nodes
that provides the real location of the memory banks.

Use it, instead of the fake csrow/channel location.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoedac-ctl: move dimm label parsing routine to the beginning
Mauro Carvalho Chehab [Mon, 6 May 2013 18:06:36 +0000 (15:06 -0300)]
edac-ctl: move dimm label parsing routine to the beginning

This routine will be used later on other places. So, move it to
the beginning.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoRemove the already solved issues from TODO.
Mauro Carvalho Chehab [Fri, 3 May 2013 21:20:41 +0000 (18:20 -0300)]
Remove the already solved issues from TODO.

For now, don't renumber it, as the numbering is still usefull.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoras-events: Use uptime clock if available
Mauro Carvalho Chehab [Fri, 3 May 2013 21:06:35 +0000 (18:06 -0300)]
ras-events: Use uptime clock if available

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoras-events: Use per-instance tracing ringbuffer, if supported
Mauro Carvalho Chehab [Fri, 3 May 2013 18:20:47 +0000 (15:20 -0300)]
ras-events: Use per-instance tracing ringbuffer, if supported

Kernel 3.10-rc1 and upper supports per-instance ringbuffers.
Use it if available.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoras-events: warn if something got wrong with threads
Mauro Carvalho Chehab [Fri, 3 May 2013 17:16:15 +0000 (14:16 -0300)]
ras-events: warn if something got wrong with threads

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoSome fixes at the log function
Mauro Carvalho Chehab [Fri, 3 May 2013 16:47:35 +0000 (13:47 -0300)]
Some fixes at the log function

1) use the do { } while (0) logic, as it helps to avoid
   troubles with the define (see Kernel's Documentation);

2) add a "\n" where missing;

3) add ';' after log(...) to make it to look as a
real function.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agomove ras events generic code into a separate file
Mauro Carvalho Chehab [Fri, 3 May 2013 13:14:55 +0000 (10:14 -0300)]
move ras events generic code into a separate file

As we'll add other event types, move the ras events generic
code into a separate dir.

While here, get hid of the DEBUGFS define, replacing it by
a code that will discover where the debugfs got mounted on
the system.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agolibtrace: sync with latest changeset
Mauro Carvalho Chehab [Thu, 2 May 2013 20:10:33 +0000 (17:10 -0300)]
libtrace: sync with latest changeset

Sync it with the last upstream changeset(07f0eee).

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>