[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

r6096 - in glibc-package/branches/glibc-2.19/debian: . patches patches/any patches/powerpc patches/sh4



Author: aurel32
Date: 2014-05-21 12:00:44 +0000 (Wed, 21 May 2014)
New Revision: 6096

Added:
   glibc-package/branches/glibc-2.19/debian/patches/any/local-dynamic-resolvconf.diff
   glibc-package/branches/glibc-2.19/debian/patches/powerpc/local-powerpc8xx-dcbz.diff
   glibc-package/branches/glibc-2.19/debian/patches/sh4/local-fpscr_values.diff
Modified:
   glibc-package/branches/glibc-2.19/debian/changelog
   glibc-package/branches/glibc-2.19/debian/patches/series
Log:
  - patches/any/local-dynamic-resolvconf.diff: new patch from the eglibc
    tree to dynamically take into account changes in resolv.conf.
  - patches/powerpc/local-powerpc8xx-dcbz.diff: new patch from the eglibc
    tree to workaround dcbz issues on PowerPC 8XX CPUs.
  - patches/sh4/local-fpscr_values.diff: new patch from eglibc tree to
    export the ___fpscr_values symbol on SH4.

Modified: glibc-package/branches/glibc-2.19/debian/changelog
===================================================================
--- glibc-package/branches/glibc-2.19/debian/changelog	2014-05-21 10:59:50 UTC (rev 6095)
+++ glibc-package/branches/glibc-2.19/debian/changelog	2014-05-21 12:00:44 UTC (rev 6096)
@@ -17,6 +17,12 @@
       to fetch the branch updates through git.
     - patches/any/submitted-nl_langinfo-static.diff: refresh.
     - patches/any/submitted-ldsodefs_rtld_debug.diff: drop.
+    - patches/any/local-dynamic-resolvconf.diff: new patch from the eglibc
+      tree to dynamically take into account changes in resolv.conf.
+    - patches/powerpc/local-powerpc8xx-dcbz.diff: new patch from the eglibc
+      tree to workaround dcbz issues on PowerPC 8XX CPUs.
+    - patches/sh4/local-fpscr_values.diff: new patch from eglibc tree to
+      export the ___fpscr_values symbol on SH4.
 
  -- Aurelien Jarno <aurel32@debian.org>  Wed, 21 May 2014 12:38:51 +0200
 

Added: glibc-package/branches/glibc-2.19/debian/patches/any/local-dynamic-resolvconf.diff
===================================================================
--- glibc-package/branches/glibc-2.19/debian/patches/any/local-dynamic-resolvconf.diff	                        (rev 0)
+++ glibc-package/branches/glibc-2.19/debian/patches/any/local-dynamic-resolvconf.diff	2014-05-21 12:00:44 UTC (rev 6096)
@@ -0,0 +1,44 @@
+--- a/resolv/res_libc.c	
++++ b/resolv/res_libc.c	
+@@ -22,12 +22,13 @@
+ #include <arpa/nameser.h>
+ #include <resolv.h>
+ #include <bits/libc-lock.h>
+-
++#include <sys/stat.h>
+ 
+ /* The following bit is copied from res_data.c (where it is #ifdef'ed
+    out) since res_init() should go into libc.so but the rest of that
+    file should not.  */
+ 
++__libc_lock_define_initialized (static, lock);
+ extern unsigned long long int __res_initstamp attribute_hidden;
+ /* We have atomic increment operations on 64-bit platforms.  */
+ #if __WORDSIZE == 64
+@@ -35,7 +36,6 @@
+ # define atomicincunlock(lock) (void) 0
+ # define atomicinc(var) catomic_increment (&(var))
+ #else
+-__libc_lock_define_initialized (static, lock);
+ # define atomicinclock(lock) __libc_lock_lock (lock)
+ # define atomicincunlock(lock) __libc_lock_unlock (lock)
+ # define atomicinc(var) ++var
+@@ -94,7 +94,18 @@
+ int
+ __res_maybe_init (res_state resp, int preinit)
+ {
++	static time_t last_mtime;
++	struct stat statbuf;
++	int ret;
++
+ 	if (resp->options & RES_INIT) {
++		ret = stat (_PATH_RESCONF, &statbuf);
++		__libc_lock_lock (lock);
++		if ((ret == 0) && (last_mtime != statbuf.st_mtime)) {
++			last_mtime = statbuf.st_mtime;
++			atomicinc (__res_initstamp);
++		}
++		__libc_lock_unlock (lock);
+ 		if (__res_initstamp != resp->_u._ext.initstamp) {
+ 			if (resp->nscount > 0)
+ 				__res_iclose (resp, true);

Added: glibc-package/branches/glibc-2.19/debian/patches/powerpc/local-powerpc8xx-dcbz.diff
===================================================================
--- glibc-package/branches/glibc-2.19/debian/patches/powerpc/local-powerpc8xx-dcbz.diff	                        (rev 0)
+++ glibc-package/branches/glibc-2.19/debian/patches/powerpc/local-powerpc8xx-dcbz.diff	2014-05-21 12:00:44 UTC (rev 6096)
@@ -0,0 +1,53 @@
+--- a/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
++++ b/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
+@@ -25,9 +25,21 @@
+ /* Scan the Aux Vector for the "Data Cache Block Size" entry.  If found
+    verify that the static extern __cache_line_size is defined by checking
+    for not NULL.  If it is defined then assign the cache block size
+-   value to __cache_line_size.  */
++   value to __cache_line_size.  This is used by memset to
++   optimize setting to zero.  We have to detect 8xx processors, which
++   have buggy dcbz implementations that cannot report page faults
++   correctly.  That requires reading SPR, which is a privileged
++   operation.  Fortunately 2.2.18 and later emulates PowerPC mfspr
++   reads from the PVR register.   */
+ #define DL_PLATFORM_AUXV						      \
+       case AT_DCACHEBSIZE:						      \
++	if (__LINUX_KERNEL_VERSION >= 0x020218)				      \
++	  {								      \
++	    unsigned pvr = 0;						      \
++	    asm ("mfspr %0, 287" : "=r" (pvr));				      \
++	    if ((pvr & 0xffff0000) == 0x00500000)			      \
++	      break;							      \
++	  }								      \
+ 	__cache_line_size = av->a_un.a_val;				      \
+ 	break;
+ 
+--- a/sysdeps/unix/sysv/linux/powerpc/libc-start.c
++++ b/sysdeps/unix/sysv/linux/powerpc/libc-start.c
+@@ -68,11 +68,24 @@
+       rtld_fini = NULL;
+     }
+ 
+-  /* Initialize the __cache_line_size variable from the aux vector.  */
++  /* Initialize the __cache_line_size variable from the aux vector.
++     This is used by memset to optimize setting to zero.  We have to
++     detect 8xx processors, which have buggy dcbz implementations that
++     cannot report page faults correctly.  That requires reading SPR,
++     which is a privileged operation.  Fortunately 2.2.18 and later
++     emulates PowerPC mfspr reads from the PVR register.  */
+   for (ElfW (auxv_t) * av = auxvec; av->a_type != AT_NULL; ++av)
+     switch (av->a_type)
+       {
+       case AT_DCACHEBSIZE:
++	if (__LINUX_KERNEL_VERSION >= 0x020218)
++	  {
++	    unsigned pvr = 0;
++	    
++	    asm ("mfspr %0, 287" : "=r" (pvr) :);
++	    if ((pvr & 0xffff0000) == 0x00500000)
++	      break;
++	  }
+ 	__cache_line_size = av->a_un.a_val;
+ 	break;
+       }

Modified: glibc-package/branches/glibc-2.19/debian/patches/series
===================================================================
--- glibc-package/branches/glibc-2.19/debian/patches/series	2014-05-21 10:59:50 UTC (rev 6095)
+++ glibc-package/branches/glibc-2.19/debian/patches/series	2014-05-21 12:00:44 UTC (rev 6096)
@@ -173,9 +173,12 @@
 
 powerpc/local-math-logb.diff
 powerpc/cvs-ibm-branch.diff
+powerpc/local-powerpc8xx-dcbz.diff
 
 s390/submitted-nexttowardf.diff
 
+sh4/local-fpscr_values.diff
+
 sparc/local-fork.diff
 sparc/local-sparcv9-target.diff
 sparc/submitted-timing.diff
@@ -243,3 +246,4 @@
 any/cvs-socketcall-syscall.diff
 any/submitted-nl_langinfo-static.diff
 any/cvs-strtod.diff
+any/local-dynamic-resolvconf.diff

Added: glibc-package/branches/glibc-2.19/debian/patches/sh4/local-fpscr_values.diff
===================================================================
--- glibc-package/branches/glibc-2.19/debian/patches/sh4/local-fpscr_values.diff	                        (rev 0)
+++ glibc-package/branches/glibc-2.19/debian/patches/sh4/local-fpscr_values.diff	2014-05-21 12:00:44 UTC (rev 6096)
@@ -0,0 +1,27 @@
+--- a/sysdeps/unix/sysv/linux/sh/sysdep.S
++++ b/sysdeps/unix/sysv/linux/sh/sysdep.S
+@@ -30,3 +30,14 @@
+ 
+ #define __syscall_error __syscall_error_1
+ #include <sysdeps/unix/sh/sysdep.S>
++
++       .data
++       .align 3
++       .globl ___fpscr_values
++       .type ___fpscr_values, @object
++       .size ___fpscr_values, 8
++___fpscr_values:
++       .long 0
++       .long 0x80000
++weak_alias (___fpscr_values, __fpscr_values)
++
+--- a/sysdeps/unix/sysv/linux/sh/Versions
++++ b/sysdeps/unix/sysv/linux/sh/Versions
+@@ -2,6 +2,7 @@
+   GLIBC_2.2 {
+     # functions used in other libraries
+     __xstat64; __fxstat64; __lxstat64;
++    __fpscr_values;
+ 
+     # a*
+     alphasort64;


Reply to: