tree:
git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
head: 07775fc13878cbc2e9cda5ffac7c7289adee91cb
commit: f89f8c6bafd0692d3afd21488d012ceb1baf6df6 [8/16] drm/amdgpu: Guard against write
accesses after device removal
config: powerpc64-randconfig-r026-20210520 (attached as .config)
compiler: clang version 13.0.0 (
https://github.com/llvm/llvm-project
bf9ef3efaa99c02e7bfc4c57207301b8de39a278)
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 powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
git remote add drm-drm-misc
git://anongit.freedesktop.org/drm/drm-misc
git fetch --no-tags drm-drm-misc drm-misc-next
git checkout f89f8c6bafd0692d3afd21488d012ceb1baf6df6
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
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_device.c:332:1: warning: unused
label 'exit' [-Wunused-label]
exit:
^~~~~
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1140:18: warning: result of comparison of
constant 4294967296 with expression of type 'resource_size_t' (aka 'unsigned
int') is always false [-Wtautological-constant-out-of-range-compare]
res->start > 0x100000000ull)
~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4662:6: warning: no previous prototype for
function 'amdgpu_device_recheck_guilty_jobs' [-Wmissing-prototypes]
void amdgpu_device_recheck_guilty_jobs(
^
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4662:1: note: declare 'static' if
the function is not intended to be used outside of this translation unit
void amdgpu_device_recheck_guilty_jobs(
^
static
3 warnings generated.
vim +/exit +332 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
315
316 spin_lock_irqsave(&adev->mmio_idx_lock, flags);
317 for (last = pos + size; pos < last; pos += 4) {
318 uint32_t tmp = pos >> 31;
319
320 WREG32_NO_KIQ(mmMM_INDEX, ((uint32_t)pos) | 0x80000000);
321 if (tmp != hi) {
322 WREG32_NO_KIQ(mmMM_INDEX_HI, tmp);
323 hi = tmp;
324 }
325 if (write)
326 WREG32_NO_KIQ(mmMM_DATA, *buf++);
327 else
328 *buf++ = RREG32_NO_KIQ(mmMM_DATA);
329 }
330 spin_unlock_irqrestore(&adev->mmio_idx_lock, flags);
331
332 exit:
333 drm_dev_exit(idx);
334 }
335
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org