lkml.org 
[lkml]   [2014]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] separate CMCI/Threshold Interrupt and POLL in mce-inject
Date
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


\
 
 \ /
  Last update: 2014-10-31 03:01    [W:0.083 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site