Blame SOURCES/glibc-rh642584.patch

b40826
2010-10-13  H.J. Lu  <hongjiu.lu@intel.com>
b40826
b40826
	[BZ #12113]
b40826
	* sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
b40826
	* sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
b40826
	of "struct pthread".
b40826
b40826
Index: glibc-2.12-2-gc4ccff1/nptl/sysdeps/x86_64/pthreaddef.h
b40826
===================================================================
b40826
--- glibc-2.12-2-gc4ccff1.orig/nptl/sysdeps/x86_64/pthreaddef.h
b40826
+++ glibc-2.12-2-gc4ccff1/nptl/sysdeps/x86_64/pthreaddef.h
b40826
@@ -27,8 +27,9 @@
b40826
 /* Minimal stack size after allocating thread descriptor and guard size.  */
b40826
 #define MINIMAL_REST_STACK	2048
b40826
 
b40826
-/* Alignment requirement for TCB.  */
b40826
-#define TCB_ALIGNMENT		16
b40826
+/* Alignment requirement for TCB.  Need to store post-AVX vector registers
b40826
+   in the TCB and we want the storage to be aligned at 32-byte.  */
b40826
+#define TCB_ALIGNMENT		32
b40826
 
b40826
 
b40826
 /* Location of current stack frame.  The frame pointer is not usable.  */
b40826
Index: glibc-2.12-2-gc4ccff1/nptl/sysdeps/x86_64/tls.h
b40826
===================================================================
b40826
--- glibc-2.12-2-gc4ccff1.orig/nptl/sysdeps/x86_64/tls.h
b40826
+++ glibc-2.12-2-gc4ccff1/nptl/sysdeps/x86_64/tls.h
b40826
@@ -117,12 +117,7 @@ typedef struct
b40826
 # define TLS_TCB_SIZE sizeof (struct pthread)
b40826
 
b40826
 /* Alignment requirements for the TCB.  */
b40826
-//# define TLS_TCB_ALIGN __alignof__ (struct pthread)
b40826
-// Normally the above would be correct  But we have to store post-AVX
b40826
-// vector registers in the TCB and we want the storage to be aligned.
b40826
-// unfortunately there isn't yet a type for these values and hence no
b40826
-// 32-byte alignment requirement.  Make this explicit, for now.
b40826
-# define TLS_TCB_ALIGN 32
b40826
+# define TLS_TCB_ALIGN __alignof__ (struct pthread)
b40826
 
b40826
 /* The TCB can have any size and the memory following the address the
b40826
    thread pointer points to is unspecified.  Allocate the TCB there.  */