[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202205231025.i4fdy5M0-lkp@intel.com>
Date: Mon, 23 May 2022 10:42:19 +0800
From: kernel test robot <lkp@...el.com>
To: Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org
Subject: [tomoyo-tomoyo-test1:master 1/1] drivers/staging/wfx/bh.c:298:2:
warning: call to __warn_flushing_systemwide_wq declared with 'warning'
attribute: Please avoid flushing system-wide workqueues.
tree: git://git.osdn.net/gitroot/tomoyo/tomoyo-test1.git master
head: 84baad17cb8286b6b53b675f8c3d7343ee6a990c
commit: 84baad17cb8286b6b53b675f8c3d7343ee6a990c [1/1] workqueue: Wrap flush_workqueue() using a macro
config: hexagon-randconfig-r045-20220522 (https://download.01.org/0day-ci/archive/20220523/202205231025.i4fdy5M0-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 768a1ca5eccb678947f4155e38a5f5744dcefb56)
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
git remote add tomoyo-tomoyo-test1 git://git.osdn.net/gitroot/tomoyo/tomoyo-test1.git
git fetch --no-tags tomoyo-tomoyo-test1 master
git checkout 84baad17cb8286b6b53b675f8c3d7343ee6a990c
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/infiniband/core/ drivers/input/mouse/ drivers/staging/wfx/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
>> drivers/staging/wfx/bh.c:298:2: warning: call to __warn_flushing_systemwide_wq declared with 'warning' attribute: Please avoid flushing system-wide workqueues. [-Wattribute-warning]
flush_workqueue(system_highpri_wq);
^
include/linux/workqueue.h:695:3: note: expanded from macro 'flush_workqueue'
__warn_flushing_systemwide_wq(); \
^
1 warning generated.
--
>> drivers/staging/wfx/hif_tx.c:76:3: warning: call to __warn_flushing_systemwide_wq declared with 'warning' attribute: Please avoid flushing system-wide workqueues. [-Wattribute-warning]
flush_workqueue(system_highpri_wq);
^
include/linux/workqueue.h:695:3: note: expanded from macro 'flush_workqueue'
__warn_flushing_systemwide_wq(); \
^
1 warning generated.
--
>> drivers/input/mouse/psmouse-smbus.c:320:2: warning: call to __warn_flushing_systemwide_wq declared with 'warning' attribute: Please avoid flushing system-wide workqueues. [-Wattribute-warning]
flush_scheduled_work();
^
include/linux/workqueue.h:705:32: note: expanded from macro 'flush_scheduled_work'
#define flush_scheduled_work() flush_workqueue(system_wq)
^
include/linux/workqueue.h:695:3: note: expanded from macro 'flush_workqueue'
__warn_flushing_systemwide_wq(); \
^
1 warning generated.
--
>> drivers/infiniband/core/device.c:2857:2: warning: call to __warn_flushing_systemwide_wq declared with 'warning' attribute: Please avoid flushing system-wide workqueues. [-Wattribute-warning]
flush_workqueue(system_unbound_wq);
^
include/linux/workqueue.h:695:3: note: expanded from macro 'flush_workqueue'
__warn_flushing_systemwide_wq(); \
^
1 warning generated.
vim +/warning +298 drivers/staging/wfx/bh.c
b0998f0c040daf Jérôme Pouiller 2019-09-19 285
f545b23d477552 Jérôme Pouiller 2022-01-13 286 /* If IRQ is not available, this function allow to manually poll the control register and simulate
f545b23d477552 Jérôme Pouiller 2022-01-13 287 * an IRQ ahen an event happened.
57aa557f110d9f Jérôme Pouiller 2020-05-05 288 *
f545b23d477552 Jérôme Pouiller 2022-01-13 289 * Note that the device has a bug: If an IRQ raise while host read control register, the IRQ is
f545b23d477552 Jérôme Pouiller 2022-01-13 290 * lost. So, use this function carefully (only duing device initialisation).
57aa557f110d9f Jérôme Pouiller 2020-05-05 291 */
57aa557f110d9f Jérôme Pouiller 2020-05-05 292 void wfx_bh_poll_irq(struct wfx_dev *wdev)
57aa557f110d9f Jérôme Pouiller 2020-05-05 293 {
57aa557f110d9f Jérôme Pouiller 2020-05-05 294 ktime_t now, start;
57aa557f110d9f Jérôme Pouiller 2020-05-05 295 u32 reg;
57aa557f110d9f Jérôme Pouiller 2020-05-05 296
f00dc1d789e1ca Jérôme Pouiller 2020-05-05 297 WARN(!wdev->poll_irq, "unexpected IRQ polling can mask IRQ");
c86176d51340d5 Jérôme Pouiller 2022-02-25 @298 flush_workqueue(system_highpri_wq);
57aa557f110d9f Jérôme Pouiller 2020-05-05 299 start = ktime_get();
57aa557f110d9f Jérôme Pouiller 2020-05-05 300 for (;;) {
c1d193c5058e72 Jérôme Pouiller 2022-01-13 301 wfx_control_reg_read(wdev, ®);
57aa557f110d9f Jérôme Pouiller 2020-05-05 302 now = ktime_get();
57aa557f110d9f Jérôme Pouiller 2020-05-05 303 if (reg & 0xFFF)
57aa557f110d9f Jérôme Pouiller 2020-05-05 304 break;
57aa557f110d9f Jérôme Pouiller 2020-05-05 305 if (ktime_after(now, ktime_add_ms(start, 1000))) {
57aa557f110d9f Jérôme Pouiller 2020-05-05 306 dev_err(wdev->dev, "time out while polling control register\n");
57aa557f110d9f Jérôme Pouiller 2020-05-05 307 return;
57aa557f110d9f Jérôme Pouiller 2020-05-05 308 }
57aa557f110d9f Jérôme Pouiller 2020-05-05 309 udelay(200);
57aa557f110d9f Jérôme Pouiller 2020-05-05 310 }
57aa557f110d9f Jérôme Pouiller 2020-05-05 311 wfx_bh_request_rx(wdev);
57aa557f110d9f Jérôme Pouiller 2020-05-05 312 }
57aa557f110d9f Jérôme Pouiller 2020-05-05 313
:::::: The code at line 298 was first introduced by commit
:::::: c86176d51340d5ee29afffce63d79c4ece5d96bb staging: wfx: ensure HIF request has been sent before polling
:::::: TO: Jérôme Pouiller <jerome.pouiller@...abs.com>
:::::: CC: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists