tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 9a6863f4e4a4271bdb5b3a1e955bcd851d81c27a commit: bbae0ca11850da2793282896206974656859a73e [19114/30000] SCSI: SSSRAID: Introduce map_queue in sssraid module config: x86_64-randconfig-122-20240413 (https://download.01.org/0day-ci/archive/20240415/202404151411.qh3ixZhW-lkp@i...) compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240415/202404151411.qh3ixZhW-lkp@i...)
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@intel.com | Closes: https://lore.kernel.org/oe-kbuild-all/202404151411.qh3ixZhW-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/scsi/sssraid/sssraid_os.c:1568:2: error: implicit declaration of function 'for_each_pci_msi_entry' [-Werror,-Wimplicit-function-declaration]
1568 | for_each_pci_msi_entry(entry, pdev) { | ^
drivers/scsi/sssraid/sssraid_os.c:1568:37: error: expected ';' after expression
1568 | for_each_pci_msi_entry(entry, pdev) { | ^ | ;
drivers/scsi/sssraid/sssraid_os.c:1569:43: error: no member named 'msi_list' in 'struct device'
1569 | struct list_head *msi_list = &pdev->dev.msi_list; | ~~~~~~~~~ ^
drivers/scsi/sssraid/sssraid_os.c:1581:5: error: 'continue' statement not in loop statement
1581 | continue; | ^ drivers/scsi/sssraid/sssraid_os.c:1591:3: error: 'continue' statement not in loop statement 1591 | continue; | ^ 5 errors generated.
vim +/for_each_pci_msi_entry +1568 drivers/scsi/sssraid/sssraid_os.c
1550 1551 static int sssraid_map_queues(struct Scsi_Host *shost) 1552 { 1553 struct sssraid_ioc *sdioc = shost_priv(shost); 1554 struct pci_dev *pdev = sdioc->pdev; 1555 struct msi_desc *entry = NULL; 1556 struct irq_affinity_desc *affinity = NULL; 1557 struct blk_mq_tag_set *tag_set = &shost->tag_set; 1558 struct blk_mq_queue_map *queue_map = &tag_set->map[HCTX_TYPE_DEFAULT]; 1559 const struct cpumask *node_mask = NULL; 1560 unsigned int queue_offset = queue_map->queue_offset; 1561 unsigned int *map = queue_map->mq_map; 1562 unsigned int nr_queues = queue_map->nr_queues; 1563 unsigned int node_id, node_id_last = 0xFFFFFFFF; 1564 int cpu, first_sibling, cpu_index = 0; 1565 u8 node_count = 0, i; 1566 unsigned int node_id_array[100]; 1567
1568 for_each_pci_msi_entry(entry, pdev) { 1569 struct list_head *msi_list = &pdev->dev.msi_list;
1570 1571 if (list_is_last(msi_list, &entry->list)) 1572 goto get_next_numa_node; 1573 1574 if (entry->irq) { 1575 affinity = entry->affinity; 1576 node_mask = &affinity->mask; 1577 1578 cpu = cpumask_first(node_mask); 1579 node_id = cpu_to_node(cpu); 1580 if (node_id_last == node_id)
1581 continue;
1582 1583 for (i = 0; i < node_count; i++) { 1584 if (node_id == node_id_array[i]) 1585 goto get_next_numa_node; 1586 } 1587 node_id_array[node_count++] = node_id; 1588 node_id_last = node_id; 1589 } 1590 get_next_numa_node: 1591 continue; 1592 } 1593 1594 for (i = 0; i < node_count; i++) { 1595 node_mask = cpumask_of_node(node_id_array[i]); 1596 dbgprint(sdioc, "NUMA_node = %d\n", node_id_array[i]); 1597 for_each_cpu(cpu, node_mask) { 1598 if (cpu_index < nr_queues) { 1599 map[cpu_index++] = queue_offset + (cpu % nr_queues); 1600 } else { 1601 first_sibling = sssraid_get_first_sibling(cpu); 1602 if (first_sibling == cpu) 1603 map[cpu_index++] = queue_offset + (cpu % nr_queues); 1604 else 1605 map[cpu_index++] = map[first_sibling]; 1606 } 1607 dbgprint(sdioc, "map[%d] = %d\n", cpu_index - 1, map[cpu_index - 1]); 1608 } 1609 } 1610 1611 return 0; 1612 } 1613