Skip to contentSkip to conversation

ACPI/IORT: Handle device properties with software node API

PATCH In review Heikki Krogerus 4 participants 6 messages May 11, 2021 – May 17, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ACPI/IORT: Handle device properties with software node API

The older device property API is going to be removed. Replacing the device_add_properties() call with software node API equivalent device_create_managed_software_node().

Fixes 434b73e61cc6 ("iommu/arm-smmu-v3: Use device properties for pasid-num-bits")
---
 drivers/acpi/arm64/iort.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/arm64/iort.c +1 -1
index 3912a1f6058e5..e34937e11186a 100644
@@ -976,7 +976,7 @@ static void iort_named_component_init(struct device *dev,
 				      FIELD_GET(ACPI_IORT_NC_PASID_BITS,
 						nc->node_flags));
 
-	if (device_add_properties(dev, props))
+	if (device_create_managed_software_node(dev, props, NULL))
 		dev_warn(dev, "Could not add device properties\n");
 }
 
Signature · 1 line
2.30.2
#1 lore raw
Quoted 16 lines · Heikki Krogerus

The older device property API is going to be removed. Replacing the device_add_properties() call with software node API equivalent device_create_managed_software_node().

Fixes 434b73e61cc6 ("iommu/arm-smmu-v3: Use device properties for pasid-num-bits")
---
 drivers/acpi/arm64/iort.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/arm64/iort.c +0 -0
index 3912a1f6058e5..e34937e11186a 100644

drivers/acpi/arm64/iort.c static void iort_named_component_init(struct device *dev,

Quoted 9 lines
drivers/acpi/arm64/iort.c +1 -2
@@ -976,7 +976,7 @@ static void iort_named_component_init(struct device *dev,
                                      FIELD_GET(ACPI_IORT_NC_PASID_BITS,
                                                nc->node_flags));
 
-       if (device_add_properties(dev, props))
+       if (device_create_managed_software_node(dev, props, NULL))
                dev_warn(dev, "Could not add device properties\n");
 }
 
--

Thanks!

I can take this through the ACPI tree if there are no objections.

maintainer
#2 lore raw
Quoted 25 lines · Rafael J. Wysocki
Quoted 23 lines · Heikki Krogerus

The older device property API is going to be removed. Replacing the device_add_properties() call with software node API equivalent device_create_managed_software_node().

Fixes 434b73e61cc6 ("iommu/arm-smmu-v3: Use device properties for pasid-num-bits")
---
  drivers/acpi/arm64/iort.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/arm64/iort.c +1 -1
index 3912a1f6058e5..e34937e11186a 100644
@@ -976,7 +976,7 @@ static void iort_named_component_init(struct device *dev,
                                       FIELD_GET(ACPI_IORT_NC_PASID_BITS,
                                                 nc->node_flags));
 
-       if (device_add_properties(dev, props))
+       if (device_create_managed_software_node(dev, props, NULL))
                 dev_warn(dev, "Could not add device properties\n");
  }
 
Quoted 4 lines
Quoted 1 line

--

Thanks!

I can take this through the ACPI tree if there are no objections.

Since this is related to device property API refactor, I'm fine with it.

Lorenzo, what's your position?

Thanks
Hanjun

Acked-by on v1 1/1
#3 lore raw
In reply to Heikki Krogerus
Quoted 5 lines · Heikki Krogerus

The older device property API is going to be removed. Replacing the device_add_properties() call with software node API equivalent device_create_managed_software_node().

Fixes 434b73e61cc6 ("iommu/arm-smmu-v3: Use device properties for pasid-num-bits")

Is this really fixing anything ? I am not sure I understand what you would like to achieve with this tag.

Quoted 4 lines
---
 drivers/acpi/arm64/iort.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

With the above comment clarified:

Quoted 16 lines
drivers/acpi/arm64/iort.c +1 -1
index 3912a1f6058e5..e34937e11186a 100644
@@ -976,7 +976,7 @@ static void iort_named_component_init(struct device *dev,
 				      FIELD_GET(ACPI_IORT_NC_PASID_BITS,
 						nc->node_flags));
 
-	if (device_add_properties(dev, props))
+	if (device_create_managed_software_node(dev, props, NULL))
 		dev_warn(dev, "Could not add device properties\n");
 }
 
Signature · 1 line
2.30.2
#4 lore raw
Quoted 9 lines · Lorenzo Pieralisi
Quoted 5 lines · Heikki Krogerus

The older device property API is going to be removed. Replacing the device_add_properties() call with software node API equivalent device_create_managed_software_node().

Fixes 434b73e61cc6 ("iommu/arm-smmu-v3: Use device properties for pasid-num-bits")

Is this really fixing anything ? I am not sure I understand what you would like to achieve with this tag.

Right now it's not possible to simply remove the old API because some of the maintainers want to take care of the conversion themselves, but at the same time I also do not want to see any new releases of the kernel that introduce more users for it. That's why it's a fix.

Quoted 17 lines
Quoted 4 lines
---
 drivers/acpi/arm64/iort.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

With the above comment clarified:

Quoted 8 lines
drivers/acpi/arm64/iort.c +0 -0
index 3912a1f6058e5..e34937e11186a 100644
@@ -976,7 +976,7 @@ static void iort_named_component_init(struct device *dev,
 				      FIELD_GET(ACPI_IORT_NC_PASID_BITS,
 						nc->node_flags));
 
Quoted 8 lines
Quoted 8 lines
drivers/acpi/arm64/iort.c +1 -1
-	if (device_add_properties(dev, props))
+	if (device_create_managed_software_node(dev, props, NULL))
 		dev_warn(dev, "Could not add device properties\n");
 }
 
Signature · 1 line
2.30.2

thanks,

Signature · 1 line
heikki
#5 lore raw
Quoted 9 lines · Heikki Krogerus
Quoted 7 lines · Lorenzo Pieralisi
Quoted 5 lines · Heikki Krogerus

The older device property API is going to be removed. Replacing the device_add_properties() call with software node API equivalent device_create_managed_software_node().

Fixes 434b73e61cc6 ("iommu/arm-smmu-v3: Use device properties for pasid-num-bits")
Quoted 7 lines
Quoted 2 lines

Is this really fixing anything ? I am not sure I understand what you would like to achieve with this tag.

Right now it's not possible to simply remove the old API because some of the maintainers want to take care of the conversion themselves, but at the same time I also do not want to see any new releases of the kernel that introduce more users for it. That's why it's a fix.

With the assumption that the above clarification is sufficient, applied as 5.14 material, thanks!

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel