aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/mcheck
diff options
context:
space:
mode:
authorBorislav Petkov <borislav.petkov@amd.com>2009-10-16 06:31:32 -0400
committerIngo Molnar <mingo@elte.hu>2009-10-16 08:46:49 -0400
commit5e09954a9acc3b435ffe318b95afd3c02fae069f (patch)
treea635ff9e4f550e23cc7cf8f128c5a117bab5a4d3 /arch/x86/kernel/cpu/mcheck
parent6b50f5c7c7163d50af0946a93b61c05e448f6038 (diff)
x86, mce: Fix up MCE naming nomenclature
Prefix global/setup routines with "mcheck_" thus differentiating from the internal facilities prefixed with "mce_". Also, prefix the per cpu calls with mcheck_cpu and rename them to reflect the MCE setup hierarchy of calls better. There should be no functionality change resulting from this patch. Signed-off-by: Borislav Petkov <borislav.petkov@amd.com> Cc: Andi Kleen <andi@firstfloor.org> LKML-Reference: <1255689093-26921-1-git-send-email-borislav.petkov@amd.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/cpu/mcheck')
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce.c52
1 files changed, 26 insertions, 26 deletions
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 */
1136static DEFINE_PER_CPU(int, mce_next_interval); /* in jiffies */ 1136static DEFINE_PER_CPU(int, mce_next_interval); /* in jiffies */
1137static DEFINE_PER_CPU(struct timer_list, mce_timer); 1137static DEFINE_PER_CPU(struct timer_list, mce_timer);
1138 1138
1139static void mcheck_timer(unsigned long data) 1139static 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 */
1223static int __cpuinit mce_cap_init(void) 1223static 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
1261static void mce_init(void) 1261static 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 */
1290static int __cpuinit mce_cpu_quirks(struct cpuinfo_x86 *c) 1290static 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
1358static void __cpuinit mce_ancient_init(struct cpuinfo_x86 *c) 1358static 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
1372static void mce_cpu_features(struct cpuinfo_x86 *c) 1372static 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
1386static void mce_init_timer(void) 1386static 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 */
1417void __cpuinit mcheck_init(struct cpuinfo_x86 *c) 1417void __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 */
1668static int mce_disable(void) 1668static 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
1681static int mce_suspend(struct sys_device *dev, pm_message_t state) 1681static 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
1686static int mce_shutdown(struct sys_device *dev) 1686static 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 */
1696static int mce_resume(struct sys_device *dev) 1696static int mce_resume(struct sys_device *dev)
1697{ 1697{
1698 mce_init(); 1698 __mcheck_cpu_init_generic();
1699 mce_cpu_features(&current_cpu_data); 1699 __mcheck_cpu_init_vendor(&current_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(&current_cpu_data)) 1707 if (!mce_available(&current_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
1739static struct sysdev_class mce_sysclass = { 1739static struct sysdev_class mce_sysclass = {
@@ -2042,7 +2042,7 @@ static __init void mce_init_banks(void)
2042 } 2042 }
2043} 2043}
2044 2044
2045static __init int mce_init_device(void) 2045static __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
2073device_initcall(mce_init_device); 2073device_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)
2118DEFINE_SIMPLE_ATTRIBUTE(fake_panic_fops, fake_panic_get, 2118DEFINE_SIMPLE_ATTRIBUTE(fake_panic_fops, fake_panic_get,
2119 fake_panic_set, "%llu\n"); 2119 fake_panic_set, "%llu\n");
2120 2120
2121static int __init mce_debugfs_init(void) 2121static 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}
2135late_initcall(mce_debugfs_init); 2135late_initcall(mcheck_debugfs_init);
2136#endif 2136#endif