From: kernel test robot <lkp@intel.com>
To: Lu Yao <yaolu@kylinos.cn>,
tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
dave.hansen@linux.intel.com, x86@kernel.org,
rdunlap@infradead.org
Cc: oe-kbuild-all@lists.linux.dev, hpa@zytor.com,
linux-kernel@vger.kernel.org, Lu Yao <yaolu@kylinos.cn>
Subject: Re: [PATCH v2] x86/msi: Fix compile error caused by GENERIC_MSI_IRQ and X86_LOCAL_APIC
Date: Thu, 12 Oct 2023 08:35:43 +0800 [thread overview]
Message-ID: <202310120849.zrfrI44Z-lkp@intel.com> (raw)
In-Reply-To: <20231011055749.98840-1-yaolu@kylinos.cn>
Hi Lu,
kernel test robot noticed the following build warnings:
[auto build test WARNING on tip/master]
[also build test WARNING on tip/x86/core tip/auto-latest linus/master v6.6-rc5 next-20231011]
[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/Lu-Yao/x86-msi-Fix-compile-error-caused-by-GENERIC_MSI_IRQ-and-X86_LOCAL_APIC/20231011-135941
base: tip/master
patch link: https://lore.kernel.org/r/20231011055749.98840-1-yaolu%40kylinos.cn
patch subject: [PATCH v2] x86/msi: Fix compile error caused by GENERIC_MSI_IRQ and X86_LOCAL_APIC
config: i386-buildonly-randconfig-001-20231012 (https://download.01.org/0day-ci/archive/20231012/202310120849.zrfrI44Z-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231012/202310120849.zrfrI44Z-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202310120849.zrfrI44Z-lkp@intel.com/
All warnings (new ones prefixed by >>):
arch/x86/kernel/hpet.c:509:29: error: 'msi_domain_set_affinity' undeclared here (not in a function); did you mean 'irq_can_set_affinity'?
509 | .irq_set_affinity = msi_domain_set_affinity,
| ^~~~~~~~~~~~~~~~~~~~~~~
| irq_can_set_affinity
>> arch/x86/kernel/hpet.c:516:33: warning: 'struct msi_domain_info' declared inside parameter list will not be visible outside of this definition or declaration
516 | struct msi_domain_info *info, unsigned int virq,
| ^~~~~~~~~~~~~~~
arch/x86/kernel/hpet.c: In function 'hpet_msi_init':
arch/x86/kernel/hpet.c:520:59: error: invalid use of undefined type 'struct msi_domain_info'
520 | irq_domain_set_info(domain, virq, arg->hwirq, info->chip, NULL,
| ^~
arch/x86/kernel/hpet.c: At top level:
arch/x86/kernel/hpet.c:527:34: warning: 'struct msi_domain_info' declared inside parameter list will not be visible outside of this definition or declaration
527 | struct msi_domain_info *info, unsigned int virq)
| ^~~~~~~~~~~~~~~
arch/x86/kernel/hpet.c:532:15: error: variable 'hpet_msi_domain_ops' has initializer but incomplete type
532 | static struct msi_domain_ops hpet_msi_domain_ops = {
| ^~~~~~~~~~~~~~
arch/x86/kernel/hpet.c:533:10: error: 'struct msi_domain_ops' has no member named 'msi_init'
533 | .msi_init = hpet_msi_init,
| ^~~~~~~~
>> arch/x86/kernel/hpet.c:533:27: warning: excess elements in struct initializer
533 | .msi_init = hpet_msi_init,
| ^~~~~~~~~~~~~
arch/x86/kernel/hpet.c:533:27: note: (near initialization for 'hpet_msi_domain_ops')
arch/x86/kernel/hpet.c:534:10: error: 'struct msi_domain_ops' has no member named 'msi_free'
534 | .msi_free = hpet_msi_free,
| ^~~~~~~~
arch/x86/kernel/hpet.c:534:27: warning: excess elements in struct initializer
534 | .msi_free = hpet_msi_free,
| ^~~~~~~~~~~~~
arch/x86/kernel/hpet.c:534:27: note: (near initialization for 'hpet_msi_domain_ops')
arch/x86/kernel/hpet.c:537:15: error: variable 'hpet_msi_domain_info' has initializer but incomplete type
537 | static struct msi_domain_info hpet_msi_domain_info = {
| ^~~~~~~~~~~~~~~
arch/x86/kernel/hpet.c:538:10: error: 'struct msi_domain_info' has no member named 'ops'
538 | .ops = &hpet_msi_domain_ops,
| ^~~
arch/x86/kernel/hpet.c:538:27: warning: excess elements in struct initializer
538 | .ops = &hpet_msi_domain_ops,
| ^
arch/x86/kernel/hpet.c:538:27: note: (near initialization for 'hpet_msi_domain_info')
arch/x86/kernel/hpet.c:539:10: error: 'struct msi_domain_info' has no member named 'chip'
539 | .chip = &hpet_msi_controller,
| ^~~~
arch/x86/kernel/hpet.c:539:27: warning: excess elements in struct initializer
539 | .chip = &hpet_msi_controller,
| ^
arch/x86/kernel/hpet.c:539:27: note: (near initialization for 'hpet_msi_domain_info')
arch/x86/kernel/hpet.c:540:10: error: 'struct msi_domain_info' has no member named 'flags'
540 | .flags = MSI_FLAG_USE_DEF_DOM_OPS,
| ^~~~~
arch/x86/kernel/hpet.c:540:27: error: 'MSI_FLAG_USE_DEF_DOM_OPS' undeclared here (not in a function)
540 | .flags = MSI_FLAG_USE_DEF_DOM_OPS,
| ^~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/kernel/hpet.c:540:27: warning: excess elements in struct initializer
arch/x86/kernel/hpet.c:540:27: note: (near initialization for 'hpet_msi_domain_info')
arch/x86/kernel/hpet.c: In function 'hpet_create_irq_domain':
arch/x86/kernel/hpet.c:553:37: error: invalid application of 'sizeof' to incomplete type 'struct msi_domain_info'
553 | domain_info = kzalloc(sizeof(*domain_info), GFP_KERNEL);
| ^
arch/x86/kernel/hpet.c:557:24: error: 'hpet_msi_domain_info' has an incomplete type 'struct msi_domain_info'
557 | *domain_info = hpet_msi_domain_info;
| ^~~~~~~~~~~~~~~~~~~~
arch/x86/kernel/hpet.c:557:22: error: invalid use of undefined type 'struct msi_domain_info'
557 | *domain_info = hpet_msi_domain_info;
| ^
arch/x86/kernel/hpet.c:558:20: error: invalid use of undefined type 'struct msi_domain_info'
558 | domain_info->data = (void *)(long)hpet_id;
| ^~
arch/x86/kernel/hpet.c:580:13: error: implicit declaration of function 'msi_create_irq_domain'; did you mean 'hpet_create_irq_domain'? [-Werror=implicit-function-declaration]
580 | d = msi_create_irq_domain(fn, domain_info, parent);
| ^~~~~~~~~~~~~~~~~~~~~
| hpet_create_irq_domain
>> arch/x86/kernel/hpet.c:580:11: warning: assignment to 'struct irq_domain *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
580 | d = msi_create_irq_domain(fn, domain_info, parent);
| ^
arch/x86/kernel/hpet.c: In function 'hpet_dev_id':
arch/x86/kernel/hpet.c:590:40: error: implicit declaration of function 'msi_get_domain_info' [-Werror=implicit-function-declaration]
590 | struct msi_domain_info *info = msi_get_domain_info(domain);
| ^~~~~~~~~~~~~~~~~~~
>> arch/x86/kernel/hpet.c:590:40: warning: initialization of 'struct msi_domain_info *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
arch/x86/kernel/hpet.c:592:31: error: invalid use of undefined type 'struct msi_domain_info'
592 | return (int)(long)info->data;
| ^~
arch/x86/kernel/hpet.c: At top level:
arch/x86/kernel/hpet.c:532:30: error: storage size of 'hpet_msi_domain_ops' isn't known
532 | static struct msi_domain_ops hpet_msi_domain_ops = {
| ^~~~~~~~~~~~~~~~~~~
arch/x86/kernel/hpet.c:537:31: error: storage size of 'hpet_msi_domain_info' isn't known
537 | static struct msi_domain_info hpet_msi_domain_info = {
| ^~~~~~~~~~~~~~~~~~~~
arch/x86/kernel/hpet.c: In function 'hpet_dev_id':
arch/x86/kernel/hpet.c:593:1: error: control reaches end of non-void function [-Werror=return-type]
593 | }
| ^
cc1: some warnings being treated as errors
vim +516 arch/x86/kernel/hpet.c
3d7295eb3003ae David Woodhouse 2020-10-24 514
3d7295eb3003ae David Woodhouse 2020-10-24 515 static int hpet_msi_init(struct irq_domain *domain,
3d7295eb3003ae David Woodhouse 2020-10-24 @516 struct msi_domain_info *info, unsigned int virq,
3d7295eb3003ae David Woodhouse 2020-10-24 517 irq_hw_number_t hwirq, msi_alloc_info_t *arg)
3d7295eb3003ae David Woodhouse 2020-10-24 518 {
3d7295eb3003ae David Woodhouse 2020-10-24 519 irq_set_status_flags(virq, IRQ_MOVE_PCNTXT);
3d7295eb3003ae David Woodhouse 2020-10-24 520 irq_domain_set_info(domain, virq, arg->hwirq, info->chip, NULL,
3d7295eb3003ae David Woodhouse 2020-10-24 521 handle_edge_irq, arg->data, "edge");
3d7295eb3003ae David Woodhouse 2020-10-24 522
3d7295eb3003ae David Woodhouse 2020-10-24 523 return 0;
3d7295eb3003ae David Woodhouse 2020-10-24 524 }
3d7295eb3003ae David Woodhouse 2020-10-24 525
3d7295eb3003ae David Woodhouse 2020-10-24 526 static void hpet_msi_free(struct irq_domain *domain,
3d7295eb3003ae David Woodhouse 2020-10-24 527 struct msi_domain_info *info, unsigned int virq)
3d7295eb3003ae David Woodhouse 2020-10-24 528 {
3d7295eb3003ae David Woodhouse 2020-10-24 529 irq_clear_status_flags(virq, IRQ_MOVE_PCNTXT);
3d7295eb3003ae David Woodhouse 2020-10-24 530 }
3d7295eb3003ae David Woodhouse 2020-10-24 531
3d7295eb3003ae David Woodhouse 2020-10-24 532 static struct msi_domain_ops hpet_msi_domain_ops = {
3d7295eb3003ae David Woodhouse 2020-10-24 @533 .msi_init = hpet_msi_init,
3d7295eb3003ae David Woodhouse 2020-10-24 534 .msi_free = hpet_msi_free,
3d7295eb3003ae David Woodhouse 2020-10-24 535 };
3d7295eb3003ae David Woodhouse 2020-10-24 536
3d7295eb3003ae David Woodhouse 2020-10-24 537 static struct msi_domain_info hpet_msi_domain_info = {
3d7295eb3003ae David Woodhouse 2020-10-24 538 .ops = &hpet_msi_domain_ops,
3d7295eb3003ae David Woodhouse 2020-10-24 539 .chip = &hpet_msi_controller,
3d7295eb3003ae David Woodhouse 2020-10-24 540 .flags = MSI_FLAG_USE_DEF_DOM_OPS,
3d7295eb3003ae David Woodhouse 2020-10-24 541 };
3d7295eb3003ae David Woodhouse 2020-10-24 542
3d7295eb3003ae David Woodhouse 2020-10-24 543 static struct irq_domain *hpet_create_irq_domain(int hpet_id)
3d7295eb3003ae David Woodhouse 2020-10-24 544 {
3d7295eb3003ae David Woodhouse 2020-10-24 545 struct msi_domain_info *domain_info;
3d7295eb3003ae David Woodhouse 2020-10-24 546 struct irq_domain *parent, *d;
3d7295eb3003ae David Woodhouse 2020-10-24 547 struct fwnode_handle *fn;
c2a5881c28e5bb David Woodhouse 2020-10-24 548 struct irq_fwspec fwspec;
3d7295eb3003ae David Woodhouse 2020-10-24 549
3d7295eb3003ae David Woodhouse 2020-10-24 550 if (x86_vector_domain == NULL)
3d7295eb3003ae David Woodhouse 2020-10-24 551 return NULL;
3d7295eb3003ae David Woodhouse 2020-10-24 552
3d7295eb3003ae David Woodhouse 2020-10-24 553 domain_info = kzalloc(sizeof(*domain_info), GFP_KERNEL);
3d7295eb3003ae David Woodhouse 2020-10-24 554 if (!domain_info)
3d7295eb3003ae David Woodhouse 2020-10-24 555 return NULL;
3d7295eb3003ae David Woodhouse 2020-10-24 556
3d7295eb3003ae David Woodhouse 2020-10-24 557 *domain_info = hpet_msi_domain_info;
3d7295eb3003ae David Woodhouse 2020-10-24 558 domain_info->data = (void *)(long)hpet_id;
3d7295eb3003ae David Woodhouse 2020-10-24 559
3d7295eb3003ae David Woodhouse 2020-10-24 560 fn = irq_domain_alloc_named_id_fwnode(hpet_msi_controller.name,
3d7295eb3003ae David Woodhouse 2020-10-24 561 hpet_id);
3d7295eb3003ae David Woodhouse 2020-10-24 562 if (!fn) {
3d7295eb3003ae David Woodhouse 2020-10-24 563 kfree(domain_info);
3d7295eb3003ae David Woodhouse 2020-10-24 564 return NULL;
3d7295eb3003ae David Woodhouse 2020-10-24 565 }
3d7295eb3003ae David Woodhouse 2020-10-24 566
c2a5881c28e5bb David Woodhouse 2020-10-24 567 fwspec.fwnode = fn;
c2a5881c28e5bb David Woodhouse 2020-10-24 568 fwspec.param_count = 1;
c2a5881c28e5bb David Woodhouse 2020-10-24 569 fwspec.param[0] = hpet_id;
c2a5881c28e5bb David Woodhouse 2020-10-24 570
c2a5881c28e5bb David Woodhouse 2020-10-24 571 parent = irq_find_matching_fwspec(&fwspec, DOMAIN_BUS_ANY);
c2a5881c28e5bb David Woodhouse 2020-10-24 572 if (!parent) {
c2a5881c28e5bb David Woodhouse 2020-10-24 573 irq_domain_free_fwnode(fn);
c2a5881c28e5bb David Woodhouse 2020-10-24 574 kfree(domain_info);
c2a5881c28e5bb David Woodhouse 2020-10-24 575 return NULL;
c2a5881c28e5bb David Woodhouse 2020-10-24 576 }
c2a5881c28e5bb David Woodhouse 2020-10-24 577 if (parent != x86_vector_domain)
c2a5881c28e5bb David Woodhouse 2020-10-24 578 hpet_msi_controller.name = "IR-HPET-MSI";
c2a5881c28e5bb David Woodhouse 2020-10-24 579
3d7295eb3003ae David Woodhouse 2020-10-24 @580 d = msi_create_irq_domain(fn, domain_info, parent);
3d7295eb3003ae David Woodhouse 2020-10-24 581 if (!d) {
3d7295eb3003ae David Woodhouse 2020-10-24 582 irq_domain_free_fwnode(fn);
3d7295eb3003ae David Woodhouse 2020-10-24 583 kfree(domain_info);
3d7295eb3003ae David Woodhouse 2020-10-24 584 }
3d7295eb3003ae David Woodhouse 2020-10-24 585 return d;
3d7295eb3003ae David Woodhouse 2020-10-24 586 }
3d7295eb3003ae David Woodhouse 2020-10-24 587
3d7295eb3003ae David Woodhouse 2020-10-24 588 static inline int hpet_dev_id(struct irq_domain *domain)
3d7295eb3003ae David Woodhouse 2020-10-24 589 {
3d7295eb3003ae David Woodhouse 2020-10-24 @590 struct msi_domain_info *info = msi_get_domain_info(domain);
3d7295eb3003ae David Woodhouse 2020-10-24 591
3d7295eb3003ae David Woodhouse 2020-10-24 592 return (int)(long)info->data;
3d7295eb3003ae David Woodhouse 2020-10-24 593 }
3d7295eb3003ae David Woodhouse 2020-10-24 594
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2023-10-12 0:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-08 8:28 [PATCH] x86/msi: Fix compile error "incomplete typedef 'msi_alloc_info_t'" yaolu
2023-10-10 15:59 ` Randy Dunlap
2023-10-11 5:57 ` [PATCH v2] x86/msi: Fix compile error caused by GENERIC_MSI_IRQ and X86_LOCAL_APIC Lu Yao
2023-10-11 19:18 ` Randy Dunlap
2023-10-12 0:35 ` kernel test robot [this message]
2023-10-12 3:26 ` [PATCH v3] " Lu Yao
2023-10-12 6:25 ` [tip: x86/apic] x86/msi: Fix compile error caused by CONFIG_GENERIC_MSI_IRQ=y && !CONFIG_X86_LOCAL_APIC tip-bot2 for Lu Yao
2023-10-12 10:59 ` [PATCH v2] x86/msi: Fix compile error caused by GENERIC_MSI_IRQ and X86_LOCAL_APIC kernel test robot
2023-10-12 11:30 ` kernel test robot
2023-10-11 2:41 Lu Yao
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=202310120849.zrfrI44Z-lkp@intel.com \
--to=lkp@intel.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=rdunlap@infradead.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=yaolu@kylinos.cn \
/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
all inboxes | Powered by JetHome®