> Hi,
>
> It appears that "x86: preallocate and prepopulate separately"
> (d8d5900ef8afc562088f8470feeaf17c4747790f) introduced a minor regression.
> The build fails on gcc 3.4.5 if CONFIG_DEBUG_INFO=y (that is gcc is
> called with -g) and X86_PAE not set.
>
> There was previously some discussion of this without resolution.
>
http://lkml.org/lkml/2008/7/18/250
>
> arch/x86/mm/pgtable.c: In function `pgd_prepopulate_pmd':
> arch/x86/mm/pgtable.c:222: internal compiler error: in remove_insn, at emit-rtl.c:3746
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <URL:http://gcc.gnu.org/bugs.html> for instructions.
>
> # i686-unknown-linux-gnu-gcc --version
> i686-unknown-linux-gnu-gcc (GCC) 3.4.5
>
> My investigations seem to show that gcc 3.4.5 can't cope with the following
> construct:
>
> for (i = 0; i < 0; i++)
> ...
>
> or more specifically:
>
> for (i = 0; i < PREALLOCTED_PMDS; i++)
> ...
>
> when PREALLOCTED_PMDS is 0. That is, when X86_PAE is not set.
>
> This patch resolves this problem by moving the relevant code inside
> #define X86_PAE and providing dummy functions outside !X86_PAE.
>
> Signed-off-by: Simon Horman <horms@verge.net.au>
>