diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2008-08-08 13:46:07 -0700 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-08-11 18:44:02 +0200 |
commit | cf3e50501259f9a7cb108a69c3e1b912135628f6 (patch) | |
tree | c4df8af1ad310728845b2a8f8c5153210cb48f2d /arch/x86/mm/pgtable.c | |
parent | fb6bef8002d54a9c3062abc281893ec7c896d3ce (diff) | |
download | linux-cf3e50501259f9a7cb108a69c3e1b912135628f6.tar.gz linux-cf3e50501259f9a7cb108a69c3e1b912135628f6.tar.bz2 linux-cf3e50501259f9a7cb108a69c3e1b912135628f6.zip |
x86: work around gcc 3.4.x bug
Simon Horman reported that gcc-3.4.x crashes when compiling
pgd_prepopulate_pmd() when PREALLOCATED_PMDS == 0 and CONFIG_DEBUG_INFO
is enabled.
Adding an extra check for PREALLOCATED_PMDS == 0 [which is compiled out
by gcc] seems to avoid the problem.
Reported-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Acked-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/mm/pgtable.c')
-rw-r--r-- | arch/x86/mm/pgtable.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c index 557b2abceef8..d50302774fe2 100644 --- a/arch/x86/mm/pgtable.c +++ b/arch/x86/mm/pgtable.c @@ -207,6 +207,9 @@ static void pgd_prepopulate_pmd(struct mm_struct *mm, pgd_t *pgd, pmd_t *pmds[]) unsigned long addr; int i; + if (PREALLOCATED_PMDS == 0) /* Work around gcc-3.4.x bug */ + return; + pud = pud_offset(pgd, 0); for (addr = i = 0; i < PREALLOCATED_PMDS; |