From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LBA4g-0007cK-Gc for qemu-devel@nongnu.org; Fri, 12 Dec 2008 10:37:06 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LBA4c-0007YO-Sd for qemu-devel@nongnu.org; Fri, 12 Dec 2008 10:37:04 -0500 Received: from [199.232.76.173] (port=38080 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LBA4c-0007YB-JJ for qemu-devel@nongnu.org; Fri, 12 Dec 2008 10:37:02 -0500 Received: from mx2.redhat.com ([66.187.237.31]:58618) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LBA4c-00055f-3A for qemu-devel@nongnu.org; Fri, 12 Dec 2008 10:37:02 -0500 From: Eduardo Habkost Date: Fri, 12 Dec 2008 13:09:04 -0200 Message-Id: <1229094550-2022-26-git-send-email-ehabkost@redhat.com> In-Reply-To: <1229094550-2022-1-git-send-email-ehabkost@redhat.com> References: <1229094550-2022-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [PATCH 25/31] target-ppc/helper.c: remaining LOG_BATS & LOG_MMU conversions Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Eduardo Habkost Two remaining places were there were debugging #ifdefs. These changes are on a separated patch because they are not an automatic conversion. Signed-off-by: Eduardo Habkost --- target-ppc/helper.c | 18 ++++++------------ 1 files changed, 6 insertions(+), 12 deletions(-) diff --git a/target-ppc/helper.c b/target-ppc/helper.c index 30c006b..0eaad86 100644 --- a/target-ppc/helper.c +++ b/target-ppc/helper.c @@ -563,13 +563,10 @@ static always_inline int get_bat (CPUState *env, mmu_ctx_t *ctx, /* Compute access rights */ ctx->prot = prot; ret = check_prot(ctx->prot, rw, type); -#if defined (DEBUG_BATS) - if (ret == 0 && loglevel != 0) { - fprintf(logfile, "BAT %d match: r " PADDRX " prot=%c%c\n", - i, ctx->raddr, ctx->prot & PAGE_READ ? 'R' : '-', - ctx->prot & PAGE_WRITE ? 'W' : '-'); - } -#endif + if (ret == 0) + LOG_BATS("BAT %d match: r " PADDRX " prot=%c%c\n", + i, ctx->raddr, ctx->prot & PAGE_READ ? 'R' : '-', + ctx->prot & PAGE_WRITE ? 'W' : '-'); break; } } @@ -974,14 +971,11 @@ static always_inline int get_segment (CPUState *env, mmu_ctx_t *ctx, ret = find_pte(env, ctx, 0, rw, type); if (ret < 0) { /* Secondary table lookup */ -#if defined (DEBUG_MMU) - if (eaddr != 0xEFFFFFFF && loglevel != 0) { - fprintf(logfile, "1 sdr1=" PADDRX " vsid=" ADDRX " " + if (eaddr != 0xEFFFFFFF) + LOG_MMU("1 sdr1=" PADDRX " vsid=" ADDRX " " "api=" ADDRX " hash=" PADDRX " pg_addr=" PADDRX "\n", sdr, vsid, pgidx, hash, ctx->pg_addr[1]); - } -#endif ret2 = find_pte(env, ctx, 1, rw, type); if (ret2 != -1) ret = ret2; -- 1.5.5.GIT