diff options
author | Liang Cheng <licheng@nvidia.com> | 2011-10-07 12:55:39 -0500 |
---|---|---|
committer | Rohan Somvanshi <rsomvanshi@nvidia.com> | 2011-10-11 03:17:00 -0700 |
commit | 4f36175006a9ee4e0bfb1102af91b551cf044efa (patch) | |
tree | f6b45ebb46480dcfbbdb53c90d6dd22334cd6fed /arch/arm | |
parent | 698f68a7721581177de5d67b47bcc62be10b2506 (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
Change-Id: I7cfeeb1358eb05bc7ef3f40bc73f621d3e4ac2bf
Reviewed-on: http://git-master/r/56740
Tested-by: Liang Cheng (SW) <licheng@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'arch/arm')
-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 83e2a0f2398c..f52d232ade33 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; } @@ -1138,8 +1140,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; } |