public inbox for [email protected]
 help / color / mirror / Atom feed
From: kernel test robot <[email protected]>
To: "Paul E. McKenney" <[email protected]>
Cc: [email protected],
	GNU/Weeb Mailing List <[email protected]>,
	[email protected]
Subject: [ammarfaizi2-block:paulmck/linux-rcu/dev.2022.05.23b 64/68] arch/powerpc/include/asm/cmpxchg.h:474:6: error: cast to union type from type not present in union
Date: Fri, 27 May 2022 05:03:05 +0800	[thread overview]
Message-ID: <[email protected]> (raw)

tree:   https://github.com/ammarfaizi2/linux-block paulmck/linux-rcu/dev.2022.05.23b
head:   29fe03d9190c37a93b96078e34ddd95344ef8b0f
commit: 2b23adb3446ac4098c17dee98414df6fca07f6c9 [64/68] squash! rcu-tasks: Atomically update .b.need_qs to obviate count
config: powerpc-allyesconfig (https://download.01.org/0day-ci/archive/20220527/[email protected]/config)
compiler: powerpc-linux-gcc (GCC) 11.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/ammarfaizi2/linux-block/commit/2b23adb3446ac4098c17dee98414df6fca07f6c9
        git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
        git fetch --no-tags ammarfaizi2-block paulmck/linux-rcu/dev.2022.05.23b
        git checkout 2b23adb3446ac4098c17dee98414df6fca07f6c9
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash kernel/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <[email protected]>

All errors (new ones prefixed by >>):

   In file included from kernel/rcu/update.c:606:
   kernel/rcu/tasks.h: In function 'rcu_trc_cmpxchg_need_qs':
   kernel/rcu/tasks.h:1243:9: error: aggregate value used where an integer was expected
    1243 |         ret = cmpxchg(&t->trc_reader_special, trs_old, trs_new);
         |         ^~~
   kernel/rcu/tasks.h:1243:9: error: aggregate value used where an integer was expected
   In file included from arch/powerpc/include/asm/atomic.h:11,
                    from include/linux/atomic.h:7,
                    from include/linux/cpumask.h:13,
                    from include/linux/smp.h:13,
                    from include/linux/lockdep.h:14,
                    from include/linux/spinlock.h:62,
                    from kernel/rcu/update.c:23:
>> arch/powerpc/include/asm/cmpxchg.h:474:6: error: cast to union type from type not present in union
     474 |      (__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_,           \
         |      ^
   include/linux/atomic/atomic-instrumented.h:1916:9: note: in expansion of macro 'arch_cmpxchg'
    1916 |         arch_cmpxchg(__ai_ptr, __VA_ARGS__); \
         |         ^~~~~~~~~~~~
   kernel/rcu/tasks.h:1243:15: note: in expansion of macro 'cmpxchg'
    1243 |         ret = cmpxchg(&t->trc_reader_special, trs_old, trs_new);
         |               ^~~~~~~


vim +474 arch/powerpc/include/asm/cmpxchg.h

56c08e6d226c86 Boqun Feng    2015-12-15  450  
56c08e6d226c86 Boqun Feng    2015-12-15  451  static __always_inline unsigned long
56c08e6d226c86 Boqun Feng    2015-12-15  452  __cmpxchg_acquire(void *ptr, unsigned long old, unsigned long new,
56c08e6d226c86 Boqun Feng    2015-12-15  453  		  unsigned int size)
56c08e6d226c86 Boqun Feng    2015-12-15  454  {
56c08e6d226c86 Boqun Feng    2015-12-15  455  	switch (size) {
d0563a1297e234 Pan Xinhui    2016-04-27  456  	case 1:
d0563a1297e234 Pan Xinhui    2016-04-27  457  		return __cmpxchg_u8_acquire(ptr, old, new);
d0563a1297e234 Pan Xinhui    2016-04-27  458  	case 2:
d0563a1297e234 Pan Xinhui    2016-04-27  459  		return __cmpxchg_u16_acquire(ptr, old, new);
56c08e6d226c86 Boqun Feng    2015-12-15  460  	case 4:
56c08e6d226c86 Boqun Feng    2015-12-15  461  		return __cmpxchg_u32_acquire(ptr, old, new);
56c08e6d226c86 Boqun Feng    2015-12-15  462  #ifdef CONFIG_PPC64
56c08e6d226c86 Boqun Feng    2015-12-15  463  	case 8:
56c08e6d226c86 Boqun Feng    2015-12-15  464  		return __cmpxchg_u64_acquire(ptr, old, new);
56c08e6d226c86 Boqun Feng    2015-12-15  465  #endif
56c08e6d226c86 Boqun Feng    2015-12-15  466  	}
10d8b1480e6966 pan xinhui    2016-02-23  467  	BUILD_BUG_ON_MSG(1, "Unsupported size for __cmpxchg_acquire");
56c08e6d226c86 Boqun Feng    2015-12-15  468  	return old;
56c08e6d226c86 Boqun Feng    2015-12-15  469  }
9eaa82935dccb7 Mark Rutland  2021-05-25  470  #define arch_cmpxchg(ptr, o, n)						 \
ae3a197e3d0bfe David Howells 2012-03-28  471    ({									 \
ae3a197e3d0bfe David Howells 2012-03-28  472       __typeof__(*(ptr)) _o_ = (o);					 \
ae3a197e3d0bfe David Howells 2012-03-28  473       __typeof__(*(ptr)) _n_ = (n);					 \
ae3a197e3d0bfe David Howells 2012-03-28 @474       (__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_,		 \
ae3a197e3d0bfe David Howells 2012-03-28  475  				    (unsigned long)_n_, sizeof(*(ptr))); \
ae3a197e3d0bfe David Howells 2012-03-28  476    })
ae3a197e3d0bfe David Howells 2012-03-28  477  
ae3a197e3d0bfe David Howells 2012-03-28  478  

:::::: The code at line 474 was first introduced by commit
:::::: ae3a197e3d0bfe3f4bf1693723e82dc018c096f3 Disintegrate asm/system.h for PowerPC

:::::: TO: David Howells <[email protected]>
:::::: CC: David Howells <[email protected]>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

                 reply	other threads:[~2022-05-26 21:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox