All of lore.kernel.org
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@davemloft.net>
To: sparclinux@vger.kernel.org
Subject: Re: Ultra 2 Enterprise: All 2.6.xx SMP kernels hardlock
Date: Fri, 24 Sep 2004 20:44:53 +0000	[thread overview]
Message-ID: <20040924134453.60c1194b.davem@davemloft.net> (raw)
In-Reply-To: <703d4eaa04092018404389859@mail.gmail.com>


Jason, see if this patch gets your SB100 working again.
Thanks.

=== arch/sparc64/kernel/time.c 1.60 vs edited ==--- 1.60/arch/sparc64/kernel/time.c	2004-09-10 17:51:01 -07:00
+++ edited/arch/sparc64/kernel/time.c	2004-09-24 12:41:11 -07:00
@@ -910,10 +910,10 @@
 }
 
 /* This is gets the master TICK_INT timer going. */
-static unsigned long sparc64_init_timers(irqreturn_t (*cfunc)(int, void *, struct pt_regs *))
+static unsigned long sparc64_init_timers(void)
 {
-	unsigned long pstate, clock;
-	int node, err;
+	unsigned long clock;
+	int node;
 #ifdef CONFIG_SMP
 	extern void smp_tick_init(void);
 #endif
@@ -946,6 +946,14 @@
 	smp_tick_init();
 #endif
 
+	return clock;
+}
+
+static void sparc64_start_timers(irqreturn_t (*cfunc)(int, void *, struct pt_regs *))
+{
+	unsigned long pstate;
+	int err;
+
 	/* Register IRQ handler. */
 	err = request_irq(build_irq(0, 0, 0UL, 0UL), cfunc, SA_STATIC_ALLOC,
 			  "timer", NULL);
@@ -971,8 +979,6 @@
 			     : "r" (pstate));
 
 	local_irq_enable();
-
-	return clock;
 }
 
 struct freq_table {
@@ -1036,10 +1042,15 @@
 #define SPARC64_NSEC_PER_CYC_SHIFT	30UL
 void __init time_init(void)
 {
-	unsigned long clock = sparc64_init_timers(timer_interrupt);
+	unsigned long clock = sparc64_init_timers();
 
 	sparc64_cpu_interpolator.frequency = clock;
 	register_time_interpolator(&sparc64_cpu_interpolator);
+
+	/* Now that the interpolator is registered, it is
+	 * safe to start the timer ticking.
+	 */
+	sparc64_start_timers(timer_interrupt);
 
 	timer_ticks_per_nsec_quotient  		(((NSEC_PER_SEC << SPARC64_NSEC_PER_CYC_SHIFT) +

  parent reply	other threads:[~2004-09-24 20:44 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-21  1:40 Ultra 2 Enterprise: All 2.6.xx SMP kernels hardlock Matt R Hall
2004-09-21  6:34 ` David S. Miller
2004-09-21  9:41 ` Matt R Hall
2004-09-21 12:01 ` Jason Wever
2004-09-21 13:00 ` Meelis Roos
2004-09-21 13:24 ` Stephen P. Becker
2004-09-22  3:08 ` Jason Wever
2004-09-22  3:20 ` David S. Miller
2004-09-23  0:26 ` Jason Wever
2004-09-23  4:46 ` David S. Miller
2004-09-24 20:44 ` David S. Miller [this message]
2004-09-24 22:56 ` Jason Wever
2004-09-27 12:03 ` Jason Wever
2004-09-27 18:17 ` David S. Miller

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=20040924134453.60c1194b.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=sparclinux@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.