Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/2] eglibc bugfixes for e5500 and systemd
@ 2012-09-17 20:50 Khem Raj
  2012-09-17 20:50 ` [PATCH 1/2] eglibc: Fix fcntl.h for powerpc Khem Raj
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Khem Raj @ 2012-09-17 20:50 UTC (permalink / raw)
  To: openembedded-core

This patchset addressed two bugs in eglibc on powerpc one where we would get
fsqrt intruction emitted into libm code on e5500/64bit and second problem
where systemd 189+ would not build on powerpc due to missing defines in
fcntl.h for ppc.

The following changes since commit 7887b99646d8e1e736ad6e4a306e47df9955221e:

  local.conf.sample: change valgrind support architecture comment (2012-09-14 17:05:59 +0100)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib kraj/eglibc-fixes
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=kraj/eglibc-fixes

Khem Raj (2):
  eglibc: Fix fcntl.h for powerpc
  eglibc: Do not use fsqrt in libm when building for fsl ppc with fpu

 ..._handle_at-open_by_handle-etc.-to-PowerPC.patch |   65 ++++++++++++++++++++
 .../eglibc/eglibc-2.16/fsl-ppc-no-fsqrt.patch      |   44 +++++++++++++
 meta/recipes-core/eglibc/eglibc_2.16.bb            |    4 +-
 3 files changed, 112 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-core/eglibc/eglibc-2.16/0001-Add-name_to_handle_at-open_by_handle-etc.-to-PowerPC.patch
 create mode 100644 meta/recipes-core/eglibc/eglibc-2.16/fsl-ppc-no-fsqrt.patch

-- 
1.7.9.5




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] eglibc: Fix fcntl.h for powerpc
  2012-09-17 20:50 [PATCH 0/2] eglibc bugfixes for e5500 and systemd Khem Raj
@ 2012-09-17 20:50 ` Khem Raj
  2012-09-17 20:50 ` [PATCH 2/2] eglibc: Do not use fsqrt in libm when building for fsl ppc with fpu Khem Raj
  2012-09-19 17:35 ` [PATCH 0/2] eglibc bugfixes for e5500 and systemd Saul Wold
  2 siblings, 0 replies; 5+ messages in thread
From: Khem Raj @ 2012-09-17 20:50 UTC (permalink / raw)
  To: openembedded-core

This fix is needed for systemd to work on powerpc

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ..._handle_at-open_by_handle-etc.-to-PowerPC.patch |   65 ++++++++++++++++++++
 meta/recipes-core/eglibc/eglibc_2.16.bb            |    1 +
 2 files changed, 66 insertions(+)
 create mode 100644 meta/recipes-core/eglibc/eglibc-2.16/0001-Add-name_to_handle_at-open_by_handle-etc.-to-PowerPC.patch

