diff options
author | Paul Burton <paul.burton@mips.com> | 2019-02-02 01:43:17 +0000 |
---|---|---|
committer | Paul Burton <paul.burton@mips.com> | 2019-02-04 10:56:14 -0800 |
commit | 4739f7dd99d757fb719e1173b4d2bcfc0f93e52d (patch) | |
tree | c7a85575e022a360e968858ea3bb6db421630740 /arch/mips/kvm/trap_emul.c | |
parent | 9a27324fde5d67cbadafff8f24ad65c49376f1f0 (diff) | |
download | blackbird-op-linux-4739f7dd99d757fb719e1173b4d2bcfc0f93e52d.tar.gz blackbird-op-linux-4739f7dd99d757fb719e1173b4d2bcfc0f93e52d.zip |
MIPS: mm: Remove redundant get_new_mmu_context() cpu argument
get_new_mmu_context() accepts a cpu argument, but implicitly assumes
that this is always equal to smp_processor_id() by operating on the
local CPU's TLB & icache.
Remove the cpu argument and have get_new_mmu_context() call
smp_processor_id() instead.
Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: linux-mips@vger.kernel.org
Diffstat (limited to 'arch/mips/kvm/trap_emul.c')
-rw-r--r-- | arch/mips/kvm/trap_emul.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/mips/kvm/trap_emul.c b/arch/mips/kvm/trap_emul.c index 6a0d7040d882..503c2fb7e4da 100644 --- a/arch/mips/kvm/trap_emul.c +++ b/arch/mips/kvm/trap_emul.c @@ -1058,7 +1058,7 @@ static int kvm_trap_emul_vcpu_load(struct kvm_vcpu *vcpu, int cpu) mm = KVM_GUEST_KERNEL_MODE(vcpu) ? kern_mm : user_mm; if ((cpu_context(cpu, mm) ^ asid_cache(cpu)) & asid_version_mask(cpu)) - get_new_mmu_context(mm, cpu); + get_new_mmu_context(mm); write_c0_entryhi(cpu_asid(cpu, mm)); TLBMISS_HANDLER_SETUP_PGD(mm->pgd); kvm_mips_suspend_mm(cpu); @@ -1076,7 +1076,7 @@ static int kvm_trap_emul_vcpu_put(struct kvm_vcpu *vcpu, int cpu) /* Restore normal Linux process memory map */ if (((cpu_context(cpu, current->mm) ^ asid_cache(cpu)) & asid_version_mask(cpu))) - get_new_mmu_context(current->mm, cpu); + get_new_mmu_context(current->mm); write_c0_entryhi(cpu_asid(cpu, current->mm)); TLBMISS_HANDLER_SETUP_PGD(current->mm->pgd); kvm_mips_resume_mm(cpu); @@ -1113,7 +1113,7 @@ static void kvm_trap_emul_check_requests(struct kvm_vcpu *vcpu, int cpu, /* Generate new ASID for current mode */ if (reload_asid) { mm = KVM_GUEST_KERNEL_MODE(vcpu) ? kern_mm : user_mm; - get_new_mmu_context(mm, cpu); + get_new_mmu_context(mm); htw_stop(); write_c0_entryhi(cpu_asid(cpu, mm)); TLBMISS_HANDLER_SETUP_PGD(mm->pgd); @@ -1230,7 +1230,7 @@ static void kvm_trap_emul_vcpu_reenter(struct kvm_run *run, */ if ((cpu_context(cpu, mm) ^ asid_cache(cpu)) & asid_version_mask(cpu)) - get_new_mmu_context(mm, cpu); + get_new_mmu_context(mm); } static int kvm_trap_emul_vcpu_run(struct kvm_run *run, struct kvm_vcpu *vcpu) @@ -1268,7 +1268,7 @@ static int kvm_trap_emul_vcpu_run(struct kvm_run *run, struct kvm_vcpu *vcpu) /* Restore normal Linux process memory map */ if (((cpu_context(cpu, current->mm) ^ asid_cache(cpu)) & asid_version_mask(cpu))) - get_new_mmu_context(current->mm, cpu); + get_new_mmu_context(current->mm); write_c0_entryhi(cpu_asid(cpu, current->mm)); TLBMISS_HANDLER_SETUP_PGD(current->mm->pgd); kvm_mips_resume_mm(cpu); |