diff options
author | Catalin Enache <catalin.enache@windriver.com> | 2017-07-07 19:43:34 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-08-29 16:50:53 +0100 |
commit | e6955b7d0de1900bfc3c8e83a5a00b2604f10916 (patch) | |
tree | 778c38ead0535bf9e6676d589fab755567e8bf05 /meta/recipes-core/glibc/glibc/0005-Remove-__ASSUME_REQUEUE_PI.patch | |
parent | 5b2a7393f98081946e30e311e7277d253f6ddd9a (diff) | |
download | poky-e6955b7d0de1900bfc3c8e83a5a00b2604f10916.tar.gz |
glibc: fix pthread_cond_broadcast issue (arm)
pthread_mutex functions such as pthread_cond_wait(), pthread_mutex_unlock() return
errors after PTHREAD_PRIO_INHERIT is enabled
Reference:
https://sourceware.org/bugzilla/show_bug.cgi?id=18463
Upstream patches:
https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=f0e3925bf3b8df6940c3346db17e42615979d458
https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=13cb8f76da9d9420330796f469dbf10643ba5b12
https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=23b5cae1af04f2d912910fdaf73cb482265798c1
https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=ed19993b5b0d05d62cc883571519a67dae481a14
https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=2e4cf778972573221e9b87fd992844ea9b67b9bf
https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=abff18c0c6055ca5d1cd46923fd1205c057139a5
This issue is Morty specific (glibc 2.24).
The issue is no longer present in glibc 2.25 (master branch).
(From OE-Core rev: 6dc1f1c3cc871d00ecd59d5aeeef86b7e6965750)
Signed-off-by: Catalin Enache <catalin.enache@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/glibc/glibc/0005-Remove-__ASSUME_REQUEUE_PI.patch')
-rw-r--r-- | meta/recipes-core/glibc/glibc/0005-Remove-__ASSUME_REQUEUE_PI.patch | 149 |
1 files changed, 149 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc/glibc/0005-Remove-__ASSUME_REQUEUE_PI.patch b/meta/recipes-core/glibc/glibc/0005-Remove-__ASSUME_REQUEUE_PI.patch new file mode 100644 index 0000000000..8d4ba41078 --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0005-Remove-__ASSUME_REQUEUE_PI.patch | |||
@@ -0,0 +1,149 @@ | |||
1 | From 27b7131d3d8133bf3a5ce72d4e4ff4dfadd71f20 Mon Sep 17 00:00:00 2001 | ||
2 | From: Catalin Enache <catalin.enache@windriver.com> | ||
3 | Date: Fri, 30 Jun 2017 12:08:29 +0300 | ||
4 | Subject: [PATCH 5/6] Remove __ASSUME_REQUEUE_PI | ||
5 | |||
6 | The new cond var implementation (ed19993b5b0d) removed all the | ||
7 | __ASSUME_{REQUEUE_PI,FUTEX_LOCK_PI} internal usage so there is no | ||
8 | need to keep defining it. This patch removes all USE_REQUEUE_PI | ||
9 | and __ASSUME_REQUEUE_PI. It is as follow up from BZ#18463. | ||
10 | |||
11 | Checked with a build for x86_64-linux-gnu, arm-linux-gnueabhf, | ||
12 | m68-linux-gnu, mips64-linux-gnu, and sparc64-linux-gnu. | ||
13 | |||
14 | * nptl/pthreadP.h (USE_REQUEUE_PI): Remove ununsed macro. | ||
15 | * sysdeps/unix/sysv/linux/arm/kernel-features.h | ||
16 | (__ASSUME_REQUEUE_PI): Likewise. | ||
17 | * sysdeps/unix/sysv/linux/kernel-features.h | ||
18 | (__ASSUME_REQUEUE_PI): Likewise. | ||
19 | * sysdeps/unix/sysv/linux/m68k/kernel-features.h | ||
20 | (__ASSUME_REQUEUE_PI): Likewise. | ||
21 | * sysdeps/unix/sysv/linux/mips/kernel-features.h | ||
22 | (__ASSUME_REQUEUE_PI): Likewise. | ||
23 | * sysdeps/unix/sysv/linux/sparc/kernel-features.h | ||
24 | (__ASSUME_REQUEUE_PI): Likewise. | ||
25 | |||
26 | Upstream-Status: Backport | ||
27 | |||
28 | Author: Adhemerval Zanella <adhemerval.zanella@linaro.org> | ||
29 | Signed-off-by: Catalin Enache <catalin.enache@windriver.com> | ||
30 | --- | ||
31 | ChangeLog | 14 ++++++++++++++ | ||
32 | nptl/pthreadP.h | 12 ------------ | ||
33 | sysdeps/unix/sysv/linux/arm/kernel-features.h | 1 - | ||
34 | sysdeps/unix/sysv/linux/kernel-features.h | 5 ----- | ||
35 | sysdeps/unix/sysv/linux/m68k/kernel-features.h | 1 - | ||
36 | sysdeps/unix/sysv/linux/mips/kernel-features.h | 1 - | ||
37 | sysdeps/unix/sysv/linux/sparc/kernel-features.h | 1 - | ||
38 | 7 files changed, 14 insertions(+), 21 deletions(-) | ||
39 | |||
40 | diff --git a/ChangeLog b/ChangeLog | ||
41 | index c94db7b..44c518b 100644 | ||
42 | --- a/ChangeLog | ||
43 | +++ b/ChangeLog | ||
44 | @@ -1,3 +1,17 @@ | ||
45 | +2017-04-04 Adhemerval Zanella <adhemerval.zanella@linaro.org> | ||
46 | + | ||
47 | + * nptl/pthreadP.h (USE_REQUEUE_PI): Remove ununsed macro. | ||
48 | + * sysdeps/unix/sysv/linux/arm/kernel-features.h | ||
49 | + (__ASSUME_REQUEUE_PI): Likewise. | ||
50 | + * sysdeps/unix/sysv/linux/kernel-features.h | ||
51 | + (__ASSUME_REQUEUE_PI): Likewise. | ||
52 | + * sysdeps/unix/sysv/linux/m68k/kernel-features.h | ||
53 | + (__ASSUME_REQUEUE_PI): Likewise. | ||
54 | + * sysdeps/unix/sysv/linux/mips/kernel-features.h | ||
55 | + (__ASSUME_REQUEUE_PI): Likewise. | ||
56 | + * sysdeps/unix/sysv/linux/sparc/kernel-features.h | ||
57 | + (__ASSUME_REQUEUE_PI): Likewise. | ||
58 | + | ||
59 | 2016-12-31 Torvald Riegel <triegel@redhat.com> | ||
60 | |||
61 | [BZ #13165] | ||
62 | diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h | ||
63 | index e9992bc..730c4ad 100644 | ||
64 | --- a/nptl/pthreadP.h | ||
65 | +++ b/nptl/pthreadP.h | ||
66 | @@ -594,18 +594,6 @@ extern void __wait_lookup_done (void) attribute_hidden; | ||
67 | # define PTHREAD_STATIC_FN_REQUIRE(name) __asm (".globl " #name); | ||
68 | #endif | ||
69 | |||
70 | -/* Test if the mutex is suitable for the FUTEX_WAIT_REQUEUE_PI operation. */ | ||
71 | -#if (defined lll_futex_wait_requeue_pi \ | ||
72 | - && defined __ASSUME_REQUEUE_PI) | ||
73 | -# define USE_REQUEUE_PI(mut) \ | ||
74 | - ((mut) && (mut) != (void *) ~0l \ | ||
75 | - && (((mut)->__data.__kind \ | ||
76 | - & (PTHREAD_MUTEX_PRIO_INHERIT_NP | PTHREAD_MUTEX_ROBUST_NORMAL_NP)) \ | ||
77 | - == PTHREAD_MUTEX_PRIO_INHERIT_NP)) | ||
78 | -#else | ||
79 | -# define USE_REQUEUE_PI(mut) 0 | ||
80 | -#endif | ||
81 | - | ||
82 | /* Returns 0 if POL is a valid scheduling policy. */ | ||
83 | static inline int | ||
84 | check_sched_policy_attr (int pol) | ||
85 | diff --git a/sysdeps/unix/sysv/linux/arm/kernel-features.h b/sysdeps/unix/sysv/linux/arm/kernel-features.h | ||
86 | index 6ca607e..339ad45 100644 | ||
87 | --- a/sysdeps/unix/sysv/linux/arm/kernel-features.h | ||
88 | +++ b/sysdeps/unix/sysv/linux/arm/kernel-features.h | ||
89 | @@ -23,7 +23,6 @@ | ||
90 | futex_atomic_cmpxchg_inatomic, depending on kernel | ||
91 | configuration. */ | ||
92 | #if __LINUX_KERNEL_VERSION < 0x030E03 | ||
93 | -# undef __ASSUME_REQUEUE_PI | ||
94 | # undef __ASSUME_SET_ROBUST_LIST | ||
95 | #endif | ||
96 | |||
97 | diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h | ||
98 | index 1d3b554..9f2cf9f 100644 | ||
99 | --- a/sysdeps/unix/sysv/linux/kernel-features.h | ||
100 | +++ b/sysdeps/unix/sysv/linux/kernel-features.h | ||
101 | @@ -101,11 +101,6 @@ | ||
102 | #define __ASSUME_PREADV 1 | ||
103 | #define __ASSUME_PWRITEV 1 | ||
104 | |||
105 | -/* Support for FUTEX_*_REQUEUE_PI was added in 2.6.31 (but some | ||
106 | - architectures lack futex_atomic_cmpxchg_inatomic in some | ||
107 | - configurations). */ | ||
108 | -#define __ASSUME_REQUEUE_PI 1 | ||
109 | - | ||
110 | /* Support for recvmmsg functionality was added in 2.6.33. The macros | ||
111 | defined correspond to those for accept4. */ | ||
112 | #if __LINUX_KERNEL_VERSION >= 0x020621 | ||
113 | diff --git a/sysdeps/unix/sysv/linux/m68k/kernel-features.h b/sysdeps/unix/sysv/linux/m68k/kernel-features.h | ||
114 | index 46ec601..174c1c6 100644 | ||
115 | --- a/sysdeps/unix/sysv/linux/m68k/kernel-features.h | ||
116 | +++ b/sysdeps/unix/sysv/linux/m68k/kernel-features.h | ||
117 | @@ -51,6 +51,5 @@ | ||
118 | |||
119 | /* No support for PI futexes or robust mutexes before 3.10 for m68k. */ | ||
120 | #if __LINUX_KERNEL_VERSION < 0x030a00 | ||
121 | -# undef __ASSUME_REQUEUE_PI | ||
122 | # undef __ASSUME_SET_ROBUST_LIST | ||
123 | #endif | ||
124 | diff --git a/sysdeps/unix/sysv/linux/mips/kernel-features.h b/sysdeps/unix/sysv/linux/mips/kernel-features.h | ||
125 | index b486d90..a795911c 100644 | ||
126 | --- a/sysdeps/unix/sysv/linux/mips/kernel-features.h | ||
127 | +++ b/sysdeps/unix/sysv/linux/mips/kernel-features.h | ||
128 | @@ -24,7 +24,6 @@ | ||
129 | /* The MIPS kernel does not support futex_atomic_cmpxchg_inatomic if | ||
130 | emulating LL/SC. */ | ||
131 | #if __mips == 1 || defined _MIPS_ARCH_R5900 | ||
132 | -# undef __ASSUME_REQUEUE_PI | ||
133 | # undef __ASSUME_SET_ROBUST_LIST | ||
134 | #endif | ||
135 | |||
136 | diff --git a/sysdeps/unix/sysv/linux/sparc/kernel-features.h b/sysdeps/unix/sysv/linux/sparc/kernel-features.h | ||
137 | index 69c9c7c..dd3ddf0 100644 | ||
138 | --- a/sysdeps/unix/sysv/linux/sparc/kernel-features.h | ||
139 | +++ b/sysdeps/unix/sysv/linux/sparc/kernel-features.h | ||
140 | @@ -34,6 +34,5 @@ | ||
141 | /* 32-bit SPARC kernels do not support | ||
142 | futex_atomic_cmpxchg_inatomic. */ | ||
143 | #if !defined __arch64__ && !defined __sparc_v9__ | ||
144 | -# undef __ASSUME_REQUEUE_PI | ||
145 | # undef __ASSUME_SET_ROBUST_LIST | ||
146 | #endif | ||
147 | -- | ||
148 | 2.10.2 | ||
149 | |||