linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vasyl Gomonovych <vgomonovych@marvell.com>
To: <bp@suse.de>, <ying.huang@intel.com>, <alex.kluver@hpe.com>,
	<linux-kernel@vger.kernel.org>, <vgomonovych@marvell.com>
Subject: [PATCH] efi: cper: Define macro for errors type
Date: Wed, 20 Apr 2022 10:57:24 -0700	[thread overview]
Message-ID: <20220420175726.27789-1-vgomonovych@marvell.com> (raw)

CPER defines errors type, which is currently in
form of raw numbers referenced from cper and
ghes_edac modules. CPER format sharable with
firmware. This errors type macro can be common
and share errors type between kernel and firmware
and eliminate magic numbers uses. Also will
simplify do code reuse in ghes_edac_report_mem_error.

Signed-off-by: Vasyl Gomonovych <vgomonovych@marvell.com>
---
 include/linux/cper.h | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/include/linux/cper.h b/include/linux/cper.h
index 6a511a1078ca069c4fa0e120b781c4203571afc8..13c09b08695241c9f040680c7435081f1cd2bcff 100644
--- a/include/linux/cper.h
+++ b/include/linux/cper.h
@@ -314,6 +314,23 @@ enum {
 #define CPER_ARM_ERR_ACCESS_MODE_SHIFT		43
 #define CPER_ARM_ERR_ACCESS_MODE_MASK		GENMASK(0,0)
 
+#define CPER_MEM_ERR_TYPE_UNKNOWN		0
+#define CPER_MEM_ERR_TYPE_NO_ERR		1
+#define CPER_MEM_ERR_TYPE_SBIT_ECC		2
+#define CPER_MEM_ERR_TYPE_MBIT_ECC		3
+#define CPER_MEM_ERR_TYPE_SSB_ECC		4
+#define CPER_MEM_ERR_TYPE_MSB_ECC		5
+#define CPER_MEM_ERR_TYPE_MSTR_ABRT		6
+#define CPER_MEM_ERR_TYPE_TARG_ABRT		7
+#define CPER_MEM_ERR_TYPE_PARITY_ERR		8
+#define CPER_MEM_ERR_TYPE_WDG_TIMOUT		9
+#define CPER_MEM_ERR_TYPE_INVAL_ADDR		10
+#define CPER_MEM_ERR_TYPE_MIRR_BROK		11
+#define CPER_MEM_ERR_TYPE_MEM_SPARING		12
+#define CPER_MEM_ERR_TYPE_SBR_CE		13
+#define CPER_MEM_ERR_TYPE_SBR_UE		14
+#define CPER_MEM_ERR_TYPE_PHYS_MAPOUT		15
+
 /*
  * All tables and structs must be byte-packed to match CPER
  * specification, since the tables are provided by the system BIOS
-- 
2.17.1


                 reply	other threads:[~2022-04-20 17:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20220420175726.27789-1-vgomonovych@marvell.com \
    --to=vgomonovych@marvell.com \
    --cc=alex.kluver@hpe.com \
    --cc=bp@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ying.huang@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).