Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1458794 > unrolled thread

[PATCH 1/2] of/irq: Mark interrupt controllers as populated before initialisation

Started byPhilipp Zabel <p.zabel@pengutronix.de>
First post2016-08-09 16:20 +0200
Last post2016-08-09 18:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 1/2] of/irq: Mark interrupt controllers as populated before initialisation Philipp Zabel <p.zabel@pengutronix.de> - 2016-08-09 16:20 +0200
    Re: [PATCH 1/2] of/irq: Mark interrupt controllers as populated  before initialisation Jon Hunter <jonathanh@nvidia.com> - 2016-08-09 18:40 +0200

#1458794 — [PATCH 1/2] of/irq: Mark interrupt controllers as populated before initialisation

FromPhilipp Zabel <p.zabel@pengutronix.de>
Date2016-08-09 16:20 +0200
Subject[PATCH 1/2] of/irq: Mark interrupt controllers as populated before initialisation
Message-ID<s4g2R-fu-5@gated-at.bofh.it>
That way the init callback may clear the flag again, in case of drivers
split between early irq chip and a normal platform driver.

Fixes: 15cc2ed6dcf9 ("of/irq: Mark initialised interrupt controllers as populated")
Suggested-by: Rob Herring <robh@kernel.org>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Jon Hunter <jonathanh@nvidia.com>
---
 drivers/of/irq.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/of/irq.c b/drivers/of/irq.c
index 89a71c6..a2e68f7 100644
--- a/drivers/of/irq.c
+++ b/drivers/of/irq.c
@@ -544,12 +544,15 @@ void __init of_irq_init(const struct of_device_id *matches)
 
 			list_del(&desc->list);
 
+			of_node_set_flag(desc->dev, OF_POPULATED);
+
 			pr_debug("of_irq_init: init %s (%p), parent %p\n",
 				 desc->dev->full_name,
 				 desc->dev, desc->interrupt_parent);
 			ret = desc->irq_init_cb(desc->dev,
 						desc->interrupt_parent);
 			if (ret) {
+				of_node_clear_flag(desc->dev, OF_POPULATED);
 				kfree(desc);
 				continue;
 			}
@@ -559,8 +562,6 @@ void __init of_irq_init(const struct of_device_id *matches)
 			 * its children can get processed in a subsequent pass.
 			 */
 			list_add_tail(&desc->list, &intc_parent_list);
-
-			of_node_set_flag(desc->dev, OF_POPULATED);
 		}
 
 		/* Get the next pending parent that might have children */
-- 
2.8.1

[toc] | [next] | [standalone]


#1458932 — Re: [PATCH 1/2] of/irq: Mark interrupt controllers as populated before initialisation

FromJon Hunter <jonathanh@nvidia.com>
Date2016-08-09 18:40 +0200
SubjectRe: [PATCH 1/2] of/irq: Mark interrupt controllers as populated before initialisation
Message-ID<s4iem-1Aq-59@gated-at.bofh.it>
In reply to#1458794
On 09/08/16 15:18, Philipp Zabel wrote:
> That way the init callback may clear the flag again, in case of drivers
> split between early irq chip and a normal platform driver.
> 
> Fixes: 15cc2ed6dcf9 ("of/irq: Mark initialised interrupt controllers as populated")
> Suggested-by: Rob Herring <robh@kernel.org>
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
> Cc: Jon Hunter <jonathanh@nvidia.com>
> ---
>  drivers/of/irq.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/of/irq.c b/drivers/of/irq.c
> index 89a71c6..a2e68f7 100644
> --- a/drivers/of/irq.c
> +++ b/drivers/of/irq.c
> @@ -544,12 +544,15 @@ void __init of_irq_init(const struct of_device_id *matches)
>  
>  			list_del(&desc->list);
>  
> +			of_node_set_flag(desc->dev, OF_POPULATED);
> +
>  			pr_debug("of_irq_init: init %s (%p), parent %p\n",
>  				 desc->dev->full_name,
>  				 desc->dev, desc->interrupt_parent);
>  			ret = desc->irq_init_cb(desc->dev,
>  						desc->interrupt_parent);
>  			if (ret) {
> +				of_node_clear_flag(desc->dev, OF_POPULATED);
>  				kfree(desc);
>  				continue;
>  			}
> @@ -559,8 +562,6 @@ void __init of_irq_init(const struct of_device_id *matches)
>  			 * its children can get processed in a subsequent pass.
>  			 */
>  			list_add_tail(&desc->list, &intc_parent_list);
> -
> -			of_node_set_flag(desc->dev, OF_POPULATED);
>  		}
>  
>  		/* Get the next pending parent that might have children */
> 

Acked-by: Jon Hunter <jonathanh@nvidia.com>

Cheers
Jon

-- 
nvpublic

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web