Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1339348 > unrolled thread
| Started by | MaJun <majun258@huawei.com> |
|---|---|
| First post | 2016-02-22 12:10 +0100 |
| Last post | 2016-02-22 12:30 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] Irq/mbigen:Promote the mbigen driver register timing MaJun <majun258@huawei.com> - 2016-02-22 12:10 +0100
Re: [PATCH] Irq/mbigen:Promote the mbigen driver register timing Marc Zyngier <marc.zyngier@arm.com> - 2016-02-22 12:30 +0100
| From | MaJun <majun258@huawei.com> |
|---|---|
| Date | 2016-02-22 12:10 +0100 |
| Subject | [PATCH] Irq/mbigen:Promote the mbigen driver register timing |
| Message-ID | <r4Wxk-4RK-19@gated-at.bofh.it> |
From: Ma Jun <majun258@huawei.com>
Using module_platform_driver() to register mbigen driver is
too late for some driver to apply irq, because the mbigen irq
domain is not created yet.
Signed-off-by: Ma Jun <majun258@huawei.com>
---
drivers/irqchip/irq-mbigen.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/drivers/irqchip/irq-mbigen.c b/drivers/irqchip/irq-mbigen.c
index 4dd3eb8..4df359c 100644
--- a/drivers/irqchip/irq-mbigen.c
+++ b/drivers/irqchip/irq-mbigen.c
@@ -289,7 +289,14 @@ static struct platform_driver mbigen_platform_driver = {
.probe = mbigen_device_probe,
};
-module_platform_driver(mbigen_platform_driver);
+static __init int mbigen_init(void)
+
+{
+ return platform_driver_register(&mbigen_platform_driver);
+
+}
+
+arch_initcall(mbigen_init);
MODULE_AUTHOR("Jun Ma <majun258@huawei.com>");
MODULE_AUTHOR("Yun Wu <wuyun.wu@huawei.com>");
--
1.7.1
[toc] | [next] | [standalone]
| From | Marc Zyngier <marc.zyngier@arm.com> |
|---|---|
| Date | 2016-02-22 12:30 +0100 |
| Message-ID | <r4WQH-51k-23@gated-at.bofh.it> |
| In reply to | #1339348 |
On 22/02/16 11:00, MaJun wrote:
> From: Ma Jun <majun258@huawei.com>
>
> Using module_platform_driver() to register mbigen driver is
> too late for some driver to apply irq, because the mbigen irq
> domain is not created yet.
>
> Signed-off-by: Ma Jun <majun258@huawei.com>
> ---
> drivers/irqchip/irq-mbigen.c | 9 ++++++++-
> 1 files changed, 8 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/irqchip/irq-mbigen.c b/drivers/irqchip/irq-mbigen.c
> index 4dd3eb8..4df359c 100644
> --- a/drivers/irqchip/irq-mbigen.c
> +++ b/drivers/irqchip/irq-mbigen.c
> @@ -289,7 +289,14 @@ static struct platform_driver mbigen_platform_driver = {
> .probe = mbigen_device_probe,
> };
>
> -module_platform_driver(mbigen_platform_driver);
> +static __init int mbigen_init(void)
> +
> +{
> + return platform_driver_register(&mbigen_platform_driver);
> +
> +}
> +
> +arch_initcall(mbigen_init);
>
> MODULE_AUTHOR("Jun Ma <majun258@huawei.com>");
> MODULE_AUTHOR("Yun Wu <wuyun.wu@huawei.com>");
>
I don't believe this is a proper fix, and already said so when reviewing
this code:
http://www.spinics.net/lists/linux-pci/msg46534.html
Short of actually solving the dependencies, it is likely that you will
only move the problem somewhere else.
I suggest you engage will people that are working on a proper solution,
and/or fix the drivers to gracefully defer their probing if their IRQs
are not available.
Thanks,
M.
--
Jazz is not dead. It just smells funny...
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web