All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ignore disabled memory-region nodes
@ 2019-05-22 10:47 ` Puneet Saxena
  0 siblings, 0 replies; 7+ messages in thread
From: Puneet Saxena @ 2019-05-22 10:47 UTC (permalink / raw)
  To: robh+dt, pantelis.antoniou, frowand.list, devicetree, linux-kernel
  Cc: treding, vdumpa, snikam, jonathanh, Puneet Saxena

While parsing "memory-region" node lists if a node is
"disabled", parsing halts. Therefore the nodes whose
"status" is "okay" or "ok" are not parsed.

The change ignores disabled nodes in the memory-region
nodes list and returns 0 to continue parsing next nodes.

---
v2:
* Fixed typo in commit message.
* Used of_device_is_available to check device is disabled/enabled.

Krishna Reddy (1):
  of: reserved-memory: ignore disabled memory-region nodes

 drivers/of/of_reserved_mem.c | 3 +++
 1 file changed, 3 insertions(+)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] ignore disabled memory-region nodes
@ 2019-05-22 10:47 ` Puneet Saxena
  0 siblings, 0 replies; 7+ messages in thread
From: Puneet Saxena @ 2019-05-22 10:47 UTC (permalink / raw)
  To: robh+dt, pantelis.antoniou, frowand.list, devicetree, linux-kernel
  Cc: treding, vdumpa, snikam, jonathanh, Puneet Saxena

While parsing "memory-region" node lists if a node is
"disabled", parsing halts. Therefore the nodes whose
"status" is "okay" or "ok" are not parsed.

The change ignores disabled nodes in the memory-region
nodes list and returns 0 to continue parsing next nodes.

---
v2:
* Fixed typo in commit message.
* Used of_device_is_available to check device is disabled/enabled.

Krishna Reddy (1):
  of: reserved-memory: ignore disabled memory-region nodes

 drivers/of/of_reserved_mem.c | 3 +++
 1 file changed, 3 insertions(+)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH V2] of: reserved-memory: ignore disabled memory-region nodes
  2019-05-22 10:47 ` Puneet Saxena
@ 2019-05-22 10:47   ` Puneet Saxena
  -1 siblings, 0 replies; 7+ messages in thread
From: Puneet Saxena @ 2019-05-22 10:47 UTC (permalink / raw)
  To: robh+dt, pantelis.antoniou, frowand.list, devicetree, linux-kernel
  Cc: treding, vdumpa, snikam, jonathanh, Puneet Saxena

From: Krishna Reddy <vdumpa@nvidia.com>

Ignore disabled nodes in the memory-region 
nodes list and continue to initialize the rest 
of enabled nodes.

Check if the "reserved-memory" node is available
and if it's not available, return 0 to ignore the 
"reserved-memory" node and continue parsing with 
next node in memory-region nodes list.

Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Signed-off-by: Puneet Saxena <puneets@nvidia.com>
---
v2:
* Fixed typo in commit message.
* Used "of_device_is_available" to check "reserved-memory"
  nodes are disabled/enabled.

 drivers/of/of_reserved_mem.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c
index 1977ee0adcb1..b0b7a0c4431d 100644
--- a/drivers/of/of_reserved_mem.c
+++ b/drivers/of/of_reserved_mem.c
@@ -322,6 +322,9 @@ int of_reserved_mem_device_init_by_idx(struct device *dev,
 	if (!target)
 		return -ENODEV;
 
+	if (!of_device_is_available(target))
+		return 0;
+
 	rmem = __find_rmem(target);
 	of_node_put(target);
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH V2] of: reserved-memory: ignore disabled memory-region nodes
@ 2019-05-22 10:47   ` Puneet Saxena
  0 siblings, 0 replies; 7+ messages in thread
From: Puneet Saxena @ 2019-05-22 10:47 UTC (permalink / raw)
  To: robh+dt, pantelis.antoniou, frowand.list, devicetree, linux-kernel
  Cc: treding, vdumpa, snikam, jonathanh, Puneet Saxena

From: Krishna Reddy <vdumpa@nvidia.com>

Ignore disabled nodes in the memory-region 
nodes list and continue to initialize the rest 
of enabled nodes.

Check if the "reserved-memory" node is available
and if it's not available, return 0 to ignore the 
"reserved-memory" node and continue parsing with 
next node in memory-region nodes list.

Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Signed-off-by: Puneet Saxena <puneets@nvidia.com>
---
v2:
* Fixed typo in commit message.
* Used "of_device_is_available" to check "reserved-memory"
  nodes are disabled/enabled.

 drivers/of/of_reserved_mem.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c
index 1977ee0adcb1..b0b7a0c4431d 100644
--- a/drivers/of/of_reserved_mem.c
+++ b/drivers/of/of_reserved_mem.c
@@ -322,6 +322,9 @@ int of_reserved_mem_device_init_by_idx(struct device *dev,
 	if (!target)
 		return -ENODEV;
 
+	if (!of_device_is_available(target))
+		return 0;
+
 	rmem = __find_rmem(target);
 	of_node_put(target);
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH V2] of: reserved-memory: ignore disabled memory-region nodes
  2019-05-22 10:47   ` Puneet Saxena
