build failure
Hi All,
I've just tried v4.1.2-rt1 RT-patch set and got below build failure:
CC kernel/pid_namespace.o
In file included from kernel/pid_namespace.c:11:0:include/linux/pid.h: In function 'get_pid':include/linux/pid.h:78:3: error: implicit declaration of function 'atomic_inc' [-Werror=implicit-function-declaration]
atomic_inc(&pid->count);
^
CC drivers/base/regmap/regcache-flat.o
CC fs/lockd/xdr4.o
cc1: some warnings being treated as errors
CC drivers/base/regmap/regmap-debugfs.o
make[1]: *** [kernel/pid_namespace.o] Error 1
make: *** [kernel] Error 2
make: *** Waiting for unfinished jobs....
I identified that it's reproduced in caseCONFIG_PROVE_LOCKING=nCONFIG_DEBUG_SPINLOCK=nCONFIG_DEBUG_MUTEXES=nCONFIG_DEBUG_LOCK_ALLOC=n
The same is not reproduced without RT-patch set.
The below diff fixes an issue for me:
include/linux/pid.h +1 -0
@@ -2,6 +2,7 @@#define _LINUX_PID_H#include <linux/rcupdate.h> +#include <linux/atomic.h> enum pid_type {
[1] https://lkml.org/lkml/2015/7/14/389
Signature · 2 lines
regards, -grygorii
Quoted 6 lines · * Grygorii Strashko | 2015-07-17 19:47:30 [+0300]:
CC
kernel/pid_namespace.o
In file included fromkernel/pid_namespace.c:11:0:include/linux/pid.h: In function 'get_pid':include/linux/pid.h:78:3: error: implicit declaration of function 'atomic_inc' [-Werror=implicit-function-declaration]
atomic_inc(&pid->count);
^
this is one of the patches I've thrown away because it looked not needed. On vanilla this header gets sucked in via include/linux/spinlock.h but on -RT we don't need it and we get this.
Quoted 11 lines
The below diff fixes an issue for me:
include/linux/pid.h +1
-0@@ -2,6 +2,7 @@#define _LINUX_PID_H#include <linux/rcupdate.h> +#include <linux/atomic.h>
Quoted 2 lines
enum
pid_type
{
If you manage so send me this as a proper patch then I could include it into the patchset.
Sebastian