mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Dave Hansen <dave@sr71.net>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org,
	dave.hansen@linux.intel.com
Subject: Re: [RFC][PATCH] x86: nit: wrong page size in init_memory_mapping() printks
Date: Wed, 11 Feb 2015 13:11:15 +0100	[thread overview]
Message-ID: <20150211121114.GB3650@pd.tnic> (raw)
In-Reply-To: <20150210212030.665EC267@viggo.jf.intel.com>

On Tue, Feb 10, 2015 at 01:20:30PM -0800, Dave Hansen wrote:
> 
> From: Dave Hansen <dave.hansen@linux.intel.com>
> 
> With 32-bit non-PAE kernels, we have 2 page sizes available
> (at most): 4k and 4M.
> 
> Enabling PAE replaces that 4M size with a 2M one (which 64-bit
> systems use too).
> 
> But, when booting a 32-bit non-PAE kernel, in one of our
> early-boot printouts, we say:
> 
> [    0.000000] init_memory_mapping: [mem 0x00000000-0x000fffff]
> [    0.000000]  [mem 0x00000000-0x000fffff] page 4k
> [    0.000000] init_memory_mapping: [mem 0x37000000-0x373fffff]
> [    0.000000]  [mem 0x37000000-0x373fffff] page 2M
> [    0.000000] init_memory_mapping: [mem 0x00100000-0x36ffffff]
> [    0.000000]  [mem 0x00100000-0x003fffff] page 4k
> [    0.000000]  [mem 0x00400000-0x36ffffff] page 2M
> [    0.000000] init_memory_mapping: [mem 0x37400000-0x377fdfff]
> [    0.000000]  [mem 0x37400000-0x377fdfff] page 4k
> 
> Which is obviously wrong.  There is no 2M page available.  This
> is probably because of a badly-named variable: in the map_range
> code: PG_LEVEL_2M.
> 
> Instead of renaming all the PG_LEVEL_2M's.  This patch just
> fixes the printout:
> 
> [    0.000000] init_memory_mapping: [mem 0x00000000-0x000fffff]
> [    0.000000]  [mem 0x00000000-0x000fffff] page 4k
> [    0.000000] init_memory_mapping: [mem 0x37000000-0x373fffff]
> [    0.000000]  [mem 0x37000000-0x373fffff] page 4M
> [    0.000000] init_memory_mapping: [mem 0x00100000-0x36ffffff]
> [    0.000000]  [mem 0x00100000-0x003fffff] page 4k
> [    0.000000]  [mem 0x00400000-0x36ffffff] page 4M
> [    0.000000] init_memory_mapping: [mem 0x37400000-0x377fdfff]
> [    0.000000]  [mem 0x37400000-0x377fdfff] page 4k
> [    0.000000] BRK [0x03206000, 0x03206fff] PGTABLE
> 
> 
> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>

Looks ok to me considering that we're missing a PG_LEVEL_4M thing
completely which would need to be handled depending on X86_PAE and CR4
PSE and PAE bits. Probably not worth the trouble though.

Acked-by: Borislav Petkov <bp@suse.de>

-- 
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.
--

  reply	other threads:[~2015-02-11 12:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-10 21:20 Dave Hansen
2015-02-11 12:11 ` Borislav Petkov [this message]
2015-02-19 11:34 ` [tip:x86/urgent] x86/mm/init: Fix incorrect " tip-bot for Dave Hansen

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=20150211121114.GB3650@pd.tnic \
    --to=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=dave@sr71.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=x86@kernel.org \
    /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®