diff --git a/meta/recipes-core/eglibc/eglibc-2.16/0001-Add-name_to_handle_at-open_by_handle-etc.-to-PowerPC.patch b/meta/recipes-core/eglibc/eglibc-2.16/0001-Add-name_to_handle_at-open_by_handle-etc.-to-PowerPC.patch
new file mode 100644
index 0000000..48b3c56
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.16/0001-Add-name_to_handle_at-open_by_handle-etc.-to-PowerPC.patch
@@ -0,0 +1,65 @@
+Upstream-Status: Submitted
+
+
+From 4b2716f902c117490285e39deb6ef7925fdc846e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 8 Sep 2012 19:54:03 -0700
+Subject: [PATCH] Add name_to_handle_at, open_by_handle etc. to PowerPC
+ bits/fcntl.h.
+
+---
+ ChangeLog                                    |    7 +++++++
+ sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h |   28 +++++++++++++++++++++++++-
+ 2 files changed, 34 insertions(+), 1 deletion(-)
+
+Index: libc/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
+===================================================================
+--- libc.orig/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h	2012-09-08 10:27:08.000000000 -0700
++++ libc/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h	2012-09-08 19:57:44.219191560 -0700
+@@ -1,5 +1,5 @@
+ /* O_*, F_*, FD_* bit values for Linux/PowerPC.
+-   Copyright (C) 1995-1998, 2000, 2003, 2004, 2006, 2007, 2009, 2010, 2011
++   Copyright (C) 1995-2012
+    Free Software Foundation, Inc.
+    This file is part of the GNU C Library.
+ 
+@@ -232,6 +232,19 @@
+ 					   we splice from/to).  */
+ # define SPLICE_F_MORE		4	/* Expect more data.  */
+ # define SPLICE_F_GIFT		8	/* Pages passed in are a gift.  */
++
++
++/* File handle structure.  */
++struct file_handle
++{
++  unsigned int handle_bytes;
++  int handle_type;
++  /* File identifier.  */
++  unsigned char f_handle[0];
++};
++
++/* Maximum handle size (for now).  */
++# define MAX_HANDLE_SZ  128
+ #endif
+ 
+ __BEGIN_DECLS
+@@ -278,6 +291,19 @@
+ 			__off64_t __len);
+ # endif
+ 
++
++/* Map file name to file handle.  */
++extern int name_to_handle_at (int __dfd, const char *__name,
++			      struct file_handle *__handle, int *__mnt_id,
++			      int __flags) __THROW;
++
++/* Open file using the file handle.
++
++   This function is a possible cancellation point and therefore not
++   marked with __THROW.  */
++extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle,
++			      int __flags);
++
+ #endif
+ 
+ __END_DECLS
diff --git a/meta/recipes-core/eglibc/eglibc_2.16.bb b/meta/recipes-core/eglibc/eglibc_2.16.bb
index 78dc44a..8f3d159 100644
--- a/meta/recipes-core/eglibc/eglibc_2.16.bb
+++ b/meta/recipes-core/eglibc/eglibc_2.16.bb
@@ -29,6 +29,7 @@ SRC_URI = "svn://www.eglibc.org/svn/branches/;module=${EGLIBC_BRANCH};protocol=h
            file://0001-eglibc-menuconfig-support.patch \
            file://0002-eglibc-menuconfig-hex-string-options.patch \
            file://0003-eglibc-menuconfig-build-instructions.patch \
+           file://0001-Add-name_to_handle_at-open_by_handle-etc.-to-PowerPC.patch \
           "
 LIC_FILES_CHKSUM = "file://LICENSES;md5=98a1128c4b58120182cbea3b1752d8b9 \
       file://COPYING;md5=393a5ca445f6965873eca0259a17f833 \
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] eglibc: Do not use fsqrt in libm when building for fsl ppc with fpu
  2012-09-17 20:50 [PATCH 0/2] eglibc bugfixes for e5500 and systemd Khem Raj
  2012-09-17 20:50 ` [PATCH 1/2] eglibc: Fix fcntl.h for powerpc Khem Raj
@ 2012-09-17 20:50 ` Khem Raj
  2012-09-17 21:41   ` Khem Raj
  2012-09-19 17:35 ` [PATCH 0/2] eglibc bugfixes for e5500 and systemd Saul Wold
  2 siblings, 1 reply; 5+ messages in thread
From: Khem Raj @ 2012-09-17 20:50 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../eglibc/eglibc-2.16/fsl-ppc-no-fsqrt.patch      |   44 ++++++++++++++++++++
 meta/recipes-core/eglibc/eglibc_2.16.bb            |    3 +-
 2 files changed, 46 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-core/eglibc/eglibc-2.16/fsl-ppc-no-fsqrt.patch

