MIPS: KVM: Remove ifdef DEBUG around kvm_debug
authorJames Hogan <james.hogan@imgtec.com>
Thu, 29 May 2014 09:16:42 +0000 (10:16 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 30 May 2014 11:05:28 +0000 (13:05 +0200)
kvm_debug() uses pr_debug() which is already compiled out in the absence
of a DEBUG define, so remove the unnecessary ifdef DEBUG lines around
kvm_debug() calls which are littered around arch/mips/kvm/.

As well as generally cleaning up, this prevents future bit-rot due to
DEBUG not being commonly used.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Gleb Natapov <gleb@kernel.org>
Cc: kvm@vger.kernel.org
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: Sanjay Lal <sanjayl@kymasys.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/mips/kvm/kvm_mips_emul.c
arch/mips/kvm/kvm_tlb.c
arch/mips/kvm/kvm_trap_emul.c

index c81ab79..8d48400 100644 (file)
@@ -2319,11 +2319,9 @@ kvm_mips_handle_tlbmiss(unsigned long cause, uint32_t *opc,
                                er = EMULATE_FAIL;
                        }
                } else {
-#ifdef DEBUG
                        kvm_debug
                            ("Injecting hi: %#lx, lo0: %#lx, lo1: %#lx into shadow host TLB\n",
                             tlb->tlb_hi, tlb->tlb_lo0, tlb->tlb_lo1);
-#endif
                        /* 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);
index 994fc23..15ad06d 100644 (file)
@@ -232,11 +232,9 @@ kvm_mips_host_tlb_write(struct kvm_vcpu *vcpu, unsigned long entryhi,
                tlb_write_indexed();
        tlbw_use_hazard();
 
-#ifdef DEBUG
        kvm_debug("@ %#lx idx: %2d [entryhi(R): %#lx] entrylo0(R): 0x%08lx, entrylo1(R): 0x%08lx\n",
                  vcpu->arch.pc, idx, read_c0_entryhi(),
                  read_c0_entrylo0(), read_c0_entrylo1());
-#endif
 
        /* Flush D-cache */
        if (flush_dcache_mask) {
@@ -343,11 +341,9 @@ int kvm_mips_handle_commpage_tlb_fault(unsigned long badvaddr,
        mtc0_tlbw_hazard();
        tlbw_use_hazard();
 
-#ifdef DEBUG
        kvm_debug ("@ %#lx idx: %2d [entryhi(R): %#lx] entrylo0 (R): 0x%08lx, entrylo1(R): 0x%08lx\n",
             vcpu->arch.pc, read_c0_index(), read_c0_entryhi(),
             read_c0_entrylo0(), read_c0_entrylo1());
-#endif
 
        /* Restore old ASID */
        write_c0_entryhi(old_entryhi);
@@ -395,10 +391,8 @@ kvm_mips_handle_mapped_seg_tlb_fault(struct kvm_vcpu *vcpu,
        entrylo1 = mips3_paddr_to_tlbpfn(pfn1 << PAGE_SHIFT) | (0x3 << 3) |
                        (tlb->tlb_lo1 & MIPS3_PG_D) | (tlb->tlb_lo1 & MIPS3_PG_V);
 
-#ifdef DEBUG
        kvm_debug("@ %#lx tlb_lo0: 0x%08lx tlb_lo1: 0x%08lx\n", vcpu->arch.pc,
                  tlb->tlb_lo0, tlb->tlb_lo1);
-#endif
 
        return kvm_mips_host_tlb_write(vcpu, entryhi, entrylo0, entrylo1,
                                       tlb->tlb_mask);
@@ -419,10 +413,8 @@ int kvm_mips_guest_tlb_lookup(struct kvm_vcpu *vcpu, unsigned long entryhi)
                }
        }
 
-#ifdef DEBUG
        kvm_debug("%s: entryhi: %#lx, index: %d lo0: %#lx, lo1: %#lx\n",
                  __func__, entryhi, index, tlb[i].tlb_lo0, tlb[i].tlb_lo1);
-#endif
 
        return index;
 }
@@ -456,9 +448,7 @@ int kvm_mips_host_tlb_lookup(struct kvm_vcpu *vcpu, unsigned long vaddr)
 
        local_irq_restore(flags);
 
-#ifdef DEBUG
        kvm_debug("Host TLB lookup, %#lx, idx: %2d\n", vaddr, idx);
-#endif
 
        return idx;
 }
@@ -503,11 +493,9 @@ int kvm_mips_host_tlb_inv(struct kvm_vcpu *vcpu, unsigned long va)
 
        local_irq_restore(flags);
 
-#ifdef DEBUG
        if (idx > 0)
                kvm_debug("%s: Invalidated entryhi %#lx @ idx %d\n", __func__,
                          (va & VPN2_MASK) | kvm_mips_get_user_asid(vcpu), idx);
-#endif
 
        return 0;
 }
@@ -675,9 +663,7 @@ void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
        unsigned long flags;
        int newasid = 0;
 
-#ifdef DEBUG
        kvm_debug("%s: vcpu %p, cpu: %d\n", __func__, vcpu, cpu);
-#endif
 
        /* Alocate new kernel and user ASIDs if needed */
 
Simple merge