From: kmpark@infradead.org (Kyungmin Park)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm: sched_clock: Enable HAVE_SCHED_CLOCK support without init_sched_clock
Date: Thu, 15 Sep 2011 16:35:12 +0900 [thread overview]
Message-ID: <20110915073511.GA31732@july> (raw)
From: Kyungmin Park <kyungmin.park@samsung.com>
On Samsung Exynos4 series, EVT0 chip uses the s5p_timer with HAVE_SCHED_CLOCK and remains use the MCT timer without init_sched_clock.
The similar combination will be happend with other SOCs. some board use HAVE_SCHED_CLOCK or others are not.
To co-exist the these boards. check the sched_clock_update_fn when sched_clock_postinit is called and return if not defined.
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
diff --git a/arch/arm/kernel/sched_clock.c b/arch/arm/kernel/sched_clock.c
index 9a46370..12c6b6b 100644
--- a/arch/arm/kernel/sched_clock.c
+++ b/arch/arm/kernel/sched_clock.c
@@ -70,5 +70,8 @@ void __init init_sched_clock(struct clock_data *cd, void (*update)(void),
void __init sched_clock_postinit(void)
{
+ /* If init_sched_clock is not called, just return */
+ if (!sched_clock_update_fn)
+ return;
sched_clock_poll(sched_clock_timer.data);
}
next reply other threads:[~2011-09-15 7:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-15 7:35 Kyungmin Park [this message]
2011-09-15 8:20 ` [PATCH] arm: sched_clock: Enable HAVE_SCHED_CLOCK support without init_sched_clock Russell King - ARM Linux
2011-09-15 8:35 ` Kyungmin Park
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110915073511.GA31732@july \
--to=kmpark@infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox