ACPI: GTDT: Put GTDT table after parsing
Subsystems (2)
Hanjun Guo
maintainerPATCH 1/2 ACPI: GTDT: Put GTDT table after parsing
The mapped GTDT table needs to be released after
the driver init.
Signed-off-by Hanjun Guo <[email protected]>
---
Patch 1/2 2/2 are based on top of for-next/acpi branch of the ARM64 repo.
drivers/acpi/arm64/gtdt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/acpi/arm64/gtdt.c +3 -1
@@ -394,7 +394,7 @@ static int __init gtdt_sbsa_gwdt_init(void)*/ ret =acpi_gtdt_init (table, &timer_count);if (ret || !timer_count) -return ret; + goto out_put_gtdt;for_each_platform_timer (platform_timer) {if (is_non_secure_watchdog (platform_timer)) {
@@ -408,6 +408,8 @@ static int __init gtdt_sbsa_gwdt_init(void)if (gwdt_count)pr_info ("found %d SBSA generic Watchdog(s).\n" , gwdt_count); +out_put_gtdt: +acpi_put_table (table);return ret; }
Signature · 1 line
1.7.12.4
Hanjun Guo
maintainerPATCH 2/2 ACPI: IORT: Add comments for not calling acpi_put_table()
The iort_table will be used at runtime after acpi_iort_init(), so add some comments to clarify this to make it less confusing.
Signed-off-by Hanjun Guo <[email protected]>
--- drivers/acpi/arm64/iort.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/acpi/arm64/iort.c +4 -0
@@ -1667,6 +1667,10 @@ void __init acpi_iort_init(void) {acpi_status status; +/* iort_table will be used at runtime after the iort init, +* so we don't need to call acpi_put_table() to release +* the IORT table mapping. +*/ status =acpi_get_table (ACPI_SIG_IORT ,0 , &iort_table);if (ACPI_FAILURE (status)) {if (status !=AE_NOT_FOUND ) {
Signature · 1 line
1.7.12.4
Quoted 2 lines · Hanjun Guo
The mapped GTDT table needs to be released after
the driver init.
Applied to arm64 (for-next/acpi), thanks!
[1/2] ACPI: GTDT: Put GTDT table after parsing
https://git.kernel.org/arm64/c/5ec605108ff4 [2/2] ACPI: IORT: Add comments for not calling acpi_put_table() https://git.kernel.org/arm64/c/701dafe0670c
Cheers,
Signature · 5 lines
Will https://fixes.arm64.dev https://next.arm64.dev https://will.arm64.dev