[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191206102746.GD2844@hirez.programming.kicks-ass.net>
Date: Fri, 6 Dec 2019 11:27:46 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Wei Yang <richardw.yang@...ux.intel.com>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org,
richard.weiyang@...il.com, dave.hansen@...ux.intel.com,
luto@...nel.org, peterz@...radead.or, tglx@...utronix.de
Subject: Re: [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.
Powered by blists - more mailing lists