Author: adconrad
Date: 2014-06-19 12:32:17 +0000 (Thu, 19 Jun 2014)
New Revision: 6181

Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/patches/powerpc/local-powerpc8xx-dcbz.diff
Log:
debian/patches/powerpc/local-powerpc8xx-dcbz.diff: Restrict the trap
to 32-bit builds, since the Freescale 8xx CPUs aren't 64-bit capable.

Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog        2014-06-19 10:19:40 UTC (rev 
6180)
+++ glibc-package/trunk/debian/changelog        2014-06-19 12:32:17 UTC (rev 
6181)
@@ -10,6 +10,8 @@
 
   [ Adam Conrad ]
   * debian/control.in/main: glibc-source Conflics/Replaces eglibc-source.
+  * debian/patches/powerpc/local-powerpc8xx-dcbz.diff: Restrict the trap
+    to 32-bit builds, since the Freescale 8xx CPUs aren't 64-bit capable.
 
  -- Aurelien Jarno <[email protected]>  Tue, 17 Jun 2014 20:33:56 +0200
 

Modified: glibc-package/trunk/debian/patches/powerpc/local-powerpc8xx-dcbz.diff
===================================================================
--- glibc-package/trunk/debian/patches/powerpc/local-powerpc8xx-dcbz.diff       
2014-06-19 10:19:40 UTC (rev 6180)
+++ glibc-package/trunk/debian/patches/powerpc/local-powerpc8xx-dcbz.diff       
2014-06-19 12:32:17 UTC (rev 6181)
@@ -1,6 +1,6 @@
 --- a/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
 +++ b/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
-@@ -25,9 +25,21 @@
+@@ -25,10 +25,28 @@
  /* 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
@@ -11,21 +11,29 @@
 +   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                                                    \
++#ifndef __powerpc64__
++ #define DL_PLATFORM_AUXV                                                   \
++      case AT_DCACHEBSIZE:                                                  \
++      {                                                                     \
++        unsigned pvr = 0;                                                   \
++        asm ("mfspr %0, 287" : "=r" (pvr));                                 \
++        if ((pvr & 0xffff0000) == 0x00500000)                               \
++          break;                                                            \
++      }                                                                     \
++      __cache_line_size = av->a_un.a_val;                                   \
++      break;
++#else
+-#define DL_PLATFORM_AUXV                                                    \
++ #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;
++#endif
  
+ #include <sysdeps/unix/sysv/linux/dl-sysdep.c>
 --- a/sysdeps/unix/sysv/linux/powerpc/libc-start.c
 +++ b/sysdeps/unix/sysv/linux/powerpc/libc-start.c
-@@ -68,11 +68,24 @@
+@@ -68,11 +68,25 @@
        rtld_fini = NULL;
      }
  
@@ -40,14 +48,15 @@
      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;
-+        }
++#ifndef __powerpc64__
++      {
++        unsigned pvr = 0;
++
++        asm ("mfspr %0, 287" : "=r" (pvr) :);
++        if ((pvr & 0xffff0000) == 0x00500000)
++          break;
++      }
++#endif
        __cache_line_size = av->a_un.a_val;
        break;
        }


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: https://lists.debian.org/[email protected]

Reply via email to