diff --git a/meta/recipes-core/eglibc/eglibc-2.16/fsl-ppc-no-fsqrt.patch b/meta/recipes-core/eglibc/eglibc-2.16/fsl-ppc-no-fsqrt.patch
new file mode 100644
index 0000000..712b353
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.16/fsl-ppc-no-fsqrt.patch
@@ -0,0 +1,44 @@
+Create e5500 specific math_private.h and let it include when compiling for e5500/64bit core
+We prefefine __CPU_HAS_FSQRT to 0 and then in general ppc64 math_private.h we check if its
+already defined before redefining it. This way we can ensure that on e5500 builds it wont
+emit fsqrt intructions
+
+-Khem
+
+Upstream-Status: Pending
+
+Index: libc/sysdeps/powerpc/fpu/math_private.h
+===================================================================
+--- libc.orig/sysdeps/powerpc/fpu/math_private.h	2012-09-03 22:37:58.000000000 -0700
++++ libc/sysdeps/powerpc/fpu/math_private.h	2012-09-17 09:35:09.709124003 -0700
+@@ -25,10 +25,12 @@
+ #include <dl-procinfo.h>
+ #include_next <math_private.h>
+ 
+-# if __WORDSIZE == 64 || defined _ARCH_PWR4
+-#  define __CPU_HAS_FSQRT 1
+-# else
+-#  define __CPU_HAS_FSQRT ((GLRO(dl_hwcap) & PPC_FEATURE_64) != 0)
++# ifndef __CPU_HAS_FSQRT
++#  if __WORDSIZE == 64 || defined _ARCH_PWR4
++#   define __CPU_HAS_FSQRT 1
++#  else
++#   define __CPU_HAS_FSQRT ((GLRO(dl_hwcap) & PPC_FEATURE_64) != 0)
++#  endif
+ # endif
+ 
+ extern double __slow_ieee754_sqrt (double);
+Index: libc/ports/sysdeps/powerpc/powerpc64/e5500/fpu/math_private.h
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ libc/ports/sysdeps/powerpc/powerpc64/e5500/fpu/math_private.h	2012-09-17 09:56:59.129124074 -0700
+@@ -0,0 +1,9 @@
++#ifndef _E5500_MATH_PRIVATE_H_
++#define _E5500_MATH_PRIVATE_H_ 1
++/* E5500 core FPU does not implement
++   fsqrt */
++
++#define __CPU_HAS_FSQRT 0
++#include_next <math_private.h>
++
++#endif /* _E5500_MATH_PRIVATE_H_ */
diff --git a/meta/recipes-core/eglibc/eglibc_2.16.bb b/meta/recipes-core/eglibc/eglibc_2.16.bb
index 8f3d159..bc4f044 100644
--- a/meta/recipes-core/eglibc/eglibc_2.16.bb
+++ b/meta/recipes-core/eglibc/eglibc_2.16.bb
@@ -3,7 +3,7 @@ require eglibc.inc
 SRCREV = "20393"
 
 DEPENDS += "gperf-native kconfig-frontends-native"
-PR = "r9"
+PR = "r10"
 PR_append = "+svnr${SRCPV}"
 
 EGLIBC_BRANCH="eglibc-2_16"
@@ -30,6 +30,7 @@ SRC_URI = "svn://www.eglibc.org/svn/branches/;module=${EGLIBC_BRANCH};protocol=h
            file://0002-eglibc-menuconfig-hex-string-options.patch \
            file://0003-eglibc-menuconfig-build-instructions.patch \
            file://0001-Add-name_to_handle_at-open_by_handle-etc.-to-PowerPC.patch \
+           file://file://fsl-ppc-no-fsqrt.patch \
           "
 LIC_FILES_CHKSUM = "file://LICENSES;md5=98a1128c4b58120182cbea3b1752d8b9 \
       file://COPYING;md5=393a5ca445f6965873eca0259a17f833 \
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] eglibc: Do not use fsqrt in libm when building for fsl ppc with fpu
  2012-09-17 20:50 ` [PATCH 2/2] eglibc: Do not use fsqrt in libm when building for fsl ppc with fpu Khem Raj
@ 2012-09-17 21:41   ` Khem Raj
  0 siblings, 0 replies; 5+ messages in thread
