Message ID | 1406680317-20189-7-git-send-email-gratian.crisan@ni.com |
---|---|
State | Superseded |
Headers | show |
On Tue, 29 Jul 2014, gratian.crisan@ni.com wrote: > From: Gratian Crisan <gratian.crisan@ni.com> > > ARM linux kernels before 3.14.3 may or may not support > futex_atomic_cmpxchg_inatomic depending on the kernel configuration > (e.g. CONFIG_CPU_USE_DOMAINS && CONFIG_SMP configuration was not supported) > > Starting with 3.14.3 the linux kernel unconditionally enables support for > ARM, and this re-enables the relevant __ASSUME_* macros. It's a bad idea to put a patch like this in a patch series for some other issue - if a patch can be justified on its own, it should be submitted on its own, so that concerns about the rest of the patch series, or difficulty in getting the rest of the series reviewed, does not affect the patch in question. > diff --git a/sysdeps/unix/sysv/linux/arm/kernel-features.h b/sysdeps/unix/sysv/linux/arm/kernel-features.h > index e755741..dd50cbf 100644 > --- a/sysdeps/unix/sysv/linux/arm/kernel-features.h > +++ b/sysdeps/unix/sysv/linux/arm/kernel-features.h > @@ -32,11 +32,13 @@ > # define __ASSUME_SENDMMSG_SYSCALL 1 > #endif > > -#include_next <kernel-features.h> > - > -/* The ARM kernel may or may not support > +/* The ARM kernel before 3.14.3 may or may not support > futex_atomic_cmpxchg_inatomic, depending on kernel > configuration. */ > -#undef __ASSUME_FUTEX_LOCK_PI > -#undef __ASSUME_REQUEUE_PI > -#undef __ASSUME_SET_ROBUST_LIST > +#if __LINUX_KERNEL_VERSION < 0x030E03 > +# undef __ASSUME_FUTEX_LOCK_PI > +# undef __ASSUME_REQUEUE_PI > +# undef __ASSUME_SET_ROBUST_LIST > +#endif > + > +#include_next <kernel-features.h> This move of the #include_next certainly seems wrong - the #undef is only effective when it comes after the #include_next. Could you resubmit the patch without that move?
> From: "Joseph S. Myers" <joseph@codesourcery.com> > > On Tue, 29 Jul 2014, gratian.crisan@ni.com wrote: > > > From: Gratian Crisan <gratian.crisan@ni.com> > > > > ARM linux kernels before 3.14.3 may or may not support > > futex_atomic_cmpxchg_inatomic depending on the kernel configuration > > (e.g. CONFIG_CPU_USE_DOMAINS && CONFIG_SMP configuration was not supported) > > > > Starting with 3.14.3 the linux kernel unconditionally enables support for > > ARM, and this re-enables the relevant __ASSUME_* macros. > > It's a bad idea to put a patch like this in a patch series for some other > issue - if a patch can be justified on its own, it should be submitted on > its own, so that concerns about the rest of the patch series, or > difficulty in getting the rest of the series reviewed, does not affect the > patch in question. Good point, will re-submit as a stand-alone patch. > > diff --git a/sysdeps/unix/sysv/linux/arm/kernel-features.h b/ > sysdeps/unix/sysv/linux/arm/kernel-features.h > > index e755741..dd50cbf 100644 > > --- a/sysdeps/unix/sysv/linux/arm/kernel-features.h > > +++ b/sysdeps/unix/sysv/linux/arm/kernel-features.h > > @@ -32,11 +32,13 @@ > > # define __ASSUME_SENDMMSG_SYSCALL 1 > > #endif > > > > -#include_next <kernel-features.h> > > - > > -/* The ARM kernel may or may not support > > +/* The ARM kernel before 3.14.3 may or may not support > > futex_atomic_cmpxchg_inatomic, depending on kernel > > configuration. */ > > -#undef __ASSUME_FUTEX_LOCK_PI > > -#undef __ASSUME_REQUEUE_PI > > -#undef __ASSUME_SET_ROBUST_LIST > > +#if __LINUX_KERNEL_VERSION < 0x030E03 > > +# undef __ASSUME_FUTEX_LOCK_PI > > +# undef __ASSUME_REQUEUE_PI > > +# undef __ASSUME_SET_ROBUST_LIST > > +#endif > > + > > +#include_next <kernel-features.h> > > This move of the #include_next certainly seems wrong - the #undef is only > effective when it comes after the #include_next. > > Could you resubmit the patch without that move? Updated patch on the way. Thanks, Gratian
diff --git a/sysdeps/unix/sysv/linux/arm/kernel-features.h b/sysdeps/unix/sysv/linux/arm/kernel-features.h index e755741..dd50cbf 100644 --- a/sysdeps/unix/sysv/linux/arm/kernel-features.h +++ b/sysdeps/unix/sysv/linux/arm/kernel-features.h @@ -32,11 +32,13 @@ # define __ASSUME_SENDMMSG_SYSCALL 1 #endif -#include_next <kernel-features.h> - -/* The ARM kernel may or may not support +/* The ARM kernel before 3.14.3 may or may not support futex_atomic_cmpxchg_inatomic, depending on kernel configuration. */ -#undef __ASSUME_FUTEX_LOCK_PI -#undef __ASSUME_REQUEUE_PI -#undef __ASSUME_SET_ROBUST_LIST +#if __LINUX_KERNEL_VERSION < 0x030E03 +# undef __ASSUME_FUTEX_LOCK_PI +# undef __ASSUME_REQUEUE_PI +# undef __ASSUME_SET_ROBUST_LIST +#endif + +#include_next <kernel-features.h>