From: kernel test robot <lkp@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org
Subject: Re: [Intel-gfx] [PATCH 1/2] iosys-map: Add per-word read
Date: Fri, 17 Jun 2022 22:29:22 +0800 [thread overview]
Message-ID: <202206172216.2dx0SuDN-lkp@intel.com> (raw)
In-Reply-To: <20220617085204.1678035-1-lucas.demarchi@intel.com>
Hi Lucas,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on drm-tip/drm-tip]
url: https://github.com/intel-lab-lkp/linux/commits/Lucas-De-Marchi/iosys-map-Add-per-word-read/20220617-165219
base: git://anongit.freedesktop.org/drm/drm-tip drm-tip
config: i386-randconfig-a004 (https://download.01.org/0day-ci/archive/20220617/202206172216.2dx0SuDN-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project d764aa7fc6b9cc3fbe960019018f5f9e941eb0a6)
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/intel-lab-lkp/linux/commit/ba3376fb07b117d35e6c61c7522340a3a2842ef9
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Lucas-De-Marchi/iosys-map-Add-per-word-read/20220617-165219
git checkout ba3376fb07b117d35e6c61c7522340a3a2842ef9
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c:1154:14: error: use of undeclared identifier 'vaddr_iomem__'
*last_in = record_read(&rec_map, last_switch_in_stamp);
^
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c:1134:2: note: expanded from macro 'record_read'
iosys_map_rd_field(map_, 0, struct guc_engine_usage_record, field_)
^
include/linux/iosys-map.h:461:2: note: expanded from macro 'iosys_map_rd_field'
iosys_map_rd(map__, struct_offset__ + offsetof(struct_type__, field__), \
^
include/linux/iosys-map.h:374:3: note: expanded from macro 'iosys_map_rd'
__iosys_map_rd_io(val, (map__)->vaddr_iomem + (offset__), type__);\
^
include/linux/iosys-map.h:349:2: note: expanded from macro '__iosys_map_rd_io'
__iosys_map_rd_io_u64_case(val__, vaddr_iomem__))
^
include/linux/iosys-map.h:342:30: note: expanded from macro '__iosys_map_rd_io_u64_case'
u64: memcpy_fromio(&(val_), vaddr_iomem__, sizeof(u64))
^
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c:1155:9: error: use of undeclared identifier 'vaddr_iomem__'
*id = record_read(&rec_map, current_context_index);
^
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c:1134:2: note: expanded from macro 'record_read'
iosys_map_rd_field(map_, 0, struct guc_engine_usage_record, field_)
^
include/linux/iosys-map.h:461:2: note: expanded from macro 'iosys_map_rd_field'
iosys_map_rd(map__, struct_offset__ + offsetof(struct_type__, field__), \
^
include/linux/iosys-map.h:374:3: note: expanded from macro 'iosys_map_rd'
__iosys_map_rd_io(val, (map__)->vaddr_iomem + (offset__), type__);\
^
include/linux/iosys-map.h:349:2: note: expanded from macro '__iosys_map_rd_io'
__iosys_map_rd_io_u64_case(val__, vaddr_iomem__))
^
include/linux/iosys-map.h:342:30: note: expanded from macro '__iosys_map_rd_io_u64_case'
u64: memcpy_fromio(&(val_), vaddr_iomem__, sizeof(u64))
^
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c:1156:12: error: use of undeclared identifier 'vaddr_iomem__'
*total = record_read(&rec_map, total_runtime);
^
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c:1134:2: note: expanded from macro 'record_read'
iosys_map_rd_field(map_, 0, struct guc_engine_usage_record, field_)
^
include/linux/iosys-map.h:461:2: note: expanded from macro 'iosys_map_rd_field'
iosys_map_rd(map__, struct_offset__ + offsetof(struct_type__, field__), \
^
include/linux/iosys-map.h:374:3: note: expanded from macro 'iosys_map_rd'
__iosys_map_rd_io(val, (map__)->vaddr_iomem + (offset__), type__);\
^
include/linux/iosys-map.h:349:2: note: expanded from macro '__iosys_map_rd_io'
__iosys_map_rd_io_u64_case(val__, vaddr_iomem__))
^
include/linux/iosys-map.h:342:30: note: expanded from macro '__iosys_map_rd_io_u64_case'
u64: memcpy_fromio(&(val_), vaddr_iomem__, sizeof(u64))
^
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c:1158:7: error: use of undeclared identifier 'vaddr_iomem__'
if (record_read(&rec_map, last_switch_in_stamp) == *last_in &&
^
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c:1134:2: note: expanded from macro 'record_read'
iosys_map_rd_field(map_, 0, struct guc_engine_usage_record, field_)
^
include/linux/iosys-map.h:461:2: note: expanded from macro 'iosys_map_rd_field'
iosys_map_rd(map__, struct_offset__ + offsetof(struct_type__, field__), \
^
include/linux/iosys-map.h:374:3: note: expanded from macro 'iosys_map_rd'
__iosys_map_rd_io(val, (map__)->vaddr_iomem + (offset__), type__);\
^
include/linux/iosys-map.h:349:2: note: expanded from macro '__iosys_map_rd_io'
__iosys_map_rd_io_u64_case(val__, vaddr_iomem__))
^
include/linux/iosys-map.h:342:30: note: expanded from macro '__iosys_map_rd_io_u64_case'
u64: memcpy_fromio(&(val_), vaddr_iomem__, sizeof(u64))
^
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c:1159:7: error: use of undeclared identifier 'vaddr_iomem__'
record_read(&rec_map, current_context_index) == *id &&
^
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c:1134:2: note: expanded from macro 'record_read'
iosys_map_rd_field(map_, 0, struct guc_engine_usage_record, field_)
^
include/linux/iosys-map.h:461:2: note: expanded from macro 'iosys_map_rd_field'
iosys_map_rd(map__, struct_offset__ + offsetof(struct_type__, field__), \
^
include/linux/iosys-map.h:374:3: note: expanded from macro 'iosys_map_rd'
__iosys_map_rd_io(val, (map__)->vaddr_iomem + (offset__), type__);\
^
include/linux/iosys-map.h:349:2: note: expanded from macro '__iosys_map_rd_io'
__iosys_map_rd_io_u64_case(val__, vaddr_iomem__))
^
include/linux/iosys-map.h:342:30: note: expanded from macro '__iosys_map_rd_io_u64_case'
u64: memcpy_fromio(&(val_), vaddr_iomem__, sizeof(u64))
^
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c:1160:7: error: use of undeclared identifier 'vaddr_iomem__'
record_read(&rec_map, total_runtime) == *total)
^
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c:1134:2: note: expanded from macro 'record_read'
iosys_map_rd_field(map_, 0, struct guc_engine_usage_record, field_)
^
include/linux/iosys-map.h:461:2: note: expanded from macro 'iosys_map_rd_field'
iosys_map_rd(map__, struct_offset__ + offsetof(struct_type__, field__), \
^
include/linux/iosys-map.h:374:3: note: expanded from macro 'iosys_map_rd'
__iosys_map_rd_io(val, (map__)->vaddr_iomem + (offset__), type__);\
--
>> drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c:165:6: error: use of undeclared identifier 'vaddr_iomem__'
ads_blob_read(guc, policies.dpc_promote_time));
^
drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c:65:2: note: expanded from macro 'ads_blob_read'
iosys_map_rd_field(&(guc_)->ads_map, 0, struct __guc_ads_blob, field_)
^
include/linux/iosys-map.h:461:2: note: expanded from macro 'iosys_map_rd_field'
iosys_map_rd(map__, struct_offset__ + offsetof(struct_type__, field__), \
^
include/linux/iosys-map.h:374:3: note: expanded from macro 'iosys_map_rd'
__iosys_map_rd_io(val, (map__)->vaddr_iomem + (offset__), type__);\
^
include/linux/iosys-map.h:349:2: note: expanded from macro '__iosys_map_rd_io'
__iosys_map_rd_io_u64_case(val__, vaddr_iomem__))
^
include/linux/iosys-map.h:342:30: note: expanded from macro '__iosys_map_rd_io_u64_case'
u64: memcpy_fromio(&(val_), vaddr_iomem__, sizeof(u64))
^
drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c:167:6: error: use of undeclared identifier 'vaddr_iomem__'
ads_blob_read(guc, policies.max_num_work_items));
^
drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c:65:2: note: expanded from macro 'ads_blob_read'
iosys_map_rd_field(&(guc_)->ads_map, 0, struct __guc_ads_blob, field_)
^
include/linux/iosys-map.h:461:2: note: expanded from macro 'iosys_map_rd_field'
iosys_map_rd(map__, struct_offset__ + offsetof(struct_type__, field__), \
^
include/linux/iosys-map.h:374:3: note: expanded from macro 'iosys_map_rd'
__iosys_map_rd_io(val, (map__)->vaddr_iomem + (offset__), type__);\
^
include/linux/iosys-map.h:349:2: note: expanded from macro '__iosys_map_rd_io'
__iosys_map_rd_io_u64_case(val__, vaddr_iomem__))
^
include/linux/iosys-map.h:342:30: note: expanded from macro '__iosys_map_rd_io_u64_case'
u64: memcpy_fromio(&(val_), vaddr_iomem__, sizeof(u64))
^
drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c:169:6: error: use of undeclared identifier 'vaddr_iomem__'
ads_blob_read(guc, policies.global_flags));
^
drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c:65:2: note: expanded from macro 'ads_blob_read'
iosys_map_rd_field(&(guc_)->ads_map, 0, struct __guc_ads_blob, field_)
^
include/linux/iosys-map.h:461:2: note: expanded from macro 'iosys_map_rd_field'
iosys_map_rd(map__, struct_offset__ + offsetof(struct_type__, field__), \
^
include/linux/iosys-map.h:374:3: note: expanded from macro 'iosys_map_rd'
__iosys_map_rd_io(val, (map__)->vaddr_iomem + (offset__), type__);\
^
include/linux/iosys-map.h:349:2: note: expanded from macro '__iosys_map_rd_io'
__iosys_map_rd_io_u64_case(val__, vaddr_iomem__))
^
include/linux/iosys-map.h:342:30: note: expanded from macro '__iosys_map_rd_io_u64_case'
u64: memcpy_fromio(&(val_), vaddr_iomem__, sizeof(u64))
^
drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c:192:23: error: use of undeclared identifier 'vaddr_iomem__'
scheduler_policies = ads_blob_read(guc, ads.scheduler_policies);
^
drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c:65:2: note: expanded from macro 'ads_blob_read'
iosys_map_rd_field(&(guc_)->ads_map, 0, struct __guc_ads_blob, field_)
^
include/linux/iosys-map.h:461:2: note: expanded from macro 'iosys_map_rd_field'
iosys_map_rd(map__, struct_offset__ + offsetof(struct_type__, field__), \
^
include/linux/iosys-map.h:374:3: note: expanded from macro 'iosys_map_rd'
__iosys_map_rd_io(val, (map__)->vaddr_iomem + (offset__), type__);\
^
include/linux/iosys-map.h:349:2: note: expanded from macro '__iosys_map_rd_io'
__iosys_map_rd_io_u64_case(val__, vaddr_iomem__))
^
include/linux/iosys-map.h:342:30: note: expanded from macro '__iosys_map_rd_io_u64_case'
u64: memcpy_fromio(&(val_), vaddr_iomem__, sizeof(u64))
^
drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c:505:8: error: use of undeclared identifier 'vaddr_iomem__'
if (!info_map_read(&info_map, engine_enabled_masks[guc_class]))
^
drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c:75:2: note: expanded from macro 'info_map_read'
iosys_map_rd_field(map_, 0, struct guc_gt_system_info, field_)
^
include/linux/iosys-map.h:461:2: note: expanded from macro 'iosys_map_rd_field'
iosys_map_rd(map__, struct_offset__ + offsetof(struct_type__, field__), \
^
include/linux/iosys-map.h:374:3: note: expanded from macro 'iosys_map_rd'
__iosys_map_rd_io(val, (map__)->vaddr_iomem + (offset__), type__);\
^
include/linux/iosys-map.h:349:2: note: expanded from macro '__iosys_map_rd_io'
__iosys_map_rd_io_u64_case(val__, vaddr_iomem__))
^
include/linux/iosys-map.h:342:30: note: expanded from macro '__iosys_map_rd_io_u64_case'
u64: memcpy_fromio(&(val_), vaddr_iomem__, sizeof(u64))
^
drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c:584:8: error: use of undeclared identifier 'vaddr_iomem__'
if (!ads_blob_read(guc, system_info.engine_enabled_masks[guc_class]))
^
drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c:65:2: note: expanded from macro 'ads_blob_read'
iosys_map_rd_field(&(guc_)->ads_map, 0, struct __guc_ads_blob, field_)
^
include/linux/iosys-map.h:461:2: note: expanded from macro 'iosys_map_rd_field'
iosys_map_rd(map__, struct_offset__ + offsetof(struct_type__, field__), \
^
include/linux/iosys-map.h:374:3: note: expanded from macro 'iosys_map_rd'
__iosys_map_rd_io(val, (map__)->vaddr_iomem + (offset__), type__);\
vim +/vaddr_iomem__ +1154 drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
77cdd054dd2ced Umesh Nerlige Ramappa 2021-10-26 1132
4801b99588a2e0 Lucas De Marchi 2022-02-16 1133 #define record_read(map_, field_) \
4801b99588a2e0 Lucas De Marchi 2022-02-16 1134 iosys_map_rd_field(map_, 0, struct guc_engine_usage_record, field_)
4801b99588a2e0 Lucas De Marchi 2022-02-16 1135
512712a824de9b Umesh Nerlige Ramappa 2022-01-24 1136 /*
512712a824de9b Umesh Nerlige Ramappa 2022-01-24 1137 * GuC updates shared memory and KMD reads it. Since this is not synchronized,
512712a824de9b Umesh Nerlige Ramappa 2022-01-24 1138 * we run into a race where the value read is inconsistent. Sometimes the
512712a824de9b Umesh Nerlige Ramappa 2022-01-24 1139 * inconsistency is in reading the upper MSB bytes of the last_in value when
512712a824de9b Umesh Nerlige Ramappa 2022-01-24 1140 * this race occurs. 2 types of cases are seen - upper 8 bits are zero and upper
512712a824de9b Umesh Nerlige Ramappa 2022-01-24 1141 * 24 bits are zero. Since these are non-zero values, it is non-trivial to
512712a824de9b Umesh Nerlige Ramappa 2022-01-24 1142 * determine validity of these values. Instead we read the values multiple times
512712a824de9b Umesh Nerlige Ramappa 2022-01-24 1143 * until they are consistent. In test runs, 3 attempts results in consistent
512712a824de9b Umesh Nerlige Ramappa 2022-01-24 1144 * values. The upper bound is set to 6 attempts and may need to be tuned as per
512712a824de9b Umesh Nerlige Ramappa 2022-01-24 1145 * any new occurences.
512712a824de9b Umesh Nerlige Ramappa 2022-01-24 1146 */
512712a824de9b Umesh Nerlige Ramappa 2022-01-24 1147 static void __get_engine_usage_record(struct intel_engine_cs *engine,
512712a824de9b Umesh Nerlige Ramappa 2022-01-24 1148 u32 *last_in, u32 *id, u32 *total)
77cdd054dd2ced Umesh Nerlige Ramappa 2021-10-26 1149 {
4801b99588a2e0 Lucas De Marchi 2022-02-16 1150 struct iosys_map rec_map = intel_guc_engine_usage_record_map(engine);
512712a824de9b Umesh Nerlige Ramappa 2022-01-24 1151 int i = 0;
512712a824de9b Umesh Nerlige Ramappa 2022-01-24 1152
512712a824de9b Umesh Nerlige Ramappa 2022-01-24 1153 do {
4801b99588a2e0 Lucas De Marchi 2022-02-16 @1154 *last_in = record_read(&rec_map, last_switch_in_stamp);
4801b99588a2e0 Lucas De Marchi 2022-02-16 1155 *id = record_read(&rec_map, current_context_index);
4801b99588a2e0 Lucas De Marchi 2022-02-16 1156 *total = record_read(&rec_map, total_runtime);
512712a824de9b Umesh Nerlige Ramappa 2022-01-24 1157
4801b99588a2e0 Lucas De Marchi 2022-02-16 1158 if (record_read(&rec_map, last_switch_in_stamp) == *last_in &&
4801b99588a2e0 Lucas De Marchi 2022-02-16 1159 record_read(&rec_map, current_context_index) == *id &&
4801b99588a2e0 Lucas De Marchi 2022-02-16 1160 record_read(&rec_map, total_runtime) == *total)
512712a824de9b Umesh Nerlige Ramappa 2022-01-24 1161 break;
512712a824de9b Umesh Nerlige Ramappa 2022-01-24 1162 } while (++i < 6);
512712a824de9b Umesh Nerlige Ramappa 2022-01-24 1163 }
512712a824de9b Umesh Nerlige Ramappa 2022-01-24 1164
--
0-DAY CI Kernel Test Service
https://01.org/lkp
parent reply other threads:[~2022-06-17 17:08 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20220617085204.1678035-1-lucas.demarchi@intel.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202206172216.2dx0SuDN-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=llvm@lists.linux.dev \
--cc=lucas.demarchi@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox