Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 138627
b: refs/heads/master
c: 123aa76
h: refs/heads/master
i:
  138625: 2b4bf76
  138623: 3d9b685
v: v3
  • Loading branch information
Andi Kleen authored and H. Peter Anvin committed Feb 17, 2009
1 parent 58f7068 commit c59a091
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 37 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: 973a2dd1d50a11d380086601f14e59116f93e8c5
refs/heads/master: 123aa76ec0cab5d4881cd8509faed43231e68801
2 changes: 0 additions & 2 deletions trunk/arch/x86/include/asm/mce.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,6 @@ extern void mcheck_init(struct cpuinfo_x86 *c);
#else
#define mcheck_init(c) do { } while (0)
#endif
extern void stop_mce(void);
extern void restart_mce(void);

#endif /* __KERNEL__ */
#endif /* _ASM_X86_MCE_H */
17 changes: 11 additions & 6 deletions trunk/arch/x86/kernel/alternative.c
Original file line number Diff line number Diff line change
Expand Up @@ -414,9 +414,17 @@ void __init alternative_instructions(void)
that might execute the to be patched code.
Other CPUs are not running. */
stop_nmi();
#ifdef CONFIG_X86_MCE
stop_mce();
#endif

/*
* Don't stop machine check exceptions while patching.
* MCEs only happen when something got corrupted and in this
* case we must do something about the corruption.
* Ignoring it is worse than a unlikely patching race.
* Also machine checks tend to be broadcast and if one CPU
* goes into machine check the others follow quickly, so we don't
* expect a machine check to cause undue problems during to code
* patching.
*/

apply_alternatives(__alt_instructions, __alt_instructions_end);

Expand Down Expand Up @@ -456,9 +464,6 @@ void __init alternative_instructions(void)
(unsigned long)__smp_locks_end);

restart_nmi();
#ifdef CONFIG_X86_MCE
restart_mce();
#endif
}

/**
Expand Down
14 changes: 0 additions & 14 deletions trunk/arch/x86/kernel/cpu/mcheck/mce_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,20 +60,6 @@ void mcheck_init(struct cpuinfo_x86 *c)
}
}

static unsigned long old_cr4 __initdata;

void __init stop_mce(void)
{
old_cr4 = read_cr4();
clear_in_cr4(X86_CR4_MCE);
}

void __init restart_mce(void)
{
if (old_cr4 & X86_CR4_MCE)
set_in_cr4(X86_CR4_MCE);
}

static int __init mcheck_disable(char *str)
{
mce_disabled = 1;
Expand Down
14 changes: 0 additions & 14 deletions trunk/arch/x86/kernel/cpu/mcheck/mce_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -680,20 +680,6 @@ static struct miscdevice mce_log_device = {
&mce_chrdev_ops,
};

static unsigned long old_cr4 __initdata;

void __init stop_mce(void)
{
old_cr4 = read_cr4();
clear_in_cr4(X86_CR4_MCE);
}

void __init restart_mce(void)
{
if (old_cr4 & X86_CR4_MCE)
set_in_cr4(X86_CR4_MCE);
}

/*
* Old style boot options parsing. Only for compatibility.
*/
Expand Down

0 comments on commit c59a091

Please sign in to comment.