Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 163045
b: refs/heads/master
c: 5be9ed2
h: refs/heads/master
i:
  163043: 1d4bde0
v: v3
  • Loading branch information
Huang Ying authored and H. Peter Anvin committed Aug 10, 2009
1 parent da954d5 commit cb64d22
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 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: 0dcc66851f1091af421416c28a9458836885f522
refs/heads/master: 5be9ed251f58881dfc3dd6742a81ff9ad1a7bb04
1 change: 1 addition & 0 deletions trunk/arch/x86/kernel/cpu/mcheck/mce-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ struct mce_bank {
};

int mce_severity(struct mce *a, int tolerant, char **msg);
struct dentry *mce_get_debugfs_dir(void);

extern int mce_ser;

Expand Down
4 changes: 1 addition & 3 deletions trunk/arch/x86/kernel/cpu/mcheck/mce-severity.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ static int __init severities_debugfs_init(void)
{
struct dentry *dmce = NULL, *fseverities_coverage = NULL;

dmce = debugfs_create_dir("mce", NULL);
dmce = mce_get_debugfs_dir();
if (dmce == NULL)
goto err_out;
fseverities_coverage = debugfs_create_file("severities-coverage",
Expand All @@ -209,8 +209,6 @@ static int __init severities_debugfs_init(void)
return 0;

err_out:
if (dmce)
debugfs_remove(dmce);
return -ENOMEM;
}
late_initcall(severities_debugfs_init);
13 changes: 13 additions & 0 deletions trunk/arch/x86/kernel/cpu/mcheck/mce.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <linux/smp.h>
#include <linux/fs.h>
#include <linux/mm.h>
#include <linux/debugfs.h>

#include <asm/processor.h>
#include <asm/hw_irq.h>
Expand Down Expand Up @@ -2003,3 +2004,15 @@ static int __init mcheck_disable(char *str)
return 1;
}
__setup("nomce", mcheck_disable);

#ifdef CONFIG_DEBUG_FS
struct dentry *mce_get_debugfs_dir(void)
{
static struct dentry *dmce;

if (!dmce)
dmce = debugfs_create_dir("mce", NULL);

return dmce;
}
#endif

0 comments on commit cb64d22

Please sign in to comment.