]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
Revert "platform: tegra: mcerr: print mc errors in trace as well"
authorShreshtha SAHU <ssahu@nvidia.com>
Thu, 22 Jan 2015 04:19:06 +0000 (09:49 +0530)
committerVenkat Moganty <vmoganty@nvidia.com>
Sat, 24 Jan 2015 04:12:47 +0000 (20:12 -0800)
This reverts commit 2ffe389e414223ae6a9551f6abf56b517c6cc317.

Bug 200073466

Change-Id: I7536549a31828014faa33650f507b6b5b70ec8f4
Signed-off-by: Shreshtha SAHU <ssahu@nvidia.com>
Reviewed-on: http://git-master/r/674638
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
drivers/platform/tegra/mc/mcerr.c

index cfc810dd2b9671e2d1c346ab9dc6fb48503e7da9..86bb3b6ac075c8bf327f2ea1532afeac35b86932 100644 (file)
 #include <tegra/mc.h>
 #include <tegra/mcerr.h>
 
-#define MC_PRINT(fmt, ...) \
-do { \
-       trace_printk(fmt, ##__VA_ARGS__); \
-       pr_err(fmt, ##__VA_ARGS__); \
-} while (0)
-
 static bool mcerr_throttle_enabled = true;
 
 static int arb_intr_mma_set(const char *arg, const struct kernel_param *kp);
@@ -273,7 +267,7 @@ static irqreturn_t tegra_mc_error_thread(int irq, void *data)
        if (mcerr_throttle_enabled && count >= MAX_PRINTS) {
                schedule_delayed_work(&unthrottle_prints_work, HZ/2);
                if (count == MAX_PRINTS)
-                       MC_PRINT("Too many MC errors; throttling prints\n");
+                       pr_err("Too many MC errors; throttling prints\n");
                goto out;
        }
 
@@ -322,8 +316,6 @@ static irqreturn_t tegra_mc_error_hard_irq(int irq, void *data)
                return IRQ_NONE;
        }
 
-       trace_printk("istatus=%x, estatus=%x, eaddr=%x\n",
-               intr, mc_readl(MC_ERR_STATUS), mc_readl(MC_ERR_ADR));
        /*
         * We have an interrupt; disable the rest until this one is handled.
         * This means we will potentially miss interrupts. We can live with
@@ -372,12 +364,22 @@ static void mcerr_default_print(const struct mc_error *err,
                                u32 status, phys_addr_t addr,
                                int secure, int rw, const char *smmu_info)
 {
-       MC_PRINT("[mcerr] (%s) %s: %s\n", client->swgid, client->name, err->msg);
-       MC_PRINT("[mcerr]   status = 0x%08x; addr = 0x%08llx\n", status,
-              (long long unsigned int)addr);
-       MC_PRINT("[mcerr]   secure: %s, access-type: %s, SMMU fault: %s\n",
-              secure ? "yes" : "no", rw ? "write" : "read",
-              smmu_info ? smmu_info : "none");
+       static char str[SZ_512];
+       int idx = 0;
+
+       idx += snprintf(str + idx, sizeof(str) - idx,
+                       "[mcerr] (%s) %s: %s\n",
+                       client->swgid, client->name, err->msg);
+       idx += snprintf(str + idx, sizeof(str) - idx,
+                       "[mcerr]   status = 0x%08x; addr = 0x%08llx\n",
+                       status, (long long unsigned int)addr);
+       idx += snprintf(str + idx, sizeof(str) - idx,
+                       "[mcerr]   secure: %s, access-type: %s, SMMU fault: %s\n",
+                       secure ? "yes" : "no", rw ? "write" : "read",
+                       smmu_info ? smmu_info : "none");
+
+       trace_printk(str);
+       pr_err("%s", str);
 }
 
 /*