single shot timer interrupts fix

- accidentaly this wasn't part of the SMP merge and the implementation
  remained uncomplete with the timer keeping ticking periodically

- APIC timer is set for a signel shot and restarted everytime it
  expires. This way we can keep the AP's trully idle

- the timer is restarted a little later before leaving to userspace

- LAPIC_TIMER_ICR is written before LAPIC_LVTTR so the newest value is
  used
This commit is contained in:
Tomas Hruby
2010-10-21 17:07:01 +00:00
parent ebbc730fc3
commit a1eefc013e
3 changed files with 6 additions and 5 deletions

View File

@@ -370,8 +370,6 @@ check_misc_flags:
p = arch_finish_switch_to_user();
assert(!is_zero64(p->p_cpu_time_left));
restart_local_timer();
context_stop(proc_addr(KERNEL));
/* If the process isn't the owner of FPU, enable the FPU exception */
@@ -389,6 +387,9 @@ check_misc_flags:
#ifdef CONFIG_SMP
refresh_tlb();
#endif
restart_local_timer();
/*
* restore_user_context() carries out the actual mode switch from kernel
* to userspace. This function does not return