From mboxrd@z Thu Jan 1 00:00:00 1970 From: wangkefeng.wang@huawei.com (Kefeng Wang) Date: Fri, 8 Apr 2016 16:26:21 +0800 Subject: [PATCH] irqchip/mbigen: Display message of MBIGEN domain created In-Reply-To: <20160408090935.4ec95aa8@arm.com> References: <1460099762-51497-1-git-send-email-wangkefeng.wang@huawei.com> <20160408090935.4ec95aa8@arm.com> Message-ID: <57076B2D.8050006@huawei.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 2016/4/8 16:09, Marc Zyngier wrote: > On Fri, 8 Apr 2016 15:16:02 +0800 > Kefeng Wang wrote: > >> Add message of MBIGEN domain created, it's useful for check >> which MBIGEN domain is created. >> >> Meanwhile, drop module owner, it will be set by driver core. >> >> Signed-off-by: Kefeng Wang >> --- >> drivers/irqchip/irq-mbigen.c | 15 ++++++++++++--- >> 1 file changed, 12 insertions(+), 3 deletions(-) >> >> diff --git a/drivers/irqchip/irq-mbigen.c b/drivers/irqchip/irq-mbigen.c >> index d67baa2..a4dc7a0 100644 >> --- a/drivers/irqchip/irq-mbigen.c >> +++ b/drivers/irqchip/irq-mbigen.c >> @@ -257,14 +257,19 @@ static int mbigen_device_probe(struct platform_device *pdev) >> if (IS_ERR(mgn_chip->base)) >> return PTR_ERR(mgn_chip->base); >> >> + dev_info(&pdev->dev, "%s\n", pdev->dev.of_node->full_name); >> + > > How is that a useful information? > >> for_each_child_of_node(pdev->dev.of_node, np) { >> if (!of_property_read_bool(np, "interrupt-controller")) >> continue; >> >> parent = platform_bus_type.dev_root; >> child = of_platform_device_create(np, NULL, parent); >> - if (IS_ERR(child)) >> + if (IS_ERR(child)) { >> + dev_err(&pdev->dev, "failed to create for %s\n", > > Failed to create what? > >> + np->full_name); >> return PTR_ERR(child); >> + } >> >> if (of_property_read_u32(child->dev.of_node, "num-pins", >> &num_pins) < 0) { >> @@ -276,8 +281,13 @@ static int mbigen_device_probe(struct platform_device *pdev) >> mbigen_write_msg, >> &mbigen_domain_ops, >> mgn_chip); >> - if (!domain) >> + if (!domain) { >> + dev_info(&pdev->dev, "unable to create %s domain\n", >> + np->full_name); > > And what about failure to read num_pin? No need for a debug print in > this case? > >> return -ENOMEM; >> + } >> + >> + dev_info(&pdev->dev, "%s domain created\n", np->full_name); >> } >> >> platform_set_drvdata(pdev, mgn_chip); >> @@ -293,7 +303,6 @@ MODULE_DEVICE_TABLE(of, mbigen_of_match); >> static struct platform_driver mbigen_platform_driver = { >> .driver = { >> .name = "Hisilicon MBIGEN-V2", >> - .owner = THIS_MODULE, >> .of_match_table = mbigen_of_match, >> }, >> .probe = mbigen_device_probe, > > > Overall, this doesn't look like a critical patch to me. I think Ma Jun > is working on separate series reworking the way the mgigen is getting > probed, so I'd advise you to work with him in order to integrate this > patch in his series, as it would make a lot more sense. When try to enable hip06 d03 board[1], we met following error log, so I add some debug message. The mbigen driver use module_platform_driver, the driver initialization is too late, and it is without any message, we don't know about any info of mbigen. I think we should show something about the mbigen domain creation at least. What's your option? Is there a way to solve this improper print? ----------- [ 1.345945] irq: no irq domain found for /mbigen_pcie at a0080000/intc_usb ! [ 1.353660] irq: no irq domain found for /mbigen_pcie at a0080000/intc_usb ! [1] http://www.spinics.net/lists/arm-kernel/msg495732.html Thanks Kefeng > > Thanks, > > M. > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758017AbcDHI2N (ORCPT ); Fri, 8 Apr 2016 04:28:13 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:65280 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757392AbcDHI2J (ORCPT ); Fri, 8 Apr 2016 04:28:09 -0400 Subject: Re: [PATCH] irqchip/mbigen: Display message of MBIGEN domain created To: Marc Zyngier References: <1460099762-51497-1-git-send-email-wangkefeng.wang@huawei.com> <20160408090935.4ec95aa8@arm.com> CC: Jason Cooper , , , , From: Kefeng Wang Message-ID: <57076B2D.8050006@huawei.com> Date: Fri, 8 Apr 2016 16:26:21 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <20160408090935.4ec95aa8@arm.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.177.19.180] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020205.57076B42.00A5,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: e50885642bee91bee0b3a3127b5494e6 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016/4/8 16:09, Marc Zyngier wrote: > On Fri, 8 Apr 2016 15:16:02 +0800 > Kefeng Wang wrote: > >> Add message of MBIGEN domain created, it's useful for check >> which MBIGEN domain is created. >> >> Meanwhile, drop module owner, it will be set by driver core. >> >> Signed-off-by: Kefeng Wang >> --- >> drivers/irqchip/irq-mbigen.c | 15 ++++++++++++--- >> 1 file changed, 12 insertions(+), 3 deletions(-) >> >> diff --git a/drivers/irqchip/irq-mbigen.c b/drivers/irqchip/irq-mbigen.c >> index d67baa2..a4dc7a0 100644 >> --- a/drivers/irqchip/irq-mbigen.c >> +++ b/drivers/irqchip/irq-mbigen.c >> @@ -257,14 +257,19 @@ static int mbigen_device_probe(struct platform_device *pdev) >> if (IS_ERR(mgn_chip->base)) >> return PTR_ERR(mgn_chip->base); >> >> + dev_info(&pdev->dev, "%s\n", pdev->dev.of_node->full_name); >> + > > How is that a useful information? > >> for_each_child_of_node(pdev->dev.of_node, np) { >> if (!of_property_read_bool(np, "interrupt-controller")) >> continue; >> >> parent = platform_bus_type.dev_root; >> child = of_platform_device_create(np, NULL, parent); >> - if (IS_ERR(child)) >> + if (IS_ERR(child)) { >> + dev_err(&pdev->dev, "failed to create for %s\n", > > Failed to create what? > >> + np->full_name); >> return PTR_ERR(child); >> + } >> >> if (of_property_read_u32(child->dev.of_node, "num-pins", >> &num_pins) < 0) { >> @@ -276,8 +281,13 @@ static int mbigen_device_probe(struct platform_device *pdev) >> mbigen_write_msg, >> &mbigen_domain_ops, >> mgn_chip); >> - if (!domain) >> + if (!domain) { >> + dev_info(&pdev->dev, "unable to create %s domain\n", >> + np->full_name); > > And what about failure to read num_pin? No need for a debug print in > this case? > >> return -ENOMEM; >> + } >> + >> + dev_info(&pdev->dev, "%s domain created\n", np->full_name); >> } >> >> platform_set_drvdata(pdev, mgn_chip); >> @@ -293,7 +303,6 @@ MODULE_DEVICE_TABLE(of, mbigen_of_match); >> static struct platform_driver mbigen_platform_driver = { >> .driver = { >> .name = "Hisilicon MBIGEN-V2", >> - .owner = THIS_MODULE, >> .of_match_table = mbigen_of_match, >> }, >> .probe = mbigen_device_probe, > > > Overall, this doesn't look like a critical patch to me. I think Ma Jun > is working on separate series reworking the way the mgigen is getting > probed, so I'd advise you to work with him in order to integrate this > patch in his series, as it would make a lot more sense. When try to enable hip06 d03 board[1], we met following error log, so I add some debug message. The mbigen driver use module_platform_driver, the driver initialization is too late, and it is without any message, we don't know about any info of mbigen. I think we should show something about the mbigen domain creation at least. What's your option? Is there a way to solve this improper print? ----------- [ 1.345945] irq: no irq domain found for /mbigen_pcie@a0080000/intc_usb ! [ 1.353660] irq: no irq domain found for /mbigen_pcie@a0080000/intc_usb ! [1] http://www.spinics.net/lists/arm-kernel/msg495732.html Thanks Kefeng > > Thanks, > > M. >