Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 88405
b: refs/heads/master
c: 374b8f4
h: refs/heads/master
i:
  88403: 25359f7
v: v3
  • Loading branch information
Martin Schwidefsky authored and Heiko Carstens committed Apr 17, 2008
1 parent a52c87f commit 352928f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 13 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: de553438eb6c487f72d46019eb3821f6687ce011
refs/heads/master: 374b8f45f1d5cb17f45ba1d7c74ce8cc9e2f1407
33 changes: 21 additions & 12 deletions trunk/include/asm-s390/tlbflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ static inline void __tlb_flush_local(void)
asm volatile("ptlb" : : : "memory");
}

#ifdef CONFIG_SMP
/*
* Flush all tlb entries on all cpus.
*/
Expand All @@ -39,6 +40,25 @@ static inline void __tlb_flush_global(void)
: : "d" (reg2), "d" (reg3), "d" (reg4), "m" (dummy) : "cc" );
}

static inline void __tlb_flush_full(struct mm_struct *mm)
{
cpumask_t local_cpumask;

preempt_disable();
/*
* If the process only ran on the local cpu, do a local flush.
*/
local_cpumask = cpumask_of_cpu(smp_processor_id());
if (cpus_equal(mm->cpu_vm_mask, local_cpumask))
__tlb_flush_local();
else
__tlb_flush_global();
preempt_enable();
}
#else
#define __tlb_flush_full(mm) __tlb_flush_local()
#endif

/*
* Flush all tlb entries of a page table on all cpus.
*/
Expand All @@ -51,8 +71,6 @@ static inline void __tlb_flush_idte(unsigned long asce)

static inline void __tlb_flush_mm(struct mm_struct * mm)
{
cpumask_t local_cpumask;

if (unlikely(cpus_empty(mm->cpu_vm_mask)))
return;
/*
Expand All @@ -69,16 +87,7 @@ static inline void __tlb_flush_mm(struct mm_struct * mm)
mm->context.asce_bits);
return;
}
preempt_disable();
/*
* If the process only ran on the local cpu, do a local flush.
*/
local_cpumask = cpumask_of_cpu(smp_processor_id());
if (cpus_equal(mm->cpu_vm_mask, local_cpumask))
__tlb_flush_local();
else
__tlb_flush_global();
preempt_enable();
__tlb_flush_full(mm);
}

static inline void __tlb_flush_mm_cond(struct mm_struct * mm)
Expand Down

0 comments on commit 352928f

Please sign in to comment.