Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 308090
b: refs/heads/master
c: 875e266
h: refs/heads/master
v: v3
  • Loading branch information
Tony Luck committed May 23, 2012
1 parent 1b61980 commit 04ddbc5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a129a7c84582629741e5fa6f40026efcd7a65bd4
refs/heads/master: 875e26648cf9b6db9d8dc07b7959d7c61fb3f49c
16 changes: 10 additions & 6 deletions trunk/arch/x86/kernel/cpu/mcheck/mce-severity.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,15 +165,19 @@ static struct severity {
};

/*
* If the EIPV bit is set, it means the saved IP is the
* instruction which caused the MCE.
* If mcgstatus indicated that ip/cs on the stack were
* no good, then "m->cs" will be zero and we will have
* to assume the worst case (IN_KERNEL) as we actually
* have no idea what we were executing when the machine
* check hit.
* If we do have a good "m->cs" (or a faked one in the
* case we were executing in VM86 mode) we can use it to
* distinguish an exception taken in user from from one
* taken in the kernel.
*/
static int error_context(struct mce *m)
{
if (m->mcgstatus & MCG_STATUS_EIPV)
return (m->ip && (m->cs & 3) == 3) ? IN_USER : IN_KERNEL;
/* Unknown, assume kernel */
return IN_KERNEL;
return ((m->cs & 3) == 3) ? IN_USER : IN_KERNEL;
}

int mce_severity(struct mce *m, int tolerant, char **msg)
Expand Down

0 comments on commit 04ddbc5

Please sign in to comment.