aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/apic_64.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2007-10-12 17:04:23 -0400
committerThomas Gleixner <tglx@inhelltoy.tec.linutronix.de>2007-10-12 17:04:23 -0400
commit9f75e9b74a45d7d3c343c8979f49d5e6b92bbce3 (patch)
treeca7115bd03031db131dda5912e2d9cd302046608 /arch/x86/kernel/apic_64.c
parent2f0798a3b1c2155b8f30858e853557aef9da2e4e (diff)
x86_64: remove now unused code
Remove the unused code after the switch to clock events. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Diffstat (limited to 'arch/x86/kernel/apic_64.c')
-rw-r--r--arch/x86/kernel/apic_64.c106
1 files changed, 1 insertions, 105 deletions
diff --git a/arch/x86/kernel/apic_64.c b/arch/x86/kernel/apic_64.c
index 118830cba1a..1231365404c 100644
--- a/arch/x86/kernel/apic_64.c
+++ b/arch/x86/kernel/apic_64.c
@@ -41,7 +41,6 @@
41#include <asm/apic.h> 41#include <asm/apic.h>
42 42
43int apic_verbosity; 43int apic_verbosity;
44int apic_runs_main_timer;
45int apic_calibrate_pmtmr __initdata; 44int apic_calibrate_pmtmr __initdata;
46 45
47int disable_apic_timer __cpuinitdata; 46int disable_apic_timer __cpuinitdata;
@@ -129,15 +128,6 @@ static void lapic_timer_broadcast(cpumask_t mask)
129#endif 128#endif
130} 129}
131 130
132/*
133 * cpu_mask that denotes the CPUs that needs timer interrupt coming in as
134 * IPIs in place of local APIC timers
135 */
136static cpumask_t timer_interrupt_broadcast_ipi_mask;
137
138/* Using APIC to generate smp_local_timer_interrupt? */
139int using_apic_timer __read_mostly = 0;
140
141static void apic_pm_activate(void); 131static void apic_pm_activate(void);
142 132
143void apic_wait_icr_idle(void) 133void apic_wait_icr_idle(void)
@@ -973,84 +963,6 @@ void __cpuinit setup_secondary_APIC_clock(void)
973 setup_APIC_timer(); 963 setup_APIC_timer();
974} 964}
975 965
976void disable_APIC_timer(void)
977{
978 if (using_apic_timer) {
979 unsigned long v;
980
981 v = apic_read(APIC_LVTT);
982 /*
983 * When an illegal vector value (0-15) is written to an LVT
984 * entry and delivery mode is Fixed, the APIC may signal an
985 * illegal vector error, with out regard to whether the mask
986 * bit is set or whether an interrupt is actually seen on input.
987 *
988 * Boot sequence might call this function when the LVTT has
989 * '0' vector value. So make sure vector field is set to
990 * valid value.
991 */
992 v |= (APIC_LVT_MASKED | LOCAL_TIMER_VECTOR);
993 apic_write(APIC_LVTT, v);
994 }
995}
996
997void enable_APIC_timer(void)
998{
999 int cpu = smp_processor_id();
1000
1001 if (using_apic_timer &&
1002 !cpu_isset(cpu, timer_interrupt_broadcast_ipi_mask)) {
1003 unsigned long v;
1004
1005 v = apic_read(APIC_LVTT);
1006 apic_write(APIC_LVTT, v & ~APIC_LVT_MASKED);
1007 }
1008}
1009
1010void switch_APIC_timer_to_ipi(void *cpumask)
1011{
1012 cpumask_t mask = *(cpumask_t *)cpumask;
1013 int cpu = smp_processor_id();
1014
1015 if (cpu_isset(cpu, mask) &&
1016 !cpu_isset(cpu, timer_interrupt_broadcast_ipi_mask)) {
1017 disable_APIC_timer();
1018 cpu_set(cpu, timer_interrupt_broadcast_ipi_mask);
1019 }
1020}
1021EXPORT_SYMBOL(switch_APIC_timer_to_ipi);
1022
1023void smp_send_timer_broadcast_ipi(void)
1024{
1025 int cpu = smp_processor_id();
1026 cpumask_t mask;
1027
1028 cpus_and(mask, cpu_online_map, timer_interrupt_broadcast_ipi_mask);
1029
1030 if (cpu_isset(cpu, mask)) {
1031 cpu_clear(cpu, mask);
1032 add_pda(apic_timer_irqs, 1);
1033 smp_local_timer_interrupt();
1034 }
1035
1036 if (!cpus_empty(mask)) {
1037 send_IPI_mask(mask, LOCAL_TIMER_VECTOR);
1038 }
1039}
1040
1041void switch_ipi_to_APIC_timer(void *cpumask)
1042{
1043 cpumask_t mask = *(cpumask_t *)cpumask;
1044 int cpu = smp_processor_id();
1045
1046 if (cpu_isset(cpu, mask) &&
1047 cpu_isset(cpu, timer_interrupt_broadcast_ipi_mask)) {
1048 cpu_clear(cpu, timer_interrupt_broadcast_ipi_mask);
1049 enable_APIC_timer();
1050 }
1051}
1052EXPORT_SYMBOL(switch_ipi_to_APIC_timer);
1053
1054int setup_profiling_timer(unsigned int multiplier) 966int setup_profiling_timer(unsigned int multiplier)
1055{ 967{
1056 return -EINVAL; 968 return -EINVAL;
@@ -1297,21 +1209,7 @@ static __init int setup_noapictimer(char *str)
1297 disable_apic_timer = 1; 1209 disable_apic_timer = 1;
1298 return 1; 1210 return 1;
1299} 1211}
1300 1212__setup("noapictimer", setup_noapictimer);
1301static __init int setup_apicmaintimer(char *str)
1302{
1303 apic_runs_main_timer = 1;
1304
1305 return 1;
1306}
1307__setup("apicmaintimer", setup_apicmaintimer);
1308
1309static __init int setup_noapicmaintimer(char *str)
1310{
1311 apic_runs_main_timer = -1;
1312 return 1;
1313}
1314__setup("noapicmaintimer", setup_noapicmaintimer);
1315 1213
1316static __init int setup_apicpmtimer(char *s) 1214static __init int setup_apicpmtimer(char *s)
1317{ 1215{
@@ -1321,5 +1219,3 @@ static __init int setup_apicpmtimer(char *s)
1321} 1219}
1322__setup("apicpmtimer", setup_apicpmtimer); 1220__setup("apicpmtimer", setup_apicpmtimer);
1323 1221
1324__setup("noapictimer", setup_noapictimer);
1325