linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ACPI: GTDT: Put GTDT table after parsing
@ 2020-05-08  4:05 Hanjun Guo
  2020-05-08  4:05 ` [PATCH 2/2] ACPI: IORT: Add comments for not calling acpi_put_table() Hanjun Guo
  2020-05-18 23:04 ` [PATCH 1/2] ACPI: GTDT: Put GTDT table after parsing Will Deacon
  0 siblings, 2 replies; 3+ messages in thread
From: Hanjun Guo @ 2020-05-08  4:05 UTC (permalink / raw)
  To: Lorenzo Pieralisi, Rafael J. Wysocki, Sudeep Holla, Will Deacon
  Cc: linux-acpi, linux-arm-kernel, Hanjun Guo

The mapped GTDT table needs to be released after
the driver init.

Signed-off-by: Hanjun Guo <guohanjun@huawei.com>
---

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(-)

diff --git a/drivers/acpi/arm64/gtdt.c b/drivers/acpi/arm64/gtdt.c
index 01962c6..f2d0e59 100644
--- a/drivers/acpi/arm64/gtdt.c
+++ b/drivers/acpi/arm64/gtdt.c
@@ -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;
 }
 
-- 
1.7.12.4


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

* [PATCH 2/2] ACPI: IORT: Add comments for not calling acpi_put_table()
  2020-05-08  4:05 [PATCH 1/2] ACPI: GTDT: Put GTDT table after parsing Hanjun Guo
@ 2020-05-08  4:05 ` Hanjun Guo
  2020-05-18 23:04 ` [PATCH 1/2] ACPI: GTDT: Put GTDT table after parsing Will Deacon
  1 sibling, 0 replies; 3+ messages in thread
From: Hanjun Guo @ 2020-05-08  4:05 UTC (permalink / raw)
  To: Lorenzo Pieralisi, Rafael J. Wysocki, Sudeep Holla, Will Deacon
  Cc: linux-acpi, linux-arm-kernel, Hanjun Guo

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 <guohanjun@huawei.com>
---
 drivers/acpi/arm64/iort.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c
index 6e445bc..619a3e5 100644
--- a/drivers/acpi/arm64/iort.c
+++ b/drivers/acpi/arm64/iort.c
@@ -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) {
-- 
1.7.12.4


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

* Re: [PATCH 1/2] ACPI: GTDT: Put GTDT table after parsing
  2020-05-08  4:05 [PATCH 1/2] ACPI: GTDT: Put GTDT table after parsing Hanjun Guo
  2020-05-08  4:05 ` [PATCH 2/2] ACPI: IORT: Add comments for not calling acpi_put_table() Hanjun Guo
@ 2020-05-18 23:04 ` Will Deacon
  1 sibling, 0 replies; 3+ messages in thread
From: Will Deacon @ 2020-05-18 23:04 UTC (permalink / raw)
  To: Sudeep Holla, Rafael J. Wysocki, Lorenzo Pieralisi, Hanjun Guo
  Cc: catalin.marinas, Will Deacon, linux-acpi, linux-arm-kernel

On Fri, 8 May 2020 12:05:52 +0800, Hanjun Guo wrote:
> 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,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev

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

end of thread, other threads:[~2020-05-18 23:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-08  4:05 [PATCH 1/2] ACPI: GTDT: Put GTDT table after parsing Hanjun Guo
2020-05-08  4:05 ` [PATCH 2/2] ACPI: IORT: Add comments for not calling acpi_put_table() Hanjun Guo
2020-05-18 23:04 ` [PATCH 1/2] ACPI: GTDT: Put GTDT table after parsing Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).