qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 25/31] target-ppc/helper.c: remaining LOG_BATS & LOG


From: Eduardo Habkost
Subject: [Qemu-devel] [PATCH 25/31] target-ppc/helper.c: remaining LOG_BATS & LOG_MMU conversions
Date: Fri, 12 Dec 2008 13:09:04 -0200

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 <address@hidden>
---
 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]