linux-um archives
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: linux-kernel@vger.kernel.org, stable@kernel.org
Cc: Justin Forbes <jmforbes@linuxtx.org>,
	Domenico Andreoli <cavokz@gmail.com>,
	Randy Dunlap <rdunlap@xenotime.net>,
	alan@lxorguk.ukuu.org.uk, Eugene Teo <eteo@redhat.com>,
	Chris Wedgwood <reviews@ml.cw.f00f.org>,
	Michael Krufky <mkrufky@linuxtv.org>, Ingo Molnar <mingo@elte.hu>,
	Rodrigo Rubira Branco <rbranco@la.checkpoint.com>,
	Chuck Wolber <chuckw@quantumlinux.com>,
	Zwane Mwaikambo <zwane@arm.linux.org.uk>,
	uml-devel <user-mode-linux-devel@lists.sourceforge.net>,
	Jake Edge <jake@lwn.net>, Dave Jones <davej@redhat.com>,
	Jeff Dike <jdike@linux.intel.com>,
	akpm@linux-foundation.org, Theodore Ts'o <tytso@mit.edu>,
	Ulrich Drepper <drepper@redhat.com>,
	Chuck Ebbert <cebbert@redhat.com>,
	Benny Halevy <bhalevy@panasas.com>,
	torvalds@linux-foundation.org, Willy Tarreau <w@1wt.eu>
Subject: [uml-devel] [patch 38/49] uml: fix gcc ICEs and unresolved externs
Date: Mon, 18 Aug 2008 12:20:41 -0700	[thread overview]
Message-ID: <20080818192041.GM10350@suse.de> (raw)
In-Reply-To: <20080818191834.GA10350@suse.de>

[-- Attachment #1: uml-fix-gcc-ices-and-unresolved-externs.patch --]
[-- Type: text/plain, Size: 3270 bytes --]

2.6.25-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Jeff Dike <jdike@addtoit.com>

commit 4f81c5350b44bcc501ab6f8a089b16d064b4d2f6 upstream

There are various constraints on the use of unit-at-a-time:
 - i386 uses no-unit-at-a-time for pre-4.0 (not 4.3)
 - x86_64 uses unit-at-a-time always

Uli reported a crash on x86_64 with gcc 4.1.2 with unit-at-a-time,
resulting in commit c0a18111e571138747a98af18b3a2124df56a0d1

Ingo reported a gcc internal error with gcc 4.3 with no-unit-at-a-timem,
resulting in 22eecde2f9034764a3fd095eecfa3adfb8ec9a98

Benny Halevy is seeing extern inlines not resolved with gcc 4.3 with
no-unit-at-a-time

This patch reintroduces unit-at-a-time for gcc >= 4.0, bringing back the
possibility of Uli's crash.  If that happens, we'll debug it.

I started seeing both the internal compiler errors and unresolved
inlines on Fedora 9.  This patch fixes both problems, without so far
reintroducing the crash reported by Uli.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Benny Halevy <bhalevy@panasas.com>
Cc: Adrian Bunk <bunk@kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Ulrich Drepper <drepper@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/um/Makefile        |    1 -
 arch/um/Makefile-i386   |    7 +++++++
 arch/um/Makefile-x86_64 |    3 +++
 3 files changed, 10 insertions(+), 1 deletion(-)

--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -77,7 +77,6 @@ include $(srctree)/$(ARCH_DIR)/Makefile-
 KERNEL_DEFINES = $(strip -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \
 			 -Dmktime=kernel_mktime $(ARCH_KERNEL_DEFINES))
 KBUILD_CFLAGS += $(KERNEL_DEFINES)
-KBUILD_CFLAGS += $(call cc-option,-fno-unit-at-a-time,)
 
 PHONY += linux
 
--- a/arch/um/Makefile-i386
+++ b/arch/um/Makefile-i386
@@ -32,4 +32,11 @@ cflags-y += $(call cc-option,-mpreferred
 # an unresolved reference.
 cflags-y += -ffreestanding
 
+# Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use
+# a lot more stack due to the lack of sharing of stacklots.  Also, gcc
+# 4.3.0 needs -funit-at-a-time for extern inline functions.
+KBUILD_CFLAGS += $(shell if [ $(call cc-version) -lt 0400 ] ; then \
+			echo $(call cc-option,-fno-unit-at-a-time); \
+			else echo $(call cc-option,-funit-at-a-time); fi ;)
+
 KBUILD_CFLAGS += $(cflags-y)
--- a/arch/um/Makefile-x86_64
+++ b/arch/um/Makefile-x86_64
@@ -21,3 +21,6 @@ HEADER_ARCH := x86
 
 LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib64
 LINK-y += -m64
+
+# Do unit-at-a-time unconditionally on x86_64, following the host
+KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)

-- 

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

  parent reply	other threads:[~2008-08-18 19:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080818191012.663450219@mini.kroah.org>
     [not found] ` <20080818191834.GA10350@suse.de>
2008-08-18 19:20   ` [uml-devel] [patch 27/49] uml: fix build when SLOB is enabled Greg KH
2008-08-18 19:20   ` [uml-devel] [patch 28/49] uml: fix bad NTP interaction with clock Greg KH
2008-08-18 19:20   ` [uml-devel] [patch 29/49] uml: physical memory shouldnt include initial stack Greg KH
2008-08-18 19:20   ` [uml-devel] [patch 30/49] uml: track and make up lost ticks Greg KH
2008-08-18 19:20   ` [uml-devel] [patch 31/49] uml: missed kmalloc() in pcap_user.c Greg KH
2008-08-18 19:20   ` [uml-devel] [patch 32/49] uml: deal with host time going backwards Greg KH
2008-08-18 19:20   ` [uml-devel] [patch 33/49] uml: deal with inaccessible address space start Greg KH
2008-08-18 19:20   ` [uml-devel] [patch 34/49] uml: missing export of csum_partial() on uml/amd64 Greg KH
2008-08-18 19:20   ` [uml-devel] [patch 35/49] uml: memcpy export needs to follow host declaration Greg KH
2008-08-18 19:20   ` [uml-devel] [patch 36/49] uml: stub needs to tolerate SIGWINCH Greg KH
2008-08-18 19:20   ` [uml-devel] [patch 37/49] uml: work around broken host PTRACE_SYSEMU Greg KH
2008-08-18 19:20   ` Greg KH [this message]
2008-08-18 19:20   ` [uml-devel] [patch 39/49] uml: Fix boot crash Greg KH
2008-08-18 19:20   ` [uml-devel] [patch 40/49] uml: PATH_MAX needs limits.h Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080818192041.GM10350@suse.de \
    --to=gregkh@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=bhalevy@panasas.com \
    --cc=cavokz@gmail.com \
    --cc=cebbert@redhat.com \
    --cc=chuckw@quantumlinux.com \
    --cc=davej@redhat.com \
    --cc=drepper@redhat.com \
    --cc=eteo@redhat.com \
    --cc=jake@lwn.net \
    --cc=jdike@linux.intel.com \
    --cc=jmforbes@linuxtx.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mkrufky@linuxtv.org \
    --cc=rbranco@la.checkpoint.com \
    --cc=rdunlap@xenotime.net \
    --cc=reviews@ml.cw.f00f.org \
    --cc=stable@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=tytso@mit.edu \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    --cc=w@1wt.eu \
    --cc=zwane@arm.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox