[Intel-gfx] [PATCH v2] drm/i915: Run relevant bits of debugfs drop_caches per GT
kernel test robot
lkp at intel.com
Thu Sep 7 13:37:27 UTC 2023
Hi Andi,
kernel test robot noticed the following build errors:
[auto build test ERROR on drm-tip/drm-tip]
url: https://github.com/intel-lab-lkp/linux/commits/Andi-Shyti/drm-i915-Run-relevant-bits-of-debugfs-drop_caches-per-GT/20230907-181322
base: git://anongit.freedesktop.org/drm/drm-tip drm-tip
patch link: https://lore.kernel.org/r/20230907101135.176326-1-andi.shyti%40linux.intel.com
patch subject: [Intel-gfx] [PATCH v2] drm/i915: Run relevant bits of debugfs drop_caches per GT
config: x86_64-buildonly-randconfig-003-20230907 (https://download.01.org/0day-ci/archive/20230907/202309072112.hlih7zXW-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230907/202309072112.hlih7zXW-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309072112.hlih7zXW-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
>> drivers/gpu/drm/i915/i915_debugfs.c:751:2: warning: ordered comparison between pointer and integer ('struct intel_gt *' and 'int')
for_each_gt(i915, i, gt) {
^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/gt/intel_gt.h:170:14: note: expanded from macro 'for_each_gt'
(id__) < I915_MAX_GT; \
~~~~~~ ^ ~~~~~~~~~~~
>> drivers/gpu/drm/i915/i915_debugfs.c:751:2: error: member reference type 'unsigned int' is not a pointer
for_each_gt(i915, i, gt) {
^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/gt/intel_gt.h:172:35: note: expanded from macro 'for_each_gt'
for_each_if(((gt__) = (i915__)->gt[(id__)]))
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
include/drm/drm_util.h:63:38: note: expanded from macro 'for_each_if'
#define for_each_if(condition) if (!(condition)) {} else
^~~~~~~~~
>> drivers/gpu/drm/i915/i915_debugfs.c:751:2: error: array subscript is not an integer
for_each_gt(i915, i, gt) {
^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/gt/intel_gt.h:172:37: note: expanded from macro 'for_each_gt'
for_each_if(((gt__) = (i915__)->gt[(id__)]))
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
include/drm/drm_util.h:63:38: note: expanded from macro 'for_each_if'
#define for_each_if(condition) if (!(condition)) {} else
^~~~~~~~~
1 warning and 2 errors generated.
vim +751 drivers/gpu/drm/i915/i915_debugfs.c
738
739 static int
740 i915_drop_caches_set(void *data, u64 val)
741 {
742 struct drm_i915_private *i915 = data;
743 struct intel_gt *gt;
744 unsigned int flags;
745 unsigned int i;
746 int ret;
747
748 drm_dbg(&i915->drm, "Dropping caches: 0x%08llx [0x%08llx]\n",
749 val, val & DROP_ALL);
750
> 751 for_each_gt(i915, i, gt) {
752 ret = gt_drop_caches(gt, val);
753 if (ret)
754 return ret;
755 }
756
757 fs_reclaim_acquire(GFP_KERNEL);
758 flags = memalloc_noreclaim_save();
759 if (val & DROP_BOUND)
760 i915_gem_shrink(NULL, i915, LONG_MAX, NULL, I915_SHRINK_BOUND);
761
762 if (val & DROP_UNBOUND)
763 i915_gem_shrink(NULL, i915, LONG_MAX, NULL, I915_SHRINK_UNBOUND);
764
765 if (val & DROP_SHRINK_ALL)
766 i915_gem_shrink_all(i915);
767 memalloc_noreclaim_restore(flags);
768 fs_reclaim_release(GFP_KERNEL);
769
770 if (val & DROP_RCU)
771 rcu_barrier();
772
773 if (val & DROP_FREED)
774 i915_gem_drain_freed_objects(i915);
775
776 return 0;
777 }
778
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
More information about the Intel-gfx
mailing list