From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758291AbYHOMbe (ORCPT ); Fri, 15 Aug 2008 08:31:34 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753353AbYHOMb0 (ORCPT ); Fri, 15 Aug 2008 08:31:26 -0400 Received: from mx2.mail.elte.hu ([157.181.151.9]:44829 "EHLO mx2.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753016AbYHOMbZ (ORCPT ); Fri, 15 Aug 2008 08:31:25 -0400 Date: Fri, 15 Aug 2008 14:31:06 +0200 From: Ingo Molnar To: Mikael Pettersson Cc: mingo@redhat.com, hpa@zytor.com, linux-kernel@vger.kernel.org, tglx@linutronix.de Subject: Re: [PATCH 2.6.27-rc1] x86: fix readb() et al compile error with gcc-3.2.3 Message-ID: <20080815123106.GA24663@elte.hu> References: <200807301244.m6UCi3V6023301@harpo.it.uu.se> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200807301244.m6UCi3V6023301@harpo.it.uu.se> User-Agent: Mutt/1.5.18 (2008-05-17) X-ELTE-VirusStatus: clean X-ELTE-SpamScore: -1.5 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=-1.5 required=5.9 tests=BAYES_00 autolearn=no SpamAssassin version=3.2.3 -1.5 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Mikael Pettersson wrote: > Building 2.6.27-rc1 on x86 with gcc-3.2.3 fails with: > > In file included from include/asm/dma.h:12, > from include/linux/bootmem.h:8, > from init/main.c:26: > include/asm/io.h: In function `readb': > include/asm/io.h:32: syntax error before string constant > include/asm/io.h: In function `readw': > include/asm/io.h:33: syntax error before string constant > include/asm/io.h: In function `readl': > include/asm/io.h:34: syntax error before string constant > include/asm/io.h: In function `__readb': > include/asm/io.h:36: syntax error before string constant > include/asm/io.h: In function `__readw': > include/asm/io.h:37: syntax error before string constant > include/asm/io.h: In function `__readl': > include/asm/io.h:38: syntax error before string constant > make[1]: *** [init/main.o] Error 1 > make: *** [init] Error 2 > > Starting with 2.6.27-rc1 readb() et al are generated by a > build_mmio_read() macro, which generates asm() statements with > output register constraints like "=" "q", i.e. as two adjacent > string literals. This doesn't work with the old gcc-3.2.3. > > Fixed by moving the "=" part into the callers' reg parameter > (as suggested by Ingo). > > Build and boot-tested with gcc-3.2.3 on 32 and 64-bit x86. > > Signed-off-by: Mikael Pettersson applied to tip/x86/urgent - thanks Mikael. Ingo