Skip to content

Comments

muqss: fix lockdep-enabled build#2

Merged
ckolivas merged 1 commit intockolivas:4.12-ckfrom
sergey-senozhatsky:4.12-ck
Aug 17, 2017
Merged

muqss: fix lockdep-enabled build#2
ckolivas merged 1 commit intockolivas:4.12-ckfrom
sergey-senozhatsky:4.12-ck

Conversation

@sergey-senozhatsky
Copy link

Fix by passing rq->lock pointer to lockdep_is_held():

In file included from ./arch/x86/include/asm/bug.h:81:0,
from ./include/linux/bug.h:4,
from ./include/linux/thread_info.h:11,
from ./arch/x86/include/asm/preempt.h:6,
from ./include/linux/preempt.h:80,
from ./include/linux/spinlock.h:50,
from ./include/linux/rcupdate.h:38,
from ./include/linux/rculist.h:10,
from ./include/linux/pid.h:4,
from ./include/linux/sched.h:13,
from kernel/sched/MuQSS.c:33:
kernel/sched/MuQSS.c: In function ‘set_task_cpu’:
./include/linux/lockdep.h:351:52: error: invalid type argument of ‘->’ (have ‘raw_spinlock_t {aka struct raw_spinlock}’)
#define lockdep_is_held(lock) lock_is_held(&(lock)->dep_map)
^~
./include/asm-generic/bug.h:65:25: note: in definition of macro ‘WARN_ON_ONCE’
int __ret_warn_on = !!(condition);
^~~~~~~~~
kernel/sched/MuQSS.c:1275:11: note: in expansion of macro ‘lockdep_is_held’
lockdep_is_held(rq->lock)));
^~~~~~~~~~~~~~~

Signed-off-by: Sergey Senozhatsky sergey.senozhatsky@gmail.com

Fix by passing rq->lock pointer to lockdep_is_held():

In file included from ./arch/x86/include/asm/bug.h:81:0,
                 from ./include/linux/bug.h:4,
                 from ./include/linux/thread_info.h:11,
                 from ./arch/x86/include/asm/preempt.h:6,
                 from ./include/linux/preempt.h:80,
                 from ./include/linux/spinlock.h:50,
                 from ./include/linux/rcupdate.h:38,
                 from ./include/linux/rculist.h:10,
                 from ./include/linux/pid.h:4,
                 from ./include/linux/sched.h:13,
                 from kernel/sched/MuQSS.c:33:
kernel/sched/MuQSS.c: In function ‘set_task_cpu’:
./include/linux/lockdep.h:351:52: error: invalid type argument of ‘->’ (have ‘raw_spinlock_t {aka struct raw_spinlock}’)
 #define lockdep_is_held(lock)  lock_is_held(&(lock)->dep_map)
                                                    ^~
./include/asm-generic/bug.h:65:25: note: in definition of macro ‘WARN_ON_ONCE’
  int __ret_warn_on = !!(condition);   \
                         ^~~~~~~~~
kernel/sched/MuQSS.c:1275:11: note: in expansion of macro ‘lockdep_is_held’
           lockdep_is_held(rq->lock)));
           ^~~~~~~~~~~~~~~

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
@ckolivas ckolivas merged commit 35a433c into ckolivas:4.12-ck Aug 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants