From: Jeremy Fitzhardinge Subject: [PATCH] x86: work around gcc 3.4.x bug Date: Fri, 08 Aug 2008 13:46:07 -0700 Message-ID: <489CB08F.9030902@goop.org> References: <20080808050429.GA8473@verge.net.au> <489BE9C3.2010006@goop.org> <20080808080155.GA1992@cs181140183.pp.htv.fi> <489C6485.7050009@goop.org> <20080808161331.GF14495@cs181140183.pp.htv.fi> <489C89FA.5000301@goop.org> <20080808183711.GA14495@cs181140183.pp.htv.fi> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20080808183711.GA14495@cs181140183.pp.htv.fi> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Adrian Bunk Cc: Mark McLoughlin , xen-devel@lists.xensource.com, Eduardo Habkost , Stephen Tweedie , linux-kernel@vger.kernel.org, Simon Horman , "H. Peter Anvin" , Ingo Molnar , Thomas Gleixner , Dhaval Giani List-Id: xen-devel@lists.xenproject.org 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 Cc: Adrian Bunk Cc: Simon Horman Cc: Dhaval Giani --- 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;