All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Jim Cromie" <jim.cromie@gmail.com>,
	" Łukasz Bartosik" <ukaszb@chromium.org>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [jimc:folio-pool-v2-lockdep 14/21] kernel/locking/lockdep.c:6776:2: error: 'bootstrap_stack_trace' undeclared; did you mean 'save_stack_trace'?
Date: Tue, 18 Aug 2026 21:18:08 +0800	[thread overview]
Message-ID: <202608182137.3ygq0RhO-lkp@intel.com> (raw)

tree:   https://github.com/jimc/linux.git folio-pool-v2-lockdep
head:   e77ee8289ea0755b0ee299348504d4568f942d71
commit: 198cb0234063750d4125d2f5b3fd29f373fba200 [14/21] locking/lockdep: Migrate and compact stack trace entries into folio_scratchpad
config: sparc64-randconfig-001-20260818 (https://download.01.org/0day-ci/archive/20260818/202608182137.3ygq0RhO-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260818/202608182137.3ygq0RhO-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/202608182137.3ygq0RhO-lkp@intel.com/

All errors (new ones prefixed by >>):

   kernel/locking/lockdep.c: In function 'lockdep_init':
>> kernel/locking/lockdep.c:6776:2: error: 'bootstrap_stack_trace' undeclared (first use in this function); did you mean 'save_stack_trace'?
     bootstrap_stack_trace = early_stack_trace;
     ^~~~~~~~~~~~~~~~~~~~~
     save_stack_trace
   kernel/locking/lockdep.c:6776:2: note: each undeclared identifier is reported only once for each function it appears in
>> kernel/locking/lockdep.c:6776:26: error: 'early_stack_trace' undeclared (first use in this function); did you mean 'save_stack_trace'?
     bootstrap_stack_trace = early_stack_trace;
                             ^~~~~~~~~~~~~~~~~
                             save_stack_trace
>> kernel/locking/lockdep.c:6777:2: error: 'bootstrap_stack_trace_in_use' undeclared (first use in this function); did you mean 'bootstrap_entries_in_use'?
     bootstrap_stack_trace_in_use = &early_stack_trace_in_use;
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
     bootstrap_entries_in_use
>> kernel/locking/lockdep.c:6777:34: error: 'early_stack_trace_in_use' undeclared (first use in this function); did you mean 'save_stack_trace_user'?
     bootstrap_stack_trace_in_use = &early_stack_trace_in_use;
                                     ^~~~~~~~~~~~~~~~~~~~~~~~
                                     save_stack_trace_user
   In file included from include/asm-generic/bug.h:31,
                    from arch/sparc/include/asm/bug.h:25,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:13,
                    from arch/sparc/include/asm/current.h:15,
                    from include/linux/mutex.h:14,
                    from kernel/locking/lockdep.c:30:
   kernel/locking/lockdep.c: In function 'lockdep_boot_report':
   kernel/locking/lockdep.c:6821:3: error: 'early_stack_trace_in_use' undeclared (first use in this function); did you mean 'save_stack_trace_user'?
      early_stack_trace_in_use,
      ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/printk.h:483:19: note: in definition of macro 'printk_index_wrap'
      _p_func(_fmt, ##__VA_ARGS__);    \
                      ^~~~~~~~~~~
   include/linux/printk.h:584:2: note: in expansion of macro 'printk'
     printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
     ^~~~~~
   kernel/locking/lockdep.c:6818:2: note: in expansion of macro 'pr_info'
     pr_info("lockdep: %lu/%lu bootstrap entries, %lu/%lu bootstrap traces used before buddy init, folio_pool active\n",
     ^~~~~~~
>> kernel/locking/lockdep.c:6822:18: error: 'BOOTSTRAP_STACK_TRACE_ENTRIES' undeclared (first use in this function); did you mean 'MAX_STACK_TRACE_ENTRIES'?
      (unsigned long)BOOTSTRAP_STACK_TRACE_ENTRIES);
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/printk.h:483:19: note: in definition of macro 'printk_index_wrap'
      _p_func(_fmt, ##__VA_ARGS__);    \
                      ^~~~~~~~~~~
   include/linux/printk.h:584:2: note: in expansion of macro 'printk'
     printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
     ^~~~~~
   kernel/locking/lockdep.c:6818:2: note: in expansion of macro 'pr_info'
     pr_info("lockdep: %lu/%lu bootstrap entries, %lu/%lu bootstrap traces used before buddy init, folio_pool active\n",
     ^~~~~~~
   kernel/locking/lockdep.c: In function 'lockdep_compact_boot_graph':
   kernel/locking/lockdep.c:6844:26: error: 'lockdep_trace_scratchpad' undeclared (first use in this function); did you mean 'lockdep_trace_stats'?
     folio_scratchpad_alloc(&lockdep_trace_scratchpad, sizeof(struct lock_trace) + 32 * sizeof(unsigned long),
                             ^~~~~~~~~~~~~~~~~~~~~~~~
                             lockdep_trace_stats
   kernel/locking/lockdep.c:6844:59: error: invalid application of 'sizeof' to incomplete type 'struct lock_trace'
     folio_scratchpad_alloc(&lockdep_trace_scratchpad, sizeof(struct lock_trace) + 32 * sizeof(unsigned long),
                                                              ^~~~~~
   In file included from include/linux/string.h:6,
                    from include/linux/bitmap.h:13,
                    from include/linux/cpumask.h:11,
                    from include/linux/smp.h:13,
                    from include/linux/lockdep.h:14,
                    from include/linux/mutex.h:17,
                    from kernel/locking/lockdep.c:30:
   kernel/locking/lockdep.c:6854:29: error: 'stack_trace_hash' undeclared (first use in this function); did you mean 'stack_trace_save'?
     for (i = 0; i < ARRAY_SIZE(stack_trace_hash); i++) {
                                ^~~~~~~~~~~~~~~~
   include/linux/array_size.h:11:33: note: in definition of macro 'ARRAY_SIZE'
    #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
                                    ^~~
   In file included from arch/sparc/include/asm/bug.h:6,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:13,
                    from arch/sparc/include/asm/current.h:15,
                    from include/linux/mutex.h:14,
                    from kernel/locking/lockdep.c:30:
   include/linux/compiler.h:200:82: error: expression in static assertion is not an integer
    #define __BUILD_BUG_ON_ZERO_MSG(e, msg, ...) ((int)sizeof(struct {_Static_assert(!(e), msg);}))
                                                                                     ^
   include/linux/compiler.h:205:28: note: in expansion of macro '__BUILD_BUG_ON_ZERO_MSG'
    #define __must_be_array(a) __BUILD_BUG_ON_ZERO_MSG(!__is_array(a), \
                               ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/array_size.h:11:59: note: in expansion of macro '__must_be_array'
    #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
                                                              ^~~~~~~~~~~~~~~
   kernel/locking/lockdep.c:6854:18: note: in expansion of macro 'ARRAY_SIZE'
     for (i = 0; i < ARRAY_SIZE(stack_trace_hash); i++) {
                     ^~~~~~~~~~
   In file included from include/linux/list.h:5,
                    from include/linux/mutex.h:15,
                    from kernel/locking/lockdep.c:30:
   include/linux/container_of.h:20:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     void *__mptr = (void *)(ptr);     \
                    ^
   include/linux/list.h:1183:40: note: in expansion of macro 'container_of'
    #define hlist_entry(ptr, type, member) container_of(ptr,type,member)
                                           ^~~~~~~~~~~~
   include/linux/list.h:1194:15: note: in expansion of macro 'hlist_entry'
        ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
                  ^~~~~~~~~~~
   include/linux/list.h:1235:13: note: in expansion of macro 'hlist_entry_safe'
     for (pos = hlist_entry_safe((head)->first, typeof(*pos), member);\
                ^~~~~~~~~~~~~~~~
   kernel/locking/lockdep.c:6858:3: note: in expansion of macro 'hlist_for_each_entry_safe'
      hlist_for_each_entry_safe(trace, n, &stack_trace_hash[i], hash_entry) {
      ^~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/init.h:5,
                    from include/linux/printk.h:6,
                    from include/asm-generic/bug.h:31,
                    from arch/sparc/include/asm/bug.h:25,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:13,
                    from arch/sparc/include/asm/current.h:15,
                    from include/linux/mutex.h:14,
                    from kernel/locking/lockdep.c:30:
   include/linux/container_of.h:21:28: error: invalid type argument of unary '*' (have 'int')
     static_assert(__same_type(*(ptr), ((type *)0)->member) || \
                               ^~~~~~
   include/linux/build_bug.h:80:56: note: in definition of macro '__static_assert'
    #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
                                                           ^~~~
   include/linux/container_of.h:21:2: note: in expansion of macro 'static_assert'
     static_assert(__same_type(*(ptr), ((type *)0)->member) || \
     ^~~~~~~~~~~~~
   include/linux/container_of.h:21:16: note: in expansion of macro '__same_type'
     static_assert(__same_type(*(ptr), ((type *)0)->member) || \
                   ^~~~~~~~~~~
   include/linux/list.h:1183:40: note: in expansion of macro 'container_of'
    #define hlist_entry(ptr, type, member) container_of(ptr,type,member)
                                           ^~~~~~~~~~~~
   include/linux/list.h:1194:15: note: in expansion of macro 'hlist_entry'
        ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
                  ^~~~~~~~~~~
   include/linux/list.h:1235:13: note: in expansion of macro 'hlist_entry_safe'
     for (pos = hlist_entry_safe((head)->first, typeof(*pos), member);\
                ^~~~~~~~~~~~~~~~
   kernel/locking/lockdep.c:6858:3: note: in expansion of macro 'hlist_for_each_entry_safe'
      hlist_for_each_entry_safe(trace, n, &stack_trace_hash[i], hash_entry) {


vim +6776 kernel/locking/lockdep.c

  6771	
  6772	void __init lockdep_init(void)
  6773	{
  6774		bootstrap_entries = early_list_entries;
  6775		bootstrap_entries_in_use = early_list_entries_in_use;
> 6776		bootstrap_stack_trace = early_stack_trace;
> 6777		bootstrap_stack_trace_in_use = &early_stack_trace_in_use;
  6778	
  6779		pr_info("Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar\n");
  6780	
  6781		pr_info("... MAX_LOCKDEP_SUBCLASSES:  %lu\n", MAX_LOCKDEP_SUBCLASSES);
  6782		pr_info("... MAX_LOCK_DEPTH:          %lu\n", MAX_LOCK_DEPTH);
  6783		pr_info("... MAX_LOCKDEP_KEYS:        %lu\n", MAX_LOCKDEP_KEYS);
  6784		pr_info("... CLASSHASH_SIZE:          %lu\n", CLASSHASH_SIZE);
  6785		pr_info("... MAX_LOCKDEP_ENTRIES:     %lu\n", MAX_LOCKDEP_ENTRIES);
  6786		pr_info("... MAX_LOCKDEP_CHAINS:      %lu\n", MAX_LOCKDEP_CHAINS);
  6787		pr_info("... CHAINHASH_SIZE:          %lu\n", CHAINHASH_SIZE);
  6788	
  6789		pr_info(" memory used by lock dependency info: %zu kB\n",
  6790		       (sizeof(lock_classes) +
  6791			sizeof(lock_classes_in_use) +
  6792			sizeof(classhash_table) +
  6793			sizeof(early_list_entries) +
  6794			sizeof(early_list_entries_in_use) +
  6795			sizeof(chainhash_table) +
  6796			sizeof(delayed_free)
  6797	#ifdef CONFIG_PROVE_LOCKING
  6798			+ sizeof(lock_cq)
  6799			+ sizeof(lock_chains)
  6800			+ sizeof(lock_chains_in_use)
  6801			+ sizeof(chain_hlocks)
  6802	#endif
  6803			) / 1024
  6804			);
  6805	
  6806	#if defined(CONFIG_TRACE_IRQFLAGS) && defined(CONFIG_PROVE_LOCKING)
  6807		pr_info(" memory used for stack traces: dynamic (bootstrap %zu kB)\n",
  6808		       sizeof(early_stack_trace) / 1024
  6809		       );
  6810	#endif
  6811	
  6812		pr_info(" per task-struct memory footprint: %zu bytes\n",
  6813		       sizeof(((struct task_struct *)NULL)->held_locks));
  6814	}
  6815	
  6816	static int __init lockdep_boot_report(void)
  6817	{
  6818		pr_info("lockdep: %lu/%lu bootstrap entries, %lu/%lu bootstrap traces used before buddy init, folio_pool active\n",
  6819			min_t(unsigned long, nr_list_entries, BOOTSTRAP_LOCKDEP_ENTRIES),
  6820			BOOTSTRAP_LOCKDEP_ENTRIES,
  6821			early_stack_trace_in_use,
> 6822			(unsigned long)BOOTSTRAP_STACK_TRACE_ENTRIES);
  6823		return 0;
  6824	}
  6825	core_initcall(lockdep_boot_report);
  6826	

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

                 reply	other threads:[~2026-08-18 13:18 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=202608182137.3ygq0RhO-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=jim.cromie@gmail.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=ukaszb@chromium.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.