2022-06-25 03:20:54

by kernel test robot

[permalink] [raw]
Subject: [ogabbay:gaudi2_full 48/48] drivers/misc/habanalabs/gaudi/gaudi.c:1524:6: error: no member named 'jobs_cnt' in 'struct hl_cs'

tree: https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git gaudi2_full
head: 91e0cd8151cd8592199b21f047a3915fe06ba098
commit: 91e0cd8151cd8592199b21f047a3915fe06ba098 [48/48] add increment of jobs_cnt
config: x86_64-randconfig-a005
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 6fa9120080c35a5ff851c3fc3358692c4ef7ce0d)
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/ogabbay/linux.git/commit/?id=91e0cd8151cd8592199b21f047a3915fe06ba098
git remote add ogabbay https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git
git fetch --no-tags ogabbay gaudi2_full
git checkout 91e0cd8151cd8592199b21f047a3915fe06ba098
# 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=x86_64 SHELL=/bin/bash drivers/misc/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <[email protected]>

All errors (new ones prefixed by >>):

drivers/misc/habanalabs/gaudi/gaudi.c:585:8: error: no member named 'cache_line_size' in 'struct asic_fixed_properties'
prop->cache_line_size = DEVICE_CACHE_LINE_SIZE;
~~~~ ^
drivers/misc/habanalabs/gaudi/gaudi.c:586:8: error: no member named 'cfg_base_address' in 'struct asic_fixed_properties'
prop->cfg_base_address = CFG_BASE;
~~~~ ^
drivers/misc/habanalabs/gaudi/gaudi.c:591:8: error: no member named 'completion_mode' in 'struct asic_fixed_properties'
prop->completion_mode = HL_COMPLETION_MODE_JOB;
~~~~ ^
drivers/misc/habanalabs/gaudi/gaudi.c:591:26: error: use of undeclared identifier 'HL_COMPLETION_MODE_JOB'
prop->completion_mode = HL_COMPLETION_MODE_JOB;
^
drivers/misc/habanalabs/gaudi/gaudi.c:618:8: error: no member named 'mmu_cache_mng_addr' in 'struct asic_fixed_properties'
prop->mmu_cache_mng_addr = MMU_CACHE_MNG_ADDR;
~~~~ ^
drivers/misc/habanalabs/gaudi/gaudi.c:619:8: error: no member named 'mmu_cache_mng_size' in 'struct asic_fixed_properties'
prop->mmu_cache_mng_size = MMU_CACHE_MNG_SIZE;
~~~~ ^
drivers/misc/habanalabs/gaudi/gaudi.c:688:8: error: no member named 'first_available_user_interrupt' in 'struct asic_fixed_properties'; did you mean 'first_available_user_msix_interrupt'?
prop->first_available_user_interrupt = USHRT_MAX;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
first_available_user_msix_interrupt
drivers/misc/habanalabs/gaudi/../common/habanalabs.h:628:9: note: 'first_available_user_msix_interrupt' declared here
u16 first_available_user_msix_interrupt;
^
>> drivers/misc/habanalabs/gaudi/gaudi.c:1524:6: error: no member named 'jobs_cnt' in 'struct hl_cs'
cs->jobs_cnt++;
~~ ^
drivers/misc/habanalabs/gaudi/gaudi.c:3884:43: error: no member named 'mmu_cache_mng_addr' in 'struct asic_fixed_properties'
WREG32(mmSTLB_CACHE_INV_BASE_39_8, prop->mmu_cache_mng_addr >> 8);
~~~~ ^
drivers/misc/habanalabs/gaudi/../common/habanalabs.h:2272:61: note: expanded from macro 'WREG32'
#define WREG32(reg, v) hdev->asic_funcs->wreg(hdev, (reg), (v))
^
drivers/misc/habanalabs/gaudi/gaudi.c:3885:44: error: no member named 'mmu_cache_mng_addr' in 'struct asic_fixed_properties'
WREG32(mmSTLB_CACHE_INV_BASE_49_40, prop->mmu_cache_mng_addr >> 40);
~~~~ ^
drivers/misc/habanalabs/gaudi/../common/habanalabs.h:2272:61: note: expanded from macro 'WREG32'
#define WREG32(reg, v) hdev->asic_funcs->wreg(hdev, (reg), (v))
^
drivers/misc/habanalabs/gaudi/gaudi.c:6083:20: error: no member named 'mmu_cache_mng_size' in 'struct asic_fixed_properties'
hdev->asic_prop.mmu_cache_mng_size;
~~~~~~~~~~~~~~~ ^
drivers/misc/habanalabs/gaudi/gaudi.c:8602:5: warning: no previous prototype for function 'gaudi_pre_schedule_cs' [-Wmissing-prototypes]
int gaudi_pre_schedule_cs(struct hl_cs *cs)
^
drivers/misc/habanalabs/gaudi/gaudi.c:8602:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int gaudi_pre_schedule_cs(struct hl_cs *cs)
^
static
drivers/misc/habanalabs/gaudi/gaudi.c:8978:5: warning: no previous prototype for function 'gaudi_ack_mmu_page_fault_or_access_error' [-Wmissing-prototypes]
int gaudi_ack_mmu_page_fault_or_access_error(struct hl_device *hdev,
^
drivers/misc/habanalabs/gaudi/gaudi.c:8978:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int gaudi_ack_mmu_page_fault_or_access_error(struct hl_device *hdev,
^
static
2 warnings and 11 errors generated.


vim +1524 drivers/misc/habanalabs/gaudi/gaudi.c

1434
1435 static int gaudi_collective_wait_create_job(struct hl_device *hdev,
1436 struct hl_ctx *ctx, struct hl_cs *cs,
1437 enum hl_collective_mode mode, u32 queue_id, u32 wait_queue_id,
1438 u32 encaps_signal_offset)
1439 {
1440 struct hw_queue_properties *hw_queue_prop;
1441 struct hl_cs_counters_atomic *cntr;
1442 struct hl_cs_job *job;
1443 struct hl_cb *cb;
1444 u32 cb_size;
1445 bool patched_cb;
1446
1447 cntr = &hdev->aggregated_cs_counters;
1448
1449 if (mode == HL_COLLECTIVE_MASTER) {
1450 /* CB size of collective master queue contains
1451 * 4 msg short packets for monitor 1 configuration
1452 * 1 fence packet
1453 * 4 msg short packets for monitor 2 configuration
1454 * 1 fence packet
1455 * 2 msg prot packets for completion and MSI
1456 */
1457 cb_size = sizeof(struct packet_msg_short) * 8 +
1458 sizeof(struct packet_fence) * 2 +
1459 sizeof(struct packet_msg_prot) * 2;
1460 patched_cb = true;
1461 } else {
1462 /* CB size of collective slave queues contains
1463 * 4 msg short packets for monitor configuration
1464 * 1 fence packet
1465 * 1 additional msg short packet for sob signal
1466 */
1467 cb_size = sizeof(struct packet_msg_short) * 5 +
1468 sizeof(struct packet_fence);
1469 patched_cb = false;
1470 }
1471
1472 hw_queue_prop = &hdev->asic_prop.hw_queues_props[queue_id];
1473 job = hl_cs_allocate_job(hdev, hw_queue_prop->type, true);
1474 if (!job) {
1475 atomic64_inc(&ctx->cs_counters.out_of_mem_drop_cnt);
1476 atomic64_inc(&cntr->out_of_mem_drop_cnt);
1477 dev_err(hdev->dev, "Failed to allocate a new job\n");
1478 return -ENOMEM;
1479 }
1480
1481 /* Allocate internal mapped CB for non patched CBs */
1482 cb = hl_cb_kernel_create(hdev, cb_size,
1483 hdev->mmu_enable && !patched_cb);
1484 if (!cb) {
1485 atomic64_inc(&ctx->cs_counters.out_of_mem_drop_cnt);
1486 atomic64_inc(&cntr->out_of_mem_drop_cnt);
1487 kfree(job);
1488 return -EFAULT;
1489 }
1490
1491 job->id = 0;
1492 job->cs = cs;
1493 job->user_cb = cb;
1494 atomic_inc(&job->user_cb->cs_cnt);
1495 job->user_cb_size = cb_size;
1496 job->hw_queue_id = queue_id;
1497
1498 /* since its guaranteed to have only one chunk in the collective wait
1499 * cs, we can use this chunk to set the encapsulated signal offset
1500 * in the jobs.
1501 */
1502 if (cs->encaps_signals)
1503 job->encaps_sig_wait_offset = encaps_signal_offset;
1504
1505 /*
1506 * No need in parsing, user CB is the patched CB.
1507 * We call hl_cb_destroy() out of two reasons - we don't need
1508 * the CB in the CB idr anymore and to decrement its refcount as
1509 * it was incremented inside hl_cb_kernel_create().
1510 */
1511 if (patched_cb)
1512 job->patched_cb = job->user_cb;
1513 else
1514 job->patched_cb = NULL;
1515
1516 job->job_cb_size = job->user_cb_size;
1517 hl_cb_destroy(&hdev->kernel_mem_mgr, cb->buf->handle);
1518
1519 /* increment refcount as for external queues we get completion */
1520 if (hw_queue_prop->type == QUEUE_TYPE_EXT)
1521 cs_get(cs);
1522
1523 cs->jobs_in_queue_cnt[job->hw_queue_id]++;
> 1524 cs->jobs_cnt++;
1525
1526 list_add_tail(&job->cs_node, &cs->job_list);
1527
1528 hl_debugfs_add_job(hdev, job);
1529
1530 return 0;
1531 }
1532

--
0-DAY CI Kernel Test Service
https://01.org/lkp


Attachments:
(No filename) (8.90 kB)
config (140.52 kB)
Download all attachments