* [Buildroot] [PATCH 1/2] package/rt-tests: remove sched_setattr/sched_getattr API for SuperH arch
@ 2016-08-07 22:03 Romain Naour
2016-08-07 22:03 ` [Buildroot] [PATCH 2/2] package/rt-tests: remove dependency on headers >= 3.14 Romain Naour
2016-08-08 4:42 ` [Buildroot] [PATCH 1/2] package/rt-tests: remove sched_setattr/sched_getattr API for SuperH arch Baruch Siach
0 siblings, 2 replies; 6+ messages in thread
From: Romain Naour @ 2016-08-07 22:03 UTC (permalink / raw)
To: buildroot
This commit remove rt-sched.o from librttest and pi_stress test program
only for SuperH arch which doesn't have __NR_sched_setattr and
__NR_sched_getattr syscalls defined.
Patch [1] adding these syscalls has not been merged in upstream kernel
(4.7).
Fixes:
http://autobuild.buildroot.net/results/67fc16366717f34df492683a14ecd23376e23110
[1] http://www.spinics.net/lists/linux-sh/msg41990.html
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
package/rt-tests/rt-tests.mk | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/package/rt-tests/rt-tests.mk b/package/rt-tests/rt-tests.mk
index 19f1021..1433106 100644
--- a/package/rt-tests/rt-tests.mk
+++ b/package/rt-tests/rt-tests.mk
@@ -14,6 +14,16 @@ ifeq ($(BR2_PACKAGE_PYTHON),y)
RT_TESTS_DEPENDENCIES = python
endif
+# Deadline scheduler syscalls are not defined on SuperH.
+# Remove pi_stress which depends on deadline scheduler syscalls.
+ifeq ($(BR2_sh),y)
+define RT_TESTS_REMOVE_RT_SCHED_API
+ $(SED) "s/rt-sched.o//" $(@D)/Makefile
+ $(SED) "s/pi_stress.c//" $(@D)/Makefile
+endef
+endif
+RT_TESTS_POST_PATCH_HOOKS += RT_TESTS_REMOVE_RT_SCHED_API
+
define RT_TESTS_BUILD_CMDS
$(MAKE) -C $(@D) \
CC="$(TARGET_CC)" \
--
2.5.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 2/2] package/rt-tests: remove dependency on headers >= 3.14
2016-08-07 22:03 [Buildroot] [PATCH 1/2] package/rt-tests: remove sched_setattr/sched_getattr API for SuperH arch Romain Naour
@ 2016-08-07 22:03 ` Romain Naour
2016-08-08 4:42 ` [Buildroot] [PATCH 1/2] package/rt-tests: remove sched_setattr/sched_getattr API for SuperH arch Baruch Siach
1 sibling, 0 replies; 6+ messages in thread
From: Romain Naour @ 2016-08-07 22:03 UTC (permalink / raw)
To: buildroot
The dependency on kernel headers >= 3.14 was added by
b9fa6c00b1213fd038f2aed52057f22c7e18fd4b since
librttest requires __NR_sched_setattr and
__NR_sched_getattr syscalls (rt-sched).
But a follow up patch allows to remove these syscalls
from librttest. So keep rt-tests package available
for old toolchains (pre 3.14) and remove pi-stress
program if necessary.
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
package/rt-tests/Config.in | 5 ++---
package/rt-tests/rt-tests.mk | 10 +++++++---
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/package/rt-tests/Config.in b/package/rt-tests/Config.in
index b39856d..08967ce 100644
--- a/package/rt-tests/Config.in
+++ b/package/rt-tests/Config.in
@@ -1,7 +1,6 @@
config BR2_PACKAGE_RT_TESTS
bool "rt-tests"
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
- depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14 # deadline scheduler syscall
depends on BR2_USE_MMU # fork()
depends on !BR2_STATIC_LIBS # dlopen
depends on !BR2_TOOLCHAIN_USES_MUSL # cyclictest
@@ -29,7 +28,7 @@ comment "rt-tests may not work on MIPS with an external uClibc toolchain"
depends on BR2_TOOLCHAIN_EXTERNAL_UCLIBC
depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
-comment "rt-tests needs a uClibc or glibc toolchain w/ NPTL, headers >= 3.14, dynamic library"
+comment "rt-tests needs a uClibc or glibc toolchain w/ NPTL, dynamic library"
depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS \
- || BR2_TOOLCHAIN_USES_MUSL || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
+ || BR2_TOOLCHAIN_USES_MUSL
depends on BR2_USE_MMU
diff --git a/package/rt-tests/rt-tests.mk b/package/rt-tests/rt-tests.mk
index 1433106..6e42de1 100644
--- a/package/rt-tests/rt-tests.mk
+++ b/package/rt-tests/rt-tests.mk
@@ -14,15 +14,19 @@ ifeq ($(BR2_PACKAGE_PYTHON),y)
RT_TESTS_DEPENDENCIES = python
endif
-# Deadline scheduler syscalls are not defined on SuperH.
# Remove pi_stress which depends on deadline scheduler syscalls.
-ifeq ($(BR2_sh),y)
define RT_TESTS_REMOVE_RT_SCHED_API
$(SED) "s/rt-sched.o//" $(@D)/Makefile
$(SED) "s/pi_stress.c//" $(@D)/Makefile
endef
-endif
+
+# Deadline scheduler syscalls are not defined on SuperH.
+# Deadline scheduler syscalls needs a toolchain w/ headers >= 3.14.
+ifeq ($(BR2_sh),y)
RT_TESTS_POST_PATCH_HOOKS += RT_TESTS_REMOVE_RT_SCHED_API
+else ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14),)
+RT_TESTS_POST_PATCH_HOOKS += RT_TESTS_REMOVE_RT_SCHED_API
+endif
define RT_TESTS_BUILD_CMDS
$(MAKE) -C $(@D) \
--
2.5.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/2] package/rt-tests: remove sched_setattr/sched_getattr API for SuperH arch
2016-08-07 22:03 [Buildroot] [PATCH 1/2] package/rt-tests: remove sched_setattr/sched_getattr API for SuperH arch Romain Naour
2016-08-07 22:03 ` [Buildroot] [PATCH 2/2] package/rt-tests: remove dependency on headers >= 3.14 Romain Naour
@ 2016-08-08 4:42 ` Baruch Siach
2016-08-09 10:34 ` Romain Naour
1 sibling, 1 reply; 6+ messages in thread
From: Baruch Siach @ 2016-08-08 4:42 UTC (permalink / raw)
To: buildroot
Hi Romain,
On Mon, Aug 08, 2016 at 12:03:17AM +0200, Romain Naour wrote:
> This commit remove rt-sched.o from librttest and pi_stress test program
> only for SuperH arch which doesn't have __NR_sched_setattr and
> __NR_sched_getattr syscalls defined.
>
> Patch [1] adding these syscalls has not been merged in upstream kernel
> (4.7).
But these syscalls were added for 4.8-rc1 (commit 74bdaa611fa69). This
solution prevents sched_{set,get}attr use even for future v4.8+ kernels.
baruch
> Fixes:
> http://autobuild.buildroot.net/results/67fc16366717f34df492683a14ecd23376e23110
>
> [1] http://www.spinics.net/lists/linux-sh/msg41990.html
>
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> ---
> package/rt-tests/rt-tests.mk | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/package/rt-tests/rt-tests.mk b/package/rt-tests/rt-tests.mk
> index 19f1021..1433106 100644
> --- a/package/rt-tests/rt-tests.mk
> +++ b/package/rt-tests/rt-tests.mk
> @@ -14,6 +14,16 @@ ifeq ($(BR2_PACKAGE_PYTHON),y)
> RT_TESTS_DEPENDENCIES = python
> endif
>
> +# Deadline scheduler syscalls are not defined on SuperH.
> +# Remove pi_stress which depends on deadline scheduler syscalls.
> +ifeq ($(BR2_sh),y)
> +define RT_TESTS_REMOVE_RT_SCHED_API
> + $(SED) "s/rt-sched.o//" $(@D)/Makefile
> + $(SED) "s/pi_stress.c//" $(@D)/Makefile
> +endef
> +endif
> +RT_TESTS_POST_PATCH_HOOKS += RT_TESTS_REMOVE_RT_SCHED_API
> +
> define RT_TESTS_BUILD_CMDS
> $(MAKE) -C $(@D) \
> CC="$(TARGET_CC)" \
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/2] package/rt-tests: remove sched_setattr/sched_getattr API for SuperH arch
2016-08-08 4:42 ` [Buildroot] [PATCH 1/2] package/rt-tests: remove sched_setattr/sched_getattr API for SuperH arch Baruch Siach
@ 2016-08-09 10:34 ` Romain Naour
2016-08-09 18:30 ` Baruch Siach
0 siblings, 1 reply; 6+ messages in thread
From: Romain Naour @ 2016-08-09 10:34 UTC (permalink / raw)
To: buildroot
Hi Baruch,
Le 08/08/2016 ? 06:42, Baruch Siach a ?crit :
> Hi Romain,
>
> On Mon, Aug 08, 2016 at 12:03:17AM +0200, Romain Naour wrote:
>> This commit remove rt-sched.o from librttest and pi_stress test program
>> only for SuperH arch which doesn't have __NR_sched_setattr and
>> __NR_sched_getattr syscalls defined.
>>
>> Patch [1] adding these syscalls has not been merged in upstream kernel
>> (4.7).
>
> But these syscalls were added for 4.8-rc1 (commit 74bdaa611fa69). This
> solution prevents sched_{set,get}attr use even for future v4.8+ kernels.
Thanks for this info, I haven't checked the upcoming 4.8 kernel.
However, it means that pi_stress should depends on BR2_sh and
BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8. But this symbol doesn't exist yet in Buildroot.
I think this patch can be commited as is (kernel 4.8 will be released after
2016.08) and the dependency on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8 can be added
in a follow up patch.
At least, I can improve the commit log with this info :)
Best regards,
Romain
>
> baruch
>
>> Fixes:
>> http://autobuild.buildroot.net/results/67fc16366717f34df492683a14ecd23376e23110
>>
>> [1] http://www.spinics.net/lists/linux-sh/msg41990.html
>>
>> Signed-off-by: Romain Naour <romain.naour@gmail.com>
>> ---
>> package/rt-tests/rt-tests.mk | 10 ++++++++++
>> 1 file changed, 10 insertions(+)
>>
>> diff --git a/package/rt-tests/rt-tests.mk b/package/rt-tests/rt-tests.mk
>> index 19f1021..1433106 100644
>> --- a/package/rt-tests/rt-tests.mk
>> +++ b/package/rt-tests/rt-tests.mk
>> @@ -14,6 +14,16 @@ ifeq ($(BR2_PACKAGE_PYTHON),y)
>> RT_TESTS_DEPENDENCIES = python
>> endif
>>
>> +# Deadline scheduler syscalls are not defined on SuperH.
>> +# Remove pi_stress which depends on deadline scheduler syscalls.
>> +ifeq ($(BR2_sh),y)
>> +define RT_TESTS_REMOVE_RT_SCHED_API
>> + $(SED) "s/rt-sched.o//" $(@D)/Makefile
>> + $(SED) "s/pi_stress.c//" $(@D)/Makefile
>> +endef
>> +endif
>> +RT_TESTS_POST_PATCH_HOOKS += RT_TESTS_REMOVE_RT_SCHED_API
>> +
>> define RT_TESTS_BUILD_CMDS
>> $(MAKE) -C $(@D) \
>> CC="$(TARGET_CC)" \
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/2] package/rt-tests: remove sched_setattr/sched_getattr API for SuperH arch
2016-08-09 10:34 ` Romain Naour
@ 2016-08-09 18:30 ` Baruch Siach
2016-08-15 15:59 ` Romain Naour
0 siblings, 1 reply; 6+ messages in thread
From: Baruch Siach @ 2016-08-09 18:30 UTC (permalink / raw)
To: buildroot
Hi Romain,
On Tue, Aug 09, 2016 at 12:34:24PM +0200, Romain Naour wrote:
> Le 08/08/2016 ? 06:42, Baruch Siach a ?crit :
> > On Mon, Aug 08, 2016 at 12:03:17AM +0200, Romain Naour wrote:
> >> This commit remove rt-sched.o from librttest and pi_stress test program
> >> only for SuperH arch which doesn't have __NR_sched_setattr and
> >> __NR_sched_getattr syscalls defined.
> >>
> >> Patch [1] adding these syscalls has not been merged in upstream kernel
> >> (4.7).
> >
> > But these syscalls were added for 4.8-rc1 (commit 74bdaa611fa69). This
> > solution prevents sched_{set,get}attr use even for future v4.8+ kernels.
>
> Thanks for this info, I haven't checked the upcoming 4.8 kernel.
>
> However, it means that pi_stress should depends on BR2_sh and
> BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8. But this symbol doesn't exist yet in Buildroot.
>
> I think this patch can be commited as is (kernel 4.8 will be released after
> 2016.08) and the dependency on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8 can be added
> in a follow up patch.
Alternatively, you may patch src/include/rt-sched.h to add sh syscall numbers,
in addition to the existing i386, x86_64, and ARM ones. That would fix the
current build issue, and would also be future proof. Such a patch might even
be acceptable upstream.
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/2] package/rt-tests: remove sched_setattr/sched_getattr API for SuperH arch
2016-08-09 18:30 ` Baruch Siach
@ 2016-08-15 15:59 ` Romain Naour
0 siblings, 0 replies; 6+ messages in thread
From: Romain Naour @ 2016-08-15 15:59 UTC (permalink / raw)
To: buildroot
Hi Baruch,
Le 09/08/2016 ? 20:30, Baruch Siach a ?crit :
> Hi Romain,
>
> On Tue, Aug 09, 2016 at 12:34:24PM +0200, Romain Naour wrote:
>> Le 08/08/2016 ? 06:42, Baruch Siach a ?crit :
>>> On Mon, Aug 08, 2016 at 12:03:17AM +0200, Romain Naour wrote:
>>>> This commit remove rt-sched.o from librttest and pi_stress test program
>>>> only for SuperH arch which doesn't have __NR_sched_setattr and
>>>> __NR_sched_getattr syscalls defined.
>>>>
>>>> Patch [1] adding these syscalls has not been merged in upstream kernel
>>>> (4.7).
>>>
>>> But these syscalls were added for 4.8-rc1 (commit 74bdaa611fa69). This
>>> solution prevents sched_{set,get}attr use even for future v4.8+ kernels.
>>
>> Thanks for this info, I haven't checked the upcoming 4.8 kernel.
>>
>> However, it means that pi_stress should depends on BR2_sh and
>> BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8. But this symbol doesn't exist yet in Buildroot.
>>
>> I think this patch can be commited as is (kernel 4.8 will be released after
>> 2016.08) and the dependency on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8 can be added
>> in a follow up patch.
>
> Alternatively, you may patch src/include/rt-sched.h to add sh syscall numbers,
> in addition to the existing i386, x86_64, and ARM ones. That would fix the
> current build issue, and would also be future proof. Such a patch might even
> be acceptable upstream.
Ok thanks, I'll do that.
I think I'll keep the kernel headers dependency on 3.14 since the next rt-tests
version will add two new test program for SCHED_DEADLINE (cyclicdeadline and
deadline_test). So RT_TESTS_REMOVE_RT_SCHED_API would be updated on each version
bump.
Best regards,
Romain
>
> baruch
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-08-15 15:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-07 22:03 [Buildroot] [PATCH 1/2] package/rt-tests: remove sched_setattr/sched_getattr API for SuperH arch Romain Naour
2016-08-07 22:03 ` [Buildroot] [PATCH 2/2] package/rt-tests: remove dependency on headers >= 3.14 Romain Naour
2016-08-08 4:42 ` [Buildroot] [PATCH 1/2] package/rt-tests: remove sched_setattr/sched_getattr API for SuperH arch Baruch Siach
2016-08-09 10:34 ` Romain Naour
2016-08-09 18:30 ` Baruch Siach
2016-08-15 15:59 ` Romain Naour
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox