All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Huacai Chen <chenhuacai@loongson.cn>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	linux-kernel@vger.kernel.org, Xuefeng Li <lixuefeng@loongson.cn>,
	Huacai Chen <chenhuacai@gmail.com>,
	Jiaxun Yang <jiaxun.yang@flygoat.com>,
	kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] irqchip: Select downstream irqchip drivers for LoongArch CPU
Date: Mon, 08 Aug 2022 11:05:42 +0100	[thread overview]
Message-ID: <87edxrvymh.wl-maz@kernel.org> (raw)
In-Reply-To: <20220808085319.3350111-1-chenhuacai@loongson.cn>

On Mon, 08 Aug 2022 09:53:19 +0100,
Huacai Chen <chenhuacai@loongson.cn> wrote:
> 
> LoongArch irqchips have a fixed hierarchy which currently can't be
> described by ACPI tables, so upstream irqchip drivers call downstream
> irqchip drivers' initialization directly. As a result, the top level
> (CPU-level) irqchip driver should explicitly select downstream drivers
> to avoid build errors.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
> ---
>  drivers/irqchip/Kconfig | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
> index 66b9fa408bf2..2549daa859d6 100644
> --- a/drivers/irqchip/Kconfig
> +++ b/drivers/irqchip/Kconfig
> @@ -561,6 +561,11 @@ config IRQ_LOONGARCH_CPU
>  	select GENERIC_IRQ_CHIP
>  	select IRQ_DOMAIN
>  	select GENERIC_IRQ_EFFECTIVE_AFF_MASK
> +	select LOONGSON_LIOINTC
> +	select LOONGSON_EIOINTC
> +	select LOONGSON_PCH_PIC
> +	select LOONGSON_PCH_MSI
> +	select LOONGSON_PCH_LPC

This triggers tons of pretty bad compilation and configuration issues,
as PCI still isn't selectable, even in Linus' tree (see below). I'm
guessing you still have local patches that hide this issue.

Please test your patches on an upstream tree in the future.

	M.

<log>
$ make ARCH=loongarch CROSS_COMPILE=loongarch64-linux- -j 20 vmlinux
  SYNC    include/config/auto.conf.cmd

WARNING: unmet direct dependencies detected for LOONGSON_PCH_MSI
  Depends on [n]: MACH_LOONGSON64 [=y] && PCI [=n]
  Selected by [y]:
  - IRQ_LOONGARCH_CPU [=y]

WARNING: unmet direct dependencies detected for LOONGSON_PCH_MSI
  Depends on [n]: MACH_LOONGSON64 [=y] && PCI [=n]
  Selected by [y]:
  - IRQ_LOONGARCH_CPU [=y]

WARNING: unmet direct dependencies detected for LOONGSON_PCH_MSI
  Depends on [n]: MACH_LOONGSON64 [=y] && PCI [=n]
  Selected by [y]:
