All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <andrewm@uow.edu.au>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Arjan van de Ven <arjanv@redhat.com>,
	Thibaut Laurent <thibaut@celestix.com>,
	Andrea Arcangeli <andrea@suse.de>,
	linux-kernel@vger.kernel.org
Subject: Re: PROBLEM: [2.4.6] kernel BUG at softirq.c:206!
Date: Fri, 06 Jul 2001 02:11:23 +1000	[thread overview]
Message-ID: <3B4491AB.E49CCFD3@uow.edu.au> (raw)
In-Reply-To: <3B448E33.120DF382@uow.edu.au> from "Andrew Morton" at Jul 06, 2001 01:56:35 AM <E15IBc8-0002r3-00@the-village.bc.nu>

Alan Cox wrote:
> 
> > My money is on the unconditional sti()'s in the cyrix code.
> 
> Possibly but the diff is wrong

But it'll still work :)

--- linux-2.4.6/init/main.c	Wed Jul  4 18:21:32 2001
+++ lk-ext3/init/main.c	Fri Jul  6 02:06:12 2001
@@ -523,8 +523,8 @@ asmlinkage void __init start_kernel(void
 	trap_init();
 	init_IRQ();
 	sched_init();
-	time_init();
 	softirq_init();
+	time_init();
 
 	/*
 	 * HACK ALERT! This is early. We're enabling the console before
--- linux-2.4.6/arch/i386/kernel/setup.c	Mon May 28 13:31:46 2001
+++ lk-ext3/arch/i386/kernel/setup.c	Fri Jul  6 01:59:37 2001
@@ -1243,11 +1255,13 @@ static int __init init_amd(struct cpuinf
 /*
  * Read Cyrix DEVID registers (DIR) to get more detailed info. about the CPU
  */
-static inline void do_cyrix_devid(unsigned char *dir0, unsigned char *dir1)
+static void do_cyrix_devid(unsigned char *dir0, unsigned char *dir1)
 {
 	unsigned char ccr2, ccr3;
+	unsigned long flags;
 
 	/* we test for DEVID by checking whether CCR3 is writable */
+	save_flags(flags);
 	cli();
 	ccr3 = getCx86(CX86_CCR3);
 	setCx86(CX86_CCR3, ccr3 ^ 0x80);
@@ -1272,7 +1286,7 @@ static inline void do_cyrix_devid(unsign
 		*dir0 = getCx86(CX86_DIR0);
 		*dir1 = getCx86(CX86_DIR1);
 	}
-	sti();
+	restore_flags(flags);
 }
 
 /*
@@ -1316,7 +1330,9 @@ static void __init check_cx686_slop(stru
 {
 	if (Cx86_dir0_msb == 3) {
 		unsigned char ccr3, ccr5;
+		unsigned long flags;
 
+		save_flags(flags);
 		cli();
 		ccr3 = getCx86(CX86_CCR3);
 		setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); /* enable MAPEN  */
@@ -1324,7 +1340,7 @@ static void __init check_cx686_slop(stru
 		if (ccr5 & 2)
 			setCx86(CX86_CCR5, ccr5 & 0xfd);  /* reset SLOP */
 		setCx86(CX86_CCR3, ccr3);                 /* disable MAPEN */
-		sti();
+		restore_flags(flags);
 
 		if (ccr5 & 2) { /* possible wrong calibration done */
 			printk(KERN_INFO "Recalibrating delay loop with SLOP bit reset\n");
@@ -2092,15 +2108,17 @@ static int __init id_and_try_enable_cpui
    	        if (dir0 == 5 || dir0 == 3)
    	        {
 			unsigned char ccr3, ccr4;
+			unsigned long flags;
 
 			printk(KERN_INFO "Enabling CPUID on Cyrix processor.\n");
+			save_flags(flags);
 			cli();
 			ccr3 = getCx86(CX86_CCR3);
 			setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); /* enable MAPEN  */
 			ccr4 = getCx86(CX86_CCR4);
 			setCx86(CX86_CCR4, ccr4 | 0x80);          /* enable cpuid  */
 			setCx86(CX86_CCR3, ccr3);                 /* disable MAPEN */
-			sti();
+			restore_flags(flags);
 		}
 	} else

  reply	other threads:[~2001-07-05 16:10 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-04 21:28 PROBLEM: [2.4.6] kernel BUG at softirq.c:206! Manfred H. Winter
2001-07-05  7:46 ` Mircea Damian
2001-07-05 10:52   ` Thibaut Laurent
2001-07-05 13:00     ` Mircea Damian
2001-07-05 11:18   ` Alan Cox
2001-07-05 12:10     ` Bob_Tracy
2001-07-05 13:04     ` Mircea Damian
2001-07-05 14:15     ` Manfred H. Winter
2001-07-05 11:04 ` Manfred H. Winter
2001-07-05 14:20 ` Andrea Arcangeli
2001-07-05 14:30   ` Alan Cox
2001-07-05 14:36   ` Arjan van de Ven
2001-07-05 14:40     ` Andrea Arcangeli
2001-07-05 15:32       ` Thibaut Laurent
2001-07-05 15:46         ` Arjan van de Ven
2001-07-05 15:56           ` Andrew Morton
2001-07-05 16:04             ` Alan Cox
2001-07-05 16:11               ` Andrew Morton [this message]
2001-07-05 16:15           ` Andrea Arcangeli
2001-07-05 22:40             ` Bob_Tracy
2001-07-06  3:42               ` Andrew Morton
2001-07-06 10:58           ` Manfred H. Winter
2001-07-06 12:43         ` Andrea Arcangeli
2001-07-06 14:18           ` Thibaut Laurent
2001-07-06 15:02             ` Andrea Arcangeli
2001-07-05 15:19   ` Manfred H. Winter
  -- strict thread matches above, loose matches on Subject: below --
2001-07-05 12:14 Bob_Tracy
2001-07-05 13:42 ` Alan Cox
2001-07-05 14:02   ` Bob_Tracy
     [not found] <E15I8gj-0002W7-00@the-village.bc.nu>
2001-07-05 13:59 ` Bob_Tracy
     [not found] <3B4450DF.82EEC851@uow.edu.au>
2001-07-05 14:28 ` Manfred H. Winter
2001-07-05 15:23   ` Andrew Morton
2001-07-05 17:31     ` Manfred H. Winter

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=3B4491AB.E49CCFD3@uow.edu.au \
    --to=andrewm@uow.edu.au \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=andrea@suse.de \
    --cc=arjanv@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thibaut@celestix.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 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.