From 339aaf5b7f26d1e638641c59a44883b7654bd8ea Mon Sep 17 00:00:00 2001 From: Antony Pavlov Date: Sat, 13 Dec 2014 19:48:18 +0300 Subject: qemu-log: add log category for MMU info Running barebox on qemu-system-mips* with '-d unimp' overloads stderr by very very many mips_cpu_handle_mmu_fault() messages: mips_cpu_handle_mmu_fault address=b80003fd ret 0 physical 00000000180003fd prot 3 mips_cpu_handle_mmu_fault address=a0800884 ret 0 physical 0000000000800884 prot 3 mips_cpu_handle_mmu_fault pc a080cd80 ad b80003fd rw 0 mmu_idx 0 So it's very difficult to find LOG_UNIMP message. The mips_cpu_handle_mmu_fault() messages appear on enabling ANY logging! It's not very handy. Adding separate log category for *_cpu_handle_mmu_fault() logging fixes the problem. Signed-off-by: Antony Pavlov Acked-by: Alexander Graf Reviewed-by: Richard Henderson Message-id: 1418489298-1184-1-git-send-email-antonynpavlov@gmail.com Signed-off-by: Peter Maydell --- target-cris/helper.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'target-cris') diff --git a/target-cris/helper.c b/target-cris/helper.c index e901c3a008..df6c9fdcb5 100644 --- a/target-cris/helper.c +++ b/target-cris/helper.c @@ -84,8 +84,8 @@ int cris_cpu_handle_mmu_fault(CPUState *cs, vaddr address, int rw, int r = -1; target_ulong phy; - D(printf("%s addr=%" VADDR_PRIx " pc=%x rw=%x\n", - __func__, address, env->pc, rw)); + qemu_log_mask(CPU_LOG_MMU, "%s addr=%" VADDR_PRIx " pc=%x rw=%x\n", + __func__, address, env->pc, rw); miss = cris_mmu_translate(&res, env, address & TARGET_PAGE_MASK, rw, mmu_idx, 0); if (miss) { @@ -112,9 +112,10 @@ int cris_cpu_handle_mmu_fault(CPUState *cs, vaddr address, int rw, r = 0; } if (r > 0) { - D_LOG("%s returns %d irqreq=%x addr=%" VADDR_PRIx " phy=%x vec=%x" - " pc=%x\n", __func__, r, cs->interrupt_request, address, res.phy, - res.bf_vec, env->pc); + qemu_log_mask(CPU_LOG_MMU, + "%s returns %d irqreq=%x addr=%" VADDR_PRIx " phy=%x vec=%x" + " pc=%x\n", __func__, r, cs->interrupt_request, address, + res.phy, res.bf_vec, env->pc); } return r; } -- cgit v1.2.1