Message ID | 20221107023404.26730-1-liupeibao@loongson.cn |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1790309wru; Sun, 6 Nov 2022 18:36:08 -0800 (PST) X-Google-Smtp-Source: AMsMyM4mN51LinTQ+xQ60JpZ0FOZObmQMCSTxKnYUmyUFFbSRaqkL1yqvMfVF6TilJbxYwUq2zOl X-Received: by 2002:a65:6a0f:0:b0:46e:f67c:bcee with SMTP id m15-20020a656a0f000000b0046ef67cbceemr41497685pgu.38.1667788567947; Sun, 06 Nov 2022 18:36:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667788567; cv=none; d=google.com; s=arc-20160816; b=reBCNHv1i1hMl/BDlEHeAguPAN9g2ltUIrVxF2KiSg/qjlFxWLD3sM5aBDmCpsFrJk kedG37wxF5D5hihGiY8hvuN+2+hx+ZymCw6fRzRfO6uDh3u5/lA/pragOAP4D9HXNzRx NzcBx/+eqSFI7ESKYN0H3j2U3bwZtdK4+w68Kr2APhcrxmf/VCBD2+pslphVffWKTtrk 4Z/4nEbzAPBEIjHRxExD6tblJgh1bAikG6VUc3VZx1h3TtKXrHpTPFaU3gWaQoyuIwmI claLmyy4KdDKyqRSfR1i+ayPSEdnYV0VrQ03Ipsy02LIZHBDe3Y6IVrHCZNHTAqxMFT4 1lJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=4achoRIJWYes3B0G3vCNkg6wuDQz0RU9do24aTl6iKg=; b=ORq09pKkTCdtQQdqnrPeDXqsBuRF2sftltuDftYjKki/1hAN01Valx+GtvUpfO8A8T PArPT/HG5jmwIaevFWaUVmCLT05HJcFqWzYMauy5R9tk0V+P2v56omkLtAcUSUut8BW0 q9vhRk9FiezKUrRRwBrgybqhv+N2wjSAPOwkI3MtB8K/nYi9O8XcnIj9AExnNI/gdcLW C4UR9IndXQjlfbhTpRpHtfsVsDbH/OfzvhaM9J8MCUYDmHm6XERT2e2yhTeE9BBzLaq5 fiKJ6/B9HYC3RrkeIWEARkMz6iNLc3+GNkdBQAL9SSamfeReO7QaQ3Uzksb681sAcCDq y48g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f8-20020a056a0022c800b00557eeba9fa4si9358409pfj.91.2022.11.06.18.35.54; Sun, 06 Nov 2022 18:36:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230222AbiKGCeR (ORCPT <rfc822;hjfbswb@gmail.com> + 99 others); Sun, 6 Nov 2022 21:34:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230079AbiKGCeQ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 6 Nov 2022 21:34:16 -0500 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 076CA2BDC; Sun, 6 Nov 2022 18:34:13 -0800 (PST) Received: from loongson.cn (unknown [10.20.42.77]) by gateway (Coremail) with SMTP id _____8Dxu9ihbmhjfO0EAA--.16207S3; Mon, 07 Nov 2022 10:34:09 +0800 (CST) Received: from loongson-PC.loongson.cn (unknown [10.20.42.77]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Dxr+Ccbmhj2D0OAA--.40061S2; Mon, 07 Nov 2022 10:34:09 +0800 (CST) From: Liu Peibao <liupeibao@loongson.cn> To: Thomas Gleixner <tglx@linutronix.de>, Marc Zyngier <maz@kernel.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Huacai Chen <chenhuacai@kernel.org>, WANG Xuerui <kernel@xen0n.name> Cc: Jianmin Lv <lvjianmin@loongson.cn>, Yinbo Zhu <zhuyinbo@loongson.cn>, Liu Peibao <liupeibao@loongson.cn>, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] irqchip: loongarch-cpu: add DT support Date: Mon, 7 Nov 2022 10:34:03 +0800 Message-Id: <20221107023404.26730-1-liupeibao@loongson.cn> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf8Dxr+Ccbmhj2D0OAA--.40061S2 X-CM-SenderInfo: xolx1vpled0qxorr0wxvrqhubq/1tbiAQABCmNmUmQAPwAGsA X-Coremail-Antispam: 1Uk129KBjvJXoW7Cw4fCw1fZFyUXryxAF48Crg_yoW8Jw13pa y7u3yavr1xJFnrWwn3C345Wr9Ivr1rK3y2qayfKa4Skrs8G34DZF10yF9xuFs5C3y3JF12 9F18tF18uF15JFDanT9S1TB71UUUUUDqnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj qI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUU b7xYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20xvaj40_Wr0E3s 1l1IIY67AEw4v_Jrv_JF1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xv wVC0I7IYx2IY67AKxVWUCVW8JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwA2z4 x0Y4vEx4A2jsIE14v26F4j6r4UJwA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UM2AI xVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6xACxx1l5I8CrVACY4xI64 kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1Y6r17McIj6I8E87Iv67AKxVWUJVW8JwAm 72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41l42xK82IYc2Ij64vIr41l4I8I3I 0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWU GVWUWwC2zVAF1VAY17CE14v26r1q6r43MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI 0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK8VAvwI8IcIk0 rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r1j6r 4UYxBIdaVFxhVjvjDU0xZFpf9x07j1WlkUUUUU= X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748803065441785553?= X-GMAIL-MSGID: =?utf-8?q?1748803065441785553?= |
Series |
[1/2] irqchip: loongarch-cpu: add DT support
|
|
Commit Message
Liu Peibao
Nov. 7, 2022, 2:34 a.m. UTC
LoongArch is coming to support booting with FDT, so DT
support of this driver is desired.
Signed-off-by: Liu Peibao <liupeibao@loongson.cn>
---
drivers/irqchip/irq-loongarch-cpu.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
Comments
Hi Liu, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on tip/irq/core] [also build test WARNING on robh/for-next linus/master v6.1-rc4 next-20221104] [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/Liu-Peibao/irqchip-loongarch-cpu-add-DT-support/20221107-103606 patch link: https://lore.kernel.org/r/20221107023404.26730-1-liupeibao%40loongson.cn patch subject: [PATCH 1/2] irqchip: loongarch-cpu: add DT support config: loongarch-allyesconfig 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://github.com/intel-lab-lkp/linux/commit/10a355fa4bf4ae52f3889b1d4bec5be1143dd4e2 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Liu-Peibao/irqchip-loongarch-cpu-add-DT-support/20221107-103606 git checkout 10a355fa4bf4ae52f3889b1d4bec5be1143dd4e2 # 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 drivers/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com> All warnings (new ones prefixed by >>): >> drivers/irqchip/irq-loongarch-cpu.c:96:12: warning: no previous prototype for 'loongarch_cpu_irq_of_init' [-Wmissing-prototypes] 96 | int __init loongarch_cpu_irq_of_init(struct device_node *of_node, | ^~~~~~~~~~~~~~~~~~~~~~~~~ vim +/loongarch_cpu_irq_of_init +96 drivers/irqchip/irq-loongarch-cpu.c 94 95 #ifdef CONFIG_OF > 96 int __init loongarch_cpu_irq_of_init(struct device_node *of_node, 97 struct device_node *parent) 98 { 99 cpuintc_handle = of_node_to_fwnode(of_node); 100 101 irq_domain = irq_domain_create_linear(cpuintc_handle, EXCCODE_INT_NUM, 102 &loongarch_cpu_intc_irq_domain_ops, NULL); 103 if (!irq_domain) 104 panic("Failed to add irqdomain for loongarch CPU"); 105 106 set_handle_irq(&handle_cpu_irq); 107 108 return 0; 109 } 110 IRQCHIP_DECLARE(cpu_intc, "loongson,cpu-interrupt-controller", 111 loongarch_cpu_irq_of_init); 112 #endif 113
diff --git a/drivers/irqchip/irq-loongarch-cpu.c b/drivers/irqchip/irq-loongarch-cpu.c index 741612ba6a52..a28b7c549654 100644 --- a/drivers/irqchip/irq-loongarch-cpu.c +++ b/drivers/irqchip/irq-loongarch-cpu.c @@ -92,6 +92,25 @@ static const struct irq_domain_ops loongarch_cpu_intc_irq_domain_ops = { .xlate = irq_domain_xlate_onecell, }; +#ifdef CONFIG_OF +int __init loongarch_cpu_irq_of_init(struct device_node *of_node, + struct device_node *parent) +{ + cpuintc_handle = of_node_to_fwnode(of_node); + + irq_domain = irq_domain_create_linear(cpuintc_handle, EXCCODE_INT_NUM, + &loongarch_cpu_intc_irq_domain_ops, NULL); + if (!irq_domain) + panic("Failed to add irqdomain for loongarch CPU"); + + set_handle_irq(&handle_cpu_irq); + + return 0; +} +IRQCHIP_DECLARE(cpu_intc, "loongson,cpu-interrupt-controller", + loongarch_cpu_irq_of_init); +#endif + static int __init liointc_parse_madt(union acpi_subtable_headers *header, const unsigned long end)