aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-s390/tlbflush.h
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2008-04-17 01:45:58 -0400
committerHeiko Carstens <heiko.carstens@de.ibm.com>2008-04-17 01:46:56 -0400
commit374b8f45f1d5cb17f45ba1d7c74ce8cc9e2f1407 (patch)
tree5726355757f8aa94804e1fd0420f987223682f62 /include/asm-s390/tlbflush.h
parentde553438eb6c487f72d46019eb3821f6687ce011 (diff)
[S390] allnoconfig build error.
Fix the following link error with allnoconfig: vmem.c:(.text+0x175c): undefined reference to `smp_ptlb_all' vmem.c:(.text+0x1b24): undefined reference to `smp_ptlb_all' fork.c:(.text+0x4190): undefined reference to `smp_ptlb_all' : undefined reference to `smp_ptlb_all' : undefined reference to `smp_ptlb_all' mm/built-in.o:: more undefined references to `smp_ptlb_all' follow make[1]: *** [.tmp_vmlinux1] Error 1 make: *** [sub-make] Error 2 Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'include/asm-s390/tlbflush.h')
-rw-r--r--include/asm-s390/tlbflush.h33
1 files changed, 21 insertions, 12 deletions
diff --git a/include/asm-s390/tlbflush.h b/include/asm-s390/tlbflush.h
index 35fb4f9127b2..de723470c5d4 100644
--- a/include/asm-s390/tlbflush.h
+++ b/include/asm-s390/tlbflush.h
@@ -13,6 +13,7 @@ static inline void __tlb_flush_local(void)
13 asm volatile("ptlb" : : : "memory"); 13 asm volatile("ptlb" : : : "memory");
14} 14}
15 15
16#ifdef CONFIG_SMP
16/* 17/*
17 * Flush all tlb entries on all cpus. 18 * Flush all tlb entries on all cpus.
18 */ 19 */
@@ -39,6 +40,25 @@ static inline void __tlb_flush_global(void)
39 : : "d" (reg2), "d" (reg3), "d" (reg4), "m" (dummy) : "cc" ); 40 : : "d" (reg2), "d" (reg3), "d" (reg4), "m" (dummy) : "cc" );
40} 41}
41 42
43static inline void __tlb_flush_full(struct mm_struct *mm)
44{
45 cpumask_t local_cpumask;
46
47 preempt_disable();
48 /*
49 * If the process only ran on the local cpu, do a local flush.
50 */
51 local_cpumask = cpumask_of_cpu(smp_processor_id());
52 if (cpus_equal(mm->cpu_vm_mask, local_cpumask))
53 __tlb_flush_local();
54 else
55 __tlb_flush_global();
56 preempt_enable();
57}
58#else
59#define __tlb_flush_full(mm) __tlb_flush_local()
60#endif
61
42/* 62/*
43 * Flush all tlb entries of a page table on all cpus. 63 * Flush all tlb entries of a page table on all cpus.
44 */ 64 */
@@ -51,8 +71,6 @@ static inline void __tlb_flush_idte(unsigned long asce)
51 71
52static inline void __tlb_flush_mm(struct mm_struct * mm) 72static inline void __tlb_flush_mm(struct mm_struct * mm)
53{ 73{
54 cpumask_t local_cpumask;
55
56 if (unlikely(cpus_empty(mm->cpu_vm_mask))) 74 if (unlikely(cpus_empty(mm->cpu_vm_mask)))
57 return; 75 return;
58 /* 76 /*
@@ -69,16 +87,7 @@ static inline void __tlb_flush_mm(struct mm_struct * mm)
69 mm->context.asce_bits); 87 mm->context.asce_bits);
70 return; 88 return;
71 } 89 }
72 preempt_disable(); 90 __tlb_flush_full(mm);
73 /*
74 * If the process only ran on the local cpu, do a local flush.
75 */
76 local_cpumask = cpumask_of_cpu(smp_processor_id());
77 if (cpus_equal(mm->cpu_vm_mask, local_cpumask))
78 __tlb_flush_local();
79 else
80 __tlb_flush_global();
81 preempt_enable();
82} 91}
83 92
84static inline void __tlb_flush_mm_cond(struct mm_struct * mm) 93static inline void __tlb_flush_mm_cond(struct mm_struct * mm)