Re: [PATCH 1/5] x86: Move enabling of PSE and PGE out ofinit_memory_mapping

From: Jacob Shin
Date: Sat Aug 25 2012 - 00:17:15 EST


On Fri, Aug 24, 2012 at 07:06:42PM -0700, Yinghai Lu wrote:
> On Fri, Aug 24, 2012 at 6:49 PM, Yinghai Lu <yinghai@xxxxxxxxxx> wrote:
> > On Fri, Aug 24, 2012 at 6:25 PM, Yinghai Lu <yinghai@xxxxxxxxxx> wrote:
> >> On Fri, Aug 24, 2012 at 4:55 PM, Jacob Shin <jacob.shin@xxxxxxx> wrote:
> >>> Depending on the platform, init_memory_mapping() may be called multiple
> >>> times. Move it out to setup_arch() to avoid writing to cr4 on every call.
> >>>
> >>> Signed-off-by: Jacob Shin <jacob.shin@xxxxxxx>
> >>> ---
> >>> arch/x86/kernel/setup.c | 10 ++++++++++
> >>> arch/x86/mm/init.c | 10 ----------
> >>> 2 files changed, 10 insertions(+), 10 deletions(-)
> >>>
> >>> diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
> >>> index f4b9b80..751e020 100644
> >>> --- a/arch/x86/kernel/setup.c
> >>> +++ b/arch/x86/kernel/setup.c
> >>> @@ -913,6 +913,16 @@ void __init setup_arch(char **cmdline_p)
> >>>
> >>> init_gbpages();
> >>>
> >>> + /* Enable PSE if available */
> >>> + if (cpu_has_pse)
> >>> + set_in_cr4(X86_CR4_PSE);
> >>> +
> >>> + /* Enable PGE if available */
> >>> + if (cpu_has_pge) {
> >>> + set_in_cr4(X86_CR4_PGE);
> >>> + __supported_pte_mask |= _PAGE_GLOBAL;
> >>> + }
> >>> +
> >>
> >> please don't put it directly in setup_arch().
> >>
> >> and another function.
> >>
> >
> > Jacob, hpa
> >
> > can you use attached one to replace the first patch?
>
> Please use attached two instead.

Hmm .. okay I'll test with these two patches applied on Monday ..

>
> Thanks
>
> Yinghai




--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/