From: khilman@deeprootsystems.com (Kevin Hilman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/6] davinci: timers: don't enable timer until clocksource is initialized
Date: Wed, 17 Mar 2010 08:52:38 -0700 [thread overview]
Message-ID: <1268841163-5868-2-git-send-email-khilman@deeprootsystems.com> (raw)
In-Reply-To: <1268841163-5868-1-git-send-email-khilman@deeprootsystems.com>
On da830, when the same timer is used for clocksource and clockevent,
the timer can be started before the clockevent is
registered/initialzed. This creates a window where a timer
interrupt might fire before the clockevent handler has been
setup and causes a crash.
This patch moves the actual enable/start of the timer after
the clockevent has ben registered.
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
---
arch/arm/mach-davinci/time.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-davinci/time.c b/arch/arm/mach-davinci/time.c
index 42d985b..9e0b106 100644
--- a/arch/arm/mach-davinci/time.c
+++ b/arch/arm/mach-davinci/time.c
@@ -253,8 +253,6 @@ static void __init timer_init(void)
irq = USING_COMPARE(t) ? dtip[i].cmp_irq : irq;
setup_irq(irq, &t->irqaction);
}
-
- timer32_config(&timers[i]);
}
}
@@ -331,6 +329,7 @@ static void __init davinci_timer_init(void)
unsigned int clocksource_id;
static char err[] __initdata = KERN_ERR
"%s: can't register clocksource!\n";
+ int i;
clockevent_id = soc_info->timer_info->clockevent_id;
clocksource_id = soc_info->timer_info->clocksource_id;
@@ -389,6 +388,9 @@ static void __init davinci_timer_init(void)
clockevent_davinci.cpumask = cpumask_of(0);
clockevents_register_device(&clockevent_davinci);
+
+ for (i=0; i< ARRAY_SIZE(timers); i++)
+ timer32_config(&timers[i]);
}
struct sys_timer davinci_timer = {
--
1.7.0.2
next prev parent reply other threads:[~2010-03-17 15:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-17 15:52 [PATCH 0/6] davinci fixes for 2.6.34-rc Kevin Hilman
2010-03-17 15:52 ` Kevin Hilman [this message]
2010-03-17 15:52 ` [PATCH 2/6] davinci: da8xx/omap-l1: fix build error when CONFIG_DAVINCI_MUX is undefined Kevin Hilman
2010-03-17 15:52 ` [PATCH 3/6] davinci: edma: clear events in edma_start() Kevin Hilman
2010-05-24 11:59 ` stanley.miao
2010-05-24 17:27 ` Kevin Hilman
2010-05-25 10:05 ` stanley.miao
2010-05-25 13:28 ` Sudhakar Rajashekhara
2010-05-25 15:31 ` Kevin Hilman
2010-05-25 15:30 ` Kevin Hilman
2010-03-17 15:52 ` [PATCH 4/6] davinci: DM365: fix duplicate default IRQ priorities Kevin Hilman
2010-03-17 15:52 ` [PATCH 5/6] davinci: misc cleanups from sparse Kevin Hilman
2010-03-17 15:52 ` [PATCH 6/6] davinci: sparse: gpio: void casting Kevin Hilman
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=1268841163-5868-2-git-send-email-khilman@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--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;
as well as URLs for NNTP newsgroup(s).