diff options
-rw-r--r-- | arch/x86/include/asm/mce.h | 4 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/common.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/mcheck/mce.c | 52 |
3 files changed, 29 insertions, 29 deletions
diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h index 227a72df6441..161485da6838 100644 --- a/arch/x86/include/asm/mce.h +++ b/arch/x86/include/asm/mce.h | |||
@@ -120,9 +120,9 @@ extern int mce_disabled; | |||
120 | extern int mce_p5_enabled; | 120 | extern int mce_p5_enabled; |
121 | 121 | ||
122 | #ifdef CONFIG_X86_MCE | 122 | #ifdef CONFIG_X86_MCE |
123 | void mcheck_init(struct cpuinfo_x86 *c); | 123 | void mcheck_cpu_init(struct cpuinfo_x86 *c); |
124 | #else | 124 | #else |
125 | static inline void mcheck_init(struct cpuinfo_x86 *c) {} | 125 | static inline void mcheck_cpu_init(struct cpuinfo_x86 *c) {} |
126 | #endif | 126 | #endif |
127 | 127 | ||
128 | #ifdef CONFIG_X86_ANCIENT_MCE | 128 | #ifdef CONFIG_X86_ANCIENT_MCE |
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index cc25c2b4a567..4df69a38be57 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
@@ -839,7 +839,7 @@ static void __cpuinit identify_cpu(struct cpuinfo_x86 *c) | |||
839 | 839 | ||
840 | #ifdef CONFIG_X86_MCE | 840 | #ifdef CONFIG_X86_MCE |
841 | /* Init Machine Check Exception if available. */ | 841 | /* Init Machine Check Exception if available. */ |
842 | mcheck_init(c); | 842 | mcheck_cpu_init(c); |
843 | #endif | 843 | #endif |
844 | 844 | ||
845 | select_idle_routine(c); | 845 | select_idle_routine(c); |
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index 0fb9dc50697e..68d968e69b13 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x86/kernel/cpu/mcheck/mce.c | |||
@@ -1136,7 +1136,7 @@ static int check_interval = 5 * 60; /* 5 minutes */ | |||
1136 | static DEFINE_PER_CPU(int, mce_next_interval); /* in jiffies */ | 1136 | static DEFINE_PER_CPU(int, mce_next_interval); /* in jiffies */ |
1137 | static DEFINE_PER_CPU(struct timer_list, mce_timer); | 1137 | static DEFINE_PER_CPU(struct timer_list, mce_timer); |
1138 | 1138 | ||
1139 | static void mcheck_timer(unsigned long data) | 1139 | static void mce_start_timer(unsigned long data) |
1140 | { | 1140 | { |
1141 | struct timer_list *t = &per_cpu(mce_timer, data); | 1141 | struct timer_list *t = &per_cpu(mce_timer, data); |
1142 | int *n; | 1142 | int *n; |
@@ -1220,7 +1220,7 @@ static int mce_banks_init(void) | |||
1220 | /* | 1220 | /* |
1221 | * Initialize Machine Checks for a CPU. | 1221 | * Initialize Machine Checks for a CPU. |
1222 | */ | 1222 | */ |
1223 | static int __cpuinit mce_cap_init(void) | 1223 | static int __cpuinit __mcheck_cpu_cap_init(void) |
1224 | { | 1224 | { |
1225 | unsigned b; | 1225 | unsigned b; |
1226 | u64 cap; | 1226 | u64 cap; |
@@ -1258,7 +1258,7 @@ static int __cpuinit mce_cap_init(void) | |||
1258 | return 0; | 1258 | return 0; |
1259 | } | 1259 | } |
1260 | 1260 | ||
1261 | static void mce_init(void) | 1261 | static void __mcheck_cpu_init_generic(void) |
1262 | { | 1262 | { |
1263 | mce_banks_t all_banks; | 1263 | mce_banks_t all_banks; |
1264 | u64 cap; | 1264 | u64 cap; |
@@ -1287,7 +1287,7 @@ static void mce_init(void) | |||
1287 | } | 1287 | } |
1288 | 1288 | ||
1289 | /* Add per CPU specific workarounds here */ | 1289 | /* Add per CPU specific workarounds here */ |
1290 | static int __cpuinit mce_cpu_quirks(struct cpuinfo_x86 *c) | 1290 | static int __cpuinit __mcheck_cpu_apply_quirks(struct cpuinfo_x86 *c) |
1291 | { | 1291 | { |
1292 | if (c->x86_vendor == X86_VENDOR_UNKNOWN) { | 1292 | if (c->x86_vendor == X86_VENDOR_UNKNOWN) { |
1293 | pr_info("MCE: unknown CPU type - not enabling MCE support.\n"); | 1293 | pr_info("MCE: unknown CPU type - not enabling MCE support.\n"); |
@@ -1355,7 +1355,7 @@ static int __cpuinit mce_cpu_quirks(struct cpuinfo_x86 *c) | |||
1355 | return 0; | 1355 | return 0; |
1356 | } | 1356 | } |
1357 | 1357 | ||
1358 | static void __cpuinit mce_ancient_init(struct cpuinfo_x86 *c) | 1358 | static void __cpuinit __mcheck_cpu_ancient_init(struct cpuinfo_x86 *c) |
1359 | { | 1359 | { |
1360 | if (c->x86 != 5) | 1360 | if (c->x86 != 5) |
1361 | return; | 1361 | return; |
@@ -1369,7 +1369,7 @@ static void __cpuinit mce_ancient_init(struct cpuinfo_x86 *c) | |||
1369 | } | 1369 | } |
1370 | } | 1370 | } |
1371 | 1371 | ||
1372 | static void mce_cpu_features(struct cpuinfo_x86 *c) | 1372 | static void __mcheck_cpu_init_vendor(struct cpuinfo_x86 *c) |
1373 | { | 1373 | { |
1374 | switch (c->x86_vendor) { | 1374 | switch (c->x86_vendor) { |
1375 | case X86_VENDOR_INTEL: | 1375 | case X86_VENDOR_INTEL: |
@@ -1383,7 +1383,7 @@ static void mce_cpu_features(struct cpuinfo_x86 *c) | |||
1383 | } | 1383 | } |
1384 | } | 1384 | } |
1385 | 1385 | ||
1386 | static void mce_init_timer(void) | 1386 | static void __mcheck_cpu_init_timer(void) |
1387 | { | 1387 | { |
1388 | struct timer_list *t = &__get_cpu_var(mce_timer); | 1388 | struct timer_list *t = &__get_cpu_var(mce_timer); |
1389 | int *n = &__get_cpu_var(mce_next_interval); | 1389 | int *n = &__get_cpu_var(mce_next_interval); |
@@ -1394,7 +1394,7 @@ static void mce_init_timer(void) | |||
1394 | *n = check_interval * HZ; | 1394 | *n = check_interval * HZ; |
1395 | if (!*n) | 1395 | if (!*n) |
1396 | return; | 1396 | return; |
1397 | setup_timer(t, mcheck_timer, smp_processor_id()); | 1397 | setup_timer(t, mce_start_timer, smp_processor_id()); |
1398 | t->expires = round_jiffies(jiffies + *n); | 1398 | t->expires = round_jiffies(jiffies + *n); |
1399 | add_timer_on(t, smp_processor_id()); | 1399 | add_timer_on(t, smp_processor_id()); |
1400 | } | 1400 | } |
@@ -1414,26 +1414,26 @@ void (*machine_check_vector)(struct pt_regs *, long error_code) = | |||
1414 | * Called for each booted CPU to set up machine checks. | 1414 | * Called for each booted CPU to set up machine checks. |
1415 | * Must be called with preempt off: | 1415 | * Must be called with preempt off: |
1416 | */ | 1416 | */ |
1417 | void __cpuinit mcheck_init(struct cpuinfo_x86 *c) | 1417 | void __cpuinit mcheck_cpu_init(struct cpuinfo_x86 *c) |
1418 | { | 1418 | { |
1419 | if (mce_disabled) | 1419 | if (mce_disabled) |
1420 | return; | 1420 | return; |
1421 | 1421 | ||
1422 | mce_ancient_init(c); | 1422 | __mcheck_cpu_ancient_init(c); |
1423 | 1423 | ||
1424 | if (!mce_available(c)) | 1424 | if (!mce_available(c)) |
1425 | return; | 1425 | return; |
1426 | 1426 | ||
1427 | if (mce_cap_init() < 0 || mce_cpu_quirks(c) < 0) { | 1427 | if (__mcheck_cpu_cap_init() < 0 || __mcheck_cpu_apply_quirks(c) < 0) { |
1428 | mce_disabled = 1; | 1428 | mce_disabled = 1; |
1429 | return; | 1429 | return; |
1430 | } | 1430 | } |
1431 | 1431 | ||
1432 | machine_check_vector = do_machine_check; | 1432 | machine_check_vector = do_machine_check; |
1433 | 1433 | ||
1434 | mce_init(); | 1434 | __mcheck_cpu_init_generic(); |
1435 | mce_cpu_features(c); | 1435 | __mcheck_cpu_init_vendor(c); |
1436 | mce_init_timer(); | 1436 | __mcheck_cpu_init_timer(); |
1437 | INIT_WORK(&__get_cpu_var(mce_work), mce_process_work); | 1437 | INIT_WORK(&__get_cpu_var(mce_work), mce_process_work); |
1438 | 1438 | ||
1439 | if (raw_smp_processor_id() == 0) | 1439 | if (raw_smp_processor_id() == 0) |
@@ -1665,7 +1665,7 @@ __setup("mce", mcheck_enable); | |||
1665 | * Disable machine checks on suspend and shutdown. We can't really handle | 1665 | * Disable machine checks on suspend and shutdown. We can't really handle |
1666 | * them later. | 1666 | * them later. |
1667 | */ | 1667 | */ |
1668 | static int mce_disable(void) | 1668 | static int mce_disable_error_reporting(void) |
1669 | { | 1669 | { |
1670 | int i; | 1670 | int i; |
1671 | 1671 | ||
@@ -1680,12 +1680,12 @@ static int mce_disable(void) | |||
1680 | 1680 | ||
1681 | static int mce_suspend(struct sys_device *dev, pm_message_t state) | 1681 | static int mce_suspend(struct sys_device *dev, pm_message_t state) |
1682 | { | 1682 | { |
1683 | return mce_disable(); | 1683 | return mce_disable_error_reporting(); |
1684 | } | 1684 | } |
1685 | 1685 | ||
1686 | static int mce_shutdown(struct sys_device *dev) | 1686 | static int mce_shutdown(struct sys_device *dev) |
1687 | { | 1687 | { |
1688 | return mce_disable(); | 1688 | return mce_disable_error_reporting(); |
1689 | } | 1689 | } |
1690 | 1690 | ||
1691 | /* | 1691 | /* |
@@ -1695,8 +1695,8 @@ static int mce_shutdown(struct sys_device *dev) | |||
1695 | */ | 1695 | */ |
1696 | static int mce_resume(struct sys_device *dev) | 1696 | static int mce_resume(struct sys_device *dev) |
1697 | { | 1697 | { |
1698 | mce_init(); | 1698 | __mcheck_cpu_init_generic(); |
1699 | mce_cpu_features(¤t_cpu_data); | 1699 | __mcheck_cpu_init_vendor(¤t_cpu_data); |
1700 | 1700 | ||
1701 | return 0; | 1701 | return 0; |
1702 | } | 1702 | } |
@@ -1706,8 +1706,8 @@ static void mce_cpu_restart(void *data) | |||
1706 | del_timer_sync(&__get_cpu_var(mce_timer)); | 1706 | del_timer_sync(&__get_cpu_var(mce_timer)); |
1707 | if (!mce_available(¤t_cpu_data)) | 1707 | if (!mce_available(¤t_cpu_data)) |
1708 | return; | 1708 | return; |
1709 | mce_init(); | 1709 | __mcheck_cpu_init_generic(); |
1710 | mce_init_timer(); | 1710 | __mcheck_cpu_init_timer(); |
1711 | } | 1711 | } |
1712 | 1712 | ||
1713 | /* Reinit MCEs after user configuration changes */ | 1713 | /* Reinit MCEs after user configuration changes */ |
@@ -1733,7 +1733,7 @@ static void mce_enable_ce(void *all) | |||
1733 | cmci_reenable(); | 1733 | cmci_reenable(); |
1734 | cmci_recheck(); | 1734 | cmci_recheck(); |
1735 | if (all) | 1735 | if (all) |
1736 | mce_init_timer(); | 1736 | __mcheck_cpu_init_timer(); |
1737 | } | 1737 | } |
1738 | 1738 | ||
1739 | static struct sysdev_class mce_sysclass = { | 1739 | static struct sysdev_class mce_sysclass = { |
@@ -2042,7 +2042,7 @@ static __init void mce_init_banks(void) | |||
2042 | } | 2042 | } |
2043 | } | 2043 | } |
2044 | 2044 | ||
2045 | static __init int mce_init_device(void) | 2045 | static __init int mcheck_init_device(void) |
2046 | { | 2046 | { |
2047 | int err; | 2047 | int err; |
2048 | int i = 0; | 2048 | int i = 0; |
@@ -2070,7 +2070,7 @@ static __init int mce_init_device(void) | |||
2070 | return err; | 2070 | return err; |
2071 | } | 2071 | } |
2072 | 2072 | ||
2073 | device_initcall(mce_init_device); | 2073 | device_initcall(mcheck_init_device); |
2074 | 2074 | ||
2075 | /* | 2075 | /* |
2076 | * Old style boot options parsing. Only for compatibility. | 2076 | * Old style boot options parsing. Only for compatibility. |
@@ -2118,7 +2118,7 @@ static int fake_panic_set(void *data, u64 val) | |||
2118 | DEFINE_SIMPLE_ATTRIBUTE(fake_panic_fops, fake_panic_get, | 2118 | DEFINE_SIMPLE_ATTRIBUTE(fake_panic_fops, fake_panic_get, |
2119 | fake_panic_set, "%llu\n"); | 2119 | fake_panic_set, "%llu\n"); |
2120 | 2120 | ||
2121 | static int __init mce_debugfs_init(void) | 2121 | static int __init mcheck_debugfs_init(void) |
2122 | { | 2122 | { |
2123 | struct dentry *dmce, *ffake_panic; | 2123 | struct dentry *dmce, *ffake_panic; |
2124 | 2124 | ||
@@ -2132,5 +2132,5 @@ static int __init mce_debugfs_init(void) | |||
2132 | 2132 | ||
2133 | return 0; | 2133 | return 0; |
2134 | } | 2134 | } |
2135 | late_initcall(mce_debugfs_init); | 2135 | late_initcall(mcheck_debugfs_init); |
2136 | #endif | 2136 | #endif |