Commit 374b8f45 authored by Martin Schwidefsky's avatar Martin Schwidefsky Committed by Heiko Carstens

[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: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
parent de553438
...@@ -13,6 +13,7 @@ static inline void __tlb_flush_local(void) ...@@ -13,6 +13,7 @@ static inline void __tlb_flush_local(void)
asm volatile("ptlb" : : : "memory"); asm volatile("ptlb" : : : "memory");
} }
#ifdef CONFIG_SMP
/* /*
* Flush all tlb entries on all cpus. * Flush all tlb entries on all cpus.
*/ */
...@@ -39,6 +40,25 @@ static inline void __tlb_flush_global(void) ...@@ -39,6 +40,25 @@ static inline void __tlb_flush_global(void)
: : "d" (reg2), "d" (reg3), "d" (reg4), "m" (dummy) : "cc" ); : : "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. * Flush all tlb entries of a page table on all cpus.
*/ */
...@@ -51,8 +71,6 @@ static inline void __tlb_flush_idte(unsigned long asce) ...@@ -51,8 +71,6 @@ static inline void __tlb_flush_idte(unsigned long asce)
static inline void __tlb_flush_mm(struct mm_struct * mm) static inline void __tlb_flush_mm(struct mm_struct * mm)
{ {
cpumask_t local_cpumask;
if (unlikely(cpus_empty(mm->cpu_vm_mask))) if (unlikely(cpus_empty(mm->cpu_vm_mask)))
return; return;
/* /*
...@@ -69,16 +87,7 @@ static inline void __tlb_flush_mm(struct mm_struct * mm) ...@@ -69,16 +87,7 @@ static inline void __tlb_flush_mm(struct mm_struct * mm)
mm->context.asce_bits); mm->context.asce_bits);
return; return;
} }
preempt_disable(); __tlb_flush_full(mm);
/*
* 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();
} }
static inline void __tlb_flush_mm_cond(struct mm_struct * mm) static inline void __tlb_flush_mm_cond(struct mm_struct * mm)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment