lkml.org 
[lkml]   [2015]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH] x86: nit: wrong page size in init_memory_mapping() printks
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.
--


\
 
 \ /
  Last update: 2015-02-11 13:21    [W:0.053 / U:5.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site