mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@amd64.org>
To: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Linux Edac Mailing List <linux-edac@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Aristeu Rozanski <arozansk@redhat.com>,
	Doug Thompson <norsk5@yahoo.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Ingo Molnar <mingo@redhat.com>
Subject: Re: [PATCH v29] RAS: Add a tracepoint for reporting memory controller events
Date: Tue, 5 Jun 2012 15:07:52 +0200	[thread overview]
Message-ID: <20120605130752.GE13495@aftab.osrc.amd.com> (raw)
In-Reply-To: <4FC8E5C4.4080008@redhat.com>

On Fri, Jun 01, 2012 at 12:54:44PM -0300, Mauro Carvalho Chehab wrote:
> +/*
> + * Default error mechanisms for Memory Controller errors (CE and UE)
> + */
> +TRACE_EVENT(mc_event,
> +
> +	TP_PROTO(const unsigned int err_type,
> +		 const char *error_msg,
> +		 const char *label,
> +		 const int error_count,
> +		 const u8 mc_index,
> +		 const s8 top_layer,
> +		 const s8 mid_layer,
> +		 const s8 low_layer,
> +		 unsigned long address,
> +		 const u8 grain_bits,
> +		 unsigned long syndrome,
> +		 const char *driver_detail),
> +
> +	TP_ARGS(err_type, error_msg, label, error_count, mc_index,
> +		top_layer, mid_layer, low_layer, address, grain_bits,
> +		syndrome, driver_detail),
> +
> +	TP_STRUCT__entry(
> +		__field(	unsigned int,	error_type		)
> +		__string(	msg,		error_msg		)
> +		__string(	label,		label			)
> +		__field(	u16,		error_count		)
> +		__field(	u8,		mc_index		)
> +		__field(	s8,		top_layer		)
> +		__field(	s8,		middle_layer		)
> +		__field(	s8,		lower_layer		)
> +		__field(	long,		address			)
> +		__field(	u8,		grain_bits		)
> +		__field(	long,		syndrome		)
> +		__string(	driver_detail,	driver_detail		)
> +	),
> +
> +	TP_fast_assign(
> +		__entry->error_type		= err_type;
> +		__assign_str(msg, error_msg);
> +		__assign_str(label, label);
> +		__entry->error_count		= error_count;
> +		__entry->mc_index		= mc_index;
> +		__entry->top_layer		= top_layer;
> +		__entry->middle_layer		= mid_layer;
> +		__entry->lower_layer		= low_layer;
> +		__entry->address		= address;
> +		__entry->grain_bits		= grain_bits;
> +		__entry->syndrome		= syndrome;
> +		__assign_str(driver_detail, driver_detail);
> +	),
> +
> +	TP_printk("%d %s error%s:%s%s on memory stick %s (mc:%d location:%d:%d:%d address:0x%08lx grain:%d syndrome:0x%08lx%s%s)",

Just a minor nitpick:

       mcegen.py-3078  [019] .N..  6815.663058: mc_event: 1 Corrected error: amd64_edac on memory stick unknown memory (mc:0 location:3:1:-1 address:0x000007ba grain:2 syndrome:0x00001809)

It says "... on memory stick unknown memory... "

Can we make the printk proto like this:

	TP_printk("%d %s error%s:%s%s on %s (mc:%d location:%d:%d:%d address:0x%08lx grain:%d syndrome:0x%08lx%s%s)",

so that both

	"Corrected error on DIMMx..."

and

	"Corrected error on unknown memory..."

work semantically?

Thanks.

-- 
Regards/Gruss,
Boris.

Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
GM: Alberto Bozzo
Reg: Dornach, Landkreis Muenchen
HRB Nr. 43632 WEEE Registernr: 129 19551

  reply	other threads:[~2012-06-05 13:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-01 15:07 Mauro Carvalho Chehab
2012-06-01 15:21 ` Borislav Petkov
2012-06-01 15:54   ` Mauro Carvalho Chehab
2012-06-05 13:07     ` Borislav Petkov [this message]
2012-06-06 10:33       ` Mauro Carvalho Chehab
2012-06-06 12:53         ` Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120605130752.GE13495@aftab.osrc.amd.com \
    --to=bp@amd64.org \
    --cc=arozansk@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@redhat.com \
    --cc=mingo@redhat.com \
    --cc=norsk5@yahoo.com \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome