public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>, Mark Knecht <markknecht@gmail.com>,
	Clark Williams <williams@redhat.com>,
	Robert Crocombe <rwcrocombe@raytheon.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	john stultz <johnstul@us.ibm.com>
Subject: [PATCH -rt 1/2] Dont blindly turn on interrupts in boot_override_clocksource
Date: Fri, 26 May 2006 12:06:52 -0400	[thread overview]
Message-ID: <20060526161036.586358463@goodmis.org> (raw)
In-Reply-To: 20060526160651.870725515@goodmis.org

[-- Attachment #1: clocksource-boot-irq-off.patch --]
[-- Type: text/plain, Size: 998 bytes --]

The boot_override_clocksource currently blindly turns on interrupts with
the releasing of the lock.  But if you have clocksource=xxx in the
command line, this function is called before interrupts are setup,
and causes early exception errors.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

Index: linux-2.6.16-rt23/kernel/time/clocksource.c
===================================================================
--- linux-2.6.16-rt23.orig/kernel/time/clocksource.c	2006-05-25 16:01:00.000000000 -0400
+++ linux-2.6.16-rt23/kernel/time/clocksource.c	2006-05-25 16:01:28.000000000 -0400
@@ -323,10 +323,11 @@ device_initcall(init_clocksource_sysfs);
  */
 static int __init boot_override_clocksource(char* str)
 {
-	spin_lock_irq(&clocksource_lock);
+	unsigned long flags;
+	spin_lock_irqsave(&clocksource_lock, flags);
 	if (str)
 		strlcpy(override_name, str, sizeof(override_name));
-	spin_unlock_irq(&clocksource_lock);
+	spin_unlock_irqrestore(&clocksource_lock, flags);
 	return 1;
 }
 

--

  reply	other threads:[~2006-05-26 16:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-26 16:06 [PATCH -rt 0/2] Get x86_64 running with PREEMPT_RT Steven Rostedt
2006-05-26 16:06 ` Steven Rostedt [this message]
2006-05-26 17:39   ` [PATCH -rt 1/2] Dont blindly turn on interrupts in boot_override_clocksource Ingo Molnar
2006-05-26 16:06 ` [PATCH -rt 2/2] Fix condition in default_idle Steven Rostedt
2006-05-26 17:39   ` Ingo Molnar
2006-05-26 18:19 ` [PATCH -rt 0/2] Get x86_64 running with PREEMPT_RT Clark Williams

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=20060526161036.586358463@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markknecht@gmail.com \
    --cc=mingo@elte.hu \
    --cc=rwcrocombe@raytheon.com \
    --cc=tglx@linutronix.de \
    --cc=williams@redhat.com \
    /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