[PATCH] locking/ww_mutex: add ww_mutex_is_owned_by function v4

kbuild test robot lkp at intel.com
Tue Feb 20 19:15:07 UTC 2018


Hi Christian,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.16-rc2 next-20180220]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Christian-K-nig/locking-ww_mutex-add-ww_mutex_is_owned_by-function-v4/20180221-021317
config: microblaze-mmu_defconfig (attached as .config)
compiler: microblaze-linux-gcc (GCC) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=microblaze 

All error/warnings (new ones prefixed by >>):

   In file included from kernel/locking/mutex.c:21:0:
   include/linux/ww_mutex.h: In function 'ww_mutex_is_owned_by':
   include/linux/ww_mutex.h:380:0: error: unterminated argument list invoking macro "likely"
    #endif
    
   include/linux/ww_mutex.h:377:3: error: 'likely' undeclared (first use in this function)
      likely(READ_ONCE(lock->ctx) == NULL;
      ^~~~~~
   include/linux/ww_mutex.h:377:3: note: each undeclared identifier is reported only once for each function it appears in
   In file included from include/linux/thread_info.h:13:0,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/microblaze/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:81,
                    from include/linux/rcupdate.h:40,
                    from include/linux/rculist.h:11,
                    from include/linux/sched/signal.h:5,
                    from kernel/locking/mutex.c:22:
   include/linux/restart_block.h:11:1: error: expected ';' before 'struct'
    struct timespec;
    ^~~~~~
   include/linux/restart_block.h:12:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
    struct compat_timespec;
    ^~~~~~
   In file included from include/linux/thread_info.h:38:0,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/microblaze/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:81,
                    from include/linux/rcupdate.h:40,
                    from include/linux/rculist.h:11,
                    from include/linux/sched/signal.h:5,
                    from kernel/locking/mutex.c:22:
>> arch/microblaze/include/asm/thread_info.h:90:35: error: invalid storage class for function 'current_thread_info'
    static inline struct thread_info *current_thread_info(void)
                                      ^~~~~~~~~~~~~~~~~~~
   In file included from include/asm-generic/preempt.h:5:0,
                    from ./arch/microblaze/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:81,
                    from include/linux/rcupdate.h:40,
                    from include/linux/rculist.h:11,
                    from include/linux/sched/signal.h:5,
                    from kernel/locking/mutex.c:22:
   include/linux/thread_info.h:57:20: error: invalid storage class for function 'set_ti_thread_flag'
    static inline void set_ti_thread_flag(struct thread_info *ti, int flag)
                       ^~~~~~~~~~~~~~~~~~
   include/linux/thread_info.h:62:20: error: invalid storage class for function 'clear_ti_thread_flag'
    static inline void clear_ti_thread_flag(struct thread_info *ti, int flag)
                       ^~~~~~~~~~~~~~~~~~~~
   include/linux/thread_info.h:67:19: error: invalid storage class for function 'test_and_set_ti_thread_flag'
    static inline int test_and_set_ti_thread_flag(struct thread_info *ti, int flag)
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/thread_info.h:72:19: error: invalid storage class for function 'test_and_clear_ti_thread_flag'
    static inline int test_and_clear_ti_thread_flag(struct thread_info *ti, int flag)
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/thread_info.h:77:19: error: invalid storage class for function 'test_ti_thread_flag'
    static inline int test_ti_thread_flag(struct thread_info *ti, int flag)
                      ^~~~~~~~~~~~~~~~~~~
   include/linux/thread_info.h:96:19: error: invalid storage class for function 'arch_within_stack_frames'
    static inline int arch_within_stack_frames(const void * const stack,
                      ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/thread_info.h:115:20: error: invalid storage class for function 'check_object_size'
    static inline void check_object_size(const void *ptr, unsigned long n,
                       ^~~~~~~~~~~~~~~~~
   include/linux/thread_info.h:125:20: error: invalid storage class for function 'copy_overflow'
    static inline void copy_overflow(int size, unsigned long count)
                       ^~~~~~~~~~~~~
   include/linux/thread_info.h:131:1: error: invalid storage class for function 'check_copy_size'
    check_copy_size(const void *addr, size_t bytes, bool is_source)
    ^~~~~~~~~~~~~~~
   include/linux/thread_info.h:148:20: error: invalid storage class for function 'arch_setup_new_exec'
    static inline void arch_setup_new_exec(void) { }
                       ^~~~~~~~~~~~~~~~~~~
   In file included from ./arch/microblaze/include/generated/asm/preempt.h:1:0,
                    from include/linux/preempt.h:81,
                    from include/linux/rcupdate.h:40,
                    from include/linux/rculist.h:11,
                    from include/linux/sched/signal.h:5,
                    from kernel/locking/mutex.c:22:
   include/asm-generic/preempt.h:9:28: error: invalid storage class for function 'preempt_count'
    static __always_inline int preempt_count(void)
                               ^~~~~~~~~~~~~
   include/asm-generic/preempt.h:14:38: error: invalid storage class for function 'preempt_count_ptr'
    static __always_inline volatile int *preempt_count_ptr(void)
                                         ^~~~~~~~~~~~~~~~~
   include/asm-generic/preempt.h:19:29: error: invalid storage class for function 'preempt_count_set'
    static __always_inline void preempt_count_set(int pc)
                                ^~~~~~~~~~~~~~~~~
   include/asm-generic/preempt.h:35:29: error: invalid storage class for function 'set_preempt_need_resched'
    static __always_inline void set_preempt_need_resched(void)
                                ^~~~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/preempt.h:39:29: error: invalid storage class for function 'clear_preempt_need_resched'
    static __always_inline void clear_preempt_need_resched(void)
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/preempt.h:43:29: error: invalid storage class for function 'test_preempt_need_resched'
    static __always_inline bool test_preempt_need_resched(void)
                                ^~~~~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/preempt.h:52:29: error: invalid storage class for function '__preempt_count_add'
    static __always_inline void __preempt_count_add(int val)
                                ^~~~~~~~~~~~~~~~~~~
   include/asm-generic/preempt.h:57:29: error: invalid storage class for function '__preempt_count_sub'
    static __always_inline void __preempt_count_sub(int val)
                                ^~~~~~~~~~~~~~~~~~~
   include/asm-generic/preempt.h:62:29: error: invalid storage class for function '__preempt_count_dec_and_test'
    static __always_inline bool __preempt_count_dec_and_test(void)
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/preempt.h:75:29: error: invalid storage class for function 'should_resched'
    static __always_inline bool should_resched(int preempt_offset)
                                ^~~~~~~~~~~~~~
   In file included from include/linux/rcupdate.h:41:0,
                    from include/linux/rculist.h:11,
                    from include/linux/sched/signal.h:5,
                    from kernel/locking/mutex.c:22:
   include/linux/bottom_half.h:10:29: error: invalid storage class for function '__local_bh_disable_ip'
    static __always_inline void __local_bh_disable_ip(unsigned long ip, unsigned int cnt)
                                ^~~~~~~~~~~~~~~~~~~~~
   include/linux/bottom_half.h:17:20: error: invalid storage class for function 'local_bh_disable'
    static inline void local_bh_disable(void)
                       ^~~~~~~~~~~~~~~~
   include/linux/bottom_half.h:25:20: error: invalid storage class for function 'local_bh_enable_ip'
    static inline void local_bh_enable_ip(unsigned long ip)
                       ^~~~~~~~~~~~~~~~~~
   include/linux/bottom_half.h:30:20: error: invalid storage class for function 'local_bh_enable'
    static inline void local_bh_enable(void)
                       ^~~~~~~~~~~~~~~
   In file included from include/linux/bitmap.h:9:0,
                    from include/linux/cpumask.h:12,
                    from include/linux/rcupdate.h:44,
                    from include/linux/rculist.h:11,
                    from include/linux/sched/signal.h:5,
                    from kernel/locking/mutex.c:22:
   include/linux/string.h:71:34: error: invalid storage class for function 'strstrip'
    static inline __must_check char *strstrip(char *str)
                                     ^~~~~~~~
--
                      ^~~~~~~~~~~~~
   include/linux/cpumask.h:637:19: error: invalid storage class for function 'cpulist_parse'
    static inline int cpulist_parse(const char *buf, struct cpumask *dstp)
                      ^~~~~~~~~~~~~
   include/linux/cpumask.h:645:28: error: invalid storage class for function 'cpumask_size'
    static inline unsigned int cpumask_size(void)
                               ^~~~~~~~~~~~
   include/linux/cpumask.h:715:20: error: invalid storage class for function 'alloc_cpumask_var'
    static inline bool alloc_cpumask_var(cpumask_var_t *mask, gfp_t flags)
                       ^~~~~~~~~~~~~~~~~
   include/linux/cpumask.h:720:20: error: invalid storage class for function 'alloc_cpumask_var_node'
    static inline bool alloc_cpumask_var_node(cpumask_var_t *mask, gfp_t flags,
                       ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/cpumask.h:726:20: error: invalid storage class for function 'zalloc_cpumask_var'
    static inline bool zalloc_cpumask_var(cpumask_var_t *mask, gfp_t flags)
                       ^~~~~~~~~~~~~~~~~~
   include/linux/cpumask.h:732:20: error: invalid storage class for function 'zalloc_cpumask_var_node'
    static inline bool zalloc_cpumask_var_node(cpumask_var_t *mask, gfp_t flags,
                       ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/cpumask.h:739:20: error: invalid storage class for function 'alloc_bootmem_cpumask_var'
    static inline void alloc_bootmem_cpumask_var(cpumask_var_t *mask)
                       ^~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/cpumask.h:743:20: error: invalid storage class for function 'free_cpumask_var'
    static inline void free_cpumask_var(cpumask_var_t mask)
                       ^~~~~~~~~~~~~~~~
   include/linux/cpumask.h:747:20: error: invalid storage class for function 'free_bootmem_cpumask_var'
    static inline void free_bootmem_cpumask_var(cpumask_var_t mask)
                       ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/cpumask.h:751:20: error: invalid storage class for function 'cpumask_available'
    static inline bool cpumask_available(cpumask_var_t mask)
                       ^~~~~~~~~~~~~~~~~
   include/linux/cpumask.h:774:20: error: invalid storage class for function 'reset_cpu_possible_mask'
    static inline void reset_cpu_possible_mask(void)
                       ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/cpumask.h:780:1: error: invalid storage class for function 'set_cpu_possible'
    set_cpu_possible(unsigned int cpu, bool possible)
    ^~~~~~~~~~~~~~~~
   include/linux/cpumask.h:789:1: error: invalid storage class for function 'set_cpu_present'
    set_cpu_present(unsigned int cpu, bool present)
    ^~~~~~~~~~~~~~~
   include/linux/cpumask.h:798:1: error: invalid storage class for function 'set_cpu_online'
    set_cpu_online(unsigned int cpu, bool online)
    ^~~~~~~~~~~~~~
   include/linux/cpumask.h:807:1: error: invalid storage class for function 'set_cpu_active'
    set_cpu_active(unsigned int cpu, bool active)
    ^~~~~~~~~~~~~~
   include/linux/cpumask.h:830:19: error: invalid storage class for function '__check_is_bitmap'
    static inline int __check_is_bitmap(const unsigned long *bitmap)
                      ^~~~~~~~~~~~~~~~~
   include/linux/cpumask.h:845:37: error: invalid storage class for function 'get_cpu_mask'
    static inline const struct cpumask *get_cpu_mask(unsigned int cpu)
                                        ^~~~~~~~~~~~
   include/linux/cpumask.h:880:1: error: invalid storage class for function 'cpumap_print_to_pagebuf'
    cpumap_print_to_pagebuf(bool list, char *buf, const struct cpumask *mask)
    ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/rculist.h:11:0,
                    from include/linux/sched/signal.h:5,
                    from kernel/locking/mutex.c:22:
   include/linux/rcupdate.h:80:20: error: invalid storage class for function '__rcu_read_lock'
    static inline void __rcu_read_lock(void)
                       ^~~~~~~~~~~~~~~
   include/linux/rcupdate.h:86:20: error: invalid storage class for function '__rcu_read_unlock'
    static inline void __rcu_read_unlock(void)
                       ^~~~~~~~~~~~~~~~~
   include/linux/rcupdate.h:92:20: error: invalid storage class for function 'synchronize_rcu'
    static inline void synchronize_rcu(void)
                       ^~~~~~~~~~~~~~~
   include/linux/rcupdate.h:97:19: error: invalid storage class for function 'rcu_preempt_depth'
    static inline int rcu_preempt_depth(void)
                      ^~~~~~~~~~~~~~~~~
   include/linux/rcupdate.h:118:20: error: invalid storage class for function 'rcu_sysrq_start'
    static inline void rcu_sysrq_start(void) { }
                       ^~~~~~~~~~~~~~~
   include/linux/rcupdate.h:119:20: error: invalid storage class for function 'rcu_sysrq_end'
    static inline void rcu_sysrq_end(void) { }
                       ^~~~~~~~~~~~~
   include/linux/rcupdate.h:126:20: error: invalid storage class for function 'rcu_user_enter'
    static inline void rcu_user_enter(void) { }
                       ^~~~~~~~~~~~~~
   include/linux/rcupdate.h:127:20: error: invalid storage class for function 'rcu_user_exit'
    static inline void rcu_user_exit(void) { }
                       ^~~~~~~~~~~~~
   include/linux/rcupdate.h:133:20: error: invalid storage class for function 'rcu_init_nohz'
    static inline void rcu_init_nohz(void) { }
                       ^~~~~~~~~~~~~
   include/linux/rcupdate.h:186:20: error: invalid storage class for function 'exit_tasks_rcu_start'
    static inline void exit_tasks_rcu_start(void) { }
                       ^~~~~~~~~~~~~~~~~~~~
   include/linux/rcupdate.h:187:20: error: invalid storage class for function 'exit_tasks_rcu_finish'
    static inline void exit_tasks_rcu_finish(void) { }
                       ^~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/spinlock.h:90:0,
                    from include/linux/seqlock.h:36,
                    from include/linux/time.h:6,
                    from include/linux/ktime.h:24,
                    from include/linux/rcutiny.h:28,
                    from include/linux/rcupdate.h:211,
                    from include/linux/rculist.h:11,
                    from include/linux/sched/signal.h:5,
                    from kernel/locking/mutex.c:22:
>> include/linux/spinlock_up.h:29:20: error: invalid storage class for function 'arch_spin_lock'
    static inline void arch_spin_lock(arch_spinlock_t *lock)
                       ^~~~~~~~~~~~~~
>> include/linux/spinlock_up.h:35:19: error: invalid storage class for function 'arch_spin_trylock'
    static inline int arch_spin_trylock(arch_spinlock_t *lock)
                      ^~~~~~~~~~~~~~~~~
>> include/linux/spinlock_up.h:45:20: error: invalid storage class for function 'arch_spin_unlock'
    static inline void arch_spin_unlock(arch_spinlock_t *lock)
                       ^~~~~~~~~~~~~~~~
   In file included from include/linux/spinlock.h:288:0,
                    from include/linux/seqlock.h:36,
                    from include/linux/time.h:6,
                    from include/linux/ktime.h:24,
                    from include/linux/rcutiny.h:28,
                    from include/linux/rcupdate.h:211,
                    from include/linux/rculist.h:11,
                    from include/linux/sched/signal.h:5,
                    from kernel/locking/mutex.c:22:
>> include/linux/spinlock_api_smp.h:86:19: error: invalid storage class for function '__raw_spin_trylock'
    static inline int __raw_spin_trylock(raw_spinlock_t *lock)
                      ^~~~~~~~~~~~~~~~~~
>> include/linux/spinlock_api_smp.h:104:29: error: invalid storage class for function '__raw_spin_lock_irqsave'
    static inline unsigned long __raw_spin_lock_irqsave(raw_spinlock_t *lock)
                                ^~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/spinlock_api_smp.h:124:20: error: invalid storage class for function '__raw_spin_lock_irq'
    static inline void __raw_spin_lock_irq(raw_spinlock_t *lock)
                       ^~~~~~~~~~~~~~~~~~~
>> include/linux/spinlock_api_smp.h:132:20: error: invalid storage class for function '__raw_spin_lock_bh'
    static inline void __raw_spin_lock_bh(raw_spinlock_t *lock)
                       ^~~~~~~~~~~~~~~~~~
>> include/linux/spinlock_api_smp.h:139:20: error: invalid storage class for function '__raw_spin_lock'
    static inline void __raw_spin_lock(raw_spinlock_t *lock)
                       ^~~~~~~~~~~~~~~
>> include/linux/spinlock_api_smp.h:148:20: error: invalid storage class for function '__raw_spin_unlock'
    static inline void __raw_spin_unlock(raw_spinlock_t *lock)
                       ^~~~~~~~~~~~~~~~~
>> include/linux/spinlock_api_smp.h:155:20: error: invalid storage class for function '__raw_spin_unlock_irqrestore'
    static inline void __raw_spin_unlock_irqrestore(raw_spinlock_t *lock,
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/spinlock_api_smp.h:164:20: error: invalid storage class for function '__raw_spin_unlock_irq'
    static inline void __raw_spin_unlock_irq(raw_spinlock_t *lock)
                       ^~~~~~~~~~~~~~~~~~~~~
>> include/linux/spinlock_api_smp.h:172:20: error: invalid storage class for function '__raw_spin_unlock_bh'
    static inline void __raw_spin_unlock_bh(raw_spinlock_t *lock)
                       ^~~~~~~~~~~~~~~~~~~~
>> include/linux/spinlock_api_smp.h:179:19: error: invalid storage class for function '__raw_spin_trylock_bh'
    static inline int __raw_spin_trylock_bh(raw_spinlock_t *lock)
                      ^~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/spinlock_api_smp.h:190:0,
                    from include/linux/spinlock.h:288,
                    from include/linux/seqlock.h:36,
                    from include/linux/time.h:6,
                    from include/linux/ktime.h:24,
                    from include/linux/rcutiny.h:28,
                    from include/linux/rcupdate.h:211,
                    from include/linux/rculist.h:11,
                    from include/linux/sched/signal.h:5,
                    from kernel/locking/mutex.c:22:
>> include/linux/rwlock_api_smp.h:117:19: error: invalid storage class for function '__raw_read_trylock'
    static inline int __raw_read_trylock(rwlock_t *lock)
                      ^~~~~~~~~~~~~~~~~~
>> include/linux/rwlock_api_smp.h:128:19: error: invalid storage class for function '__raw_write_trylock'
    static inline int __raw_write_trylock(rwlock_t *lock)
                      ^~~~~~~~~~~~~~~~~~~
>> include/linux/rwlock_api_smp.h:146:20: error: invalid storage class for function '__raw_read_lock'
    static inline void __raw_read_lock(rwlock_t *lock)
                       ^~~~~~~~~~~~~~~
>> include/linux/rwlock_api_smp.h:153:29: error: invalid storage class for function '__raw_read_lock_irqsave'
    static inline unsigned long __raw_read_lock_irqsave(rwlock_t *lock)
                                ^~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/rwlock_api_smp.h:165:20: error: invalid storage class for function '__raw_read_lock_irq'
    static inline void __raw_read_lock_irq(rwlock_t *lock)
                       ^~~~~~~~~~~~~~~~~~~
>> include/linux/rwlock_api_smp.h:173:20: error: invalid storage class for function '__raw_read_lock_bh'
    static inline void __raw_read_lock_bh(rwlock_t *lock)
                       ^~~~~~~~~~~~~~~~~~
..

vim +/current_thread_info +90 arch/microblaze/include/asm/thread_info.h

4684dade Michal Simek 2009-03-27  88  
4684dade Michal Simek 2009-03-27  89  /* how to get the thread information struct from C */
4684dade Michal Simek 2009-03-27 @90  static inline struct thread_info *current_thread_info(void)
4684dade Michal Simek 2009-03-27  91  {
4684dade Michal Simek 2009-03-27  92  	register unsigned long sp asm("r1");
4684dade Michal Simek 2009-03-27  93  
4684dade Michal Simek 2009-03-27  94  	return (struct thread_info *)(sp & ~(THREAD_SIZE-1));
4684dade Michal Simek 2009-03-27  95  }
4684dade Michal Simek 2009-03-27  96  

:::::: The code at line 90 was first introduced by commit
:::::: 4684dadec6ca3f310b0d9ff1860ca6b6f11ffd2d microblaze_v8: string.h thread_info.h

:::::: TO: Michal Simek <monstr at monstr.eu>
:::::: CC: Michal Simek <monstr at monstr.eu>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 13032 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20180221/bb80f033/attachment-0001.gz>


More information about the amd-gfx mailing list