Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 148876
b: refs/heads/master
c: 01c6680
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Gleixner authored and H. Peter Anvin committed May 28, 2009
1 parent 4dc3d1e commit 75fd840
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 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: ba2d0f2b0c56d7174a0208f7c463271f39040728
refs/heads/master: 01c6680a547a3ee8dd170c269ea8e037b3191b71
10 changes: 7 additions & 3 deletions trunk/arch/x86/include/asm/mce.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@
* Machine Check support for x86
*/

#define MCG_CTL_P (1ULL<<8) /* MCG_CAP register available */
#define MCG_EXT_P (1ULL<<9) /* Extended registers available */
#define MCG_CMCI_P (1ULL<<10) /* CMCI supported */
#define MCG_BANKCNT_MASK 0xff /* Number of Banks */
#define MCG_CTL_P (1ULL<<8) /* MCG_CAP register available */
#define MCG_EXT_P (1ULL<<9) /* Extended registers available */
#define MCG_CMCI_P (1ULL<<10) /* CMCI supported */
#define MCG_EXT_CNT_MASK 0xff0000 /* Number of Extended registers */
#define MCG_EXT_CNT_SHIFT 16
#define MCG_EXT_CNT(c) (((c) & MCG_EXT_CNT_MASK) >> MCG_EXT_CNT_SHIFT)

#define MCG_STATUS_RIPV (1ULL<<0) /* restart ip valid */
#define MCG_STATUS_EIPV (1ULL<<1) /* ip points to correct instruction */
Expand Down
5 changes: 3 additions & 2 deletions trunk/arch/x86/kernel/cpu/mcheck/mce.c
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,8 @@ static int mce_cap_init(void)
u64 cap;

rdmsrl(MSR_IA32_MCG_CAP, cap);
b = cap & 0xff;

b = cap & MCG_BANKCNT_MASK;
printk(KERN_INFO "mce: CPU supports %d MCE banks\n", b);

if (b > MAX_NR_BANKS) {
Expand All @@ -590,7 +591,7 @@ static int mce_cap_init(void)
}

/* Use accurate RIP reporting if available. */
if ((cap & (1<<9)) && ((cap >> 16) & 0xff) >= 9)
if ((cap & MCG_EXT_P) && MCG_EXT_CNT(cap) >= 9)
rip_msr = MSR_IA32_MCG_EIP;

return 0;
Expand Down

0 comments on commit 75fd840

Please sign in to comment.