lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202208020817.G8vpKIfp-lkp@intel.com>
Date:   Tue, 2 Aug 2022 08:23:31 +0800
From:   kernel test robot <lkp@...el.com>
To:     Huacai Chen <chenhuacai@...ngson.cn>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Marc Zyngier <maz@...nel.org>,
        Jianmin Lv <lvjianmin@...ngson.cn>
Subject: drivers/irqchip/irq-loongson-eiointc.c:305:42: error: invalid use of
 undefined type 'struct acpi_madt_bio_pic'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   9de1f9c8ca5100a02a2e271bdbde36202e251b4b
commit: dd281e1a1a937ee2f13bd0db5be78e5f5b811ca7 irqchip: Add Loongson Extended I/O interrupt controller support
date:   13 days ago
config: loongarch-randconfig-r032-20220801 (https://download.01.org/0day-ci/archive/20220802/202208020817.G8vpKIfp-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 12.1.0
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/torvalds/linux.git/commit/?id=dd281e1a1a937ee2f13bd0db5be78e5f5b811ca7
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout dd281e1a1a937ee2f13bd0db5be78e5f5b811ca7
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

   drivers/irqchip/irq-loongson-eiointc.c:289:20: warning: no previous prototype for 'acpi_get_vec_parent' [-Wmissing-prototypes]
     289 | struct irq_domain *acpi_get_vec_parent(int node, struct acpi_vector_group *vec_group)
         |                    ^~~~~~~~~~~~~~~~~~~
   drivers/irqchip/irq-loongson-eiointc.c:301:26: warning: 'union acpi_subtable_headers' declared inside parameter list will not be visible outside of this definition or declaration
     301 | pch_pic_parse_madt(union acpi_subtable_headers *header,
         |                          ^~~~~~~~~~~~~~~~~~~~~
   drivers/irqchip/irq-loongson-eiointc.c: In function 'pch_pic_parse_madt':
>> drivers/irqchip/irq-loongson-eiointc.c:305:42: error: invalid use of undefined type 'struct acpi_madt_bio_pic'
     305 |         unsigned int node = (pchpic_entry->address >> 44) & 0xf;
         |                                          ^~
   drivers/irqchip/irq-loongson-eiointc.c: At top level:
   drivers/irqchip/irq-loongson-eiointc.c:315:26: warning: 'union acpi_subtable_headers' declared inside parameter list will not be visible outside of this definition or declaration
     315 | pch_msi_parse_madt(union acpi_subtable_headers *header,
         |                          ^~~~~~~~~~~~~~~~~~~~~
   drivers/irqchip/irq-loongson-eiointc.c: In function 'acpi_cascade_irqdomain_init':
>> drivers/irqchip/irq-loongson-eiointc.c:329:9: error: implicit declaration of function 'acpi_table_parse_madt'; did you mean 'acpi_table_parse'? [-Werror=implicit-function-declaration]
     329 |         acpi_table_parse_madt(ACPI_MADT_TYPE_BIO_PIC,
         |         ^~~~~~~~~~~~~~~~~~~~~
         |         acpi_table_parse
>> drivers/irqchip/irq-loongson-eiointc.c:329:31: error: 'ACPI_MADT_TYPE_BIO_PIC' undeclared (first use in this function); did you mean 'ACPI_MADT_TYPE_IO_APIC'?
     329 |         acpi_table_parse_madt(ACPI_MADT_TYPE_BIO_PIC,
         |                               ^~~~~~~~~~~~~~~~~~~~~~
         |                               ACPI_MADT_TYPE_IO_APIC
   drivers/irqchip/irq-loongson-eiointc.c:329:31: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/irqchip/irq-loongson-eiointc.c:331:31: error: 'ACPI_MADT_TYPE_MSI_PIC' undeclared (first use in this function); did you mean 'ACPI_MADT_TYPE_IO_APIC'?
     331 |         acpi_table_parse_madt(ACPI_MADT_TYPE_MSI_PIC,
         |                               ^~~~~~~~~~~~~~~~~~~~~~
         |                               ACPI_MADT_TYPE_IO_APIC
   drivers/irqchip/irq-loongson-eiointc.c: In function 'eiointc_acpi_init':
>> drivers/irqchip/irq-loongson-eiointc.c:353:34: error: invalid use of undefined type 'struct acpi_madt_eio_pic'
     353 |         priv->node = acpi_eiointc->node;
         |                                  ^~
   drivers/irqchip/irq-loongson-eiointc.c:354:32: error: invalid use of undefined type 'struct acpi_madt_eio_pic'
     354 |         node_map = acpi_eiointc->node_map ? : -1ULL;
         |                                ^~
   drivers/irqchip/irq-loongson-eiointc.c:375:61: error: invalid use of undefined type 'struct acpi_madt_eio_pic'
     375 |         parent_irq = irq_create_mapping(parent, acpi_eiointc->cascade);
         |                                                             ^~
   drivers/irqchip/irq-loongson-eiointc.c:382:41: error: invalid use of undefined type 'struct acpi_madt_eio_pic'
     382 |         acpi_set_vec_parent(acpi_eiointc->node, priv->eiointc_domain, pch_group);
         |                                         ^~
   drivers/irqchip/irq-loongson-eiointc.c:383:41: error: invalid use of undefined type 'struct acpi_madt_eio_pic'
     383 |         acpi_set_vec_parent(acpi_eiointc->node, priv->eiointc_domain, msi_group);
         |                                         ^~
   cc1: some warnings being treated as errors


vim +305 drivers/irqchip/irq-loongson-eiointc.c

   288	
 > 289	struct irq_domain *acpi_get_vec_parent(int node, struct acpi_vector_group *vec_group)
   290	{
   291		int i;
   292	
   293		for (i = 0; i < MAX_IO_PICS; i++) {
   294			if (node == vec_group[i].node)
   295				return vec_group[i].parent;
   296		}
   297		return NULL;
   298	}
   299	
   300	static int __init
   301	pch_pic_parse_madt(union acpi_subtable_headers *header,
   302			       const unsigned long end)
   303	{
   304		struct acpi_madt_bio_pic *pchpic_entry = (struct acpi_madt_bio_pic *)header;
 > 305		unsigned int node = (pchpic_entry->address >> 44) & 0xf;
   306		struct irq_domain *parent = acpi_get_vec_parent(node, pch_group);
   307	
   308		if (parent)
   309			return pch_pic_acpi_init(parent, pchpic_entry);
   310	
   311		return -EINVAL;
   312	}
   313	
   314	static int __init
 > 315	pch_msi_parse_madt(union acpi_subtable_headers *header,
   316			       const unsigned long end)
   317	{
   318		struct acpi_madt_msi_pic *pchmsi_entry = (struct acpi_madt_msi_pic *)header;
   319		struct irq_domain *parent = acpi_get_vec_parent(eiointc_priv[nr_pics - 1]->node, msi_group);
   320	
   321		if (parent)
   322			return pch_msi_acpi_init(parent, pchmsi_entry);
   323	
   324		return -EINVAL;
   325	}
   326	
   327	static int __init acpi_cascade_irqdomain_init(void)
   328	{
 > 329		acpi_table_parse_madt(ACPI_MADT_TYPE_BIO_PIC,
   330				      pch_pic_parse_madt, 0);
 > 331		acpi_table_parse_madt(ACPI_MADT_TYPE_MSI_PIC,
   332				      pch_msi_parse_madt, 1);
   333		return 0;
   334	}
   335	
   336	int __init eiointc_acpi_init(struct irq_domain *parent,
   337					     struct acpi_madt_eio_pic *acpi_eiointc)
   338	{
   339		int i, parent_irq;
   340		unsigned long node_map;
   341		struct eiointc_priv *priv;
   342	
   343		priv = kzalloc(sizeof(*priv), GFP_KERNEL);
   344		if (!priv)
   345			return -ENOMEM;
   346	
   347		priv->domain_handle = irq_domain_alloc_fwnode((phys_addr_t *)acpi_eiointc);
   348		if (!priv->domain_handle) {
   349			pr_err("Unable to allocate domain handle\n");
   350			goto out_free_priv;
   351		}
   352	
 > 353		priv->node = acpi_eiointc->node;

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