Skip to content

Commit

Permalink
Merge branch 'timers/locking'
Browse files Browse the repository at this point in the history
  • Loading branch information
Ingo Molnar committed Feb 6, 2011
2 parents 83a06bf + f266a51 commit 55835eb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 3 additions & 2 deletions arch/x86/include/asm/mmu_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
unsigned cpu = smp_processor_id();

if (likely(prev != next)) {
/* stop flush ipis for the previous mm */
cpumask_clear_cpu(cpu, mm_cpumask(prev));
#ifdef CONFIG_SMP
percpu_write(cpu_tlbstate.state, TLBSTATE_OK);
percpu_write(cpu_tlbstate.active_mm, next);
Expand All @@ -47,6 +45,9 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
/* Re-load page tables */
load_cr3(next->pgd);

/* stop flush ipis for the previous mm */
cpumask_clear_cpu(cpu, mm_cpumask(prev));

/*
* load the LDT, if the LDT is different:
*/
Expand Down
6 changes: 5 additions & 1 deletion kernel/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -969,10 +969,14 @@ EXPORT_SYMBOL(try_to_del_timer_sync);
int del_timer_sync(struct timer_list *timer)
{
#ifdef CONFIG_LOCKDEP
unsigned long flags;

raw_local_irq_save(flags);
local_bh_disable();
lock_map_acquire(&timer->lockdep_map);
lock_map_release(&timer->lockdep_map);
local_bh_enable();
_local_bh_enable();
raw_local_irq_restore(flags);
#endif
/*
* don't use it in hardirq context, because it
Expand Down

0 comments on commit 55835eb

Please sign in to comment.