aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/apic_64.c
diff options
context:
space:
mode:
authorHiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>2008-01-30 07:32:35 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:32:35 -0500
commite83a5fdca89970f87e06f87a1d18be22b161e2ba (patch)
treee9d22fd1e1a839876e65a593535a86fbfe99fee5 /arch/x86/kernel/apic_64.c
parentc4aba4a8ec795124394bc79e3e8dbbc319338a98 (diff)
x86: clean up apic_32/64.c
White space and coding style clean up. Make apic_32/64.c similar. Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/apic_64.c')
-rw-r--r--arch/x86/kernel/apic_64.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/arch/x86/kernel/apic_64.c b/arch/x86/kernel/apic_64.c
index 47b8ef51dde0..d1a696673d9d 100644
--- a/arch/x86/kernel/apic_64.c
+++ b/arch/x86/kernel/apic_64.c
@@ -23,33 +23,37 @@
23#include <linux/mc146818rtc.h> 23#include <linux/mc146818rtc.h>
24#include <linux/kernel_stat.h> 24#include <linux/kernel_stat.h>
25#include <linux/sysdev.h> 25#include <linux/sysdev.h>
26#include <linux/module.h>
27#include <linux/ioport.h> 26#include <linux/ioport.h>
28#include <linux/clockchips.h> 27#include <linux/clockchips.h>
29#include <linux/acpi_pmtmr.h> 28#include <linux/acpi_pmtmr.h>
29#include <linux/module.h>
30 30
31#include <asm/atomic.h> 31#include <asm/atomic.h>
32#include <asm/smp.h> 32#include <asm/smp.h>
33#include <asm/mtrr.h> 33#include <asm/mtrr.h>
34#include <asm/mpspec.h> 34#include <asm/mpspec.h>
35#include <asm/hpet.h>
35#include <asm/pgalloc.h> 36#include <asm/pgalloc.h>
36#include <asm/mach_apic.h> 37#include <asm/mach_apic.h>
37#include <asm/nmi.h> 38#include <asm/nmi.h>
38#include <asm/idle.h> 39#include <asm/idle.h>
39#include <asm/proto.h> 40#include <asm/proto.h>
40#include <asm/timex.h> 41#include <asm/timex.h>
41#include <asm/hpet.h>
42#include <asm/apic.h> 42#include <asm/apic.h>
43 43
44int apic_verbosity;
45int disable_apic_timer __cpuinitdata; 44int disable_apic_timer __cpuinitdata;
46static int apic_calibrate_pmtmr __initdata; 45static int apic_calibrate_pmtmr __initdata;
47int disable_apic; 46int disable_apic;
48 47
49/* Local APIC timer works in C2? */ 48/* Local APIC timer works in C2 */
50int local_apic_timer_c2_ok; 49int local_apic_timer_c2_ok;
51EXPORT_SYMBOL_GPL(local_apic_timer_c2_ok); 50EXPORT_SYMBOL_GPL(local_apic_timer_c2_ok);
52 51
52/*
53 * Debug level, exported for io_apic.c
54 */
55int apic_verbosity;
56
53static struct resource lapic_resource = { 57static struct resource lapic_resource = {
54 .name = "Local APIC", 58 .name = "Local APIC",
55 .flags = IORESOURCE_MEM | IORESOURCE_BUSY, 59 .flags = IORESOURCE_MEM | IORESOURCE_BUSY,
@@ -355,6 +359,11 @@ static void __init calibrate_APIC_clock(void)
355 calibration_result = result / HZ; 359 calibration_result = result / HZ;
356} 360}
357 361
362/*
363 * Setup the boot APIC
364 *
365 * Calibrate and verify the result.
366 */
358void __init setup_boot_APIC_clock(void) 367void __init setup_boot_APIC_clock(void)
359{ 368{
360 /* 369 /*
@@ -1109,8 +1118,8 @@ static struct sysdev_class lapic_sysclass = {
1109}; 1118};
1110 1119
1111static struct sys_device device_lapic = { 1120static struct sys_device device_lapic = {
1112 .id = 0, 1121 .id = 0,
1113 .cls = &lapic_sysclass, 1122 .cls = &lapic_sysclass,
1114}; 1123};
1115 1124
1116static void __cpuinit apic_pm_activate(void) 1125static void __cpuinit apic_pm_activate(void)
@@ -1121,9 +1130,11 @@ static void __cpuinit apic_pm_activate(void)
1121static int __init init_lapic_sysfs(void) 1130static int __init init_lapic_sysfs(void)
1122{ 1131{
1123 int error; 1132 int error;
1133
1124 if (!cpu_has_apic) 1134 if (!cpu_has_apic)
1125 return 0; 1135 return 0;
1126 /* XXX: remove suspend/resume procs if !apic_pm_state.active? */ 1136 /* XXX: remove suspend/resume procs if !apic_pm_state.active? */
1137
1127 error = sysdev_class_register(&lapic_sysclass); 1138 error = sysdev_class_register(&lapic_sysclass);
1128 if (!error) 1139 if (!error)
1129 error = sysdev_register(&device_lapic); 1140 error = sysdev_register(&device_lapic);