[kexec-tools/f18] ppc/ppc64: compile purgatory with gcc option msoft-float

Dave Young yangrr at fedoraproject.org
Sat Sep 29 05:31:06 UTC 2012


commit 65e3922d8004d5c097e0b5285684271a5ebe4d66
Author: Dave Young <dyoung at redhat.com>
Date:   Tue Jun 12 13:03:14 2012 +0800

    ppc/ppc64: compile purgatory with gcc option msoft-float
    
    Resolves: bz831015
    
    add below patch from vivek for upstream.
    commit d40badaa2553c44d0585df335ad7e1c465f8ced1
    Author: Vivek Goyal <vgoyal at redhat.com>
    Date:   Fri Jun 8 09:43:15 2012 -0400
    
        ppc/ppc64: Compile purgatory code with gcc option -msoft-float
    
    Verified-by: Lingzhu Xiang <lxiang at redhat.com>
    Acked-by: Cong Wang <amwang at redhat.com>

 ...urgatory-code-with-gcc-option-msoft-float.patch |   43 ++++++++++++++++++++
 kexec-tools.spec                                   |    2 +
 2 files changed, 45 insertions(+), 0 deletions(-)
---
diff --git a/kexec-tools-2.0.3-ppc-ppc64-compile-purgatory-code-with-gcc-option-msoft-float.patch b/kexec-tools-2.0.3-ppc-ppc64-compile-purgatory-code-with-gcc-option-msoft-float.patch
new file mode 100644
index 0000000..6ed48a0
--- /dev/null
+++ b/kexec-tools-2.0.3-ppc-ppc64-compile-purgatory-code-with-gcc-option-msoft-float.patch
@@ -0,0 +1,43 @@
+From: Vivek Goyal <vgoyal at redhat.com>
+Recently we faced an issue on power7 machine where kernel hanged in purgatory.
+Some investigation revealed that gcc is generating hardware FPU instructions.
+I have been told we can't use it at this point of time and as kernel is
+compiled with -msoft-float for ppc/ppc64, so should be purgatory (as it runs
+inside kernel context).
+
+Thanks to Jakub Jelinek and Lingzhu Xiang for debugging and coming up with
+a fix for this issue.
+
+Signed-off-by: Vivek Goyal <vgoyal at redhat.com>
+Tested-by: Lingzhu Xiang <lxiang at redhat.com>
+Tested-by: Suzuki K. Poulose <suzuki at in.ibm.com>
+---
+ purgatory/arch/ppc/Makefile   |    2 ++
+ purgatory/arch/ppc64/Makefile |    2 +-
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+Index: kexec-tools/purgatory/arch/ppc64/Makefile
+===================================================================
+--- kexec-tools.orig/purgatory/arch/ppc64/Makefile	2012-02-20 14:45:25.000000000 -0500
++++ kexec-tools/purgatory/arch/ppc64/Makefile	2012-06-06 16:19:09.000696306 -0400
+@@ -9,7 +9,7 @@ ppc64_PURGATORY_SRCS += purgatory/arch/p
+ ppc64_PURGATORY_SRCS += purgatory/arch/ppc64/crashdump_backup.c
+ ppc64_PURGATORY_SRCS += purgatory/arch/ppc64/misc.S
+
+-ppc64_PURGATORY_EXTRA_CFLAGS += -m64 -mcall-aixdesc
++ppc64_PURGATORY_EXTRA_CFLAGS += -m64 -mcall-aixdesc -msoft-float
+ ppc64_PURGATORY_EXTRA_ASFLAGS += -m64 -mcall-aixdesc
+ ppc64_PURGATORY_EXTRA_LDFLAGS += -melf64ppc
+
+Index: kexec-tools/purgatory/arch/ppc/Makefile
+===================================================================
+--- kexec-tools.orig/purgatory/arch/ppc/Makefile	2011-03-18 17:09:38.000000000 -0400
++++ kexec-tools/purgatory/arch/ppc/Makefile	2012-06-06 16:33:50.444406235 -0400
+@@ -7,6 +7,8 @@ ppc_PURGATORY_SRCS += purgatory/arch/ppc
+ ppc_PURGATORY_SRCS += purgatory/arch/ppc/purgatory-ppc.c
+ ppc_PURGATORY_SRCS += purgatory/arch/ppc/console-ppc.c
+
++ppc_PURGATORY_EXTRA_CFLAGS += -msoft-float
++
+ dist += purgatory/arch/ppc/Makefile $(ppc_PURGATORY_SRCS)		\
+	purgatory/arch/ppc/purgatory-ppc.h purgatory/arch/ppc/ppc_asm.h
diff --git a/kexec-tools.spec b/kexec-tools.spec
index a4b3513..b1c0fda 100644
--- a/kexec-tools.spec
+++ b/kexec-tools.spec
@@ -62,6 +62,7 @@ Obsoletes: diskdumputils netdump
 #
 # Patches 301 through 400 are meant for ppc64 kexec-tools enablement
 #
+Patch301: kexec-tools-2.0.3-ppc-ppc64-compile-purgatory-code-with-gcc-option-msoft-float.patch
 
 #
 # Patches 401 through 500 are meant for s390 kexec-tools enablement
@@ -89,6 +90,7 @@ mkdir -p -m755 kcp
 tar -z -x -v -f %{SOURCE9}
 
 
+%patch301 -p1
 %patch601 -p1
 
 tar -z -x -v -f %{SOURCE13}


More information about the scm-commits mailing list