[PATCH] x86: work around gcc 3.4.x bug

From: Jeremy Fitzhardinge
Date: Fri Aug 08 2008 - 16:46:42 EST


gcc-3.4.x crashes when compiling pgd_prepopulate_pmd() when
PREALLOCATED_PMDS == 0 and CONFIG_DEBUG_INFO is enabled. This seems
to avoid the problem.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>
Cc: Adrian Bunk <bunk@xxxxxxxxxx>
Cc: Simon Horman <horms@xxxxxxxxxxxx>
Cc: Dhaval Giani <dhaval@xxxxxxxxxxxxxxxxxx>
---
arch/x86/mm/pgtable.c | 3 +++
1 file changed, 3 insertions(+)

===================================================================
--- a/arch/x86/mm/pgtable.c
+++ b/arch/x86/mm/pgtable.c
@@ -207,6 +207,9 @@
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;


--
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/