diff options
author | Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> | 2008-01-30 07:32:35 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:32:35 -0500 |
commit | e83a5fdca89970f87e06f87a1d18be22b161e2ba (patch) | |
tree | e9d22fd1e1a839876e65a593535a86fbfe99fee5 /arch/x86 | |
parent | c4aba4a8ec795124394bc79e3e8dbbc319338a98 (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')
-rw-r--r-- | arch/x86/kernel/apic_32.c | 5 | ||||
-rw-r--r-- | arch/x86/kernel/apic_64.c | 23 |
2 files changed, 19 insertions, 9 deletions
diff --git a/arch/x86/kernel/apic_32.c b/arch/x86/kernel/apic_32.c index 4330a899ddcb..ffbad74e5be0 100644 --- a/arch/x86/kernel/apic_32.c +++ b/arch/x86/kernel/apic_32.c | |||
@@ -577,7 +577,6 @@ static void local_apic_timer_interrupt(void) | |||
577 | * [ if a single-CPU system runs an SMP kernel then we call the local | 577 | * [ if a single-CPU system runs an SMP kernel then we call the local |
578 | * interrupt as well. Thus we cannot inline the local irq ... ] | 578 | * interrupt as well. Thus we cannot inline the local irq ... ] |
579 | */ | 579 | */ |
580 | |||
581 | void smp_apic_timer_interrupt(struct pt_regs *regs) | 580 | void smp_apic_timer_interrupt(struct pt_regs *regs) |
582 | { | 581 | { |
583 | struct pt_regs *old_regs = set_irq_regs(regs); | 582 | struct pt_regs *old_regs = set_irq_regs(regs); |
@@ -1021,7 +1020,7 @@ void __cpuinit setup_local_APIC(void) | |||
1021 | /* | 1020 | /* |
1022 | * Detect and initialize APIC | 1021 | * Detect and initialize APIC |
1023 | */ | 1022 | */ |
1024 | static int __init detect_init_APIC (void) | 1023 | static int __init detect_init_APIC(void) |
1025 | { | 1024 | { |
1026 | u32 h, l, features; | 1025 | u32 h, l, features; |
1027 | 1026 | ||
@@ -1165,7 +1164,7 @@ fake_ioapic_page: | |||
1165 | * This initializes the IO-APIC and APIC hardware if this is | 1164 | * This initializes the IO-APIC and APIC hardware if this is |
1166 | * a UP kernel. | 1165 | * a UP kernel. |
1167 | */ | 1166 | */ |
1168 | int __init APIC_init_uniprocessor (void) | 1167 | int __init APIC_init_uniprocessor(void) |
1169 | { | 1168 | { |
1170 | if (enable_local_apic < 0) | 1169 | if (enable_local_apic < 0) |
1171 | clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC); | 1170 | clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC); |
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 | ||
44 | int apic_verbosity; | ||
45 | int disable_apic_timer __cpuinitdata; | 44 | int disable_apic_timer __cpuinitdata; |
46 | static int apic_calibrate_pmtmr __initdata; | 45 | static int apic_calibrate_pmtmr __initdata; |
47 | int disable_apic; | 46 | int disable_apic; |
48 | 47 | ||
49 | /* Local APIC timer works in C2? */ | 48 | /* Local APIC timer works in C2 */ |
50 | int local_apic_timer_c2_ok; | 49 | int local_apic_timer_c2_ok; |
51 | EXPORT_SYMBOL_GPL(local_apic_timer_c2_ok); | 50 | EXPORT_SYMBOL_GPL(local_apic_timer_c2_ok); |
52 | 51 | ||
52 | /* | ||
53 | * Debug level, exported for io_apic.c | ||
54 | */ | ||
55 | int apic_verbosity; | ||
56 | |||
53 | static struct resource lapic_resource = { | 57 | static 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 | */ | ||
358 | void __init setup_boot_APIC_clock(void) | 367 | void __init setup_boot_APIC_clock(void) |
359 | { | 368 | { |
360 | /* | 369 | /* |
@@ -1109,8 +1118,8 @@ static struct sysdev_class lapic_sysclass = { | |||
1109 | }; | 1118 | }; |
1110 | 1119 | ||
1111 | static struct sys_device device_lapic = { | 1120 | static struct sys_device device_lapic = { |
1112 | .id = 0, | 1121 | .id = 0, |
1113 | .cls = &lapic_sysclass, | 1122 | .cls = &lapic_sysclass, |
1114 | }; | 1123 | }; |
1115 | 1124 | ||
1116 | static void __cpuinit apic_pm_activate(void) | 1125 | static void __cpuinit apic_pm_activate(void) |
@@ -1121,9 +1130,11 @@ static void __cpuinit apic_pm_activate(void) | |||
1121 | static int __init init_lapic_sysfs(void) | 1130 | static 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); |