mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Michael S. Zick" <lkml@morethan.org>
To: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [Bug Fix]: Do 32-bit table calculations in pre-processor
Date: Fri, 3 Jul 2009 15:45:42 -0500	[thread overview]
Message-ID: <200907031545.45124.lkml@morethan.org> (raw)
In-Reply-To: <86802c440907031307s43fca3c0j77d4df78450ff757@mail.gmail.com>

On Fri July 3 2009, Yinghai Lu wrote:
> On Fri, Jul 3, 2009 at 11:14 AM, Michael S. Zick<lkml@morethan.org> wrote:
> > Here is one I have found useful in my VIA processor bug hunting:
> >
> > diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S
> > index 3068388..2303d86 100644
> > --- a/arch/x86/kernel/head_32.S
> > +++ b/arch/x86/kernel/head_32.S
> > @@ -61,7 +61,7 @@
> >
> >  /* Enough space to fit pagetables for the low memory linear map */
> >  MAPPING_BEYOND_END = \
> > -       PAGE_TABLE_SIZE(((1<<32) - __PAGE_OFFSET) >> PAGE_SHIFT) << PAGE_SHIFT
> > +       PAGE_TABLE_SIZE((1<<20) - (__PAGE_OFFSET >> PAGE_SHIFT)) << PAGE_SHIFT
> >
> >  /*
> >  * Worst-case size of the kernel mapping we need to make:
> >
> > = = =
> >
> > Before:
> >
> >  #5 [0000010000 - 0000011000]          PGTABLE ==> [0000010000 - 0000011000]
> >  #6 [0000011000 - 0000015000]          BOOTMAP ==> [0000011000 - 0000015000]
> >
> > After:
> >
> >  #5 [0000010000 - 000007d000]          PGTABLE ==> [0000010000 - 000007d000]
> >  #6 [000007d000 - 0000081000]          BOOTMAP ==> [000007d000 - 0000081000]
> >
> 
> that PGTABLE is from early resource. and it is filled by init_memory_mapping()
> 
> it mean preallocated pgtable to MAPPING_BEYOND_END is small now after
> patch. and init_memory_mapping try to get more.
>

Ah, so - the labels are a bit misleading - but that makes since.
 
> please send out whole dmesg. with and without your patch. it could
>

Am having technical problems at the moment - maybe later today I
can get you the information you need.

> print out initial mapped before e820 allocation is involved for 32bit
>         printk(KERN_DEBUG "initial memory mapped : 0 - %08lx\n",
>                         max_pfn_mapped<<PAGE_SHIFT);
> 
>
> 
> your patch should be right. except to change that 12 to PAGE_SHIFT
> 

Not all pages are 4K, but as you point out, that can be fixed.

> YH
> 
> 

Mike

      parent reply	other threads:[~2009-07-03 20:45 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-03 18:14 Michael S. Zick
2009-07-03 18:27 ` Andi Kleen
2009-07-03 18:38   ` Michael S. Zick
2009-07-03 19:08     ` Jeremy Fitzhardinge
2009-07-03 19:13       ` Michael S. Zick
2009-07-03 19:30         ` Jeremy Fitzhardinge
2009-07-03 20:03           ` Michael S. Zick
2009-07-03 18:56 ` Jeremy Fitzhardinge
2009-07-03 18:57 ` Jeremy Fitzhardinge
2009-07-03 19:03   ` Michael S. Zick
2009-07-03 19:11     ` Jeremy Fitzhardinge
2009-07-03 19:18       ` H. Peter Anvin
2009-07-03 19:46         ` Michael S. Zick
2009-07-03 20:00           ` H. Peter Anvin
2009-07-03 19:14     ` H. Peter Anvin
2009-07-03 19:41       ` Michael S. Zick
2009-07-03 19:48         ` H. Peter Anvin
2009-07-03 20:38           ` Michael S. Zick
2009-07-03 20:40             ` H. Peter Anvin
2009-07-03 21:02               ` Michael S. Zick
2009-07-03 22:33                 ` H. Peter Anvin
2009-07-04  0:05                   ` Michael S. Zick
2009-07-04  0:11                     ` H. Peter Anvin
2009-07-03 22:01               ` Michael S. Zick
2009-07-04 13:23       ` Michael S. Zick
2009-07-03 19:33     ` Jeremy Fitzhardinge
2009-07-03 20:07 ` Yinghai Lu
2009-07-03 20:08   ` Yinghai Lu
2009-07-03 20:48     ` Michael S. Zick
2009-07-03 20:45   ` Michael S. Zick [this message]

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=200907031545.45124.lkml@morethan.org \
    --to=lkml@morethan.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yhlu.kernel@gmail.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

all inboxes | Powered by JetHome®