MIPS: KVM: Drop unused hpa0/hpa1 args from function
authorJames Hogan <james.hogan@imgtec.com>
Thu, 9 Jun 2016 13:19:13 +0000 (14:19 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 14 Jun 2016 09:02:43 +0000 (11:02 +0200)
The function kvm_mips_handle_mapped_seg_tlb_fault() has two completely
unused pointer arguments, hpa0 and hpa1, for which all users always pass
NULL.

Drop these two arguments and update the callers.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: kvm@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/mips/include/asm/kvm_host.h
arch/mips/kvm/emulate.c
arch/mips/kvm/mmu.c

index c8f9671c2779a27db61a8dfe8a4425c560392b06..f68293b4a598f846e291849769a7698bc5c1ee3f 100644 (file)
@@ -630,9 +630,7 @@ extern int kvm_mips_handle_commpage_tlb_fault(unsigned long badvaddr,
                                              struct kvm_vcpu *vcpu);
 
 extern int kvm_mips_handle_mapped_seg_tlb_fault(struct kvm_vcpu *vcpu,
-                                               struct kvm_mips_tlb *tlb,
-                                               unsigned long *hpa0,
-                                               unsigned long *hpa1);
+                                               struct kvm_mips_tlb *tlb);
 
 extern enum emulation_result kvm_mips_handle_tlbmiss(u32 cause,
                                                     u32 *opc,
index 3baab5ec3d3b00267b87d98d3b8edb388562402e..fb77fb4697760934df6c5f1ccf74c3319283ebb6 100644 (file)
@@ -1633,9 +1633,7 @@ enum emulation_result kvm_mips_emulate_cache(u32 inst, u32 *opc,
                                 * We fault an entry from the guest tlb to the
                                 * shadow host TLB
                                 */
-                               kvm_mips_handle_mapped_seg_tlb_fault(vcpu, tlb,
-                                                                    NULL,
-                                                                    NULL);
+                               kvm_mips_handle_mapped_seg_tlb_fault(vcpu, tlb);
                        }
                }
        } else {
@@ -2599,8 +2597,7 @@ enum emulation_result kvm_mips_handle_tlbmiss(u32 cause,
                         * OK we have a Guest TLB entry, now inject it into the
                         * shadow host TLB
                         */
-                       kvm_mips_handle_mapped_seg_tlb_fault(vcpu, tlb, NULL,
-                                                            NULL);
+                       kvm_mips_handle_mapped_seg_tlb_fault(vcpu, tlb);
                }
        }
 
index 9924c1d253a7c655ba0e41928ac2c9126ac4cb21..4d42b47b500b8e11212cf3422a10e71fd7eea72f 100644 (file)
@@ -130,9 +130,7 @@ int kvm_mips_handle_kseg0_tlb_fault(unsigned long badvaddr,
 }
 
 int kvm_mips_handle_mapped_seg_tlb_fault(struct kvm_vcpu *vcpu,
-                                        struct kvm_mips_tlb *tlb,
-                                        unsigned long *hpa0,
-                                        unsigned long *hpa1)
+                                        struct kvm_mips_tlb *tlb)
 {
        unsigned long entryhi = 0, entrylo0 = 0, entrylo1 = 0;
        struct kvm *kvm = vcpu->kvm;
@@ -157,12 +155,6 @@ int kvm_mips_handle_mapped_seg_tlb_fault(struct kvm_vcpu *vcpu,
                                            >> PAGE_SHIFT];
        }
 
-       if (hpa0)
-               *hpa0 = pfn0 << PAGE_SHIFT;
-
-       if (hpa1)
-               *hpa1 = pfn1 << PAGE_SHIFT;
-
        /* Get attributes from the Guest TLB */
        entrylo0 = mips3_paddr_to_tlbpfn(pfn0 << PAGE_SHIFT) | (0x3 << 3) |
                   (tlb->tlb_lo0 & MIPS3_PG_D) | (tlb->tlb_lo0 & MIPS3_PG_V);
@@ -354,8 +346,7 @@ u32 kvm_get_inst(u32 *opc, struct kvm_vcpu *vcpu)
                        }
                        kvm_mips_handle_mapped_seg_tlb_fault(vcpu,
                                                             &vcpu->arch.
-                                                            guest_tlb[index],
-                                                            NULL, NULL);
+                                                            guest_tlb[index]);
                        inst = *(opc);
                }
                local_irq_restore(flags);