Re: [PATCH v3] mm/migrate.c: Rework migration_entry_wait() to not take a pageref
by kernel test robot
Hi Alistair,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linux/master]
[also build test WARNING on linus/master v5.16-rc1 next-20211115]
[cannot apply to hnaz-mm/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Alistair-Popple/mm-migrate-c-Rew...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git debe436e77c72fcee804fb867f275e6d31aa999c
config: nios2-defconfig (attached as .config)
compiler: nios2-linux-gcc (GCC) 11.2.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/0day-ci/linux/commit/91a437ddc7606450e331059d80babe2d4...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Alistair-Popple/mm-migrate-c-Rework-migration_entry_wait-to-not-take-a-pageref/20211115-185444
git checkout 91a437ddc7606450e331059d80babe2d4c1163e0
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=nios2
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> mm/filemap.c:1447:6: warning: no previous prototype for 'migration_entry_wait_on_locked' [-Wmissing-prototypes]
1447 | void migration_entry_wait_on_locked(struct folio *folio, pte_t *ptep,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/migration_entry_wait_on_locked +1447 mm/filemap.c
1428
1429 #ifdef CONFIG_MIGRATION
1430 /**
1431 * migration_entry_wait_on_locked - Wait for a migration entry to be removed
1432 * @page: page referenced by the migration entry.
1433 * @ptep: mapped pte pointer. This function will return with the ptep unmapped.
1434 * @ptl: already locked ptl. This function will drop the lock.
1435 *
1436 * Wait for a migration entry referencing the given page to be removed. This is
1437 * equivalent to put_and_wait_on_page_locked(page, TASK_UNINTERRUPTIBLE) except
1438 * this can be called without taking a reference on the page. Instead this
1439 * should be called while holding the ptl for the migration entry referencing
1440 * the page.
1441 *
1442 * Returns after unmapping and unlocking the pte/ptl with pte_unmap_unlock().
1443 *
1444 * This follows the same logic as wait_on_page_bit_common() so see the comments
1445 * there.
1446 */
> 1447 void migration_entry_wait_on_locked(struct folio *folio, pte_t *ptep,
1448 spinlock_t *ptl)
1449 {
1450 struct wait_page_queue wait_page;
1451 wait_queue_entry_t *wait = &wait_page.wait;
1452 bool thrashing = false;
1453 bool delayacct = false;
1454 unsigned long pflags;
1455 wait_queue_head_t *q;
1456
1457 q = folio_waitqueue(folio);
1458 if (!folio_test_uptodate(folio) && folio_test_workingset(folio)) {
1459 if (!folio_test_swapbacked(folio)) {
1460 delayacct_thrashing_start();
1461 delayacct = true;
1462 }
1463 psi_memstall_enter(&pflags);
1464 thrashing = true;
1465 }
1466
1467 init_wait(wait);
1468 wait->func = wake_page_function;
1469 wait_page.folio = folio;
1470 wait_page.bit_nr = PG_locked;
1471 wait->flags = 0;
1472
1473 spin_lock_irq(&q->lock);
1474 folio_set_waiters(folio);
1475 if (!folio_trylock_flag(folio, PG_locked, wait))
1476 __add_wait_queue_entry_tail(q, wait);
1477 spin_unlock_irq(&q->lock);
1478
1479 /*
1480 * If a migration entry exists for the page the migration path must hold
1481 * a valid reference to the page, and it must take the ptl to remove the
1482 * migration entry. So the page is valid until the ptl is dropped.
1483 */
1484 if (ptep)
1485 pte_unmap_unlock(ptep, ptl);
1486 else
1487 spin_unlock(ptl);
1488
1489 for (;;) {
1490 unsigned int flags;
1491
1492 set_current_state(TASK_UNINTERRUPTIBLE);
1493
1494 /* Loop until we've been woken or interrupted */
1495 flags = smp_load_acquire(&wait->flags);
1496 if (!(flags & WQ_FLAG_WOKEN)) {
1497 if (signal_pending_state(TASK_UNINTERRUPTIBLE, current))
1498 break;
1499
1500 io_schedule();
1501 continue;
1502 }
1503 break;
1504 }
1505
1506 finish_wait(q, wait);
1507
1508 if (thrashing) {
1509 if (delayacct)
1510 delayacct_thrashing_end();
1511 psi_memstall_leave(&pflags);
1512 }
1513 }
1514 #endif
1515
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
Re: [RESEND PATCH v2 03/13] backlight: qcom-wled: Use cpu_to_le16 macro to perform conversion
by kernel test robot
Hi Marijn,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on lee-backlight/for-backlight-next]
[also build test WARNING on robh/for-next v5.16-rc1 next-20211115]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Marijn-Suijten/backlight-qcom-wl...
base: https://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight.git for-backlight-next
config: x86_64-randconfig-s022-20211115 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/0day-ci/linux/commit/94425d366b39b6eea4acc5623f8a66046...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Marijn-Suijten/backlight-qcom-wled-fix-and-solidify-handling-of-enabled-strings/20211112-083005
git checkout 94425d366b39b6eea4acc5623f8a66046eb62bdb
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/video/backlight/qcom-wled.c:236:11: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] v @@ got restricted __le16 [usertype] @@
drivers/video/backlight/qcom-wled.c:236:11: sparse: expected unsigned short [usertype] v
drivers/video/backlight/qcom-wled.c:236:11: sparse: got restricted __le16 [usertype]
drivers/video/backlight/qcom-wled.c:258:11: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] v @@ got restricted __le16 [usertype] @@
drivers/video/backlight/qcom-wled.c:258:11: sparse: expected unsigned short [usertype] v
drivers/video/backlight/qcom-wled.c:258:11: sparse: got restricted __le16 [usertype]
drivers/video/backlight/qcom-wled.c:280:11: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] v @@ got restricted __le16 [usertype] @@
drivers/video/backlight/qcom-wled.c:280:11: sparse: expected unsigned short [usertype] v
drivers/video/backlight/qcom-wled.c:280:11: sparse: got restricted __le16 [usertype]
vim +236 drivers/video/backlight/qcom-wled.c
230
231 static int wled3_set_brightness(struct wled *wled, u16 brightness)
232 {
233 int rc, i;
234 u16 v;
235
> 236 v = cpu_to_le16(brightness & WLED3_SINK_REG_BRIGHT_MAX);
237
238 for (i = 0; i < wled->cfg.num_strings; ++i) {
239 rc = regmap_bulk_write(wled->regmap, wled->ctrl_addr +
240 WLED3_SINK_REG_BRIGHT(i),
241 &v, sizeof(v));
242 if (rc < 0)
243 return rc;
244 }
245
246 return 0;
247 }
248
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
drivers/media/dvb-frontends/nxt200x.c:1087:12: warning: stack frame size (15224) exceeds limit (8192) in 'nxt200x_init'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8ab774587903771821b59471cc723bba6d893942
commit: a52f8a59aef46b59753e583bf4b28fccb069ce64 fortify: Explicitly disable Clang support
date: 7 weeks ago
config: x86_64-randconfig-r035-20211114 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c3dddeeafb529e769cde87bd29ef6271ac6bfa5c)
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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout a52f8a59aef46b59753e583bf4b28fccb069ce64
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/media/dvb-frontends/nxt200x.c:1087:12: warning: stack frame size (15224) exceeds limit (8192) in 'nxt200x_init' [-Wframe-larger-than]
static int nxt200x_init(struct dvb_frontend* fe)
^
>> drivers/media/dvb-frontends/nxt200x.c:519:12: warning: stack frame size (9624) exceeds limit (8192) in 'nxt200x_setup_frontend_parameters' [-Wframe-larger-than]
static int nxt200x_setup_frontend_parameters(struct dvb_frontend *fe)
^
2 warnings generated.
vim +/nxt200x_init +1087 drivers/media/dvb-frontends/nxt200x.c
04a45929e7f00e drivers/media/dvb/frontends/nxt200x.c Kirk Lapray 2005-11-08 1086
04a45929e7f00e drivers/media/dvb/frontends/nxt200x.c Kirk Lapray 2005-11-08 @1087 static int nxt200x_init(struct dvb_frontend* fe)
04a45929e7f00e drivers/media/dvb/frontends/nxt200x.c Kirk Lapray 2005-11-08 1088 {
04a45929e7f00e drivers/media/dvb/frontends/nxt200x.c Kirk Lapray 2005-11-08 1089 struct nxt200x_state* state = fe->demodulator_priv;
04a45929e7f00e drivers/media/dvb/frontends/nxt200x.c Kirk Lapray 2005-11-08 1090 int ret = 0;
04a45929e7f00e drivers/media/dvb/frontends/nxt200x.c Kirk Lapray 2005-11-08 1091
04a45929e7f00e drivers/media/dvb/frontends/nxt200x.c Kirk Lapray 2005-11-08 1092 if (!state->initialised) {
04a45929e7f00e drivers/media/dvb/frontends/nxt200x.c Kirk Lapray 2005-11-08 1093 switch (state->demod_chip) {
04a45929e7f00e drivers/media/dvb/frontends/nxt200x.c Kirk Lapray 2005-11-08 1094 case NXT2002:
04a45929e7f00e drivers/media/dvb/frontends/nxt200x.c Kirk Lapray 2005-11-08 1095 ret = nxt2002_init(fe);
04a45929e7f00e drivers/media/dvb/frontends/nxt200x.c Kirk Lapray 2005-11-08 1096 break;
04a45929e7f00e drivers/media/dvb/frontends/nxt200x.c Kirk Lapray 2005-11-08 1097 case NXT2004:
04a45929e7f00e drivers/media/dvb/frontends/nxt200x.c Kirk Lapray 2005-11-08 1098 ret = nxt2004_init(fe);
04a45929e7f00e drivers/media/dvb/frontends/nxt200x.c Kirk Lapray 2005-11-08 1099 break;
04a45929e7f00e drivers/media/dvb/frontends/nxt200x.c Kirk Lapray 2005-11-08 1100 default:
04a45929e7f00e drivers/media/dvb/frontends/nxt200x.c Kirk Lapray 2005-11-08 1101 return -EINVAL;
04a45929e7f00e drivers/media/dvb/frontends/nxt200x.c Kirk Lapray 2005-11-08 1102 }
04a45929e7f00e drivers/media/dvb/frontends/nxt200x.c Kirk Lapray 2005-11-08 1103 state->initialised = 1;
04a45929e7f00e drivers/media/dvb/frontends/nxt200x.c Kirk Lapray 2005-11-08 1104 }
04a45929e7f00e drivers/media/dvb/frontends/nxt200x.c Kirk Lapray 2005-11-08 1105 return ret;
04a45929e7f00e drivers/media/dvb/frontends/nxt200x.c Kirk Lapray 2005-11-08 1106 }
04a45929e7f00e drivers/media/dvb/frontends/nxt200x.c Kirk Lapray 2005-11-08 1107
:::::: The code at line 1087 was first introduced by commit
:::::: 04a45929e7f00ed4fc7b1d375397f808c8a5d0eb [PATCH] dvb: add nxt200x frontend module
:::::: TO: Kirk Lapray <kirk.lapray(a)gmail.com>
:::::: CC: Linus Torvalds <torvalds(a)g5.osdl.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
drivers/scsi/ufs/ufshcd.c:2635:20: error: unused function 'is_rpmb_wlun'
by kernel test robot
Hi Bart,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8ab774587903771821b59471cc723bba6d893942
commit: edc0596cc04bf0ac3a69c66e994d3ff8b650ff71 scsi: ufs: core: Stop clearing UNIT ATTENTIONS
date: 6 weeks ago
config: riscv-buildonly-randconfig-r004-20211111 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 63ef0e17e28827eae53133b3467bdac7d9729318)
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
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout edc0596cc04bf0ac3a69c66e994d3ff8b650ff71
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/scsi/ufs/ufshcd.c:2635:20: error: unused function 'is_rpmb_wlun' [-Werror,-Wunused-function]
static inline bool is_rpmb_wlun(struct scsi_device *sdev)
^
1 error generated.
vim +/is_rpmb_wlun +2635 drivers/scsi/ufs/ufshcd.c
2a8fa600445c45 Subhash Jadavani 2014-09-25 2634
b294ff3e34490f Asutosh Das 2021-04-23 @2635 static inline bool is_rpmb_wlun(struct scsi_device *sdev)
b294ff3e34490f Asutosh Das 2021-04-23 2636 {
b294ff3e34490f Asutosh Das 2021-04-23 2637 return sdev->lun == ufshcd_upiu_wlun_to_scsi_wlun(UFS_UPIU_RPMB_WLUN);
b294ff3e34490f Asutosh Das 2021-04-23 2638 }
b294ff3e34490f Asutosh Das 2021-04-23 2639
:::::: The code at line 2635 was first introduced by commit
:::::: b294ff3e34490f36233230e9ca70503d3924a6f3 scsi: ufs: core: Enable power management for wlun
:::::: TO: Asutosh Das <asutoshd(a)codeaurora.org>
:::::: CC: Martin K. Petersen <martin.petersen(a)oracle.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c:399:5: warning: no previous prototype for 'amdgpu_vkms_output_init'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8ab774587903771821b59471cc723bba6d893942
commit: 733ee71ae0d03a8b03711dca8bc94c8ac05a6bc3 drm/amdgpu: replace dce_virtual with amdgpu_vkms (v3)
date: 3 months ago
config: arc-randconfig-r043-20210927 (attached as .config)
compiler: arceb-elf-gcc (GCC) 11.2.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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 733ee71ae0d03a8b03711dca8bc94c8ac05a6bc3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c:399:5: warning: no previous prototype for 'amdgpu_vkms_output_init' [-Wmissing-prototypes]
399 | int amdgpu_vkms_output_init(struct drm_device *dev,
| ^~~~~~~~~~~~~~~~~~~~~~~
vim +/amdgpu_vkms_output_init +399 drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
84ec374bd58036 Ryan Taylor 2021-06-07 398
84ec374bd58036 Ryan Taylor 2021-06-07 @399 int amdgpu_vkms_output_init(struct drm_device *dev,
84ec374bd58036 Ryan Taylor 2021-06-07 400 struct amdgpu_vkms_output *output, int index)
84ec374bd58036 Ryan Taylor 2021-06-07 401 {
84ec374bd58036 Ryan Taylor 2021-06-07 402 struct drm_connector *connector = &output->connector;
84ec374bd58036 Ryan Taylor 2021-06-07 403 struct drm_encoder *encoder = &output->encoder;
84ec374bd58036 Ryan Taylor 2021-06-07 404 struct drm_crtc *crtc = &output->crtc;
84ec374bd58036 Ryan Taylor 2021-06-07 405 struct drm_plane *primary, *cursor = NULL;
84ec374bd58036 Ryan Taylor 2021-06-07 406 int ret;
84ec374bd58036 Ryan Taylor 2021-06-07 407
84ec374bd58036 Ryan Taylor 2021-06-07 408 primary = amdgpu_vkms_plane_init(dev, DRM_PLANE_TYPE_PRIMARY, index);
84ec374bd58036 Ryan Taylor 2021-06-07 409 if (IS_ERR(primary))
84ec374bd58036 Ryan Taylor 2021-06-07 410 return PTR_ERR(primary);
84ec374bd58036 Ryan Taylor 2021-06-07 411
84ec374bd58036 Ryan Taylor 2021-06-07 412 ret = amdgpu_vkms_crtc_init(dev, crtc, primary, cursor);
84ec374bd58036 Ryan Taylor 2021-06-07 413 if (ret)
84ec374bd58036 Ryan Taylor 2021-06-07 414 goto err_crtc;
84ec374bd58036 Ryan Taylor 2021-06-07 415
84ec374bd58036 Ryan Taylor 2021-06-07 416 ret = drm_connector_init(dev, connector, &amdgpu_vkms_connector_funcs,
84ec374bd58036 Ryan Taylor 2021-06-07 417 DRM_MODE_CONNECTOR_VIRTUAL);
84ec374bd58036 Ryan Taylor 2021-06-07 418 if (ret) {
84ec374bd58036 Ryan Taylor 2021-06-07 419 DRM_ERROR("Failed to init connector\n");
84ec374bd58036 Ryan Taylor 2021-06-07 420 goto err_connector;
84ec374bd58036 Ryan Taylor 2021-06-07 421 }
84ec374bd58036 Ryan Taylor 2021-06-07 422
84ec374bd58036 Ryan Taylor 2021-06-07 423 drm_connector_helper_add(connector, &amdgpu_vkms_conn_helper_funcs);
84ec374bd58036 Ryan Taylor 2021-06-07 424
84ec374bd58036 Ryan Taylor 2021-06-07 425 ret = drm_simple_encoder_init(dev, encoder, DRM_MODE_ENCODER_VIRTUAL);
84ec374bd58036 Ryan Taylor 2021-06-07 426 if (ret) {
84ec374bd58036 Ryan Taylor 2021-06-07 427 DRM_ERROR("Failed to init encoder\n");
84ec374bd58036 Ryan Taylor 2021-06-07 428 goto err_encoder;
84ec374bd58036 Ryan Taylor 2021-06-07 429 }
84ec374bd58036 Ryan Taylor 2021-06-07 430 encoder->possible_crtcs = 1 << index;
84ec374bd58036 Ryan Taylor 2021-06-07 431
84ec374bd58036 Ryan Taylor 2021-06-07 432 ret = drm_connector_attach_encoder(connector, encoder);
84ec374bd58036 Ryan Taylor 2021-06-07 433 if (ret) {
84ec374bd58036 Ryan Taylor 2021-06-07 434 DRM_ERROR("Failed to attach connector to encoder\n");
84ec374bd58036 Ryan Taylor 2021-06-07 435 goto err_attach;
84ec374bd58036 Ryan Taylor 2021-06-07 436 }
84ec374bd58036 Ryan Taylor 2021-06-07 437
84ec374bd58036 Ryan Taylor 2021-06-07 438 drm_mode_config_reset(dev);
84ec374bd58036 Ryan Taylor 2021-06-07 439
84ec374bd58036 Ryan Taylor 2021-06-07 440 return 0;
84ec374bd58036 Ryan Taylor 2021-06-07 441
84ec374bd58036 Ryan Taylor 2021-06-07 442 err_attach:
84ec374bd58036 Ryan Taylor 2021-06-07 443 drm_encoder_cleanup(encoder);
84ec374bd58036 Ryan Taylor 2021-06-07 444
84ec374bd58036 Ryan Taylor 2021-06-07 445 err_encoder:
84ec374bd58036 Ryan Taylor 2021-06-07 446 drm_connector_cleanup(connector);
84ec374bd58036 Ryan Taylor 2021-06-07 447
84ec374bd58036 Ryan Taylor 2021-06-07 448 err_connector:
84ec374bd58036 Ryan Taylor 2021-06-07 449 drm_crtc_cleanup(crtc);
84ec374bd58036 Ryan Taylor 2021-06-07 450
84ec374bd58036 Ryan Taylor 2021-06-07 451 err_crtc:
84ec374bd58036 Ryan Taylor 2021-06-07 452 drm_plane_cleanup(primary);
84ec374bd58036 Ryan Taylor 2021-06-07 453
84ec374bd58036 Ryan Taylor 2021-06-07 454 return ret;
84ec374bd58036 Ryan Taylor 2021-06-07 455 }
733ee71ae0d03a Ryan Taylor 2021-06-18 456
:::::: The code at line 399 was first introduced by commit
:::::: 84ec374bd580364a32818c9fc269c19d6e931cab drm/amdgpu: create amdgpu_vkms (v4)
:::::: TO: Ryan Taylor <Ryan.Taylor(a)amd.com>
:::::: CC: Alex Deucher <alexander.deucher(a)amd.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
drivers/soc/ixp4xx/ixp4xx-npe.c:737:34: warning: unused variable 'ixp4xx_npe_of_match'
by kernel test robot
Hi Arnd,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8ab774587903771821b59471cc723bba6d893942
commit: 7f94b69ece515ac82defa60ef7cba2cf26180216 ARM: ixp4xx: fix compile-testing soc drivers
date: 4 months ago
config: hexagon-randconfig-r041-20210927 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project dc6e8dfdfe7efecfda318d43a06fae18b40eb498)
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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 7f94b69ece515ac82defa60ef7cba2cf26180216
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=hexagon
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/soc/ixp4xx/ixp4xx-npe.c:737:34: warning: unused variable 'ixp4xx_npe_of_match' [-Wunused-const-variable]
static const struct of_device_id ixp4xx_npe_of_match[] = {
^
1 warning generated.
vim +/ixp4xx_npe_of_match +737 drivers/soc/ixp4xx/ixp4xx-npe.c
82a96f5790ac93 arch/arm/mach-ixp4xx/ixp4xx_npe.c Krzysztof Halasa 2008-01-01 736
e00797f2e05b7f drivers/soc/ixp4xx/ixp4xx-npe.c Linus Walleij 2019-02-10 @737 static const struct of_device_id ixp4xx_npe_of_match[] = {
e00797f2e05b7f drivers/soc/ixp4xx/ixp4xx-npe.c Linus Walleij 2019-02-10 738 {
e00797f2e05b7f drivers/soc/ixp4xx/ixp4xx-npe.c Linus Walleij 2019-02-10 739 .compatible = "intel,ixp4xx-network-processing-engine",
e00797f2e05b7f drivers/soc/ixp4xx/ixp4xx-npe.c Linus Walleij 2019-02-10 740 },
e00797f2e05b7f drivers/soc/ixp4xx/ixp4xx-npe.c Linus Walleij 2019-02-10 741 {},
e00797f2e05b7f drivers/soc/ixp4xx/ixp4xx-npe.c Linus Walleij 2019-02-10 742 };
e00797f2e05b7f drivers/soc/ixp4xx/ixp4xx-npe.c Linus Walleij 2019-02-10 743
:::::: The code at line 737 was first introduced by commit
:::::: e00797f2e05b7f3758bb96e6248aff8d95999cec soc: ixp4xx: npe: Add DT probe code
:::::: TO: Linus Walleij <linus.walleij(a)linaro.org>
:::::: CC: Linus Walleij <linus.walleij(a)linaro.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
Re: [PATCH v4 2/2] ASoC: codec: tlv320adc3xxx: New codec driver
by kernel test robot
Hi Ricard,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on broonie-sound/for-next]
[also build test WARNING on v5.16-rc1 next-20211115]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Ricard-Wanderlof/Codec-driver-fo...
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: nios2-randconfig-m031-20211115 (attached as .config)
compiler: nios2-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
smatch warnings:
sound/soc/codecs/tlv320adc3xxx.c:1002 adc3xxx_i2c_probe() warn: unsigned 'adc3xxx->rst_pin' is never less than zero.
vim +1002 sound/soc/codecs/tlv320adc3xxx.c
956
957 static int adc3xxx_i2c_probe(struct i2c_client *i2c,
958 const struct i2c_device_id *id)
959 {
960 struct device *dev = &i2c->dev;
961 struct device_node *np = dev->of_node;
962 struct adc3xxx *adc3xxx = NULL;
963 enum of_gpio_flags flags;
964 int ret;
965
966 adc3xxx = devm_kzalloc(dev, sizeof(struct adc3xxx), GFP_KERNEL);
967 if (!adc3xxx)
968 return -ENOMEM;
969 adc3xxx->dev = dev;
970
971 adc3xxx->mclk = devm_clk_get(dev, NULL);
972 if (IS_ERR(adc3xxx->mclk)) {
973 /*
974 * The chip itself supports running off the BCLK either
975 * directly or via the PLL, but the driver does not (yet), so
976 * having a specified mclk is required. Otherwise, we could
977 * use the lack of a clocks property to indicate when BCLK is
978 * intended as the clock source.
979 */
980 return PTR_ERR(adc3xxx->mclk);
981 } else if (adc3xxx->mclk) {
982 ret = clk_prepare_enable(adc3xxx->mclk);
983 if (ret < 0)
984 return ret;
985 dev_dbg(dev, "Enabled MCLK, freq %lu Hz\n", clk_get_rate(adc3xxx->mclk));
986 }
987
988 adc3xxx_parse_dt_gpio(adc3xxx, "ti,dmdin-gpio1", &adc3xxx->gpio_cfg[0]);
989 adc3xxx_parse_dt_gpio(adc3xxx, "ti,dmclk-gpio2", &adc3xxx->gpio_cfg[1]);
990 adc3xxx_parse_dt_micbias(adc3xxx, "ti,micbias1-vg", &adc3xxx->micbias_vg[0]);
991 adc3xxx_parse_dt_micbias(adc3xxx, "ti,micbias2-vg", &adc3xxx->micbias_vg[1]);
992
993 adc3xxx->regmap = devm_regmap_init_i2c(i2c, &adc3xxx_regmap);
994 if (IS_ERR(adc3xxx->regmap)) {
995 ret = PTR_ERR(adc3xxx->regmap);
996 return ret;
997 }
998
999 i2c_set_clientdata(i2c, adc3xxx);
1000
1001 adc3xxx->rst_pin = of_get_named_gpio_flags(np, "reset-gpios", 0, &flags);
> 1002 if (adc3xxx->rst_pin < 0 || !gpio_is_valid(adc3xxx->rst_pin))
1003 return -ENXIO;
1004
1005 adc3xxx->rst_active = !(flags & OF_GPIO_ACTIVE_LOW);
1006 adc3xxx->type = id->driver_data;
1007
1008 ret = devm_gpio_request(dev, adc3xxx->rst_pin, "adc3xxx reset");
1009 if (ret < 0) {
1010 dev_err(dev, "Failed to request rst_pin: %d\n", ret);
1011 return ret;
1012 }
1013
1014 /* Reset codec chip */
1015 gpio_direction_output(adc3xxx->rst_pin, adc3xxx->rst_active);
1016 usleep_range(2000, 100000); /* Requirement: > 10 ns (datasheet p13) */
1017 gpio_direction_output(adc3xxx->rst_pin, !adc3xxx->rst_active);
1018
1019 /* Potentially set up pins used as GPIOs */
1020 adc3xxx_init_gpio(adc3xxx);
1021
1022 ret = snd_soc_register_component(dev,
1023 &soc_component_dev_adc3xxx, &adc3xxx_dai, 1);
1024 if (ret < 0)
1025 dev_err(dev, "Failed to register codec: %d\n", ret);
1026
1027 return ret;
1028 }
1029
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
Re: [PATCH V3 4/4] mm/damon: Remove some no need func definitions in damon.h file
by kernel test robot
Hi Xin,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on hnaz-mm/master]
url: https://github.com/0day-ci/linux/commits/Xin-Hao/mm-damon-Do-some-small-c...
base: https://github.com/hnaz/linux-mm master
config: nios2-randconfig-r021-20211115 (attached as .config)
compiler: nios2-linux-gcc (GCC) 11.2.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/0day-ci/linux/commit/c9ed99dc122a1b52e3d9591ed817ccc82...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Xin-Hao/mm-damon-Do-some-small-changes/20211113-000614
git checkout c9ed99dc122a1b52e3d9591ed817ccc826b08de0
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=nios2
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> mm/damon/vaddr.c:274:6: warning: no previous prototype for 'damon_va_init' [-Wmissing-prototypes]
274 | void damon_va_init(struct damon_ctx *ctx)
| ^~~~~~~~~~~~~
>> mm/damon/vaddr.c:358:6: warning: no previous prototype for 'damon_va_update' [-Wmissing-prototypes]
358 | void damon_va_update(struct damon_ctx *ctx)
| ^~~~~~~~~~~~~~~
>> mm/damon/vaddr.c:420:6: warning: no previous prototype for 'damon_va_prepare_access_checks' [-Wmissing-prototypes]
420 | void damon_va_prepare_access_checks(struct damon_ctx *ctx)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> mm/damon/vaddr.c:541:14: warning: no previous prototype for 'damon_va_check_accesses' [-Wmissing-prototypes]
541 | unsigned int damon_va_check_accesses(struct damon_ctx *ctx)
| ^~~~~~~~~~~~~~~~~~~~~~~
>> mm/damon/vaddr.c:605:5: warning: no previous prototype for 'damon_va_apply_scheme' [-Wmissing-prototypes]
605 | int damon_va_apply_scheme(struct damon_ctx *ctx, struct damon_target *t,
| ^~~~~~~~~~~~~~~~~~~~~
>> mm/damon/vaddr.c:636:5: warning: no previous prototype for 'damon_va_scheme_score' [-Wmissing-prototypes]
636 | int damon_va_scheme_score(struct damon_ctx *context, struct damon_target *t,
| ^~~~~~~~~~~~~~~~~~~~~
vim +/damon_va_init +274 mm/damon/vaddr.c
3f49584b262cf8 SeongJae Park 2021-09-07 272
3f49584b262cf8 SeongJae Park 2021-09-07 273 /* Initialize '->regions_list' of every target (task) */
3f49584b262cf8 SeongJae Park 2021-09-07 @274 void damon_va_init(struct damon_ctx *ctx)
3f49584b262cf8 SeongJae Park 2021-09-07 275 {
3f49584b262cf8 SeongJae Park 2021-09-07 276 struct damon_target *t;
3f49584b262cf8 SeongJae Park 2021-09-07 277
3f49584b262cf8 SeongJae Park 2021-09-07 278 damon_for_each_target(t, ctx) {
3f49584b262cf8 SeongJae Park 2021-09-07 279 /* the user may set the target regions as they want */
3f49584b262cf8 SeongJae Park 2021-09-07 280 if (!damon_nr_regions(t))
3f49584b262cf8 SeongJae Park 2021-09-07 281 __damon_va_init_regions(ctx, t);
3f49584b262cf8 SeongJae Park 2021-09-07 282 }
3f49584b262cf8 SeongJae Park 2021-09-07 283 }
3f49584b262cf8 SeongJae Park 2021-09-07 284
3f49584b262cf8 SeongJae Park 2021-09-07 285 /*
3f49584b262cf8 SeongJae Park 2021-09-07 286 * Functions for the dynamic monitoring target regions update
3f49584b262cf8 SeongJae Park 2021-09-07 287 */
3f49584b262cf8 SeongJae Park 2021-09-07 288
3f49584b262cf8 SeongJae Park 2021-09-07 289 /*
3f49584b262cf8 SeongJae Park 2021-09-07 290 * Check whether a region is intersecting an address range
3f49584b262cf8 SeongJae Park 2021-09-07 291 *
3f49584b262cf8 SeongJae Park 2021-09-07 292 * Returns true if it is.
3f49584b262cf8 SeongJae Park 2021-09-07 293 */
3f49584b262cf8 SeongJae Park 2021-09-07 294 static bool damon_intersect(struct damon_region *r, struct damon_addr_range *re)
3f49584b262cf8 SeongJae Park 2021-09-07 295 {
3f49584b262cf8 SeongJae Park 2021-09-07 296 return !(r->ar.end <= re->start || re->end <= r->ar.start);
3f49584b262cf8 SeongJae Park 2021-09-07 297 }
3f49584b262cf8 SeongJae Park 2021-09-07 298
3f49584b262cf8 SeongJae Park 2021-09-07 299 /*
3f49584b262cf8 SeongJae Park 2021-09-07 300 * Update damon regions for the three big regions of the given target
3f49584b262cf8 SeongJae Park 2021-09-07 301 *
3f49584b262cf8 SeongJae Park 2021-09-07 302 * t the given target
3f49584b262cf8 SeongJae Park 2021-09-07 303 * bregions the three big regions of the target
3f49584b262cf8 SeongJae Park 2021-09-07 304 */
3f49584b262cf8 SeongJae Park 2021-09-07 305 static void damon_va_apply_three_regions(struct damon_target *t,
3f49584b262cf8 SeongJae Park 2021-09-07 306 struct damon_addr_range bregions[3])
3f49584b262cf8 SeongJae Park 2021-09-07 307 {
3f49584b262cf8 SeongJae Park 2021-09-07 308 struct damon_region *r, *next;
966a1baa2355c1 Xin Hao 2021-10-28 309 unsigned int i;
3f49584b262cf8 SeongJae Park 2021-09-07 310
3f49584b262cf8 SeongJae Park 2021-09-07 311 /* Remove regions which are not in the three big regions now */
3f49584b262cf8 SeongJae Park 2021-09-07 312 damon_for_each_region_safe(r, next, t) {
3f49584b262cf8 SeongJae Park 2021-09-07 313 for (i = 0; i < 3; i++) {
3f49584b262cf8 SeongJae Park 2021-09-07 314 if (damon_intersect(r, &bregions[i]))
3f49584b262cf8 SeongJae Park 2021-09-07 315 break;
3f49584b262cf8 SeongJae Park 2021-09-07 316 }
3f49584b262cf8 SeongJae Park 2021-09-07 317 if (i == 3)
3f49584b262cf8 SeongJae Park 2021-09-07 318 damon_destroy_region(r, t);
3f49584b262cf8 SeongJae Park 2021-09-07 319 }
3f49584b262cf8 SeongJae Park 2021-09-07 320
3f49584b262cf8 SeongJae Park 2021-09-07 321 /* Adjust intersecting regions to fit with the three big regions */
3f49584b262cf8 SeongJae Park 2021-09-07 322 for (i = 0; i < 3; i++) {
3f49584b262cf8 SeongJae Park 2021-09-07 323 struct damon_region *first = NULL, *last;
3f49584b262cf8 SeongJae Park 2021-09-07 324 struct damon_region *newr;
3f49584b262cf8 SeongJae Park 2021-09-07 325 struct damon_addr_range *br;
3f49584b262cf8 SeongJae Park 2021-09-07 326
3f49584b262cf8 SeongJae Park 2021-09-07 327 br = &bregions[i];
3f49584b262cf8 SeongJae Park 2021-09-07 328 /* Get the first and last regions which intersects with br */
3f49584b262cf8 SeongJae Park 2021-09-07 329 damon_for_each_region(r, t) {
3f49584b262cf8 SeongJae Park 2021-09-07 330 if (damon_intersect(r, br)) {
3f49584b262cf8 SeongJae Park 2021-09-07 331 if (!first)
3f49584b262cf8 SeongJae Park 2021-09-07 332 first = r;
3f49584b262cf8 SeongJae Park 2021-09-07 333 last = r;
3f49584b262cf8 SeongJae Park 2021-09-07 334 }
3f49584b262cf8 SeongJae Park 2021-09-07 335 if (r->ar.start >= br->end)
3f49584b262cf8 SeongJae Park 2021-09-07 336 break;
3f49584b262cf8 SeongJae Park 2021-09-07 337 }
3f49584b262cf8 SeongJae Park 2021-09-07 338 if (!first) {
3f49584b262cf8 SeongJae Park 2021-09-07 339 /* no damon_region intersects with this big region */
3f49584b262cf8 SeongJae Park 2021-09-07 340 newr = damon_new_region(
3f49584b262cf8 SeongJae Park 2021-09-07 341 ALIGN_DOWN(br->start,
3f49584b262cf8 SeongJae Park 2021-09-07 342 DAMON_MIN_REGION),
3f49584b262cf8 SeongJae Park 2021-09-07 343 ALIGN(br->end, DAMON_MIN_REGION));
3f49584b262cf8 SeongJae Park 2021-09-07 344 if (!newr)
3f49584b262cf8 SeongJae Park 2021-09-07 345 continue;
3f49584b262cf8 SeongJae Park 2021-09-07 346 damon_insert_region(newr, damon_prev_region(r), r, t);
3f49584b262cf8 SeongJae Park 2021-09-07 347 } else {
3f49584b262cf8 SeongJae Park 2021-09-07 348 first->ar.start = ALIGN_DOWN(br->start,
3f49584b262cf8 SeongJae Park 2021-09-07 349 DAMON_MIN_REGION);
3f49584b262cf8 SeongJae Park 2021-09-07 350 last->ar.end = ALIGN(br->end, DAMON_MIN_REGION);
3f49584b262cf8 SeongJae Park 2021-09-07 351 }
3f49584b262cf8 SeongJae Park 2021-09-07 352 }
3f49584b262cf8 SeongJae Park 2021-09-07 353 }
3f49584b262cf8 SeongJae Park 2021-09-07 354
3f49584b262cf8 SeongJae Park 2021-09-07 355 /*
3f49584b262cf8 SeongJae Park 2021-09-07 356 * Update regions for current memory mappings
3f49584b262cf8 SeongJae Park 2021-09-07 357 */
3f49584b262cf8 SeongJae Park 2021-09-07 @358 void damon_va_update(struct damon_ctx *ctx)
3f49584b262cf8 SeongJae Park 2021-09-07 359 {
3f49584b262cf8 SeongJae Park 2021-09-07 360 struct damon_addr_range three_regions[3];
3f49584b262cf8 SeongJae Park 2021-09-07 361 struct damon_target *t;
3f49584b262cf8 SeongJae Park 2021-09-07 362
3f49584b262cf8 SeongJae Park 2021-09-07 363 damon_for_each_target(t, ctx) {
3f49584b262cf8 SeongJae Park 2021-09-07 364 if (damon_va_three_regions(t, three_regions))
3f49584b262cf8 SeongJae Park 2021-09-07 365 continue;
3f49584b262cf8 SeongJae Park 2021-09-07 366 damon_va_apply_three_regions(t, three_regions);
3f49584b262cf8 SeongJae Park 2021-09-07 367 }
3f49584b262cf8 SeongJae Park 2021-09-07 368 }
3f49584b262cf8 SeongJae Park 2021-09-07 369
3f49584b262cf8 SeongJae Park 2021-09-07 370 static int damon_mkold_pmd_entry(pmd_t *pmd, unsigned long addr,
3f49584b262cf8 SeongJae Park 2021-09-07 371 unsigned long next, struct mm_walk *walk)
3f49584b262cf8 SeongJae Park 2021-09-07 372 {
3f49584b262cf8 SeongJae Park 2021-09-07 373 pte_t *pte;
3f49584b262cf8 SeongJae Park 2021-09-07 374 spinlock_t *ptl;
3f49584b262cf8 SeongJae Park 2021-09-07 375
3f49584b262cf8 SeongJae Park 2021-09-07 376 if (pmd_huge(*pmd)) {
3f49584b262cf8 SeongJae Park 2021-09-07 377 ptl = pmd_lock(walk->mm, pmd);
3f49584b262cf8 SeongJae Park 2021-09-07 378 if (pmd_huge(*pmd)) {
3f49584b262cf8 SeongJae Park 2021-09-07 379 damon_pmdp_mkold(pmd, walk->mm, addr);
3f49584b262cf8 SeongJae Park 2021-09-07 380 spin_unlock(ptl);
3f49584b262cf8 SeongJae Park 2021-09-07 381 return 0;
3f49584b262cf8 SeongJae Park 2021-09-07 382 }
3f49584b262cf8 SeongJae Park 2021-09-07 383 spin_unlock(ptl);
3f49584b262cf8 SeongJae Park 2021-09-07 384 }
3f49584b262cf8 SeongJae Park 2021-09-07 385
3f49584b262cf8 SeongJae Park 2021-09-07 386 if (pmd_none(*pmd) || unlikely(pmd_bad(*pmd)))
3f49584b262cf8 SeongJae Park 2021-09-07 387 return 0;
3f49584b262cf8 SeongJae Park 2021-09-07 388 pte = pte_offset_map_lock(walk->mm, pmd, addr, &ptl);
3f49584b262cf8 SeongJae Park 2021-09-07 389 if (!pte_present(*pte))
3f49584b262cf8 SeongJae Park 2021-09-07 390 goto out;
3f49584b262cf8 SeongJae Park 2021-09-07 391 damon_ptep_mkold(pte, walk->mm, addr);
3f49584b262cf8 SeongJae Park 2021-09-07 392 out:
3f49584b262cf8 SeongJae Park 2021-09-07 393 pte_unmap_unlock(pte, ptl);
3f49584b262cf8 SeongJae Park 2021-09-07 394 return 0;
3f49584b262cf8 SeongJae Park 2021-09-07 395 }
3f49584b262cf8 SeongJae Park 2021-09-07 396
aafaf6b3b9b77a Rikard Falkeborn 2021-10-28 397 static const struct mm_walk_ops damon_mkold_ops = {
3f49584b262cf8 SeongJae Park 2021-09-07 398 .pmd_entry = damon_mkold_pmd_entry,
3f49584b262cf8 SeongJae Park 2021-09-07 399 };
3f49584b262cf8 SeongJae Park 2021-09-07 400
3f49584b262cf8 SeongJae Park 2021-09-07 401 static void damon_va_mkold(struct mm_struct *mm, unsigned long addr)
3f49584b262cf8 SeongJae Park 2021-09-07 402 {
3f49584b262cf8 SeongJae Park 2021-09-07 403 mmap_read_lock(mm);
3f49584b262cf8 SeongJae Park 2021-09-07 404 walk_page_range(mm, addr, addr + 1, &damon_mkold_ops, NULL);
3f49584b262cf8 SeongJae Park 2021-09-07 405 mmap_read_unlock(mm);
3f49584b262cf8 SeongJae Park 2021-09-07 406 }
3f49584b262cf8 SeongJae Park 2021-09-07 407
3f49584b262cf8 SeongJae Park 2021-09-07 408 /*
3f49584b262cf8 SeongJae Park 2021-09-07 409 * Functions for the access checking of the regions
3f49584b262cf8 SeongJae Park 2021-09-07 410 */
3f49584b262cf8 SeongJae Park 2021-09-07 411
a7c7432ffce91f Xin Hao 2021-11-13 412 static void __damon_va_prepare_access_check(struct damon_ctx *ctx,
3f49584b262cf8 SeongJae Park 2021-09-07 413 struct mm_struct *mm, struct damon_region *r)
3f49584b262cf8 SeongJae Park 2021-09-07 414 {
3f49584b262cf8 SeongJae Park 2021-09-07 415 r->sampling_addr = damon_rand(r->ar.start, r->ar.end);
3f49584b262cf8 SeongJae Park 2021-09-07 416
3f49584b262cf8 SeongJae Park 2021-09-07 417 damon_va_mkold(mm, r->sampling_addr);
3f49584b262cf8 SeongJae Park 2021-09-07 418 }
3f49584b262cf8 SeongJae Park 2021-09-07 419
3f49584b262cf8 SeongJae Park 2021-09-07 @420 void damon_va_prepare_access_checks(struct damon_ctx *ctx)
3f49584b262cf8 SeongJae Park 2021-09-07 421 {
3f49584b262cf8 SeongJae Park 2021-09-07 422 struct damon_target *t;
3f49584b262cf8 SeongJae Park 2021-09-07 423 struct mm_struct *mm;
3f49584b262cf8 SeongJae Park 2021-09-07 424 struct damon_region *r;
3f49584b262cf8 SeongJae Park 2021-09-07 425
3f49584b262cf8 SeongJae Park 2021-09-07 426 damon_for_each_target(t, ctx) {
3f49584b262cf8 SeongJae Park 2021-09-07 427 mm = damon_get_mm(t);
3f49584b262cf8 SeongJae Park 2021-09-07 428 if (!mm)
3f49584b262cf8 SeongJae Park 2021-09-07 429 continue;
3f49584b262cf8 SeongJae Park 2021-09-07 430 damon_for_each_region(r, t)
a7c7432ffce91f Xin Hao 2021-11-13 431 __damon_va_prepare_access_check(ctx, mm, r);
3f49584b262cf8 SeongJae Park 2021-09-07 432 mmput(mm);
3f49584b262cf8 SeongJae Park 2021-09-07 433 }
3f49584b262cf8 SeongJae Park 2021-09-07 434 }
3f49584b262cf8 SeongJae Park 2021-09-07 435
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week