Skip to contentSkip to conversation

of: property: Disable fw_devlink DT support for X86

PATCH Applied Saravana Kannan 4 participants 5 messages Sep 10, 2021 Device tree

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 of: property: Disable fw_devlink DT support for X86

Andre reported fw_devlink=on breaking OLPC XO-1.5 [1].

OLPC XO-1.5 is an X86 system that uses a mix of ACPI and OF to populate devices. The root cause seems to be ISA devices not setting their fwnode field. But trying to figure out how to fix that doesn't seem worth the trouble because the OLPC devicetree is very sparse/limited and fw_devlink only adds the links causing this issue. Considering that there aren't many users of OF in an X86 system, simply fw_devlink DT support for X86.

[1] - https://lore.kernel.org/lkml/[email protected]/

Fixes ea718c699055 ("Revert "Revert "driver core: Set fw_devlink=on by default""")
Cc Andre Muller <[email protected]>
---
 drivers/of/property.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/of/property.c +3 -0
index 0c0dc2e369c0..3fd74bb34819 100644
@@ -1444,6 +1444,9 @@ static int of_fwnode_add_links(struct fwnode_handle *fwnode)
 	struct property *p;
 	struct device_node *con_np = to_of_node(fwnode);
 
+	if (IS_ENABLED(CONFIG_X86))
+		return 0;
+
 	if (!con_np)
 		return -EINVAL;
 
Signature · 1 line
2.33.0.309.g3052b89438-goog
#1 lore raw
Quoted 22 lines · Saravana Kannan

Andre reported fw_devlink=on breaking OLPC XO-1.5 [1].

OLPC XO-1.5 is an X86 system that uses a mix of ACPI and OF to populate devices. The root cause seems to be ISA devices not setting their fwnode field. But trying to figure out how to fix that doesn't seem worth the trouble because the OLPC devicetree is very sparse/limited and fw_devlink only adds the links causing this issue. Considering that there aren't many users of OF in an X86 system, simply fw_devlink DT support for X86.

[1] - https://lore.kernel.org/lkml/[email protected]/

Fixes ea718c699055 ("Revert "Revert "driver core: Set fw_devlink=on by default""")
Cc Andre Muller <[email protected]>
---
 drivers/of/property.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/of/property.c +0 -0
index 0c0dc2e369c0..3fd74bb34819 100644

drivers/of/property.c static int of_fwnode_add_links(struct fwnode_handle *fwnode) · line 1448

Quoted 5 lines
drivers/of/property.c +2 -0
@@ -1444,6 +1444,9 @@ static int of_fwnode_add_links(struct fwnode_handle *fwnode)
 	struct property *p;
 	struct device_node *con_np = to_of_node(fwnode);
 
+	if (IS_ENABLED(CONFIG_X86))
+		return 0;

I love it :)

Anyway, getting a "Tested-by:" would be great to have here. Andre, can you verify this solves your issue?

thanks,

greg k-h

Tested-by
#2 lore raw
Quoted 26 lines · Greg Kroah-Hartman
Quoted 25 lines · Saravana Kannan

Andre reported fw_devlink=on breaking OLPC XO-1.5 [1].

OLPC XO-1.5 is an X86 system that uses a mix of ACPI and OF to populate devices. The root cause seems to be ISA devices not setting their fwnode field. But trying to figure out how to fix that doesn't seem worth the trouble because the OLPC devicetree is very sparse/limited and fw_devlink only adds the links causing this issue. Considering that there aren't many users of OF in an X86 system, simply fw_devlink DT support for X86.

[1] - https://lore.kernel.org/lkml/[email protected]/

Fixes ea718c699055 ("Revert "Revert "driver core: Set fw_devlink=on by default""")
Cc Andre Muller <[email protected]>
---
  drivers/of/property.c | 3 +++
  1 file changed, 3 insertions(+)
drivers/of/property.c +0 -0
index 0c0dc2e369c0..3fd74bb34819 100644
@@ -1444,6 +1444,9 @@ static int of_fwnode_add_links(struct fwnode_handle *fwnode)
  	struct property *p;
  	struct device_node *con_np = to_of_node(fwnode);
 
Quoted 7 lines

drivers/of/property.c static int of_fwnode_add_links(struct fwnode_handle *fwnode) · line 1448

Quoted 2 lines
drivers/of/property.c +2 -0
+	if (IS_ENABLED(CONFIG_X86))
+		return 0;

I love it :)

Anyway, getting a "Tested-by:" would be great to have here. Andre, can you verify this solves your issue?

Yes, this patch fixes the issue, the drives work fine.

Thanks all,
Andre

Quoted 5 lines

thanks,

greg k-h

#3 lore raw
Quoted 32 lines · Andre Muller
Quoted 31 lines · Greg Kroah-Hartman
Quoted 22 lines · Saravana Kannan

Andre reported fw_devlink=on breaking OLPC XO-1.5 [1].

OLPC XO-1.5 is an X86 system that uses a mix of ACPI and OF to populate devices. The root cause seems to be ISA devices not setting their fwnode field. But trying to figure out how to fix that doesn't seem worth the trouble because the OLPC devicetree is very sparse/limited and fw_devlink only adds the links causing this issue. Considering that there aren't many users of OF in an X86 system, simply fw_devlink DT support for X86.

[1] - https://lore.kernel.org/lkml/[email protected]/

Fixes ea718c699055 ("Revert "Revert "driver core: Set fw_devlink=on by default""")
Cc Andre Muller <[email protected]>
---
  drivers/of/property.c | 3 +++
  1 file changed, 3 insertions(+)
drivers/of/property.c +0 -0
index 0c0dc2e369c0..3fd74bb34819 100644

drivers/of/property.c static int of_fwnode_add_links(struct fwnode_handle *fwnode) · line 1448

Quoted 5 lines
drivers/of/property.c +2 -0
@@ -1444,6 +1444,9 @@ static int of_fwnode_add_links(struct fwnode_handle *fwnode)
  	struct property *p;
  	struct device_node *con_np = to_of_node(fwnode);
 
+	if (IS_ENABLED(CONFIG_X86))
+		return 0;

I love it :)

Quoted 5 lines
Quoted 2 lines

Anyway, getting a "Tested-by:" would be great to have here. Andre, can you verify this solves your issue?

Yes, this patch fixes the issue, the drives work fine.

Wonderful!

Or Rob, want me to take this through my tree?

thanks,

greg k-h

maintainer Applied
#4 lore raw
In reply to Saravana Kannan
Quoted 9 lines · Saravana Kannan

Andre reported fw_devlink=on breaking OLPC XO-1.5 [1].

OLPC XO-1.5 is an X86 system that uses a mix of ACPI and OF to populate devices. The root cause seems to be ISA devices not setting their fwnode field. But trying to figure out how to fix that doesn't seem worth the trouble because the OLPC devicetree is very sparse/limited and fw_devlink only adds the links causing this issue. Considering that there aren't many users of OF in an X86 system, simply fw_devlink DT support for X86.

Quoted 8 lines

[1] - https://lore.kernel.org/lkml/[email protected]/

Fixes ea718c699055 ("Revert "Revert "driver core: Set fw_devlink=on by default""")
Cc Andre Muller <[email protected]>
---
 drivers/of/property.c | 3 +++
 1 file changed, 3 insertions(+)

Applied, thanks!