From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 23200C00140 for ; Mon, 8 Aug 2022 10:06:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242352AbiHHKGC (ORCPT ); Mon, 8 Aug 2022 06:06:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237452AbiHHKFr (ORCPT ); Mon, 8 Aug 2022 06:05:47 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BE8BB855 for ; Mon, 8 Aug 2022 03:05:46 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id EEAC16102F for ; Mon, 8 Aug 2022 10:05:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5E1A0C433D7; Mon, 8 Aug 2022 10:05:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659953145; bh=jNT5hSYRHs1dOrRJs+RdgwXntzYu00VkZyghx/5xXJE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ow4v55uWs/Rixuu0PSWtHqNOywJusA9IT50ZYooi6qBBSwoti93LFdZTvv6lVYTB2 Wn7Qoyhx61U5LEjzXU4GqLf9NrBk1517OBiwx/+0NMpTHk9sKRIBAix6C9rqaHZWy9 SiEC3g7EjOjAPVtM7AL+YkgK/5tG3MPX3hN/zOKn33xqYNsHpGnV5gKAs9ZGSyTd+a 79b8I2a5cpYw6ZYO8tlOQYGB1TEk3B5/+orsWIslZMjamHKcjqo30R0Y4tNndI9HRO aYWxZw6kahb9P00JFnZPeFh1j3BpqyKcNF4vz+FAr95V3q4jR64A0gT5E2SgVroAaa G/4I/mh+0fXtw== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1oKzdn-001dEs-0F; Mon, 08 Aug 2022 11:05:43 +0100 Date: Mon, 08 Aug 2022 11:05:42 +0100 Message-ID: <87edxrvymh.wl-maz@kernel.org> From: Marc Zyngier To: Huacai Chen Cc: Thomas Gleixner , linux-kernel@vger.kernel.org, Xuefeng Li , Huacai Chen , Jiaxun Yang , kernel test robot Subject: Re: [PATCH] irqchip: Select downstream irqchip drivers for LoongArch CPU In-Reply-To: <20220808085319.3350111-1-chenhuacai@loongson.cn> References: <20220808085319.3350111-1-chenhuacai@loongson.cn> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: chenhuacai@loongson.cn, tglx@linutronix.de, linux-kernel@vger.kernel.org, lixuefeng@loongson.cn, chenhuacai@gmail.com, jiaxun.yang@flygoat.com, lkp@intel.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 08 Aug 2022 09:53:19 +0100, Huacai Chen 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 > Signed-off-by: Huacai Chen > --- > 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. $ 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 = { | ^~~~~~~~~~~~~~~~~~~ -- Without deviation from the norm, progress is not possible.