lkml.org 
[lkml]   [2019]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Patch v2 4/6] x86/mm: Refine debug print string retrieval function
On Fri, Dec 06, 2019 at 09:51:26AM +0800, Wei Yang wrote:

> >> +#if defined(CONFIG_X86_32) && !defined(CONFIG_X86_PAE)
> >> + static const char *sz[2] = { "4K", "4M" };
> >> +#else
> >> + static const char *sz[4] = { "4K", "2M", "1G", "" };
> >> +#endif
> >> + unsigned int idx, s;
> >>
> >> + for (idx = 0; idx < maxidx; idx++, mr++) {
> >> + s = (mr->page_size_mask >> PG_LEVEL_2M) & (ARRAY_SIZE(sz) - 1);
> >
> >Is it at all possible for !PAE to have 1G here, if you use the sz[4]
> >definition unconditionally?
> >
>
> You mean remove the ifdef and use sz[4] for both condition?
>
> Then how to differentiate 4M and 2M?

Argh, I'm blind.. I failed to spot that. N/m then.

\
 
 \ /
  Last update: 2019-12-06 11:28    [W:0.293 / U:0.576 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site