public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Linux ACPI <linux-acpi@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>, Bob Moore <robert.moore@intel.com>
Subject: [PATCH 07/20] ACPICA: Add new ACPI 6.4 semantics for LoadTable() operator
Date: Mon, 11 Apr 2022 20:52:26 +0200	[thread overview]
Message-ID: <2200163.iZASKD2KPV@kreacher> (raw)
In-Reply-To: <5578328.DvuYhMxLoT@kreacher>

From: Bob Moore <robert.moore@intel.com>

ACPICA commit b32dde35e26a63a85d78d4dc0a7260b61e626ac1

DDB_HANDLE is gone, now LoadTable() returns a pass/fail integer.

Link: https://github.com/acpica/acpica/commit/b32dde35
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 exconfig.c |   24 +++++++++++++++++-------
 1 file changed, 17 insertions(+), 7 deletions(-)

diff -Nurp linux.before_name/drivers/acpi/acpica/exconfig.c linux.after_name/drivers/acpi/acpica/exconfig.c
--- linux.before_name/drivers/acpi/acpica/exconfig.c	2022-04-01 18:23:55.873311880 +0200
+++ linux.after_name/drivers/acpi/acpica/exconfig.c	2022-04-01 18:23:52.190359143 +0200
@@ -87,11 +87,21 @@ acpi_ex_load_table_op(struct acpi_walk_s
 	struct acpi_namespace_node *parent_node;
 	struct acpi_namespace_node *start_node;
 	struct acpi_namespace_node *parameter_node = NULL;
+	union acpi_operand_object *return_obj;
 	union acpi_operand_object *ddb_handle;
 	u32 table_index;
 
 	ACPI_FUNCTION_TRACE(ex_load_table_op);
 
+	/* Create the return object */
+
+	return_obj = acpi_ut_create_integer_object((u64)0);
+	if (!return_obj) {
+		return_ACPI_STATUS(AE_NO_MEMORY);
+	}
+
+	*return_desc = return_obj;
+
 	/* Find the ACPI table in the RSDT/XSDT */
 
 	acpi_ex_exit_interpreter();
@@ -106,12 +116,6 @@ acpi_ex_load_table_op(struct acpi_walk_s
 
 		/* Table not found, return an Integer=0 and AE_OK */
 
-		ddb_handle = acpi_ut_create_integer_object((u64) 0);
-		if (!ddb_handle) {
-			return_ACPI_STATUS(AE_NO_MEMORY);
-		}
-
-		*return_desc = ddb_handle;
 		return_ACPI_STATUS(AE_OK);
 	}
 
@@ -198,7 +202,13 @@ acpi_ex_load_table_op(struct acpi_walk_s
 		}
 	}
 
-	*return_desc = ddb_handle;
+	/* Remove the reference to ddb_handle created by acpi_ex_add_table above */
+
+	acpi_ut_remove_reference(ddb_handle);
+
+	/* Return -1 (non-zero) indicates success */
+
+	return_obj->integer.value = 0xFFFFFFFFFFFFFFFF;
 	return_ACPI_STATUS(status);
 }
 




  parent reply	other threads:[~2022-04-11 19:05 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-11 18:46 [PATCH 00/20] ACPICA: ACPICA 20220331 Rafael J. Wysocki
2022-04-11 18:47 ` [PATCH 01/20] ACPICA: Add support for the Windows 11 _OSI string Rafael J. Wysocki
2022-04-11 18:47 ` [PATCH 02/20] ACPICA: Add the subtable CFMWS to the CEDT table Rafael J. Wysocki
2022-04-11 18:48 ` [PATCH 03/20] ACPICA: iASL: NHLT: Treat Terminator as specific_config Rafael J. Wysocki
2022-04-11 18:49 ` [PATCH 04/20] ACPICA: iASL: NHLT: Fix parsing undocumented bytes at the end of Endpoint Descriptor Rafael J. Wysocki
2022-04-11 18:50 ` [PATCH 05/20] ACPICA: iASL: NHLT: Rename linux specific strucures to device_info Rafael J. Wysocki
2022-04-11 18:51 ` [PATCH 06/20] ACPICA: Add new ACPI 6.4 semantics to the Load() operator Rafael J. Wysocki
2022-04-11 18:52 ` Rafael J. Wysocki [this message]
2022-04-11 18:53 ` [PATCH 08/20] ACPICA: Clean up double word in comment Rafael J. Wysocki
2022-04-11 18:54 ` [PATCH 09/20] ACPICA: Update copyright notices to the year 2022 Rafael J. Wysocki
2022-04-11 18:55 ` [PATCH 10/20] ACPICA: Removed some tabs and // comments Rafael J. Wysocki
2022-04-11 18:56 ` [PATCH 11/20] ACPICA: Headers: Replace zero-length array with flexible-array member Rafael J. Wysocki
2022-04-11 18:57 ` [PATCH 12/20] ACPICA: executer/exsystem: Add units to time variable names Rafael J. Wysocki
2022-04-11 18:58 ` [PATCH 13/20] ACPICA: Add support for ARM Performance Monitoring Unit Table Rafael J. Wysocki
2022-04-11 18:59 ` [PATCH 14/20] ACPICA: executer/exsystem: Inform users about ACPI spec violation Rafael J. Wysocki
2022-04-12  2:53   ` kernel test robot
2022-04-12 12:47     ` Rafael J. Wysocki
2022-04-11 18:59 ` [PATCH 15/20] ACPICA: executer/exsystem: Warn about sleeps greater than 10 ms Rafael J. Wysocki
2022-04-12  5:22   ` kernel test robot
2022-05-21 16:11   ` Rafael J. Wysocki
2022-05-21 23:28     ` Paul Menzel
2022-06-14 13:25       ` Rafael J. Wysocki
2022-04-11 19:00 ` [PATCH 16/20] ACPICA: iASL/MADT: Add OEM-defined subtable Rafael J. Wysocki
2022-04-11 19:01 ` [PATCH 17/20] ACPICA: executer/exsystem: Fix some typo mistakes Rafael J. Wysocki
2022-04-11 19:02 ` [PATCH 18/20] ACPICA: IORT: Updates for revision E.d Rafael J. Wysocki
2022-04-11 19:03 ` [PATCH 19/20] ACPICA: exsystem.c: Use ACPI_FORMAT_UINT64 for 64-bit output Rafael J. Wysocki
2022-04-11 19:04 ` [PATCH 20/20] ACPICA: Update version to 20220331 Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2200163.iZASKD2KPV@kreacher \
    --to=rjw@rjwysocki.net \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robert.moore@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox