Skip to contentSkip to conversation

firmware: arm_sdei: Put the SDEI table after using it

PATCH In review Hanjun Guo 2 participants 3 messages May 9, 2020 – May 19, 2020 Software delegated exception interface (sdei)

lore
Share & tools
lore

Hanjun Guo

author
#0 lore raw

PATCH 1/1 firmware: arm_sdei: Put the SDEI table after using it

The acpi_get_table() should be coupled with acpi_put_table() if the mapped table is not used for runtime after the initialization to release the table mapping, put the SDEI table after using it.

---
 drivers/firmware/arm_sdei.c | 1 +
 1 file changed, 1 insertion(+)
drivers/firmware/arm_sdei.c +1 -0
index 334c8be..5c42757 100644
@@ -1113,6 +1113,7 @@ static bool __init sdei_present_acpi(void)
 	if (ACPI_FAILURE(status))
 		return false;
 
+	acpi_put_table(sdei_table_header);
 	pdev = platform_device_register_simple(sdei_driver.driver.name, 0, NULL,
 					       0);
 	if (IS_ERR(pdev))
Signature · 7 lines
1.7.12.4


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

Hi Hanjun,

Quoted 3 lines · Hanjun Guo

The acpi_get_table() should be coupled with acpi_put_table() if the mapped table is not used for runtime after the initialization to release the table mapping, put the SDEI table after using it.

I thought this didn't really matter once ACPI had switched to its global mapping of the tables...

drivers/firmware/arm_sdei.c static bool __init sdei_present_acpi(void) · line 1119

Quoted 13 lines
drivers/firmware/arm_sdei.c +1 -0
index 334c8be..5c42757 100644
@@ -1113,6 +1113,7 @@ static bool __init sdei_present_acpi(void)
 	if (ACPI_FAILURE(status))
 		return false;
 
+	acpi_put_table(sdei_table_header);
 	pdev = platform_device_register_simple(sdei_driver.driver.name, 0, NULL,
 					       0);
 	if (IS_ERR(pdev))

This conflicts with Sudeep's patch that moved all this code. I'll rebase and repost it.

Thanks!

James

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

author
#2 lore raw
Quoted 19 lines · James Morse

Hi Hanjun,

Quoted 3 lines · Hanjun Guo

The acpi_get_table() should be coupled with acpi_put_table() if the mapped table is not used for runtime after the initialization to release the table mapping, put the SDEI table after using it.

I thought this didn't really matter once ACPI had switched to its global mapping of the tables...

Quoted 8 lines
drivers/firmware/arm_sdei.c +0 -0
index 334c8be..5c42757 100644
@@ -1113,6 +1113,7 @@ static bool __init sdei_present_acpi(void)
  	if (ACPI_FAILURE(status))
  		return false;
 
Quoted 8 lines

drivers/firmware/arm_sdei.c static bool __init sdei_present_acpi(void) · line 1119

Quoted 5 lines
drivers/firmware/arm_sdei.c +1 -0
+	acpi_put_table(sdei_table_header);
  	pdev = platform_device_register_simple(sdei_driver.driver.name, 0, NULL,
  					       0);
  	if (IS_ERR(pdev))

This conflicts with Sudeep's patch that moved all this code. I'll rebase and repost it.

Thank you very much!

Regards,
Hanjun

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