Re: 2.5.55/.56 instant reboot problem on 486

Bill Davidsen (davidsen@tmr.com)
Sun, 12 Jan 2003 23:20:04 -0500 (EST)


This is a MIME-formatted message. If you see this text it means that your
E-mail software does not support MIME-formatted messages.

--=_courier-26528-1042431790-0001-2
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Content-ID: <Pine.LNX.3.96.1030112231930.18057C@gatekeeper.tmr.com>

On Sun, 12 Jan 2003, Brian Gerst wrote:

> 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.

As someone who uses 486's for routers on occasion, thank you!

-- 
bill davidsen <davidsen@tmr.com>
  CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.

--=_courier-26528-1042431790-0001-2 Content-Type: text/plain; name=ptefix-1; charset=iso-8859-1 Content-Transfer-Encoding: 7bit Content-ID: <Pine.LNX.3.96.1030112231930.18057D@gatekeeper.tmr.com> Content-Description:

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); } /*

--=_courier-26528-1042431790-0001-2--