Re: Current git fails to compile

From: Dhaval Giani
Date: Fri Jul 18 2008 - 09:42:21 EST

On Fri, Jul 18, 2008 at 11:14:41AM +0200, Ingo Molnar wrote:
> * Dhaval Giani <dhaval@xxxxxxxxxxxxxxxxxx> wrote:
> > Hi Ingo, Thomas,
> >
> > Today's git fails to compile for me with
> > (5b664cb235e97afbf34db9c4d77f08ebd725335e)
> >
> > arch/x86/mm/pgtable.c: In function `pgd_mop_up_pmds':
> > arch/x86/mm/pgtable.c:194: warning: unused variable `pmd'
> > 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:3829
> > Please submit a full bug report,
> > with preprocessed source if appropriate.
> > See <URL:> for instructions.
> > Preprocessed source stored into /tmp/ccJG8rDB.out file, please attach
> > this to your bugreport.
> > make[1]: *** [arch/x86/mm/pgtable.o] Error 1
> > make: *** [arch/x86/mm] Error 2
> > [root@llm11 linux-2.6]#
> >
> > [root@llm11 linux-2.6]# gcc -v
> > Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.4/specs
> > Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
> > --infodir=/usr/share/info --enable-shared --enable-threads=posix
> > --disable-checking --with-system-zlib --enable-__cxa_atexit
> > --disable-libunwind-exceptions --enable-java-awt=gtk
> > --host=i386-redhat-linux
> > Thread model: posix
> > gcc version 3.4.4 20050721 (Red Hat 3.4.4-2)
> > [root@llm11 linux-2.6]#
> so old-gcc crapped up.
> Any chance you could try something like:
> git-bisect good v2.6.26
> git-bisect bad linus/master
> git-bisect run make arch/x86/mm/pgtable.o
> ... if we know which change caused this maybe we can work this gcc bug
> around.

d8d5900ef8afc562088f8470feeaf17c4747790f is first bad commit
commit d8d5900ef8afc562088f8470feeaf17c4747790f
Author: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: Wed Jun 25 00:19:13 2008 -0400

x86: preallocate and prepopulate separately

Jan Beulich points out that vmalloc_sync_all() assumes that the
kernel's pmd is always expected to be present in the pgd. The
pgd construction code will add the pgd to the pgd_list before its
have been pre-populated, thereby making it visible to

However, because pgd_prepopulate_pmd also does the allocation, it
block and cannot be done under spinlock.

The solution is to preallocate the pmds out of the spinlock, then
populate them while holding the pgd_list lock.

This patch also pulls the pmd preallocation and mop-up functions out
to be common, assuming that the compiler will generate no code for
them when PREALLOCTED_PMDS is 0. Also, there's no need for pgd_ctor
to clear the pgd again, since it's allocated as a zeroed page.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Cc: Stephen Tweedie <sct@xxxxxxxxxx>
Cc: Eduardo Habkost <ehabkost@xxxxxxxxxx>
Cc: Mark McLoughlin <markmc@xxxxxxxxxx>
Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
Cc: Jan Beulich <jbeulich@xxxxxxxxxx>

Signed-off-by: Ingo Molnar <mingo@xxxxxxx>

:040000 040000 fe332e58e5a85d0c577a33dbf410f0a013358974
5fc1451845521927fbc4c894a09b301e871a07c9 M arch
bisect run success
[root@llm11 linux-2.6]#

[root@llm11 linux-2.6]# git bisect log
git-bisect start
# good: [bce7f793daec3e65ec5c5705d2457b81fe7b5725] Linux 2.6.26
git-bisect good bce7f793daec3e65ec5c5705d2457b81fe7b5725
# bad: [5b664cb235e97afbf34db9c4d77f08ebd725335e] Merge branch
'upstream-linus' of
git-bisect bad 5b664cb235e97afbf34db9c4d77f08ebd725335e
# bad: [e18425a0abc8eafa8e98ecffac517bb0c0904f4b] Merge branch
'tracing/for-linus' of
git-bisect bad e18425a0abc8eafa8e98ecffac517bb0c0904f4b
# bad: [d59fdcf2ac501de99c3dfb452af5e254d4342886] Merge commit 'v2.6.26'
into x86/core
git-bisect bad d59fdcf2ac501de99c3dfb452af5e254d4342886
# good: [3de352bbd86f890dd0c5e1c09a6a1b0b29e0f8ce] Merge branch
'x86/mpparse' into x86/devel
git-bisect good 3de352bbd86f890dd0c5e1c09a6a1b0b29e0f8ce
# bad: [b4df32f4aeef8794d0135fc8dc250acb44cfee60] x86: fix warning in
e820_reserve_resources with 32bit
git-bisect bad b4df32f4aeef8794d0135fc8dc250acb44cfee60
# good: [7f0be02c5ed1deb04c54c6a17f412e04f417df11] x86: move boot_params
declaring to setup.c
git-bisect good 7f0be02c5ed1deb04c54c6a17f412e04f417df11
# good: [eb1379cb296f5aee348c2e04317d911bb84d9184] x86: update
reserve_initrd to support 64bit
git-bisect good eb1379cb296f5aee348c2e04317d911bb84d9184
# bad: [f97013fd8f17120182aa247f360e4d2069a9db9c] x86, 64-bit: split
git-bisect bad f97013fd8f17120182aa247f360e4d2069a9db9c
# good: [29f784e369a914b5926e01a0b0caae0b47f6452a] x86: change some
functions in setup.c to static
git-bisect good 29f784e369a914b5926e01a0b0caae0b47f6452a
# good: [67350a5c4514c280665cdb45439d32a008a264ba] x86: simplify
git-bisect good 67350a5c4514c280665cdb45439d32a008a264ba
# bad: [97349135fea7f0ba8464534433df3bfd1dc0e9a6] x86/paravirt: add
debugging for missing operations
git-bisect bad 97349135fea7f0ba8464534433df3bfd1dc0e9a6
# bad: [d8d5900ef8afc562088f8470feeaf17c4747790f] x86: preallocate and
prepopulate separately
git-bisect bad d8d5900ef8afc562088f8470feeaf17c4747790f
# good: [eba0045ff87bab465d3c80c289f3bf709c1800f5] x86/paravirt: add a
pgd_alloc/free hooks
git-bisect good eba0045ff87bab465d3c80c289f3bf709c1800f5
[root@llm11 linux-2.6]#

> Ingo

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at