diff options
author | Liang Cheng <licheng@nvidia.com> | 2011-10-07 12:55:39 -0500 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2011-10-25 16:34:33 -0700 |
commit | 7c07da8873bf8a00efe4a15a7e8b140f24590143 (patch) | |
tree | e26f4438e846a6fe3a7628827466ea42f4aee222 | |
parent | c3161a85aa425fd1d775e712ba07d70df6db716f (diff) |
arm: tegra: issue a warning message per run
A large trunk of warning message and stack trace storms kmesg
when a very small sample quantum is supplied. This eventually
causes the system unresponsive.
This change fixes this issue by warning once per run.
Bug 886286
Reviewed-on: http://git-master/r/56740
(cherry picked from commit 4f36175006a9ee4e0bfb1102af91b551cf044efa)
Change-Id: If86852d2b5d66bfeb2610d332229376cdad6903a
Reviewed-on: http://git-master/r/60281
Tested-by: Liang Cheng (SW) <licheng@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
-rw-r--r-- | arch/arm/mach-tegra/tegra3_mc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/arm/mach-tegra/tegra3_mc.c b/arch/arm/mach-tegra/tegra3_mc.c index f92c31a13340..bc65eca34c8c 100644 --- a/arch/arm/mach-tegra/tegra3_mc.c +++ b/arch/arm/mach-tegra/tegra3_mc.c @@ -77,6 +77,7 @@ static int sample_log_size = SAMPLE_LOG_SIZE - 1; static struct hrtimer sample_timer; static bool aggregate = false; +static bool warned = false; static void stat_start(void); static void stat_stop(void); @@ -126,6 +127,7 @@ static ssize_t tegra_mc_enable_store(struct sysdev_class *class, if (!sample_enable) { stat_stop(); hrtimer_cancel(&sample_timer); + warned = false; return count; } @@ -1134,8 +1136,10 @@ static void stat_log(void) if (header.event_state_change != 0) { spin_lock_irqsave(&sample_log_lock, flags); if (unlikely(required_log_size > sample_log_size)) { - pr_err("%s: sample log too small!\n", __func__); - WARN_ON(1); + if (!warned) { + pr_err("%s: sample log too small!\n", __func__); + warned = true; + } spin_unlock_irqrestore(&sample_log_lock, flags); goto reschedule; } |