[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1322364751-29980-5-git-send-email-jkrzyszt@tis.icnet.pl>
Date: Sun, 27 Nov 2011 04:32:30 +0100
From: Janusz Krzysztofik <jkrzyszt@....icnet.pl>
To: Tony Lindgren <tony@...mide.com>
Cc: Paul Walmsley <paul@...an.com>, linux-omap@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Janusz Krzysztofik <jkrzyszt@....icnet.pl>,
Andrew Morton <akpm@...ux-foundation.org>,
Sameer Nanda <snanda@...omium.org>
Subject: [PATCH 4/5] init/calibrate.c: allow for recalibration of loops per jiffy
This is required on ARM OMAP1 platform, after DPLL reprogramming has
been fixed by moving it from setup_arch() to kernel_init().
Created against linux-3.2-rc2.
Signed-off-by: Janusz Krzysztofik <jkrzyszt@....icnet.pl>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Sameer Nanda <snanda@...omium.org>
---
include/linux/delay.h | 4 +++-
init/calibrate.c | 6 ++++--
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/include/linux/delay.h b/include/linux/delay.h
index a6ecb34..ed0fbbe 100644
--- a/include/linux/delay.h
+++ b/include/linux/delay.h
@@ -42,7 +42,9 @@ static inline void ndelay(unsigned long x)
#endif
extern unsigned long lpj_fine;
-void calibrate_delay(void);
+void _calibrate_delay(bool redo);
+#define calibrate_delay() _calibrate_delay(0)
+#define recalibrate_delay() _calibrate_delay(1)
void msleep(unsigned int msecs);
unsigned long msleep_interruptible(unsigned int msecs);
void usleep_range(unsigned long min, unsigned long max);
diff --git a/init/calibrate.c b/init/calibrate.c
index 24df797..f7c1593 100644
--- a/init/calibrate.c
+++ b/init/calibrate.c
@@ -246,13 +246,15 @@ recalibrate:
static DEFINE_PER_CPU(unsigned long, cpu_loops_per_jiffy) = { 0 };
-void __cpuinit calibrate_delay(void)
+void __cpuinit _calibrate_delay(bool redo)
{
unsigned long lpj;
static bool printed;
int this_cpu = smp_processor_id();
- if (per_cpu(cpu_loops_per_jiffy, this_cpu)) {
+ if (redo)
+ printed = 0;
+ if (!redo && per_cpu(cpu_loops_per_jiffy, this_cpu)) {
lpj = per_cpu(cpu_loops_per_jiffy, this_cpu);
pr_info("Calibrating delay loop (skipped) "
"already calibrated this CPU");
--
1.7.3.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists