Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 75084
b: refs/heads/master
c: aec103b
h: refs/heads/master
v: v3
  • Loading branch information
de Dinechin, Christophe (Integrity VM) authored and Tony Luck committed Dec 19, 2007
1 parent 9531d41 commit 2fbea8b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3cdc7fc7fd5bd1ead75758dfadef609a6e9fd3de
refs/heads/master: aec103bfa60e9f72bd66a144236592f54b986a03
18 changes: 15 additions & 3 deletions trunk/arch/ia64/mm/tlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* IPI based ptc implementation and A-step IPI implementation.
* Rohit Seth <rohit.seth@intel.com>
* Ken Chen <kenneth.w.chen@intel.com>
* Christophe de Dinechin <ddd@hp.com>: Avoid ptc.e on memory allocation
*/
#include <linux/module.h>
#include <linux/init.h>
Expand Down Expand Up @@ -89,9 +90,16 @@ ia64_global_tlb_purge (struct mm_struct *mm, unsigned long start,
{
static DEFINE_SPINLOCK(ptcg_lock);

if (mm != current->active_mm || !current->mm) {
flush_tlb_all();
return;
struct mm_struct *active_mm = current->active_mm;

if (mm != active_mm) {
/* Restore region IDs for mm */
if (mm && active_mm) {
activate_context(mm);
} else {
flush_tlb_all();
return;
}
}

/* HW requires global serialization of ptc.ga. */
Expand All @@ -107,6 +115,10 @@ ia64_global_tlb_purge (struct mm_struct *mm, unsigned long start,
} while (start < end);
}
spin_unlock(&ptcg_lock);

if (mm != active_mm) {
activate_context(active_mm);
}
}

void
Expand Down

0 comments on commit 2fbea8b

Please sign in to comment.