Re: [PATCH 2/2] irq/irq-loongarch-ir:Add Redirect irqchip support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Tianyang,

kernel test robot noticed the following build errors:

[auto build test ERROR on tip/irq/core]
[also build test ERROR on lwn/docs-next linus/master v6.14-rc5 next-20250305]
[cannot apply to tip/smp/core]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Tianyang-Zhang/Docs-LoongArch-Add-Advanced-Extended-Redirect-IRQ-model-description/20250303-181832
base:   tip/irq/core
patch link:    https://lore.kernel.org/r/20250303101533.31462-3-zhangtianyang%40loongson.cn
patch subject: [PATCH 2/2] irq/irq-loongarch-ir:Add Redirect irqchip support
config: loongarch-randconfig-002-20250305 (https://download.01.org/0day-ci/archive/20250305/202503052234.SiXLJuat-lkp@xxxxxxxxx/config)
compiler: loongarch64-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250305/202503052234.SiXLJuat-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202503052234.SiXLJuat-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   In file included from include/linux/percpu.h:5,
                    from include/linux/context_tracking_state.h:5,
                    from include/linux/hardirq.h:5,
                    from include/linux/interrupt.h:11,
                    from drivers/irqchip/irq-loongarch-ir.c:8:
   drivers/irqchip/irq-loongarch-ir.c: In function 'redirect_queue_init':
>> drivers/irqchip/irq-loongarch-ir.c:413:62: error: 'INVALID_QUEUE_PAGE_ORDER' undeclared (first use in this function)
     413 |         pages = alloc_pages_node(0, GFP_KERNEL | __GFP_ZERO, INVALID_QUEUE_PAGE_ORDER);
         |                                                              ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/alloc_tag.h:227:16: note: in definition of macro 'alloc_hooks_tag'
     227 |         typeof(_do_alloc) _res;                                         \
         |                ^~~~~~~~~
   include/linux/gfp.h:295:49: note: in expansion of macro 'alloc_hooks'
     295 | #define  alloc_pages_node(...)                  alloc_hooks(alloc_pages_node_noprof(__VA_ARGS__))
         |                                                 ^~~~~~~~~~~
   drivers/irqchip/irq-loongarch-ir.c:413:17: note: in expansion of macro 'alloc_pages_node'
     413 |         pages = alloc_pages_node(0, GFP_KERNEL | __GFP_ZERO, INVALID_QUEUE_PAGE_ORDER);
         |                 ^~~~~~~~~~~~~~~~
   drivers/irqchip/irq-loongarch-ir.c:413:62: note: each undeclared identifier is reported only once for each function it appears in
     413 |         pages = alloc_pages_node(0, GFP_KERNEL | __GFP_ZERO, INVALID_QUEUE_PAGE_ORDER);
         |                                                              ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/alloc_tag.h:227:16: note: in definition of macro 'alloc_hooks_tag'
     227 |         typeof(_do_alloc) _res;                                         \
         |                ^~~~~~~~~
   include/linux/gfp.h:295:49: note: in expansion of macro 'alloc_hooks'
     295 | #define  alloc_pages_node(...)                  alloc_hooks(alloc_pages_node_noprof(__VA_ARGS__))
         |                                                 ^~~~~~~~~~~
   drivers/irqchip/irq-loongarch-ir.c:413:17: note: in expansion of macro 'alloc_pages_node'
     413 |         pages = alloc_pages_node(0, GFP_KERNEL | __GFP_ZERO, INVALID_QUEUE_PAGE_ORDER);
         |                 ^~~~~~~~~~~~~~~~
>> drivers/irqchip/irq-loongarch-ir.c:413:15: error: assignment to 'struct page *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     413 |         pages = alloc_pages_node(0, GFP_KERNEL | __GFP_ZERO, INVALID_QUEUE_PAGE_ORDER);
         |               ^
   drivers/irqchip/irq-loongarch-ir.c: In function 'redirect_table_init':
>> drivers/irqchip/irq-loongarch-ir.c:440:65: error: 'IRD_PAGE_ORDER' undeclared (first use in this function); did you mean 'NR_PAGE_ORDERS'?
     440 |         pages = alloc_pages_node(node, GFP_KERNEL | __GFP_ZERO, IRD_PAGE_ORDER);
         |                                                                 ^~~~~~~~~~~~~~
   include/linux/alloc_tag.h:227:16: note: in definition of macro 'alloc_hooks_tag'
     227 |         typeof(_do_alloc) _res;                                         \
         |                ^~~~~~~~~
   include/linux/gfp.h:295:49: note: in expansion of macro 'alloc_hooks'
     295 | #define  alloc_pages_node(...)                  alloc_hooks(alloc_pages_node_noprof(__VA_ARGS__))
         |                                                 ^~~~~~~~~~~
   drivers/irqchip/irq-loongarch-ir.c:440:17: note: in expansion of macro 'alloc_pages_node'
     440 |         pages = alloc_pages_node(node, GFP_KERNEL | __GFP_ZERO, IRD_PAGE_ORDER);
         |                 ^~~~~~~~~~~~~~~~
   drivers/irqchip/irq-loongarch-ir.c:440:15: error: assignment to 'struct page *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     440 |         pages = alloc_pages_node(node, GFP_KERNEL | __GFP_ZERO, IRD_PAGE_ORDER);
         |               ^
   drivers/irqchip/irq-loongarch-ir.c: In function 'redirect_table_fini':
   drivers/irqchip/irq-loongarch-ir.c:475:47: error: 'IRD_PAGE_ORDER' undeclared (first use in this function); did you mean 'NR_PAGE_ORDERS'?
     475 |                 __free_pages(ird_table->page, IRD_PAGE_ORDER);
         |                                               ^~~~~~~~~~~~~~
         |                                               NR_PAGE_ORDERS
   drivers/irqchip/irq-loongarch-ir.c:486:44: error: 'INVALID_QUEUE_PAGE_ORDER' undeclared (first use in this function)
     486 |                 __free_pages(rqueue->page, INVALID_QUEUE_PAGE_ORDER);
         |                                            ^~~~~~~~~~~~~~~~~~~~~~~~


vim +/INVALID_QUEUE_PAGE_ORDER +413 drivers/irqchip/irq-loongarch-ir.c

   407	
   408	static int redirect_queue_init(int node)
   409	{
   410		struct redirect_queue *rqueue = &(irde_descs[node].inv_queue);
   411		struct page *pages;
   412	
 > 413		pages = alloc_pages_node(0, GFP_KERNEL | __GFP_ZERO, INVALID_QUEUE_PAGE_ORDER);
   414		if (!pages) {
   415			pr_err("Node [%d] Invalid Queue alloc pages failed!\n", node);
   416			return -ENOMEM;
   417		}
   418	
   419		rqueue->page = pages;
   420		rqueue->base = (u64)page_address(pages);
   421		rqueue->max_size = INVALID_QUEUE_SIZE;
   422		rqueue->head = 0;
   423		rqueue->tail = 0;
   424		rqueue->node = node;
   425		raw_spin_lock_init(&rqueue->lock);
   426	
   427		iocsr_write32(0, LOONGARCH_IOCSR_REDIRECT_CQH);
   428		iocsr_write32(0, LOONGARCH_IOCSR_REDIRECT_CQT);
   429		iocsr_write64(((rqueue->base & (CQB_ADDR_MASK << CQB_ADDR_SHIFT)) |
   430					(CQB_SIZE_MASK << CQB_SIZE_SHIFT)), LOONGARCH_IOCSR_REDIRECT_CQB);
   431		return 0;
   432	}
   433	
   434	static int redirect_table_init(int node)
   435	{
   436		struct redirect_table *ird_table = &(irde_descs[node].ird_table);
   437		struct page *pages;
   438		unsigned long *bitmap;
   439	
 > 440		pages = alloc_pages_node(node, GFP_KERNEL | __GFP_ZERO, IRD_PAGE_ORDER);
   441		if (!pages) {
   442			pr_err("Node [%d] redirect table alloc pages failed!\n", node);
   443			return -ENOMEM;
   444		}
   445		ird_table->page = pages;
   446		ird_table->table = page_address(pages);
   447	
   448		bitmap = bitmap_zalloc(IRD_ENTRIES, GFP_KERNEL);
   449		if (!bitmap) {
   450			pr_err("Node [%d] redirect table bitmap alloc pages failed!\n", node);
   451			return -ENOMEM;
   452		}
   453	
   454		ird_table->bitmap = bitmap;
   455		ird_table->nr_ird = IRD_ENTRIES;
   456		ird_table->node = node;
   457	
   458		raw_spin_lock_init(&ird_table->lock);
   459	
   460		if (redirect_queue_init(node))
   461			return -EINVAL;
   462	
   463		iocsr_write64(CFG_DISABLE_IDLE, LOONGARCH_IOCSR_REDIRECT_CFG);
   464		iocsr_write64(__pa(ird_table->table), LOONGARCH_IOCSR_REDIRECT_TBR);
   465	
   466		return 0;
   467	}
   468	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux