aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2009-04-22 23:04:09 -0400
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2009-04-22 23:04:09 -0400
commit042043c14a2fe0d3f78682d8f149e038926d5869 (patch)
treee00999c6d52ea9ed1e034beb8cf2f4fe5a9515f6
parentb5c4ababa76ce94cfa276f620b81d7d0f1d8ebf1 (diff)
x86-32: add support for smp_send_pull_timers()
This establishes the architectures dependent bits for hrtimer_start_on() on x86-32.
-rw-r--r--arch/x86/kernel/smp_32.c17
-rw-r--r--arch/x86/kernel/smpboot_32.c2
-rw-r--r--include/asm-x86/hw_irq_32.h1
-rw-r--r--include/asm-x86/mach-default/entry_arch.h1
-rw-r--r--include/asm-x86/mach-default/irq_vectors.h2
5 files changed, 23 insertions, 0 deletions
diff --git a/arch/x86/kernel/smp_32.c b/arch/x86/kernel/smp_32.c
index 1063dfc498..e1c5aa316f 100644
--- a/arch/x86/kernel/smp_32.c
+++ b/arch/x86/kernel/smp_32.c
@@ -25,6 +25,8 @@
25#include <asm/mmu_context.h> 25#include <asm/mmu_context.h>
26#include <mach_apic.h> 26#include <mach_apic.h>
27 27
28#include <litmus/litmus.h>
29
28/* 30/*
29 * Some notes on x86 processor bugs affecting SMP operation: 31 * Some notes on x86 processor bugs affecting SMP operation:
30 * 32 *
@@ -475,6 +477,12 @@ static void native_smp_send_reschedule(int cpu)
475 send_IPI_mask(cpumask_of_cpu(cpu), RESCHEDULE_VECTOR); 477 send_IPI_mask(cpumask_of_cpu(cpu), RESCHEDULE_VECTOR);
476} 478}
477 479
480void smp_send_pull_timers(int cpu)
481{
482 WARN_ON(cpu_is_offline(cpu));
483 send_IPI_mask(cpumask_of_cpu(cpu), PULL_TIMERS_VECTOR);
484}
485
478/* 486/*
479 * Structure and data for smp_call_function(). This is designed to minimise 487 * Structure and data for smp_call_function(). This is designed to minimise
480 * static memory requirements. It also looks cleaner. 488 * static memory requirements. It also looks cleaner.
@@ -645,6 +653,15 @@ fastcall void smp_reschedule_interrupt(struct pt_regs *regs)
645 __get_cpu_var(irq_stat).irq_resched_count++; 653 __get_cpu_var(irq_stat).irq_resched_count++;
646} 654}
647 655
656extern void hrtimer_pull(void);
657
658fastcall void smp_pull_timers_interrupt(struct pt_regs *regs)
659{
660 ack_APIC_irq();
661 TRACE("pull timers interrupt\n");
662 hrtimer_pull();
663}
664
648fastcall void smp_call_function_interrupt(struct pt_regs *regs) 665fastcall void smp_call_function_interrupt(struct pt_regs *regs)
649{ 666{
650 void (*func) (void *info) = call_data->func; 667 void (*func) (void *info) = call_data->func;
diff --git a/arch/x86/kernel/smpboot_32.c b/arch/x86/kernel/smpboot_32.c
index 4ea80cbe52..133cbb6118 100644
--- a/arch/x86/kernel/smpboot_32.c
+++ b/arch/x86/kernel/smpboot_32.c
@@ -1323,6 +1323,8 @@ void __init smp_intr_init(void)
1323 1323
1324 /* IPI for generic function call */ 1324 /* IPI for generic function call */
1325 set_intr_gate(CALL_FUNCTION_VECTOR, call_function_interrupt); 1325 set_intr_gate(CALL_FUNCTION_VECTOR, call_function_interrupt);
1326
1327 set_intr_gate(PULL_TIMERS_VECTOR, pull_timers_interrupt);
1326} 1328}
1327 1329
1328/* 1330/*
diff --git a/include/asm-x86/hw_irq_32.h b/include/asm-x86/hw_irq_32.h
index 0bedbdf5e9..d5d7c67697 100644
--- a/include/asm-x86/hw_irq_32.h
+++ b/include/asm-x86/hw_irq_32.h
@@ -32,6 +32,7 @@ extern void (*interrupt[NR_IRQS])(void);
32fastcall void reschedule_interrupt(void); 32fastcall void reschedule_interrupt(void);
33fastcall void invalidate_interrupt(void); 33fastcall void invalidate_interrupt(void);
34fastcall void call_function_interrupt(void); 34fastcall void call_function_interrupt(void);
35fastcall void pull_timers_interrupt(void);
35#endif 36#endif
36 37
37#ifdef CONFIG_X86_LOCAL_APIC 38#ifdef CONFIG_X86_LOCAL_APIC
diff --git a/include/asm-x86/mach-default/entry_arch.h b/include/asm-x86/mach-default/entry_arch.h
index bc861469bd..f76a08618d 100644
--- a/include/asm-x86/mach-default/entry_arch.h
+++ b/include/asm-x86/mach-default/entry_arch.h
@@ -13,6 +13,7 @@
13BUILD_INTERRUPT(reschedule_interrupt,RESCHEDULE_VECTOR) 13BUILD_INTERRUPT(reschedule_interrupt,RESCHEDULE_VECTOR)
14BUILD_INTERRUPT(invalidate_interrupt,INVALIDATE_TLB_VECTOR) 14BUILD_INTERRUPT(invalidate_interrupt,INVALIDATE_TLB_VECTOR)
15BUILD_INTERRUPT(call_function_interrupt,CALL_FUNCTION_VECTOR) 15BUILD_INTERRUPT(call_function_interrupt,CALL_FUNCTION_VECTOR)
16BUILD_INTERRUPT(pull_timers_interrupt,PULL_TIMERS_VECTOR)
16#endif 17#endif
17 18
18/* 19/*
diff --git a/include/asm-x86/mach-default/irq_vectors.h b/include/asm-x86/mach-default/irq_vectors.h
index 881c63ca61..fd42e2a40c 100644
--- a/include/asm-x86/mach-default/irq_vectors.h
+++ b/include/asm-x86/mach-default/irq_vectors.h
@@ -49,6 +49,8 @@
49#define RESCHEDULE_VECTOR 0xfc 49#define RESCHEDULE_VECTOR 0xfc
50#define CALL_FUNCTION_VECTOR 0xfb 50#define CALL_FUNCTION_VECTOR 0xfb
51 51
52#define PULL_TIMERS_VECTOR 0xfa /* LITMUS hrtimer hack */
53
52#define THERMAL_APIC_VECTOR 0xf0 54#define THERMAL_APIC_VECTOR 0xf0
53/* 55/*
54 * Local APIC timer IRQ vector is on a different priority level, 56 * Local APIC timer IRQ vector is on a different priority level,