From: Chen Yucong <slaoub@gmail.com>
To: bp@alien8.de
Cc: tony.luck@intel.com, ak@linux.intel.com,
gong.chen@linux.intel.com, linux-edac@vger.kernel.org,
linux-kernel@vger.kernel.org, Chen Yucong <slaoub@gmail.com>
Subject: [PATCH] separate CMCI/Threshold Interrupt and POLL in mce-inject
Date: Fri, 31 Oct 2014 09:24:08 +0800 [thread overview]
Message-ID: <1414718648-7766-4-git-send-email-slaoub@gmail.com> (raw)
In-Reply-To: <1414718648-7766-1-git-send-email-slaoub@gmail.com>
This patch introduces a new flag MCJ_INTERRUPT that will be used
to separate CMCI/Threshold Interrupt and POLL in mce-inject.
Signed-off-by: Chen Yucong <slaoub@gmail.com>
---
mce.h | 5 +++--
mce.lex | 1 +
mce.y | 6 +++++-
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/mce.h b/mce.h
index c0668ad..d0bd39a 100644
--- a/mce.h
+++ b/mce.h
@@ -38,8 +38,9 @@
#define MCJ_CTX_PROCESS 1 /* inject context: process */
#define MCJ_CTX_IRQ 2 /* inject context: IRQ */
#define MCJ_NMI_BROADCAST 4 /* do NMI broadcasting */
-#define MCJ_EXCEPTION 8 /* raise as exception */
-#define MCJ_IRQ_BRAODCAST 0x10 /* do IRQ broadcasting */
+#define MCJ_IRQ_BRAODCAST 8 /* do IRQ broadcasting */
+#define MCJ_EXCEPTION 0x10 /* raise as exception */
+#define MCJ_INTERRUPT 0x20 /* raise as interrupt */
#define MCJ_CTX_SET(flags, ctx) \
do { \
diff --git a/mce.lex b/mce.lex
index ce8a9ae..ce4ea69 100644
--- a/mce.lex
+++ b/mce.lex
@@ -83,6 +83,7 @@ static struct key {
KEY(IN_IRQ),
KEY(IN_PROC),
KEY(POLL),
+ KEY(INTERRUPT),
KEY(EXCP),
KEYVAL(CORRECTED, MCI_STATUS_VAL|MCI_STATUS_EN), // checkme
KEYVAL(UNCORRECTED, MCI_STATUS_VAL|MCI_STATUS_UC|MCI_STATUS_EN),
diff --git a/mce.y b/mce.y
index a9421ee..84095a1 100644
--- a/mce.y
+++ b/mce.y
@@ -43,7 +43,7 @@ static void init(void);
%token STATUS RIP TSC ADDR MISC CPU BANK MCGSTATUS HOLD
%token NOBROADCAST IRQBROADCAST NMIBROADCAST
%token IN_IRQ IN_PROC PROCESSOR TIME SOCKETID APICID MCGCAP
-%token POLL EXCP
+%token POLL INTERRUPT EXCP
%token CORRECTED UNCORRECTED FATAL MCE
%token NUMBER
%token SYMBOL
@@ -94,7 +94,11 @@ mce_term: STATUS status_list { m.status = $2; }
| IN_IRQ { MCJ_CTX_SET(m.inject_flags, MCJ_CTX_IRQ); }
| IN_PROC { MCJ_CTX_SET(m.inject_flags, MCJ_CTX_PROCESS); }
| POLL { mce_flags |= MCE_RAISE_MODE;
+ m.inject_flags &= ~MCJ_INTERRUPT;
m.inject_flags &= ~MCJ_EXCEPTION; }
+ | INTERRUPT { mce_flags |= MCE_RAISE_MODE;
+ m.inject_flags &= ~MCJ_EXCEPTION;
+ m.inject_flags |= MCJ_INTERRUPT; }
| EXCP { mce_flags |= MCE_RAISE_MODE;
m.inject_flags |= MCJ_EXCEPTION; }
;
--
1.7.10.4
prev parent reply other threads:[~2014-10-31 1:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-31 1:24 [PATCH 0/2] mce-inject: extend mce-inject for support threshold interrupt event injection on ADM platform Chen Yucong
2014-10-31 1:24 ` [PATCH 1/2] x86, mce: apply MCE MSR wrappers to AMD platform for testing threshold interrupt handler Chen Yucong
2014-10-31 1:24 ` [PATCH 2/2] x86, mce, amd: extend mce-inject for support threshold interrupt event injection on AMD platform Chen Yucong
[not found] ` <CAOjmkp9Aec9Ec-93YvT5S_mMaxrOoZSYCDbjyWaxGV_dac6qog@mail.gmail.com>
2014-11-03 17:51 ` Aravind Gopalakrishnan
2014-11-03 18:00 ` Borislav Petkov
2014-11-04 2:02 ` Chen Yucong
2014-11-04 1:39 ` Chen Yucong
2014-10-31 1:24 ` Chen Yucong [this message]
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=1414718648-7766-4-git-send-email-slaoub@gmail.com \
--to=slaoub@gmail.com \
--cc=ak@linux.intel.com \
--cc=bp@alien8.de \
--cc=gong.chen@linux.intel.com \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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.