]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/patches/glibc/glibc-rh642584.patch
Merge remote-tracking branch 'origin/next' into thirteen
[people/teissler/ipfire-2.x.git] / src / patches / glibc / glibc-rh642584.patch
1 2010-10-13 H.J. Lu <hongjiu.lu@intel.com>
2
3 [BZ #12113]
4 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
5 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
6 of "struct pthread".
7
8 Index: glibc-2.12-2-gc4ccff1/nptl/sysdeps/x86_64/pthreaddef.h
9 ===================================================================
10 --- glibc-2.12-2-gc4ccff1.orig/nptl/sysdeps/x86_64/pthreaddef.h
11 +++ glibc-2.12-2-gc4ccff1/nptl/sysdeps/x86_64/pthreaddef.h
12 @@ -27,8 +27,9 @@
13 /* Minimal stack size after allocating thread descriptor and guard size. */
14 #define MINIMAL_REST_STACK 2048
15
16 -/* Alignment requirement for TCB. */
17 -#define TCB_ALIGNMENT 16
18 +/* Alignment requirement for TCB. Need to store post-AVX vector registers
19 + in the TCB and we want the storage to be aligned at 32-byte. */
20 +#define TCB_ALIGNMENT 32
21
22
23 /* Location of current stack frame. The frame pointer is not usable. */
24 Index: glibc-2.12-2-gc4ccff1/nptl/sysdeps/x86_64/tls.h
25 ===================================================================
26 --- glibc-2.12-2-gc4ccff1.orig/nptl/sysdeps/x86_64/tls.h
27 +++ glibc-2.12-2-gc4ccff1/nptl/sysdeps/x86_64/tls.h
28 @@ -117,12 +117,7 @@ typedef struct
29 # define TLS_TCB_SIZE sizeof (struct pthread)
30
31 /* Alignment requirements for the TCB. */
32 -//# define TLS_TCB_ALIGN __alignof__ (struct pthread)
33 -// Normally the above would be correct But we have to store post-AVX
34 -// vector registers in the TCB and we want the storage to be aligned.
35 -// unfortunately there isn't yet a type for these values and hence no
36 -// 32-byte alignment requirement. Make this explicit, for now.
37 -# define TLS_TCB_ALIGN 32
38 +# define TLS_TCB_ALIGN __alignof__ (struct pthread)
39
40 /* The TCB can have any size and the memory following the address the
41 thread pointer points to is unspecified. Allocate the TCB there. */