Re: [PATCH] x86: Construct 32 bit boot time page tables in native format.

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andi Kleen <andi@...>
Cc: <linux-kernel@...>, Thomas Gleixner <tglx@...>, Ingo Molnar <mingo@...>, H. Peter Anvin <hpa@...>, Eric W. Biederman <ebiederm@...>
Date: Sunday, January 20, 2008 - 12:44 pm

On Sun, 2008-01-20 at 00:07 +0100, Andi Kleen wrote: 

Indeed it does. I don't have any non-PAE to test it but I turned the
failure case into a simple jmp to hlt_loop since we ought never to get
here in any case.


The problem here is that we explicitly want native accessors because
it's too early to use the pv ops since we are still running P==V. A PV
kernel boot will never come down this path -- it is diverted earlier in
head_32.S so using the native versions are appropriate.

I'll try again to use the native_{make,set}_xxx functions but originally
I found the necessary variants weren't defined in all combinations of
PAE/not and PARAVIRT/not.

FWIW we use the same undef trick under arch/x86/boot too and this early
start of day stuff if fairly similar.


As hpa says we can't be above 4G at this point. Probably I can use some
variant of make_pte now though.


I was trying to fit in with the native_foo stuff that is available and
happened to be using pud on my last attempt before I switched to the
#undef CONFIG_PARAVIRT approach. I'll switch to pgd if I can get it to
work.

pgd_none (and pud_none) are hardcoded to 0 in the 32 bit case (in
asm-generic/pgtable-nopud.h and asm-generic/pgtable-nopmd.h or
asm-x86/pgtable-3level.h). Presumably this is because at regular runtime
these entries are guaranteed to exist which isn't true this early at
startup.

In fact since we are always going to need a PMD in the PAE case there is
probably not much wrong with simply unconditionally allocating the pmd
at the start of early_pgtable_init().


done (without the !)


True. However the assembly being replaced makes the same assumptions so
I don't think that should block this patch, it's a fixup that can be
made later.


Done.


Nope, the return type of early_ioremap_pte() changed unsigned long ->
pte_t and that is what is assigned to pte.

I'll spin another version.

Ian.
-- 
Ian Campbell

"I go on working for the same reason a hen goes on laying eggs."
		-- H. L. Mencken

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] x86: Construct 32 bit boot time page tables in n..., Jeremy Fitzhardinge, (Wed Jan 23, 9:06 pm)
Re: [PATCH] x86: Construct 32 bit boot time page tables in n..., Jeremy Fitzhardinge, (Thu Jan 24, 6:35 pm)
Re: [PATCH] x86: Construct 32 bit boot time page tables in n..., Jeremy Fitzhardinge, (Thu Jan 24, 6:58 pm)
Re: [PATCH] x86: Construct 32 bit boot time page tables in n..., Jeremy Fitzhardinge, (Thu Jan 24, 7:40 pm)
Re: [PATCH] x86: Construct 32 bit boot time page tables in n..., Rafael J. Wysocki, (Fri Jan 25, 6:02 pm)
Re: [PATCH] x86: Construct 32 bit boot time page tables in n..., Rafael J. Wysocki, (Mon Jan 28, 1:02 pm)
Re: [PATCH] x86: Construct 32 bit boot time page tables in n..., Rafael J. Wysocki, (Fri Feb 1, 10:28 am)
Re: [PATCH] x86: Construct 32 bit boot time page tables in n..., Rafael J. Wysocki, (Mon Jan 28, 11:25 am)
Re: [PATCH] x86: Construct 32 bit boot time page tables in n..., Rafael J. Wysocki, (Mon Jan 28, 4:26 pm)
Re: [PATCH] x86: Construct 32 bit boot time page tables in n..., Jeremy Fitzhardinge, (Mon Jan 28, 4:44 pm)
Re: [PATCH] x86: Construct 32 bit boot time page tables in n..., Rafael J. Wysocki, (Mon Jan 28, 4:50 pm)
Re: [PATCH] x86: Construct 32 bit boot time page tables in n..., Rafael J. Wysocki, (Mon Jan 28, 6:02 pm)
Re: [PATCH] x86: Construct 32 bit boot time page tables in n..., Rafael J. Wysocki, (Mon Jan 28, 4:59 pm)
Re: [PATCH] x86: Construct 32 bit boot time page tables in n..., Jeremy Fitzhardinge, (Mon Jan 28, 4:03 pm)
Re: [PATCH] x86: Construct 32 bit boot time page tables in n..., Rafael J. Wysocki, (Mon Jan 28, 4:28 pm)
Re: [PATCH] x86: Construct 32 bit boot time page tables in n..., Eric W. Biederman, (Thu Jan 24, 10:16 pm)
Re: [PATCH] x86: Construct 32 bit boot time page tables in n..., Rafael J. Wysocki, (Thu Jan 24, 8:46 pm)
Re: [PATCH] x86: Construct 32 bit boot time page tables in n..., Jeremy Fitzhardinge, (Thu Jan 24, 7:51 pm)
Re: [PATCH] x86: Construct 32 bit boot time page tables in n..., Jeremy Fitzhardinge, (Thu Jan 24, 8:11 pm)
Re: [PATCH] x86: Construct 32 bit boot time page tables in n..., Jeremy Fitzhardinge, (Thu Jan 24, 8:31 pm)
Re: [PATCH] x86: Construct 32 bit boot time page tables in n..., Eric W. Biederman, (Thu Jan 24, 10:56 pm)
Re: [PATCH] x86: Construct 32 bit boot time page tables in n..., Jeremy Fitzhardinge, (Fri Jan 25, 12:41 am)
Re: [PATCH] x86: Construct 32 bit boot time page tables in n..., Eric W. Biederman, (Fri Jan 25, 7:07 am)
[PATCH] x86: make nx_enabled conditional on CONFIG_X86_PAE, Harvey Harrison, (Tue Jan 22, 5:00 pm)
Re: [PATCH] x86: Construct 32 bit boot time page tables in n..., Ian Campbell, (Sun Jan 20, 12:44 pm)