aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/smp.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/smp.c')
-rw-r--r--arch/x86/kernel/smp.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/x86/kernel/smp.c b/arch/x86/kernel/smp.c
index 013e7eba83b..7539d84628f 100644
--- a/arch/x86/kernel/smp.c
+++ b/arch/x86/kernel/smp.c
@@ -23,6 +23,9 @@
23#include <linux/cpu.h> 23#include <linux/cpu.h>
24#include <linux/gfp.h> 24#include <linux/gfp.h>
25 25
26#include <litmus/preempt.h>
27#include <litmus/debug_trace.h>
28
26#include <asm/mtrr.h> 29#include <asm/mtrr.h>
27#include <asm/tlbflush.h> 30#include <asm/tlbflush.h>
28#include <asm/mmu_context.h> 31#include <asm/mmu_context.h>
@@ -147,6 +150,16 @@ void native_send_call_func_ipi(const struct cpumask *mask)
147 free_cpumask_var(allbutself); 150 free_cpumask_var(allbutself);
148} 151}
149 152
153/* trigger timers on remote cpu */
154void smp_send_pull_timers(int cpu)
155{
156 if (unlikely(cpu_is_offline(cpu))) {
157 WARN_ON(1);
158 return;
159 }
160 apic->send_IPI_mask(cpumask_of(cpu), PULL_TIMERS_VECTOR);
161}
162
150/* 163/*
151 * this function calls the 'stop' function on all other CPUs in the system. 164 * this function calls the 'stop' function on all other CPUs in the system.
152 */ 165 */
@@ -204,6 +217,11 @@ void smp_reschedule_interrupt(struct pt_regs *regs)
204 /* 217 /*
205 * KVM uses this interrupt to force a cpu out of guest mode 218 * KVM uses this interrupt to force a cpu out of guest mode
206 */ 219 */
220
221 /* LITMUS^RT: this IPI might need to trigger the sched state machine.
222 * Starting from 3.0 schedule_ipi() actually does something. This may
223 * increase IPI latencies compared with previous versions. */
224 sched_state_ipi();
207} 225}
208 226
209void smp_call_function_interrupt(struct pt_regs *regs) 227void smp_call_function_interrupt(struct pt_regs *regs)
@@ -224,6 +242,17 @@ void smp_call_function_single_interrupt(struct pt_regs *regs)
224 irq_exit(); 242 irq_exit();
225} 243}
226 244
245extern void hrtimer_pull(void);
246
247void smp_pull_timers_interrupt(struct pt_regs *regs)
248{
249 ack_APIC_irq();
250 irq_enter();
251 TRACE("pull timer interrupt\n");
252 hrtimer_pull();
253 irq_exit();
254}
255
227struct smp_ops smp_ops = { 256struct smp_ops smp_ops = {
228 .smp_prepare_boot_cpu = native_smp_prepare_boot_cpu, 257 .smp_prepare_boot_cpu = native_smp_prepare_boot_cpu,
229 .smp_prepare_cpus = native_smp_prepare_cpus, 258 .smp_prepare_cpus = native_smp_prepare_cpus,