From: Mauro Carvalho Chehab <m.chehab@samsung.com>
To: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
Cc: tony.luck@intel.com, bp@alien8.de, bhelgaas@google.com,
rostedt@goodmis.org, rjw@sisk.pl, lance.ortiz@hp.com,
linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] mce: acpi/apei: trace: Enable ghes memory error trace event
Date: Thu, 08 Aug 2013 16:38:22 -0300 [thread overview]
Message-ID: <20130808163822.67e0828a@samsung.com> (raw)
In-Reply-To: <1375986471-27113-4-git-send-email-naveen.n.rao@linux.vnet.ibm.com>
Em Thu, 08 Aug 2013 23:57:51 +0530
"Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> escreveu:
> Enable memory error trace event in cper.c
Why do we need to do that? Memory error events are already handled
via edac_ghes module, in a standard way that allows the same
tracing to be used by either BIOS or by direct hardware error
report mechanism.
Adding an extra tracing for the same thing here will just make
userspace more complex, and will create duplicated error events
for the very same error.
Ok, if the interface there is poor, let's improve it, but adding
yet another interface to report the same error doesn't sound
reasonable on my eyes.
Regards,
Mauro
>
> Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
> ---
> drivers/acpi/apei/cper.c | 21 ++++++++++++++++-----
> 1 file changed, 16 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/acpi/apei/cper.c b/drivers/acpi/apei/cper.c
> index 33dc6a0..19a9c0b 100644
> --- a/drivers/acpi/apei/cper.c
> +++ b/drivers/acpi/apei/cper.c
> @@ -32,6 +32,10 @@
> #include <linux/pci.h>
> #include <linux/aer.h>
>
> +#define CREATE_TRACE_POINTS
> +#define TRACE_EVENT_GHES
> +#include <trace/events/ras.h>
> +
> /*
> * CPER record ID need to be unique even after reboot, because record
> * ID is used as index for ERST storage, while CPER records from
> @@ -193,8 +197,13 @@ static const char *cper_mem_err_type_strs[] = {
> "scrub uncorrected error",
> };
>
> -static void cper_print_mem(const char *pfx, const struct cper_sec_mem_err *mem)
> +static void cper_print_mem(const char *pfx,
> + const struct acpi_hest_generic_status *estatus,
> + const struct acpi_hest_generic_data *gdata,
> + const struct cper_sec_mem_err *mem)
> {
> + trace_ghes_platform_memory_event(estatus, gdata, mem);
> +
> if (mem->validation_bits & CPER_MEM_VALID_ERROR_STATUS)
> printk("%s""error_status: 0x%016llx\n", pfx, mem->error_status);
> if (mem->validation_bits & CPER_MEM_VALID_PHYSICAL_ADDRESS)
> @@ -292,8 +301,10 @@ static const char *apei_estatus_section_flag_strs[] = {
> "latent error",
> };
>
> -static void apei_estatus_print_section(
> - const char *pfx, const struct acpi_hest_generic_data *gdata, int sec_no)
> +static void apei_estatus_print_section(const char *pfx,
> + const struct acpi_hest_generic_status *estatus,
> + const struct acpi_hest_generic_data *gdata,
> + int sec_no)
> {
> uuid_le *sec_type = (uuid_le *)gdata->section_type;
> __u16 severity;
> @@ -320,7 +331,7 @@ static void apei_estatus_print_section(
> struct cper_sec_mem_err *mem_err = (void *)(gdata + 1);
> printk("%s""section_type: memory error\n", pfx);
> if (gdata->error_data_length >= sizeof(*mem_err))
> - cper_print_mem(pfx, mem_err);
> + cper_print_mem(pfx, estatus, gdata, mem_err);
> else
> goto err_section_too_small;
> } else if (!uuid_le_cmp(*sec_type, CPER_SEC_PCIE)) {
> @@ -355,7 +366,7 @@ void apei_estatus_print(const char *pfx,
> gdata = (struct acpi_hest_generic_data *)(estatus + 1);
> while (data_len > sizeof(*gdata)) {
> gedata_len = gdata->error_data_length;
> - apei_estatus_print_section(pfx, gdata, sec_no);
> + apei_estatus_print_section(pfx, estatus, gdata, sec_no);
> data_len -= gedata_len + sizeof(*gdata);
> gdata = (void *)(gdata + 1) + gedata_len;
> sec_no++;
--
Cheers,
Mauro
next prev parent reply other threads:[~2013-08-08 19:38 UTC|newest]
Thread overview: 75+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-08 18:27 [PATCH 0/3] Add trace event for ghes memory error Naveen N. Rao
2013-08-08 18:27 ` [PATCH 1/3] mce: acpi/apei: trace: Include PCIe AER trace event conditionally Naveen N. Rao
2013-08-08 19:23 ` Steven Rostedt
2013-08-12 11:37 ` Naveen N. Rao
2013-08-12 13:13 ` Steven Rostedt
2013-08-12 13:26 ` Borislav Petkov
2013-08-08 18:27 ` [PATCH 2/3] mce: acpi/apei: trace: Add trace event for ghes memory error Naveen N. Rao
2013-08-08 19:17 ` Borislav Petkov
2013-08-12 11:28 ` Naveen N. Rao
2013-08-08 18:27 ` [PATCH 3/3] mce: acpi/apei: trace: Enable ghes memory error trace event Naveen N. Rao
2013-08-08 19:38 ` Mauro Carvalho Chehab [this message]
2013-08-10 18:03 ` Borislav Petkov
2013-08-12 11:33 ` Mauro Carvalho Chehab
2013-08-12 12:38 ` Borislav Petkov
2013-08-12 14:49 ` Mauro Carvalho Chehab
2013-08-12 15:04 ` Borislav Petkov
2013-08-12 17:25 ` Mauro Carvalho Chehab
2013-08-12 17:54 ` Luck, Tony
2013-08-12 17:56 ` Borislav Petkov
2013-08-13 11:36 ` Naveen N. Rao
2013-08-13 12:21 ` Mauro Carvalho Chehab
2013-08-13 12:33 ` Borislav Petkov
2013-08-13 16:55 ` Naveen N. Rao
2013-08-14 23:54 ` Mauro Carvalho Chehab
2013-08-12 12:41 ` Naveen N. Rao
2013-08-12 12:53 ` Borislav Petkov
2013-08-13 11:21 ` Naveen N. Rao
2013-08-13 12:42 ` Borislav Petkov
2013-08-13 17:32 ` Naveen N. Rao
2013-08-13 17:58 ` Borislav Petkov
2013-08-13 18:05 ` Luck, Tony
2013-08-13 18:05 ` Luck, Tony
2013-08-13 18:05 ` Luck, Tony
2013-08-13 18:10 ` Borislav Petkov
2013-08-13 20:13 ` Luck, Tony
2013-08-13 20:13 ` Luck, Tony
2013-08-13 20:13 ` Luck, Tony
2013-08-14 5:43 ` Borislav Petkov
2013-08-14 18:38 ` Luck, Tony
2013-08-14 18:38 ` Luck, Tony
2013-08-14 18:38 ` Luck, Tony
2013-08-15 10:14 ` Borislav Petkov
2013-08-15 19:14 ` Luck, Tony
2013-08-15 19:14 ` Luck, Tony
2013-08-15 19:14 ` Luck, Tony
2013-08-15 19:43 ` Borislav Petkov
2013-08-15 0:05 ` Mauro Carvalho Chehab
2013-08-14 10:57 ` Naveen N. Rao
2013-08-15 0:22 ` Mauro Carvalho Chehab
2013-08-15 9:38 ` Borislav Petkov
2013-08-15 13:26 ` Mauro Carvalho Chehab
2013-08-15 13:44 ` Borislav Petkov
2013-08-15 14:14 ` Mauro Carvalho Chehab
2013-08-15 16:11 ` Borislav Petkov
2013-08-15 19:20 ` Luck, Tony
2013-08-15 19:41 ` Borislav Petkov
2013-08-15 0:00 ` Mauro Carvalho Chehab
2013-08-15 9:43 ` Borislav Petkov
2013-08-12 14:44 ` Mauro Carvalho Chehab
2013-08-13 11:41 ` Naveen N. Rao
2013-08-13 12:41 ` Mauro Carvalho Chehab
2013-08-13 17:17 ` Naveen N. Rao
2013-08-13 17:39 ` Luck, Tony
2013-08-14 10:47 ` Naveen N. Rao
2013-08-14 12:18 ` Borislav Petkov
2013-08-15 0:15 ` Mauro Carvalho Chehab
2013-08-15 10:01 ` Borislav Petkov
2013-08-15 13:34 ` Mauro Carvalho Chehab
2013-08-15 13:51 ` Borislav Petkov
2013-08-15 18:16 ` Luck, Tony
2013-08-15 18:16 ` Luck, Tony
2013-08-15 18:16 ` Luck, Tony
2013-08-15 18:41 ` Borislav Petkov
2013-08-14 23:56 ` Mauro Carvalho Chehab
2013-08-15 10:02 ` 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=20130808163822.67e0828a@samsung.com \
--to=m.chehab@samsung.com \
--cc=bhelgaas@google.com \
--cc=bp@alien8.de \
--cc=lance.ortiz@hp.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=naveen.n.rao@linux.vnet.ibm.com \
--cc=rjw@sisk.pl \
--cc=rostedt@goodmis.org \
--cc=tony.luck@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.