[...]
drivers/irqchip/irq-loongson-pch-msi.c:88:15: error: variable 'pch_msi_domain_info' has initializer but incomplete type
   88 | static struct msi_domain_info pch_msi_domain_info = {
      |               ^~~~~~~~~~~~~~~
drivers/irqchip/irq-loongson-pch-msi.c:89:10: error: 'struct msi_domain_info' has no member named 'flags'
   89 |         .flags  = MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS |
      |          ^~~~~
  CC      mm/page-writeback.o
  CC      io_uring/advise.o
drivers/irqchip/irq-loongson-pch-msi.c:89:19: error: 'MSI_FLAG_USE_DEF_DOM_OPS' undeclared here (not in a function)
   89 |         .flags  = MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS |
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~
  CC      fs/char_dev.o
  CC      fs/stat.o
drivers/irqchip/irq-loongson-pch-msi.c:89:46: error: 'MSI_FLAG_USE_DEF_CHIP_OPS' undeclared here (not in a function)
   89 |         .flags  = MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS |
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~
  CC      security/security.o
  AS      arch/loongarch/kernel/switch.o
  CC      kernel/softirq.o
drivers/irqchip/irq-loongson-pch-msi.c:90:19: error: 'MSI_FLAG_MULTI_PCI_MSI' undeclared here (not in a function)
   90 |                   MSI_FLAG_MULTI_PCI_MSI | MSI_FLAG_PCI_MSIX,
      |                   ^~~~~~~~~~~~~~~~~~~~~~
  CC      crypto/dh_helper.o
  CC      arch/loongarch/kernel/elf.o
drivers/irqchip/irq-loongson-pch-msi.c:90:44: error: 'MSI_FLAG_PCI_MSIX' undeclared here (not in a function)
   90 |                   MSI_FLAG_MULTI_PCI_MSI | MSI_FLAG_PCI_MSIX,
      |                                            ^~~~~~~~~~~~~~~~~
drivers/irqchip/irq-loongson-pch-msi.c:89:19: warning: excess elements in struct initializer
   89 |         .flags  = MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS |
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/irqchip/irq-loongson-pch-msi.c:89:19: note: (near initialization for 'pch_msi_domain_info')
drivers/irqchip/irq-loongson-pch-msi.c:91:10: error: 'struct msi_domain_info' has no member named 'chip'
   91 |         .chip   = &pch_msi_irq_chip,
      |          ^~~~
drivers/irqchip/irq-loongson-pch-msi.c:91:19: warning: excess elements in struct initializer
   91 |         .chip   = &pch_msi_irq_chip,
      |                   ^
drivers/irqchip/irq-loongson-pch-msi.c:91:19: note: (near initialization for 'pch_msi_domain_info')
  CC      sound/core/device.o
  CC      drivers/gpio/gpiolib-sysfs.o
  CC      io_uring/filetable.o
drivers/irqchip/irq-loongson-pch-msi.c: In function 'pch_msi_init_domains':
drivers/irqchip/irq-loongson-pch-msi.c:178:22: error: implicit declaration of function 'pci_msi_create_irq_domain'; did you mean 'pci_msi_get_device_domain'? [-Werror=implicit-function-declaration]
  178 |         msi_domain = pci_msi_create_irq_domain(domain_handle,
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~
      |                      pci_msi_get_device_domain
drivers/irqchip/irq-loongson-pch-msi.c:178:20: warning: assignment to 'struct irq_domain *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
  178 |         msi_domain = pci_msi_create_irq_domain(domain_handle,
      |                    ^
drivers/irqchip/irq-loongson-pch-msi.c: At top level:
drivers/irqchip/irq-loongson-pch-msi.c:88:31: error: storage size of 'pch_msi_domain_info' isn't known
   88 | static struct msi_domain_info pch_msi_domain_info = {
      |                               ^~~~~~~~~~~~~~~~~~~
</log>

-- 
Without deviation from the norm, progress is not possible.

  reply	other threads:[~2022-08-08 10:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-08  8:53 [PATCH] irqchip: Select downstream irqchip drivers for LoongArch CPU Huacai Chen
2022-08-08 10:05 ` Marc Zyngier [this message]
2022-08-08 11:06   ` Huacai Chen
2022-08-08 11:16     ` Marc Zyngier
2022-08-08 11:24       ` Huacai Chen
2022-08-09  1:59 ` kernel test robot
2022-09-13 12:53 ` [irqchip: irq/irqchip-fixes] " irqchip-bot for Huacai Chen
  -- strict thread matches above, loose matches on Subject: below --
2022-08-08 12:07 [PATCH] " kernel test robot
2022-08-08 13:09 kernel test robot

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=87edxrvymh.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=chenhuacai@gmail.com \
    --cc=chenhuacai@loongson.cn \
    --cc=jiaxun.yang@flygoat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lixuefeng@loongson.cn \
    --cc=lkp@intel.com \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.