@ 2019-05-24 20:53     ` Rob Herring
  -1 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2019-05-24 20:53 UTC (permalink / raw)
  To: Puneet Saxena
  Cc: robh+dt, pantelis.antoniou, frowand.list, devicetree,
	linux-kernel, treding, vdumpa, snikam, jonathanh, Puneet Saxena

On Wed, 22 May 2019 16:17:11 +0530, Puneet Saxena wrote:
> From: Krishna Reddy <vdumpa@nvidia.com>
> 
> Ignore disabled nodes in the memory-region 
> nodes list and continue to initialize the rest 
> of enabled nodes.
> 
> Check if the "reserved-memory" node is available
> and if it's not available, return 0 to ignore the 
> "reserved-memory" node and continue parsing with 
> next node in memory-region nodes list.
> 
> Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
> Signed-off-by: Puneet Saxena <puneets@nvidia.com>
> ---
> v2:
> * Fixed typo in commit message.
> * Used "of_device_is_available" to check "reserved-memory"
>   nodes are disabled/enabled.
> 
>  drivers/of/of_reserved_mem.c | 3 +++
>  1 file changed, 3 insertions(+)
> 

Applied, thanks.

Rob

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH V2] of: reserved-memory: ignore disabled memory-region nodes
@ 2019-05-24 20:53     ` Rob Herring
  0 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2019-05-24 20:53 UTC (permalink / raw)
  Cc: robh+dt, pantelis.antoniou, frowand.list, devicetree,
	linux-kernel, treding, vdumpa, snikam, jonathanh, Puneet Saxena

On Wed, 22 May 2019 16:17:11 +0530, Puneet Saxena wrote:
> From: Krishna Reddy <vdumpa@nvidia.com>
> 
> Ignore disabled nodes in the memory-region 
> nodes list and continue to initialize the rest 
> of enabled nodes.
> 
> Check if the "reserved-memory" node is available
> and if it's not available, return 0 to ignore the 
> "reserved-memory" node and continue parsing with 
> next node in memory-region nodes list.
> 
> Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
> Signed-off-by: Puneet Saxena <puneets@nvidia.com>
> ---
> v2:
> * Fixed typo in commit message.
> * Used "of_device_is_available" to check "reserved-memory"
>   nodes are disabled/enabled.
> 
>  drivers/of/of_reserved_mem.c | 3 +++
>  1 file changed, 3 insertions(+)
> 

Applied, thanks.

Rob

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] ignore disabled memory-region nodes
@ 2019-05-22  5:35 Puneet Saxena
  0 siblings, 0 replies; 7+ messages in thread
From: Puneet Saxena @ 2019-05-22  5:35 UTC (permalink / raw)
  To: pantelis.antoniou, frowand.list, devicetree
  Cc: treding, vdumpa, snikam, Puneet Saxena

While parsing "memory-region" node lists if a node
is "disabled", parsing halts. Therefore the nodes whoes
"status" is "okay" or "ok" are not parsed.

The change ignore disabled nodes in the memory-region
nodes list and continues to initialize the rest of
enabled nodes.

Krishna Reddy (1):
  of: resered-memory: ignore disabled memory-region nodes

 drivers/of/of_reserved_mem.c | 5 +++++
 1 file changed, 5 insertions(+)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-05-24 20:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-22 10:47 [PATCH] ignore disabled memory-region nodes Puneet Saxena
2019-05-22 10:47 ` Puneet Saxena
2019-05-22 10:47 ` [PATCH V2] of: reserved-memory: " Puneet Saxena
2019-05-22 10:47   ` Puneet Saxena
2019-05-24 20:53   ` Rob Herring
2019-05-24 20:53     ` Rob Herring
  -- strict thread matches above, loose matches on Subject: below --
2019-05-22  5:35 [PATCH] " Puneet Saxena

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.