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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jeremy Fitzhardinge
Date: Friday, August 8, 2008 - 1:46 pm

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@citrix.com>
Cc: Adrian Bunk <bunk@kernel.org>
Cc: Simon Horman <horms@verge.net.au>
Cc: Dhaval Giani <dhaval@linux.vnet.ibm.com>
---
 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;


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

Messages in current thread:
Re: Allow compile with CONFIG_DEBUG_INFO=y, X86_PAE not se ..., Jeremy Fitzhardinge, (Thu Aug 7, 11:37 pm)
Re: [Xen-devel] Re: Allow compile with CONFIG_DEBUG_INFO=y ..., Jeremy Fitzhardinge, (Fri Aug 8, 8:21 am)
Re: [Xen-devel] Re: Allow compile with CONFIG_DEBUG_INFO=y ..., Jeremy Fitzhardinge, (Fri Aug 8, 11:01 am)
[PATCH] x86: work around gcc 3.4.x bug, Jeremy Fitzhardinge, (Fri Aug 8, 1:46 pm)
Re: [PATCH] x86: work around gcc 3.4.x bug, Simon Horman, (Fri Aug 8, 11:29 pm)
Re: [PATCH] x86: work around gcc 3.4.x bug, Ingo Molnar, (Mon Aug 11, 9:44 am)