Re: [PATCH] i915: fix shift warning
by kernel test robot
Hi Arnd,
I love your patch! Perhaps something to improve:
[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on v5.11-rc1 next-20201223]
[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/Arnd-Bergmann/i915-fix-shift-war...
base: git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-randconfig-a015-20201230 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 3c0d36f977d9e012b245c796ddc8596ac3af659b)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/6b837ba40d73c6c02cdf26654c577a901...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Arnd-Bergmann/i915-fix-shift-warning/20201230-234054
git checkout 6b837ba40d73c6c02cdf26654c577a90130a6b99
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross 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/gpu/drm/i915/gt/intel_engine_cs.c:509:15: warning: format specifies type 'unsigned long' but the argument has type 'unsigned long long' [-Wformat]
vdbox_mask, VDBOX_MASK(gt));
^~~~~~~~~~~~~~
include/drm/drm_print.h:448:48: note: expanded from macro 'drm_dbg'
drm_dev_dbg((drm)->dev, DRM_UT_DRIVER, fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
drivers/gpu/drm/i915/i915_drv.h:1630:2: note: expanded from macro 'VDBOX_MASK'
ENGINE_INSTANCES_MASK(gt, VCS0, I915_MAX_VCS)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/i915_drv.h:1623:49: note: expanded from macro 'ENGINE_INSTANCES_MASK'
#define ENGINE_INSTANCES_MASK(gt, first, count) ({ \
^~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/gt/intel_engine_cs.c:524:15: warning: format specifies type 'unsigned long' but the argument has type 'unsigned long long' [-Wformat]
vebox_mask, VEBOX_MASK(gt));
^~~~~~~~~~~~~~
include/drm/drm_print.h:448:48: note: expanded from macro 'drm_dbg'
drm_dev_dbg((drm)->dev, DRM_UT_DRIVER, fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
drivers/gpu/drm/i915/i915_drv.h:1632:2: note: expanded from macro 'VEBOX_MASK'
ENGINE_INSTANCES_MASK(gt, VECS0, I915_MAX_VECS)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/i915_drv.h:1623:49: note: expanded from macro 'ENGINE_INSTANCES_MASK'
#define ENGINE_INSTANCES_MASK(gt, first, count) ({ \
^~~~~~~~~~~~~~~~~
2 warnings generated.
vim +509 drivers/gpu/drm/i915/gt/intel_engine_cs.c
e26b6d4341476f6 Chris Wilson 2019-12-22 455
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 456 /*
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 457 * Determine which engines are fused off in our particular hardware.
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 458 * Note that we have a catch-22 situation where we need to be able to access
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 459 * the blitter forcewake domain to read the engine fuses, but at the same time
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 460 * we need to know which engines are available on the system to know which
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 461 * forcewake domains are present. We solve this by intializing the forcewake
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 462 * domains based on the full engine mask in the platform capabilities before
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 463 * calling this function and pruning the domains for fused-off engines
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 464 * afterwards.
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 465 */
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 466 static intel_engine_mask_t init_engine_mask(struct intel_gt *gt)
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 467 {
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 468 struct drm_i915_private *i915 = gt->i915;
792592e72aba416 Daniele Ceraolo Spurio 2020-07-07 469 struct intel_gt_info *info = >->info;
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 470 struct intel_uncore *uncore = gt->uncore;
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 471 unsigned int logical_vdbox = 0;
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 472 unsigned int i;
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 473 u32 media_fuse;
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 474 u16 vdbox_mask;
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 475 u16 vebox_mask;
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 476
792592e72aba416 Daniele Ceraolo Spurio 2020-07-07 477 info->engine_mask = INTEL_INFO(i915)->platform_engine_mask;
792592e72aba416 Daniele Ceraolo Spurio 2020-07-07 478
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 479 if (INTEL_GEN(i915) < 11)
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 480 return info->engine_mask;
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 481
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 482 media_fuse = ~intel_uncore_read(uncore, GEN11_GT_VEBOX_VDBOX_DISABLE);
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 483
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 484 vdbox_mask = media_fuse & GEN11_GT_VDBOX_DISABLE_MASK;
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 485 vebox_mask = (media_fuse & GEN11_GT_VEBOX_DISABLE_MASK) >>
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 486 GEN11_GT_VEBOX_DISABLE_SHIFT;
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 487
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 488 for (i = 0; i < I915_MAX_VCS; i++) {
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 489 if (!HAS_ENGINE(gt, _VCS(i))) {
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 490 vdbox_mask &= ~BIT(i);
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 491 continue;
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 492 }
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 493
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 494 if (!(BIT(i) & vdbox_mask)) {
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 495 info->engine_mask &= ~BIT(_VCS(i));
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 496 drm_dbg(&i915->drm, "vcs%u fused off\n", i);
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 497 continue;
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 498 }
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 499
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 500 /*
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 501 * In Gen11, only even numbered logical VDBOXes are
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 502 * hooked up to an SFC (Scaler & Format Converter) unit.
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 503 * In TGL each VDBOX has access to an SFC.
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 504 */
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 505 if (INTEL_GEN(i915) >= 12 || logical_vdbox++ % 2 == 0)
792592e72aba416 Daniele Ceraolo Spurio 2020-07-07 506 gt->info.vdbox_sfc_access |= BIT(i);
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 507 }
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 508 drm_dbg(&i915->drm, "vdbox enable: %04x, instances: %04lx\n",
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 @509 vdbox_mask, VDBOX_MASK(gt));
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 510 GEM_BUG_ON(vdbox_mask != VDBOX_MASK(gt));
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 511
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 512 for (i = 0; i < I915_MAX_VECS; i++) {
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 513 if (!HAS_ENGINE(gt, _VECS(i))) {
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 514 vebox_mask &= ~BIT(i);
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 515 continue;
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 516 }
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 517
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 518 if (!(BIT(i) & vebox_mask)) {
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 519 info->engine_mask &= ~BIT(_VECS(i));
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 520 drm_dbg(&i915->drm, "vecs%u fused off\n", i);
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 521 }
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 522 }
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 523 drm_dbg(&i915->drm, "vebox enable: %04x, instances: %04lx\n",
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 524 vebox_mask, VEBOX_MASK(gt));
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 525 GEM_BUG_ON(vebox_mask != VEBOX_MASK(gt));
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 526
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 527 return info->engine_mask;
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 528 }
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 529
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
Re: [PATCH] i915: fix shift warning
by kernel test robot
Hi Arnd,
I love your patch! Perhaps something to improve:
[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on v5.11-rc1 next-20201223]
[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/Arnd-Bergmann/i915-fix-shift-war...
base: git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-rhel (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/6b837ba40d73c6c02cdf26654c577a901...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Arnd-Bergmann/i915-fix-shift-warning/20201230-234054
git checkout 6b837ba40d73c6c02cdf26654c577a90130a6b99
# save the attached .config to linux build tree
make 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 >>):
In file included from drivers/gpu/drm/i915/gt/intel_engine_cs.c:25:
drivers/gpu/drm/i915/gt/intel_engine_cs.c: In function 'init_engine_mask':
>> drivers/gpu/drm/i915/gt/intel_engine_cs.c:508:22: warning: format '%lx' expects argument of type 'long unsigned int', but argument 5 has type 'long long unsigned int' [-Wformat=]
508 | drm_dbg(&i915->drm, "vdbox enable: %04x, instances: %04lx\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/drm/drm_print.h:448:41: note: in definition of macro 'drm_dbg'
448 | drm_dev_dbg((drm)->dev, DRM_UT_DRIVER, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/i915/gt/intel_engine_cs.c:508:58: note: format string is defined here
508 | drm_dbg(&i915->drm, "vdbox enable: %04x, instances: %04lx\n",
| ~~~~^
| |
| long unsigned int
| %04llx
In file included from drivers/gpu/drm/i915/gt/intel_engine_cs.c:25:
drivers/gpu/drm/i915/gt/intel_engine_cs.c:523:22: warning: format '%lx' expects argument of type 'long unsigned int', but argument 5 has type 'long long unsigned int' [-Wformat=]
523 | drm_dbg(&i915->drm, "vebox enable: %04x, instances: %04lx\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/drm/drm_print.h:448:41: note: in definition of macro 'drm_dbg'
448 | drm_dev_dbg((drm)->dev, DRM_UT_DRIVER, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/i915/gt/intel_engine_cs.c:523:58: note: format string is defined here
523 | drm_dbg(&i915->drm, "vebox enable: %04x, instances: %04lx\n",
| ~~~~^
| |
| long unsigned int
| %04llx
vim +508 drivers/gpu/drm/i915/gt/intel_engine_cs.c
e26b6d4341476f6 Chris Wilson 2019-12-22 455
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 456 /*
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 457 * Determine which engines are fused off in our particular hardware.
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 458 * Note that we have a catch-22 situation where we need to be able to access
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 459 * the blitter forcewake domain to read the engine fuses, but at the same time
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 460 * we need to know which engines are available on the system to know which
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 461 * forcewake domains are present. We solve this by intializing the forcewake
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 462 * domains based on the full engine mask in the platform capabilities before
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 463 * calling this function and pruning the domains for fused-off engines
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 464 * afterwards.
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 465 */
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 466 static intel_engine_mask_t init_engine_mask(struct intel_gt *gt)
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 467 {
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 468 struct drm_i915_private *i915 = gt->i915;
792592e72aba416 Daniele Ceraolo Spurio 2020-07-07 469 struct intel_gt_info *info = >->info;
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 470 struct intel_uncore *uncore = gt->uncore;
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 471 unsigned int logical_vdbox = 0;
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 472 unsigned int i;
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 473 u32 media_fuse;
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 474 u16 vdbox_mask;
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 475 u16 vebox_mask;
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 476
792592e72aba416 Daniele Ceraolo Spurio 2020-07-07 477 info->engine_mask = INTEL_INFO(i915)->platform_engine_mask;
792592e72aba416 Daniele Ceraolo Spurio 2020-07-07 478
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 479 if (INTEL_GEN(i915) < 11)
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 480 return info->engine_mask;
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 481
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 482 media_fuse = ~intel_uncore_read(uncore, GEN11_GT_VEBOX_VDBOX_DISABLE);
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 483
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 484 vdbox_mask = media_fuse & GEN11_GT_VDBOX_DISABLE_MASK;
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 485 vebox_mask = (media_fuse & GEN11_GT_VEBOX_DISABLE_MASK) >>
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 486 GEN11_GT_VEBOX_DISABLE_SHIFT;
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 487
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 488 for (i = 0; i < I915_MAX_VCS; i++) {
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 489 if (!HAS_ENGINE(gt, _VCS(i))) {
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 490 vdbox_mask &= ~BIT(i);
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 491 continue;
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 492 }
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 493
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 494 if (!(BIT(i) & vdbox_mask)) {
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 495 info->engine_mask &= ~BIT(_VCS(i));
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 496 drm_dbg(&i915->drm, "vcs%u fused off\n", i);
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 497 continue;
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 498 }
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 499
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 500 /*
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 501 * In Gen11, only even numbered logical VDBOXes are
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 502 * hooked up to an SFC (Scaler & Format Converter) unit.
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 503 * In TGL each VDBOX has access to an SFC.
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 504 */
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 505 if (INTEL_GEN(i915) >= 12 || logical_vdbox++ % 2 == 0)
792592e72aba416 Daniele Ceraolo Spurio 2020-07-07 506 gt->info.vdbox_sfc_access |= BIT(i);
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 507 }
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 @508 drm_dbg(&i915->drm, "vdbox enable: %04x, instances: %04lx\n",
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 509 vdbox_mask, VDBOX_MASK(gt));
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 510 GEM_BUG_ON(vdbox_mask != VDBOX_MASK(gt));
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 511
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 512 for (i = 0; i < I915_MAX_VECS; i++) {
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 513 if (!HAS_ENGINE(gt, _VECS(i))) {
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 514 vebox_mask &= ~BIT(i);
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 515 continue;
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 516 }
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 517
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 518 if (!(BIT(i) & vebox_mask)) {
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 519 info->engine_mask &= ~BIT(_VECS(i));
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 520 drm_dbg(&i915->drm, "vecs%u fused off\n", i);
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 521 }
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 522 }
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 523 drm_dbg(&i915->drm, "vebox enable: %04x, instances: %04lx\n",
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 524 vebox_mask, VEBOX_MASK(gt));
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 525 GEM_BUG_ON(vebox_mask != VEBOX_MASK(gt));
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 526
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 527 return info->engine_mask;
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 528 }
f6beb38100778b7 Daniele Ceraolo Spurio 2020-07-07 529
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[lee-linaro:google/android-3.18-batch 202/521] fs/pstore/ram_core.c:269:34: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot
tree: https://git.linaro.org/people/lee.jones/linux.git google/android-3.18-batch
head: 4067e89d337bc9eff1775d036695028b3ea3487c
commit: ba095f7a7a499fc213bfcf54a9eac7ba29837dac [202/521] pstore/ram: Use memcpy_toio instead of memcpy
config: powerpc-randconfig-s031-20201230 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 5.5.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-184-g1b896707-dirty
git remote add lee-linaro https://git.linaro.org/people/lee.jones/linux.git
git fetch --no-tags lee-linaro google/android-3.18-batch
git checkout ba095f7a7a499fc213bfcf54a9eac7ba29837dac
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-5.5.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=powerpc
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 >>)"
fs/pstore/ram_core.c:101:35: sparse: sparse: Variable length array is used.
fs/pstore/ram_core.c:114:35: sparse: sparse: Variable length array is used.
>> fs/pstore/ram_core.c:269:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] <asn:2> *d @@ got unsigned char * @@
fs/pstore/ram_core.c:269:34: sparse: expected void volatile [noderef] <asn:2> *d
fs/pstore/ram_core.c:269:34: sparse: got unsigned char *
fs/pstore/ram_core.c:444:20: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *va @@ got void [noderef] <asn:2> * @@
fs/pstore/ram_core.c:444:20: sparse: expected void *va
fs/pstore/ram_core.c:444:20: sparse: got void [noderef] <asn:2> *
fs/pstore/ram_core.c:446:20: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *va @@ got void [noderef] <asn:2> * @@
fs/pstore/ram_core.c:446:20: sparse: expected void *va
fs/pstore/ram_core.c:446:20: sparse: got void [noderef] <asn:2> *
fs/pstore/ram_core.c:528:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] <asn:2> *addr @@ got void *vaddr @@
fs/pstore/ram_core.c:528:36: sparse: expected void volatile [noderef] <asn:2> *addr
fs/pstore/ram_core.c:528:36: sparse: got void *vaddr
fs/pstore/ram_core.c:68:17: sparse: sparse: context imbalance in 'buffer_start_add' - unexpected unlock
fs/pstore/ram_core.c:94:17: sparse: sparse: context imbalance in 'buffer_size_add' - unexpected unlock
In file included from arch/powerpc/include/asm/pgtable-ppc32.h:7:0,
from arch/powerpc/include/asm/pgtable.h:19,
from include/linux/mm.h:63,
from include/linux/memblock.h:18,
from fs/pstore/ram_core.c:24:
include/linux/sched.h:1067:42: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
const struct sched_group_energy * const(*sched_domain_energy_f)(int cpu);
^
In file included from include/linux/memblock.h:18:0,
from fs/pstore/ram_core.c:24:
include/linux/mm.h: In function 'is_vmalloc_addr':
include/linux/mm.h:378:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
return addr >= VMALLOC_START && addr < VMALLOC_END;
^
In file included from include/linux/ioport.h:12:0,
from include/linux/device.h:16,
from fs/pstore/ram_core.c:17:
fs/pstore/ram_core.c: In function 'buffer_start_add':
fs/pstore/ram_core.c:63:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while (unlikely(new >= prz->buffer_size))
^
include/linux/compiler.h:176:42: note: in definition of macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
fs/pstore/ram_core.c: In function 'persistent_ram_write':
fs/pstore/ram_core.c:313:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (unlikely(c > prz->buffer_size)) {
^
include/linux/compiler.h:176:42: note: in definition of macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
fs/pstore/ram_core.c: In function 'persistent_ram_write_user':
fs/pstore/ram_core.c:344:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (unlikely(c > prz->buffer_size)) {
^
include/linux/compiler.h:176:42: note: in definition of macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
fs/pstore/ram_core.c:365:29: warning: signed and unsigned type in conditional expression [-Wsign-compare]
return unlikely(ret) ? ret : count;
^
vim +269 fs/pstore/ram_core.c
264
265 static void notrace persistent_ram_update(struct persistent_ram_zone *prz,
266 const void *s, unsigned int start, unsigned int count)
267 {
268 struct persistent_ram_buffer *buffer = prz->buffer;
> 269 memcpy_toio(buffer->data + start, s, count);
270 persistent_ram_update_ecc(prz, start, count);
271 }
272
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[android-goldfish:android-3.18 349/362] drivers/staging/wlan-ng/p80211netdev.c:235:41: sparse: sparse: cast to restricted __le16
by kernel test robot
tree: https://android.googlesource.com/kernel/goldfish android-3.18
head: 145dffbee46bf9294a60c79e32c2397b27a6853e
commit: a6cb2a3ff14ca4b576a826eddd79006fcfc9f1b2 [349/362] staging: wlan-ng: add missing byte order conversion
config: x86_64-randconfig-s021-20201230 (attached as .config)
compiler: gcc-5 (Ubuntu 5.5.0-12ubuntu1) 5.5.0 20171010
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-184-g1b896707-dirty
git remote add android-goldfish https://android.googlesource.com/kernel/goldfish
git fetch --no-tags android-goldfish android-3.18
git checkout a6cb2a3ff14ca4b576a826eddd79006fcfc9f1b2
# 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/staging/wlan-ng/p80211netdev.c:361:24: sparse: sparse: restricted __be16 degrades to integer
drivers/staging/wlan-ng/p80211netdev.c:372:16: sparse: sparse: restricted __be16 degrades to integer
>> drivers/staging/wlan-ng/p80211netdev.c:235:41: sparse: sparse: cast to restricted __le16
arch/x86/include/asm/bitops.h: Assembler messages:
arch/x86/include/asm/bitops.h:206: Warning: no instruction mnemonic suffix given and no register operands; using default for `bts'
vim +235 drivers/staging/wlan-ng/p80211netdev.c
220
221 /**
222 * p80211_convert_to_ether - conversion from 802.11 frame to ethernet frame
223 * @wlandev: pointer to WLAN device
224 * @skb: pointer to socket buffer
225 *
226 * Returns: 0 if conversion succeeded
227 * CONV_TO_ETHER_FAILED if conversion failed
228 * CONV_TO_ETHER_SKIPPED if frame is ignored
229 */
230 static int p80211_convert_to_ether(wlandevice_t *wlandev, struct sk_buff *skb)
231 {
232 struct p80211_hdr_a3 *hdr;
233
234 hdr = (struct p80211_hdr_a3 *) skb->data;
> 235 if (p80211_rx_typedrop(wlandev, le16_to_cpu(hdr->fc)))
236 return CONV_TO_ETHER_SKIPPED;
237
238 /* perform mcast filtering: allow my local address through but reject
239 * anything else that isn't multicast
240 */
241 if (wlandev->netdev->flags & IFF_ALLMULTI) {
242 if (!ether_addr_equal_unaligned(wlandev->netdev->dev_addr,
243 hdr->a1)) {
244 if (!is_multicast_ether_addr(hdr->a1))
245 return CONV_TO_ETHER_SKIPPED;
246 }
247 }
248
249 if (skb_p80211_to_ether(wlandev, wlandev->ethconv, skb) == 0) {
250 skb->dev->last_rx = jiffies;
251 wlandev->netdev->stats.rx_packets++;
252 wlandev->netdev->stats.rx_bytes += skb->len;
253 netif_rx_ni(skb);
254 return 0;
255 }
256
257 netdev_dbg(wlandev->netdev, "p80211_convert_to_ether failed.\n");
258 return CONV_TO_ETHER_FAILED;
259 }
260
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
Re: [PATCH v1 2/2] drm/bridge: anx7625: add MIPI DPI input feature support
by kernel test robot
Hi Xin,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on drm-tip/drm-tip linus/master v5.11-rc1 next-20201223]
[cannot apply to robh/for-next]
[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/Xin-Ji/Add-MIPI-rx-DPI-support/2...
base: git://anongit.freedesktop.org/drm-intel for-linux-next
config: arm64-randconfig-r026-20201230 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 3c0d36f977d9e012b245c796ddc8596ac3af659b)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://github.com/0day-ci/linux/commit/eb80dca31ef0506d1afd6590d45376845...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Xin-Ji/Add-MIPI-rx-DPI-support/20201225-190825
git checkout eb80dca31ef0506d1afd6590d453768456f2d646
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
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/bridge/analogix/anx7625.c:935:6: warning: no previous prototype for function 'hdcp_enable' [-Wmissing-prototypes]
void hdcp_enable(struct anx7625_data *ctx, int en)
^
drivers/gpu/drm/bridge/analogix/anx7625.c:935:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void hdcp_enable(struct anx7625_data *ctx, int en)
^
static
1 warning generated.
vim +/hdcp_enable +935 drivers/gpu/drm/bridge/analogix/anx7625.c
934
> 935 void hdcp_enable(struct anx7625_data *ctx, int en)
936 {
937 struct device *dev = &ctx->client->dev;
938
939 DRM_DEV_DEBUG_DRIVER(dev, "en(%d)\n", en);
940
941 ctx->hdcp_en = !!en;
942 }
943
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
Re: [PATCH V5 2/8] remoteproc: add is_iomem to da_to_va
by kernel test robot
Hi,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.11-rc1 next-20201223]
[cannot apply to soc/for-next xlnx/master remoteproc/for-next rpmsg/for-next]
[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/peng-fan-nxp-com/remoteproc-imx_...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git dea8dcf2a9fa8cc540136a6cd885c3beece16ec3
config: i386-randconfig-s001-20201230 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-184-g1b896707-dirty
# https://github.com/0day-ci/linux/commit/f2054bc05d3b183ef0b0ff0b4c802ba53...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review peng-fan-nxp-com/remoteproc-imx_rproc-support-iMX8MQ-M/20201229-110725
git checkout f2054bc05d3b183ef0b0ff0b4c802ba53680a5af
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
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/remoteproc/remoteproc_elf_loader.c:219:61: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const volatile [noderef] __iomem * @@ got unsigned char const [usertype] * @@
drivers/remoteproc/remoteproc_elf_loader.c:219:61: sparse: expected void const volatile [noderef] __iomem *
drivers/remoteproc/remoteproc_elf_loader.c:219:61: sparse: got unsigned char const [usertype] *
>> drivers/remoteproc/remoteproc_elf_loader.c:233:47: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem * @@ got void * @@
drivers/remoteproc/remoteproc_elf_loader.c:233:47: sparse: expected void volatile [noderef] __iomem *
drivers/remoteproc/remoteproc_elf_loader.c:233:47: sparse: got void *
--
>> drivers/remoteproc/remoteproc_coredump.c:169:53: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const volatile [noderef] __iomem * @@ got void *[assigned] ptr @@
drivers/remoteproc/remoteproc_coredump.c:169:53: sparse: expected void const volatile [noderef] __iomem *
drivers/remoteproc/remoteproc_coredump.c:169:53: sparse: got void *[assigned] ptr
vim +219 drivers/remoteproc/remoteproc_elf_loader.c
131
132 /**
133 * rproc_elf_load_segments() - load firmware segments to memory
134 * @rproc: remote processor which will be booted using these fw segments
135 * @fw: the ELF firmware image
136 *
137 * This function loads the firmware segments to memory, where the remote
138 * processor expects them.
139 *
140 * Some remote processors will expect their code and data to be placed
141 * in specific device addresses, and can't have them dynamically assigned.
142 *
143 * We currently support only those kind of remote processors, and expect
144 * the program header's paddr member to contain those addresses. We then go
145 * through the physically contiguous "carveout" memory regions which we
146 * allocated (and mapped) earlier on behalf of the remote processor,
147 * and "translate" device address to kernel addresses, so we can copy the
148 * segments where they are expected.
149 *
150 * Currently we only support remote processors that required carveout
151 * allocations and got them mapped onto their iommus. Some processors
152 * might be different: they might not have iommus, and would prefer to
153 * directly allocate memory for every segment/resource. This is not yet
154 * supported, though.
155 */
156 int rproc_elf_load_segments(struct rproc *rproc, const struct firmware *fw)
157 {
158 struct device *dev = &rproc->dev;
159 const void *ehdr, *phdr;
160 int i, ret = 0;
161 u16 phnum;
162 const u8 *elf_data = fw->data;
163 u8 class = fw_elf_get_class(fw);
164 u32 elf_phdr_get_size = elf_size_of_phdr(class);
165
166 ehdr = elf_data;
167 phnum = elf_hdr_get_e_phnum(class, ehdr);
168 phdr = elf_data + elf_hdr_get_e_phoff(class, ehdr);
169
170 /* go through the available ELF segments */
171 for (i = 0; i < phnum; i++, phdr += elf_phdr_get_size) {
172 u64 da = elf_phdr_get_p_paddr(class, phdr);
173 u64 memsz = elf_phdr_get_p_memsz(class, phdr);
174 u64 filesz = elf_phdr_get_p_filesz(class, phdr);
175 u64 offset = elf_phdr_get_p_offset(class, phdr);
176 u32 type = elf_phdr_get_p_type(class, phdr);
177 void *ptr;
178 bool is_iomem;
179
180 if (type != PT_LOAD)
181 continue;
182
183 dev_dbg(dev, "phdr: type %d da 0x%llx memsz 0x%llx filesz 0x%llx\n",
184 type, da, memsz, filesz);
185
186 if (filesz > memsz) {
187 dev_err(dev, "bad phdr filesz 0x%llx memsz 0x%llx\n",
188 filesz, memsz);
189 ret = -EINVAL;
190 break;
191 }
192
193 if (offset + filesz > fw->size) {
194 dev_err(dev, "truncated fw: need 0x%llx avail 0x%zx\n",
195 offset + filesz, fw->size);
196 ret = -EINVAL;
197 break;
198 }
199
200 if (!rproc_u64_fit_in_size_t(memsz)) {
201 dev_err(dev, "size (%llx) does not fit in size_t type\n",
202 memsz);
203 ret = -EOVERFLOW;
204 break;
205 }
206
207 /* grab the kernel address for this device address */
208 ptr = rproc_da_to_va(rproc, da, memsz, &is_iomem);
209 if (!ptr) {
210 dev_err(dev, "bad phdr da 0x%llx mem 0x%llx\n", da,
211 memsz);
212 ret = -EINVAL;
213 break;
214 }
215
216 /* put the segment where the remote processor expects it */
217 if (filesz) {
218 if (is_iomem)
> 219 memcpy_fromio(ptr, elf_data + offset, filesz);
220 else
221 memcpy(ptr, elf_data + offset, filesz);
222 }
223
224 /*
225 * Zero out remaining memory for this segment.
226 *
227 * This isn't strictly required since dma_alloc_coherent already
228 * did this for us. albeit harmless, we may consider removing
229 * this.
230 */
231 if (memsz > filesz) {
232 if (is_iomem)
> 233 memset_io(ptr + filesz, 0, memsz - filesz);
234 else
235 memset(ptr + filesz, 0, memsz - filesz);
236 }
237 }
238
239 return ret;
240 }
241 EXPORT_SYMBOL(rproc_elf_load_segments);
242
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
Re: [PATCH V5 2/8] remoteproc: add is_iomem to da_to_va
by kernel test robot
Hi,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.11-rc1 next-20201223]
[cannot apply to soc/for-next xlnx/master remoteproc/for-next rpmsg/for-next]
[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/peng-fan-nxp-com/remoteproc-imx_...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git dea8dcf2a9fa8cc540136a6cd885c3beece16ec3
config: powerpc64-randconfig-s032-20201230 (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-184-g1b896707-dirty
# https://github.com/0day-ci/linux/commit/f2054bc05d3b183ef0b0ff0b4c802ba53...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review peng-fan-nxp-com/remoteproc-imx_rproc-support-iMX8MQ-M/20201229-110725
git checkout f2054bc05d3b183ef0b0ff0b4c802ba53680a5af
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=powerpc64
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/remoteproc/remoteproc_elf_loader.c:219:61: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const volatile [noderef] __iomem *s @@ got unsigned char const [usertype] * @@
drivers/remoteproc/remoteproc_elf_loader.c:219:61: sparse: expected void const volatile [noderef] __iomem *s
drivers/remoteproc/remoteproc_elf_loader.c:219:61: sparse: got unsigned char const [usertype] *
>> drivers/remoteproc/remoteproc_elf_loader.c:233:47: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *a @@ got void * @@
drivers/remoteproc/remoteproc_elf_loader.c:233:47: sparse: expected void volatile [noderef] __iomem *a
drivers/remoteproc/remoteproc_elf_loader.c:233:47: sparse: got void *
--
>> drivers/remoteproc/remoteproc_coredump.c:169:53: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const volatile [noderef] __iomem *s @@ got void *[assigned] ptr @@
drivers/remoteproc/remoteproc_coredump.c:169:53: sparse: expected void const volatile [noderef] __iomem *s
drivers/remoteproc/remoteproc_coredump.c:169:53: sparse: got void *[assigned] ptr
vim +219 drivers/remoteproc/remoteproc_elf_loader.c
131
132 /**
133 * rproc_elf_load_segments() - load firmware segments to memory
134 * @rproc: remote processor which will be booted using these fw segments
135 * @fw: the ELF firmware image
136 *
137 * This function loads the firmware segments to memory, where the remote
138 * processor expects them.
139 *
140 * Some remote processors will expect their code and data to be placed
141 * in specific device addresses, and can't have them dynamically assigned.
142 *
143 * We currently support only those kind of remote processors, and expect
144 * the program header's paddr member to contain those addresses. We then go
145 * through the physically contiguous "carveout" memory regions which we
146 * allocated (and mapped) earlier on behalf of the remote processor,
147 * and "translate" device address to kernel addresses, so we can copy the
148 * segments where they are expected.
149 *
150 * Currently we only support remote processors that required carveout
151 * allocations and got them mapped onto their iommus. Some processors
152 * might be different: they might not have iommus, and would prefer to
153 * directly allocate memory for every segment/resource. This is not yet
154 * supported, though.
155 */
156 int rproc_elf_load_segments(struct rproc *rproc, const struct firmware *fw)
157 {
158 struct device *dev = &rproc->dev;
159 const void *ehdr, *phdr;
160 int i, ret = 0;
161 u16 phnum;
162 const u8 *elf_data = fw->data;
163 u8 class = fw_elf_get_class(fw);
164 u32 elf_phdr_get_size = elf_size_of_phdr(class);
165
166 ehdr = elf_data;
167 phnum = elf_hdr_get_e_phnum(class, ehdr);
168 phdr = elf_data + elf_hdr_get_e_phoff(class, ehdr);
169
170 /* go through the available ELF segments */
171 for (i = 0; i < phnum; i++, phdr += elf_phdr_get_size) {
172 u64 da = elf_phdr_get_p_paddr(class, phdr);
173 u64 memsz = elf_phdr_get_p_memsz(class, phdr);
174 u64 filesz = elf_phdr_get_p_filesz(class, phdr);
175 u64 offset = elf_phdr_get_p_offset(class, phdr);
176 u32 type = elf_phdr_get_p_type(class, phdr);
177 void *ptr;
178 bool is_iomem;
179
180 if (type != PT_LOAD)
181 continue;
182
183 dev_dbg(dev, "phdr: type %d da 0x%llx memsz 0x%llx filesz 0x%llx\n",
184 type, da, memsz, filesz);
185
186 if (filesz > memsz) {
187 dev_err(dev, "bad phdr filesz 0x%llx memsz 0x%llx\n",
188 filesz, memsz);
189 ret = -EINVAL;
190 break;
191 }
192
193 if (offset + filesz > fw->size) {
194 dev_err(dev, "truncated fw: need 0x%llx avail 0x%zx\n",
195 offset + filesz, fw->size);
196 ret = -EINVAL;
197 break;
198 }
199
200 if (!rproc_u64_fit_in_size_t(memsz)) {
201 dev_err(dev, "size (%llx) does not fit in size_t type\n",
202 memsz);
203 ret = -EOVERFLOW;
204 break;
205 }
206
207 /* grab the kernel address for this device address */
208 ptr = rproc_da_to_va(rproc, da, memsz, &is_iomem);
209 if (!ptr) {
210 dev_err(dev, "bad phdr da 0x%llx mem 0x%llx\n", da,
211 memsz);
212 ret = -EINVAL;
213 break;
214 }
215
216 /* put the segment where the remote processor expects it */
217 if (filesz) {
218 if (is_iomem)
> 219 memcpy_fromio(ptr, elf_data + offset, filesz);
220 else
221 memcpy(ptr, elf_data + offset, filesz);
222 }
223
224 /*
225 * Zero out remaining memory for this segment.
226 *
227 * This isn't strictly required since dma_alloc_coherent already
228 * did this for us. albeit harmless, we may consider removing
229 * this.
230 */
231 if (memsz > filesz) {
232 if (is_iomem)
> 233 memset_io(ptr + filesz, 0, memsz - filesz);
234 else
235 memset(ptr + filesz, 0, memsz - filesz);
236 }
237 }
238
239 return ret;
240 }
241 EXPORT_SYMBOL(rproc_elf_load_segments);
242
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
ERROR: modpost: ".idr_find" undefined!
by kernel test robot
Hi Miao-chen,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 139711f033f636cc78b6aaf7363252241b9698ef
commit: bd2fbc6cb815b5171facb42526f6db206d920e13 Bluetooth: Add handler of MGMT_OP_REMOVE_ADV_MONITOR
date: 7 months ago
config: powerpc-randconfig-r034-20201225 (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.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 bd2fbc6cb815b5171facb42526f6db206d920e13
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc
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 >>, old ones prefixed by <<):
ERROR: modpost: "._raw_write_lock_bh" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".simple_read_from_buffer" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".skb_push" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".idr_get_next" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".ns_to_kernel_old_timeval" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".mutex_lock" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".sprintf" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".__msecs_to_jiffies" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".skb_put" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".sock_register" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".__crypto_memneq" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".crypto_destroy_tfm" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".fwnode_property_read_u8_array" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".__kmalloc" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".wake_up_bit" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".wait_woken" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".kfree_call_rcu" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".prepare_to_wait_event" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".idr_destroy" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".devm_kasprintf" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: "._raw_spin_lock" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".get_device" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: "._raw_write_unlock" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".skb_unlink" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".sk_alloc" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".rfkill_alloc" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".__alloc_skb" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".crypto_ecdh_key_len" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".debugfs_remove" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".sk_free" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".kmemdup" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".device_initialize" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".jiffies_to_msecs" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".skb_dequeue" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".__raw_spin_lock_init" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".led_trigger_register_simple" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: "._raw_write_unlock_bh" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".debugfs_create_dir" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".crypto_alloc_kpp" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".dev_set_name" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".flush_work" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".proto_register" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".device_del" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".find_next_bit" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".strnlen" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: "._raw_spin_lock_irqsave" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: "._copy_from_iter_full" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".seq_printf" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".device_find_child" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".alloc_workqueue" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".sock_queue_rcv_skb" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".skb_queue_tail" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".skb_pull" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".init_wait_entry" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".strcpy" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".rfkill_destroy" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: "._raw_spin_unlock" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: "._raw_write_lock" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".memcpy" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".led_trigger_event" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".__sock_queue_rcv_skb" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".queue_work_on" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".add_wait_queue" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".__wake_up" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".kstrtobool_from_user" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".memset" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".__sock_recv_timestamp" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".aes_encrypt" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".idr_remove" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".put_cmsg" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".kmem_cache_alloc" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".kstrtobool" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".get_random_bytes" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: "._raw_spin_unlock_bh" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".__rcu_read_unlock" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".skb_free_datagram" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".add_wait_queue_exclusive" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".__get_task_comm" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".__class_create" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".__request_module" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".sock_init_data" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".debugfs_create_u16" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".device_move" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".__pskb_pull_tail" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".vsnprintf" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".remove_wait_queue" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".ida_alloc_range" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".kvasprintf_const" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".skb_copy_datagram_iter" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".mutex_unlock" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".ktime_get_with_offset" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".complete" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".sock_alloc_send_skb" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".prandom_u32" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".skb_recv_datagram" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".skb_queue_head" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: "._copy_from_user" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".crypto_shash_setkey" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".simple_attr_open" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: "._raw_read_lock" [net/bluetooth/bluetooth.ko] undefined!
>> ERROR: modpost: ".idr_find" [net/bluetooth/bluetooth.ko] undefined!
ERROR: modpost: ".skb_queue_purge" [net/rose/rose.ko] undefined!
ERROR: modpost: ".skb_clone" [net/rose/rose.ko] undefined!
ERROR: modpost: ".register_netdevice_notifier" [net/rose/rose.ko] undefined!
ERROR: modpost: ".consume_skb" [net/rose/rose.ko] undefined!
ERROR: modpost: ".alloc_netdev_mqs" [net/rose/rose.ko] undefined!
ERROR: modpost: ".mod_timer" [net/rose/rose.ko] undefined!
ERROR: modpost: ".release_sock" [net/rose/rose.ko] undefined!
ERROR: modpost: ".strlen" [net/rose/rose.ko] undefined!
ERROR: modpost: ".ax25_send_frame" [net/rose/rose.ko] undefined!
ERROR: modpost: ".asc2ax" [net/rose/rose.ko] undefined!
ERROR: modpost: ".__rcu_read_lock" [net/rose/rose.ko] undefined!
ERROR: modpost: "._copy_to_user" [net/rose/rose.ko] undefined!
ERROR: modpost: ".init_timer_key" [net/rose/rose.ko] undefined!
ERROR: modpost: ".unregister_netdevice_notifier" [net/rose/rose.ko] undefined!
ERROR: modpost: ".kfree_skb" [net/rose/rose.ko] undefined!
ERROR: modpost: ".sock_unregister" [net/rose/rose.ko] undefined!
ERROR: modpost: ".ax25_find_cb" [net/rose/rose.ko] undefined!
ERROR: modpost: ".memcmp" [net/rose/rose.ko] undefined!
ERROR: modpost: ".refcount_warn_saturate" [net/rose/rose.ko] undefined!
ERROR: modpost: ".lock_sock_nested" [net/rose/rose.ko] undefined!
ERROR: modpost: "._raw_spin_lock_bh" [net/rose/rose.ko] undefined!
ERROR: modpost: ".__might_fault" [net/rose/rose.ko] undefined!
ERROR: modpost: ".strncmp" [net/rose/rose.ko] undefined!
ERROR: modpost: ".ax25_findbyuid" [net/rose/rose.ko] undefined!
ERROR: modpost: ".sk_filter_trim_cap" [net/rose/rose.ko] undefined!
ERROR: modpost: ".ax25_linkfail_register" [net/rose/rose.ko] undefined!
ERROR: modpost: ".finish_wait" [net/rose/rose.ko] undefined!
ERROR: modpost: ".proto_unregister" [net/rose/rose.ko] undefined!
ERROR: modpost: "._raw_write_lock_bh" [net/rose/rose.ko] undefined!
ERROR: modpost: ".skb_push" [net/rose/rose.ko] undefined!
ERROR: modpost: ".sprintf" [net/rose/rose.ko] undefined!
ERROR: modpost: ".__msecs_to_jiffies" [net/rose/rose.ko] undefined!
ERROR: modpost: ".skb_put" [net/rose/rose.ko] undefined!
ERROR: modpost: ".sock_register" [net/rose/rose.ko] undefined!
ERROR: modpost: ".__dev_get_by_name" [net/rose/rose.ko] undefined!
ERROR: modpost: ".ax25_linkfail_release" [net/rose/rose.ko] undefined!
ERROR: modpost: ".__kmalloc" [net/rose/rose.ko] undefined!
ERROR: modpost: ".arch_local_irq_restore" [net/rose/rose.ko] undefined!
ERROR: modpost: ".ax25_register_pid" [net/rose/rose.ko] undefined!
ERROR: modpost: ".ax25cmp" [net/rose/rose.ko] undefined!
ERROR: modpost: ".free_netdev" [net/rose/rose.ko] undefined!
ERROR: modpost: "._raw_spin_lock" [net/rose/rose.ko] undefined!
ERROR: modpost: ".sk_alloc" [net/rose/rose.ko] undefined!
ERROR: modpost: ".__alloc_skb" [net/rose/rose.ko] undefined!
ERROR: modpost: ".unregister_netdev" [net/rose/rose.ko] undefined!
ERROR: modpost: ".sk_free" [net/rose/rose.ko] undefined!
ERROR: modpost: ".skb_dequeue" [net/rose/rose.ko] undefined!
ERROR: modpost: ".__raw_spin_lock_init" [net/rose/rose.ko] undefined!
ERROR: modpost: ".schedule" [net/rose/rose.ko] undefined!
ERROR: modpost: ".send_sig" [net/rose/rose.ko] undefined!
ERROR: modpost: "._raw_write_unlock_bh" [net/rose/rose.ko] undefined!
ERROR: modpost: ".skb_set_owner_w" [net/rose/rose.ko] undefined!
ERROR: modpost: ".proto_register" [net/rose/rose.ko] undefined!
ERROR: modpost: ".ax25_protocol_release" [net/rose/rose.ko] undefined!
ERROR: modpost: ".ax2asc" [net/rose/rose.ko] undefined!
ERROR: modpost: "._copy_from_iter_full" [net/rose/rose.ko] undefined!
ERROR: modpost: ".skb_queue_tail" [net/rose/rose.ko] undefined!
ERROR: modpost: ".skb_pull" [net/rose/rose.ko] undefined!
ERROR: modpost: "._raw_spin_unlock" [net/rose/rose.ko] undefined!
ERROR: modpost: ".memcpy" [net/rose/rose.ko] undefined!
ERROR: modpost: ".__sock_queue_rcv_skb" [net/rose/rose.ko] undefined!
ERROR: modpost: ".memset" [net/rose/rose.ko] undefined!
ERROR: modpost: ".kmem_cache_alloc" [net/rose/rose.ko] undefined!
ERROR: modpost: ".register_netdev" [net/rose/rose.ko] undefined!
ERROR: modpost: ".add_timer" [net/rose/rose.ko] undefined!
ERROR: modpost: "._raw_spin_unlock_bh" [net/rose/rose.ko] undefined!
ERROR: modpost: ".__rcu_read_unlock" [net/rose/rose.ko] undefined!
ERROR: modpost: ".skb_free_datagram" [net/rose/rose.ko] undefined!
ERROR: modpost: ".del_timer" [net/rose/rose.ko] undefined!
ERROR: modpost: ".ax25_listen_release" [net/rose/rose.ko] undefined!
ERROR: modpost: ".sock_init_data" [net/rose/rose.ko] undefined!
ERROR: modpost: ".skb_copy_datagram_iter" [net/rose/rose.ko] undefined!
ERROR: modpost: ".sock_alloc_send_skb" [net/rose/rose.ko] undefined!
ERROR: modpost: ".skb_recv_datagram" [net/rose/rose.ko] undefined!
ERROR: modpost: ".skb_queue_head" [net/rose/rose.ko] undefined!
ERROR: modpost: ".skb_append" [net/rose/rose.ko] undefined!
ERROR: modpost: "._copy_from_user" [net/rose/rose.ko] undefined!
ERROR: modpost: ".ax25_listen_register" [net/rose/rose.ko] undefined!
ERROR: modpost: ".prepare_to_wait" [net/rose/rose.ko] undefined!
ERROR: modpost: ".skb_queue_purge" [net/appletalk/appletalk.ko] undefined!
ERROR: modpost: ".skb_clone" [net/appletalk/appletalk.ko] undefined!
ERROR: modpost: ".register_netdevice_notifier" [net/appletalk/appletalk.ko] undefined!
ERROR: modpost: ".consume_skb" [net/appletalk/appletalk.ko] undefined!
ERROR: modpost: ".alloc_netdev_mqs" [net/appletalk/appletalk.ko] undefined!
ERROR: modpost: ".mod_timer" [net/appletalk/appletalk.ko] undefined!
ERROR: modpost: ".release_sock" [net/appletalk/appletalk.ko] undefined!
ERROR: modpost: ".skb_copy" [net/appletalk/appletalk.ko] undefined!
ERROR: modpost: "._copy_to_user" [net/appletalk/appletalk.ko] undefined!
ERROR: modpost: ".init_timer_key" [net/appletalk/appletalk.ko] undefined!
ERROR: modpost: ".unregister_netdevice_notifier" [net/appletalk/appletalk.ko] undefined!
ERROR: modpost: ".kfree_skb" [net/appletalk/appletalk.ko] undefined!
ERROR: modpost: ".sock_unregister" [net/appletalk/appletalk.ko] undefined!
ERROR: modpost: "._raw_read_lock_bh" [net/appletalk/appletalk.ko] undefined!
ERROR: modpost: ".refcount_warn_saturate" [net/appletalk/appletalk.ko] undefined!
ERROR: modpost: ".lock_sock_nested" [net/appletalk/appletalk.ko] undefined!
ERROR: modpost: ".__might_fault" [net/appletalk/appletalk.ko] undefined!
ERROR: modpost: ".skb_trim" [net/appletalk/appletalk.ko] undefined!
ERROR: modpost: ".proto_unregister" [net/appletalk/appletalk.ko] undefined!
ERROR: modpost: "._raw_write_lock_bh" [net/appletalk/appletalk.ko] undefined!
ERROR: modpost: "._raw_read_unlock_bh" [net/appletalk/appletalk.ko] undefined!
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months