All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Gerst <bgerst@didntduck.org>
To: Mikael Pettersson <mikpe@csd.uu.se>
Cc: linux-kernel@vger.kernel.org, torvalds@transmeta.com
Subject: Re: 2.5.55/.56 instant reboot problem on 486
Date: Sun, 12 Jan 2003 02:13:01 -0500	[thread overview]
Message-ID: <3E21157D.30607@didntduck.org> (raw)
In-Reply-To: 200301120231.DAA14711@harpo.it.uu.se

[-- Attachment #1: Type: text/plain, Size: 828 bytes --]

Mikael Pettersson wrote:
> My '94 vintage 486 has problems booting 2.5.55 and 2.5.56.
> When it fails, the boot gets to loading the kernel and
> printing "Ok, booting the kernel.". Then there is a short
> pause (line a tenth of a second) and the machine reboots.
> 
> After doing a binary search with "for(;;);" statements
> (printk doesn't work this early) I found that the reboot
> occurs in arch/i386/mm/init.c:kernel_physical_mapping_init():
> (start_kernel() -> setup_arch() -> paging_init() ->
> pagetable_init() -> kernel_physical_mapping_init())
> 

The problem is that one_page_table_init() pulls the rug out from under 
the kernel by installing a new page table before setting it up.  A 486 
has a small TLB so any miss will cause a triple fault and reset.  Try 
this patch and see if it fixes it.

--
				Brian Gerst

[-- Attachment #2: ptefix-1 --]
[-- Type: text/plain, Size: 756 bytes --]

diff -urN linux-2.5.56/arch/i386/mm/init.c linux/arch/i386/mm/init.c
--- linux-2.5.56/arch/i386/mm/init.c	Sun Jan 12 00:16:22 2003
+++ linux/arch/i386/mm/init.c	Sun Jan 12 01:48:28 2003
@@ -71,12 +71,16 @@
  */
 static pte_t * __init one_page_table_init(pmd_t *pmd)
 {
-	pte_t *page_table = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE);
-	set_pmd(pmd, __pmd(__pa(page_table) | _PAGE_TABLE));
-	if (page_table != pte_offset_kernel(pmd, 0))
-		BUG();	
+	if (pmd_none(*pmd)) {
+		pte_t *page_table = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE);
+		set_pmd(pmd, __pmd(__pa(page_table) | _PAGE_TABLE));
+		if (page_table != pte_offset_kernel(pmd, 0))
+			BUG();	
 
-	return page_table;
+		return page_table;
+	}
+	
+	return pte_offset_kernel(pmd, 0);
 }
 
 /*

  parent reply	other threads:[~2003-01-12  7:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-12  2:31 2.5.55/.56 instant reboot problem on 486 Mikael Pettersson
2003-01-12  4:17 ` Linus Torvalds
2003-01-12  7:13 ` Brian Gerst [this message]
2003-01-13  4:20   ` Bill Davidsen
  -- strict thread matches above, loose matches on Subject: below --
2003-01-12 16:05 Mikael Pettersson

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=3E21157D.30607@didntduck.org \
    --to=bgerst@didntduck.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikpe@csd.uu.se \
    --cc=torvalds@transmeta.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.