* [android-common:android15-6.6-2025-10 1/1] lib/sbitmap.c:104: warning: Function parameter or member 'sb' not described in 'sbitmap_spinlock'
@ 2026-07-16 10:18 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-07-16 10:18 UTC (permalink / raw)
To: cros-kernel-buildreports; +Cc: oe-kbuild-all
Hi Bart,
FYI, the error/warning still remains.
tree: https://android.googlesource.com/kernel/common android15-6.6-2025-10
head: bb7218bc09c920f6ff72bf0b939cf88fa52736ff
commit: 05baf38affa65735b6698f089e82af7c0e17b349 [1/1] ANDROID: sbitmap: Fix sbitmap_spinlock()
config: arm64-allnoconfig (https://download.01.org/0day-ci/archive/20260716/202607161823.2stQ8bZY-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260716/202607161823.2stQ8bZY-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/202607161823.2stQ8bZY-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> lib/sbitmap.c:104: warning: Function parameter or member 'sb' not described in 'sbitmap_spinlock'
>> lib/sbitmap.c:104: warning: Excess function parameter 'map' description in 'sbitmap_spinlock'
>> lib/sbitmap.c:104: warning: Excess function parameter 'map_nr' description in 'sbitmap_spinlock'
vim +104 lib/sbitmap.c
bf2c4282a10a92 Ming Lei 2021-01-22 59
783d6780cd6684 Yang Yang 2024-07-16 60 /**
783d6780cd6684 Yang Yang 2024-07-16 61 * sbitmap_spinlock() - Get the spinlock corresponding to sbitmap_work.
783d6780cd6684 Yang Yang 2024-07-16 62 * @map: The memory address of the index sbitmap_work area.
783d6780cd6684 Yang Yang 2024-07-16 63 * @map_nr: Number of words (cachelines) being used for the bitmap.
783d6780cd6684 Yang Yang 2024-07-16 64 * @index: The index of the spinlock.
783d6780cd6684 Yang Yang 2024-07-16 65 *
783d6780cd6684 Yang Yang 2024-07-16 66 * this lock: serializes simultaneous updates of ->word and ->cleared.
783d6780cd6684 Yang Yang 2024-07-16 67 * sbitmap_spinlock is for checking on ->cleared and updating on both
783d6780cd6684 Yang Yang 2024-07-16 68 * ->cleared and ->word need to be done atomically.
783d6780cd6684 Yang Yang 2024-07-16 69 * Prevent the following situations from causing block:
783d6780cd6684 Yang Yang 2024-07-16 70 * Configuration for sbq:
783d6780cd6684 Yang Yang 2024-07-16 71 * depth=64, wake_batch=6, shift=6, map_nr=1
783d6780cd6684 Yang Yang 2024-07-16 72 *
783d6780cd6684 Yang Yang 2024-07-16 73 * 1. There are 64 requests in progress:
783d6780cd6684 Yang Yang 2024-07-16 74 * map->word = 0xFFFFFFFFFFFFFFFF
783d6780cd6684 Yang Yang 2024-07-16 75 * 2. After all the 64 requests complete, and no more requests come:
783d6780cd6684 Yang Yang 2024-07-16 76 * map->word = 0xFFFFFFFFFFFFFFFF, map->cleared = 0xFFFFFFFFFFFFFFFF
783d6780cd6684 Yang Yang 2024-07-16 77 * 3. Now two tasks try to allocate requests:
783d6780cd6684 Yang Yang 2024-07-16 78 * T1: T2:
783d6780cd6684 Yang Yang 2024-07-16 79 * __blk_mq_get_tag .
783d6780cd6684 Yang Yang 2024-07-16 80 * __sbitmap_queue_get .
783d6780cd6684 Yang Yang 2024-07-16 81 * sbitmap_get .
783d6780cd6684 Yang Yang 2024-07-16 82 * sbitmap_find_bit .
783d6780cd6684 Yang Yang 2024-07-16 83 * sbitmap_find_bit_in_word .
783d6780cd6684 Yang Yang 2024-07-16 84 * sbitmap_get_word -> nr=-1 __blk_mq_get_tag
783d6780cd6684 Yang Yang 2024-07-16 85 * sbitmap_deferred_clear __sbitmap_queue_get
783d6780cd6684 Yang Yang 2024-07-16 86 * //map->cleared=0xFFFFFFFFFFFFFFFF sbitmap_find_bit
783d6780cd6684 Yang Yang 2024-07-16 87 * if (!READ_ONCE(map->cleared)) sbitmap_find_bit_in_word
783d6780cd6684 Yang Yang 2024-07-16 88 * return false; __sbitmap_get_word -> nr=-1
783d6780cd6684 Yang Yang 2024-07-16 89 * mask = xchg(&map->cleared, 0) sbitmap_deferred_clear
783d6780cd6684 Yang Yang 2024-07-16 90 * atomic_long_andnot() // map->cleared=0
783d6780cd6684 Yang Yang 2024-07-16 91 * if (!(map->cleared))
783d6780cd6684 Yang Yang 2024-07-16 92 * return false;
783d6780cd6684 Yang Yang 2024-07-16 93 *
783d6780cd6684 Yang Yang 2024-07-16 94 * // map->cleared is cleared by T1
783d6780cd6684 Yang Yang 2024-07-16 95 * // T2 fail to acquire the tag
783d6780cd6684 Yang Yang 2024-07-16 96 *
783d6780cd6684 Yang Yang 2024-07-16 97 * 4. T2 is the sole tag waiter. When T1 puts the tag, T2 cannot be woken
783d6780cd6684 Yang Yang 2024-07-16 98 * up due to the wake_batch being set at 6. If no more requests come, T1
783d6780cd6684 Yang Yang 2024-07-16 99 * will wait here indefinitely.
783d6780cd6684 Yang Yang 2024-07-16 100 *
783d6780cd6684 Yang Yang 2024-07-16 101 * Return: Returns the spinlock corresponding to index.
783d6780cd6684 Yang Yang 2024-07-16 102 */
05baf38affa657 Bart Van Assche 2025-04-03 103 static spinlock_t *sbitmap_spinlock(struct sbitmap *sb, unsigned int index)
783d6780cd6684 Yang Yang 2024-07-16 @104 {
05baf38affa657 Bart Van Assche 2025-04-03 105 const unsigned int max_map_nr = *(unsigned int *)&sb->map[-1];
05baf38affa657 Bart Van Assche 2025-04-03 106 spinlock_t *const base_lock = (spinlock_t *)
05baf38affa657 Bart Van Assche 2025-04-03 107 round_up((uintptr_t)&sb->map[max_map_nr],
05baf38affa657 Bart Van Assche 2025-04-03 108 __alignof__(spinlock_t));
05baf38affa657 Bart Van Assche 2025-04-03 109
05baf38affa657 Bart Van Assche 2025-04-03 110 WARN_ON_ONCE(index < 0 || index >= sb->map_nr);
783d6780cd6684 Yang Yang 2024-07-16 111
783d6780cd6684 Yang Yang 2024-07-16 112 return &base_lock[index];
783d6780cd6684 Yang Yang 2024-07-16 113 }
783d6780cd6684 Yang Yang 2024-07-16 114
:::::: The code at line 104 was first introduced by commit
:::::: 783d6780cd66848c96945c8143a808a2b98c9836 ANDROID: Fixed the KMI corruption issue caused by the patch of 72d04bdcf3f7.
:::::: TO: Yang Yang <yang.yang@vivo.com>
:::::: CC: Todd Kjos <tkjos@google.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-16 10:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-16 10:18 [android-common:android15-6.6-2025-10 1/1] lib/sbitmap.c:104: warning: Function parameter or member 'sb' not described in 'sbitmap_spinlock' kernel test robot
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.