* [PATCH] 2.5.48 s390 (10/16): flushtlb bug.
@ 2002-11-18 19:21 Martin Schwidefsky
0 siblings, 0 replies; only message in thread
From: Martin Schwidefsky @ 2002-11-18 19:21 UTC (permalink / raw)
To: linux-kernel, torvalds
Don't set cpu_vm_mask if the mm isn't exclusive to the cpu.
diff -urN linux-2.5.48/include/asm-s390/tlbflush.h linux-2.5.48-s390/include/asm-s390/tlbflush.h
--- linux-2.5.48/include/asm-s390/tlbflush.h Mon Nov 18 05:29:57 2002
+++ linux-2.5.48-s390/include/asm-s390/tlbflush.h Mon Nov 18 20:11:48 2002
@@ -91,13 +91,15 @@
static inline void __flush_tlb_mm(struct mm_struct * mm)
{
- if (((atomic_read(&mm->mm_count) != 1) ||
- (mm->cpu_vm_mask != (1UL << smp_processor_id())))) {
- mm->cpu_vm_mask = (1UL << smp_processor_id());
+ if (mm->cpu_vm_mask != (1UL << smp_processor_id())) {
+ /* mm was active on more than one cpu. */
+ if (mm == current->active_mm &&
+ atomic_read(&mm->mm_count) == 1)
+ /* this cpu is the only one using the mm. */
+ mm->cpu_vm_mask = 1UL << smp_processor_id();
global_flush_tlb();
- } else {
+ } else
local_flush_tlb();
- }
}
static inline void flush_tlb(void)
diff -urN linux-2.5.48/include/asm-s390x/tlbflush.h linux-2.5.48-s390/include/asm-s390x/tlbflush.h
--- linux-2.5.48/include/asm-s390x/tlbflush.h Mon Nov 18 05:29:50 2002
+++ linux-2.5.48-s390/include/asm-s390x/tlbflush.h Mon Nov 18 20:11:48 2002
@@ -88,13 +88,15 @@
static inline void __flush_tlb_mm(struct mm_struct * mm)
{
- if (((atomic_read(&mm->mm_count) != 1) ||
- (mm->cpu_vm_mask != (1UL << smp_processor_id())))) {
- mm->cpu_vm_mask = (1UL << smp_processor_id());
+ if (mm->cpu_vm_mask != (1UL << smp_processor_id())) {
+ /* mm was active on more than one cpu. */
+ if (mm == current->active_mm &&
+ atomic_read(&mm->mm_count) == 1)
+ /* this cpu is the only one using the mm. */
+ mm->cpu_vm_mask = 1UL << smp_processor_id();
global_flush_tlb();
- } else {
+ } else
local_flush_tlb();
- }
}
static inline void flush_tlb(void)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-11-18 19:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-18 19:21 [PATCH] 2.5.48 s390 (10/16): flushtlb bug Martin Schwidefsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®