From: Khem Raj @ 2012-09-17 21:41 UTC (permalink / raw)
  To: openembedded-core

>
>  EGLIBC_BRANCH="eglibc-2_16"
> @@ -30,6 +30,7 @@ SRC_URI = "svn://www.eglibc.org/svn/branches/;module=${EGLIBC_BRANCH};protocol=h
>             file://0002-eglibc-menuconfig-hex-string-options.patch \
>             file://0003-eglibc-menuconfig-build-instructions.patch \
>             file://0001-Add-name_to_handle_at-open_by_handle-etc.-to-PowerPC.patch \
> +           file://file://fsl-ppc-no-fsqrt.patch \


I have fixed this typo on the branch

>            "
>  LIC_FILES_CHKSUM = "file://LICENSES;md5=98a1128c4b58120182cbea3b1752d8b9 \
>        file://COPYING;md5=393a5ca445f6965873eca0259a17f833 \
> --
> 1.7.9.5
>



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] eglibc bugfixes for e5500 and systemd
  2012-09-17 20:50 [PATCH 0/2] eglibc bugfixes for e5500 and systemd Khem Raj
  2012-09-17 20:50 ` [PATCH 1/2] eglibc: Fix fcntl.h for powerpc Khem Raj
  2012-09-17 20:50 ` [PATCH 2/2] eglibc: Do not use fsqrt in libm when building for fsl ppc with fpu Khem Raj
@ 2012-09-19 17:35 ` Saul Wold
  2 siblings, 0 replies; 5+ messages in thread
From: Saul Wold @ 2012-09-19 17:35 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-core

On 09/17/2012 01:50 PM, Khem Raj wrote:
> This patchset addressed two bugs in eglibc on powerpc one where we would get
> fsqrt intruction emitted into libm code on e5500/64bit and second problem
> where systemd 189+ would not build on powerpc due to missing defines in
> fcntl.h for ppc.
>
> The following changes since commit 7887b99646d8e1e736ad6e4a306e47df9955221e:
>
>    local.conf.sample: change valgrind support architecture comment (2012-09-14 17:05:59 +0100)
>
> are available in the git repository at:
>
>    git://git.openembedded.org/openembedded-core-contrib kraj/eglibc-fixes
>    http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=kraj/eglibc-fixes
>
> Khem Raj (2):
>    eglibc: Fix fcntl.h for powerpc
>    eglibc: Do not use fsqrt in libm when building for fsl ppc with fpu
>
>   ..._handle_at-open_by_handle-etc.-to-PowerPC.patch |   65 ++++++++++++++++++++
>   .../eglibc/eglibc-2.16/fsl-ppc-no-fsqrt.patch      |   44 +++++++++++++
>   meta/recipes-core/eglibc/eglibc_2.16.bb            |    4 +-
>   3 files changed, 112 insertions(+), 1 deletion(-)
>   create mode 100644 meta/recipes-core/eglibc/eglibc-2.16/0001-Add-name_to_handle_at-open_by_handle-etc.-to-PowerPC.patch
>   create mode 100644 meta/recipes-core/eglibc/eglibc-2.16/fsl-ppc-no-fsqrt.patch
>

Merged into OE-Core

Thanks
	Sau!




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-09-19 17:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-17 20:50 [PATCH 0/2] eglibc bugfixes for e5500 and systemd Khem Raj
2012-09-17 20:50 ` [PATCH 1/2] eglibc: Fix fcntl.h for powerpc Khem Raj
2012-09-17 20:50 ` [PATCH 2/2] eglibc: Do not use fsqrt in libm when building for fsl ppc with fpu Khem Raj
2012-09-17 21:41   ` Khem Raj
2012-09-19 17:35 ` [PATCH 0/2] eglibc bugfixes for e5500 and systemd Saul Wold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox