llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>
Subject: mm/slub.c:5000:2: error: call to '__compiletime_assert_641' declared with 'error' attribute: BUILD_BUG_ON failed: PERCPU_DYNAMIC_EARLY_SIZE < NR_KMALLOC_TYPES * KMALLOC_SHIFT_HIGH * sizeof(struct kmem_cache_cpu)
Date: Wed, 2 Oct 2024 03:53:13 +0800	[thread overview]
Message-ID: <202410020326.iaZIteIx-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   e32cde8d2bd7d251a8f9b434143977ddf13dcec6
commit: d8fccd9ca5f905533dc6c26cfd1f91beb8691c95 arm64: Allow to enable PREEMPT_RT.
date:   2 weeks ago
config: arm64-randconfig-002-20241002 (https://download.01.org/0day-ci/archive/20241002/202410020326.iaZIteIx-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project fef3566a25ff0e34fb87339ba5e13eca17cec00f)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241002/202410020326.iaZIteIx-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410020326.iaZIteIx-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from mm/slub.c:13:
   In file included from include/linux/mm.h:2237:
   include/linux/vmstat.h:517:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     517 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
>> mm/slub.c:5000:2: error: call to '__compiletime_assert_641' declared with 'error' attribute: BUILD_BUG_ON failed: PERCPU_DYNAMIC_EARLY_SIZE < NR_KMALLOC_TYPES * KMALLOC_SHIFT_HIGH * sizeof(struct kmem_cache_cpu)
    5000 |         BUILD_BUG_ON(PERCPU_DYNAMIC_EARLY_SIZE <
         |         ^
   include/linux/build_bug.h:50:2: note: expanded from macro 'BUILD_BUG_ON'
      50 |         BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
         |         ^
   include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
      39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^
   include/linux/compiler_types.h:510:2: note: expanded from macro 'compiletime_assert'
     510 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^
   include/linux/compiler_types.h:498:2: note: expanded from macro '_compiletime_assert'
     498 |         __compiletime_assert(condition, msg, prefix, suffix)
         |         ^
   include/linux/compiler_types.h:491:4: note: expanded from macro '__compiletime_assert'
     491 |                         prefix ## suffix();                             \
         |                         ^
   <scratch space>:99:1: note: expanded from here
      99 | __compiletime_assert_641
         | ^
   1 warning and 1 error generated.


vim +5000 mm/slub.c

81819f0fc8285a Christoph Lameter 2007-05-06  4996  
0af8489b0216fa Vlastimil Babka   2022-11-15  4997  #ifndef CONFIG_SLUB_TINY
55136592fedf5c Christoph Lameter 2010-08-20  4998  static inline int alloc_kmem_cache_cpus(struct kmem_cache *s)
4c93c355d5d563 Christoph Lameter 2007-10-16  4999  {
6c182dc0de26ef Christoph Lameter 2010-08-20 @5000  	BUILD_BUG_ON(PERCPU_DYNAMIC_EARLY_SIZE <
a0dc161ae77377 Baoquan He        2022-10-24  5001  			NR_KMALLOC_TYPES * KMALLOC_SHIFT_HIGH *
a0dc161ae77377 Baoquan He        2022-10-24  5002  			sizeof(struct kmem_cache_cpu));
4c93c355d5d563 Christoph Lameter 2007-10-16  5003  
8a5ec0ba42c491 Christoph Lameter 2011-02-25  5004  	/*
d4d84fef6d0366 Chris Metcalf     2011-06-02  5005  	 * Must align to double word boundary for the double cmpxchg
d4d84fef6d0366 Chris Metcalf     2011-06-02  5006  	 * instructions to work; see __pcpu_double_call_return_bool().
8a5ec0ba42c491 Christoph Lameter 2011-02-25  5007  	 */
d4d84fef6d0366 Chris Metcalf     2011-06-02  5008  	s->cpu_slab = __alloc_percpu(sizeof(struct kmem_cache_cpu),
d4d84fef6d0366 Chris Metcalf     2011-06-02  5009  				     2 * sizeof(void *));
8a5ec0ba42c491 Christoph Lameter 2011-02-25  5010  
8a5ec0ba42c491 Christoph Lameter 2011-02-25  5011  	if (!s->cpu_slab)
8a5ec0ba42c491 Christoph Lameter 2011-02-25  5012  		return 0;
8a5ec0ba42c491 Christoph Lameter 2011-02-25  5013  
8a5ec0ba42c491 Christoph Lameter 2011-02-25  5014  	init_kmem_cache_cpus(s);
4c93c355d5d563 Christoph Lameter 2007-10-16  5015  
8a5ec0ba42c491 Christoph Lameter 2011-02-25  5016  	return 1;
4c93c355d5d563 Christoph Lameter 2007-10-16  5017  }
0af8489b0216fa Vlastimil Babka   2022-11-15  5018  #else
0af8489b0216fa Vlastimil Babka   2022-11-15  5019  static inline int alloc_kmem_cache_cpus(struct kmem_cache *s)
0af8489b0216fa Vlastimil Babka   2022-11-15  5020  {
0af8489b0216fa Vlastimil Babka   2022-11-15  5021  	return 1;
0af8489b0216fa Vlastimil Babka   2022-11-15  5022  }
0af8489b0216fa Vlastimil Babka   2022-11-15  5023  #endif /* CONFIG_SLUB_TINY */
4c93c355d5d563 Christoph Lameter 2007-10-16  5024  

:::::: The code at line 5000 was first introduced by commit
:::::: 6c182dc0de26ef97efb6a97a8deab074833764e7 slub: Remove static kmem_cache_cpu array for boot

:::::: TO: Christoph Lameter <cl@linux.com>
:::::: CC: Pekka Enberg <penberg@kernel.org>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2024-10-01 19:53 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 \
    --in-reply-to=202410020326.iaZIteIx-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=bigeasy@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=tglx@linutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).