Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 87523
b: refs/heads/master
c: 44387e9
h: refs/heads/master
i:
  87521: 4f89ee8
  87519: 22dcdb3
v: v3
  • Loading branch information
Anton Blanchard authored and Paul Mackerras committed Mar 19, 2008
1 parent 35f6e68 commit 01d73e9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c2372eb9bcafdd149b26987a8c25bbed92fd2775
refs/heads/master: 44387e9ff25267c78a99229aca55ed750e9174c7
6 changes: 6 additions & 0 deletions trunk/arch/powerpc/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,12 @@ struct task_struct *__switch_to(struct task_struct *prev,
account_process_vtime(current);
calculate_steal_time();

/*
* We can't take a PMU exception inside _switch() since there is a
* window where the kernel stack SLB and the kernel stack are out
* of sync. Hard disable here.
*/
hard_irq_disable();
last = _switch(old_thread, new_thread);

local_irq_restore(flags);
Expand Down
6 changes: 6 additions & 0 deletions trunk/arch/powerpc/mm/slb.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ void slb_flush_and_rebolt(void)
ksp_vsid_data = get_slb_shadow()->save_area[2].vsid;
}

/*
* We can't take a PMU exception in the following code, so hard
* disable interrupts.
*/
hard_irq_disable();

/* We need to do this all in asm, so we're sure we don't touch
* the stack between the slbia and rebolting it. */
asm volatile("isync\n"
Expand Down

0 comments on commit 01d73e9

Please sign in to comment.