From: Erik Schmauss <erik.schmauss@intel.com>
To: "Rafael J . Wysocki" <rafael@kernel.org>, linux-acpi@vger.kernel.org
Cc: Bob Moore <robert.moore@intel.com>,
Erik Schmauss <erik.schmauss@intel.com>
Subject: [PATCH 04/12] ACPICA: Add new external interface, acpi_unload_table
Date: Thu, 24 Oct 2019 11:55:48 -0700 [thread overview]
Message-ID: <20191024185556.4606-5-erik.schmauss@intel.com> (raw)
In-Reply-To: <20191024185556.4606-1-erik.schmauss@intel.com>
From: Bob Moore <robert.moore@intel.com>
ACPICA commit c69369cd9cf0134e1aac516e97d612947daa8dc2
Unload a table via the table_index.
Link: https://github.com/acpica/acpica/commit/c69369cd
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
---
drivers/acpi/acpica/tbxfload.c | 32 ++++++++++++++++++++++++++++++++
include/acpi/acpixf.h | 3 +++
2 files changed, 35 insertions(+)
diff --git a/drivers/acpi/acpica/tbxfload.c b/drivers/acpi/acpica/tbxfload.c
index 86f1693f6d29..ce86e7945e90 100644
--- a/drivers/acpi/acpica/tbxfload.c
+++ b/drivers/acpi/acpica/tbxfload.c
@@ -390,3 +390,35 @@ acpi_status acpi_unload_parent_table(acpi_handle object)
}
ACPI_EXPORT_SYMBOL(acpi_unload_parent_table)
+/*******************************************************************************
+ *
+ * FUNCTION: acpi_unload_table
+ *
+ * PARAMETERS: table_index - Index as returned by acpi_load_table
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Via the table_index representing an SSDT or OEMx table, unloads
+ * the table and deletes all namespace objects associated with
+ * that table. Unloading of the DSDT is not allowed.
+ * Note: Mainly intended to support hotplug removal of SSDTs.
+ *
+ ******************************************************************************/
+acpi_status acpi_unload_table(u32 table_index)
+{
+ acpi_status status;
+
+ ACPI_FUNCTION_TRACE(acpi_unload_table);
+
+ if (table_index == 1) {
+
+ /* table_index==1 means DSDT is the owner. DSDT cannot be unloaded */
+
+ return_ACPI_STATUS(AE_TYPE);
+ }
+
+ status = acpi_tb_unload_table(table_index);
+ return_ACPI_STATUS(status);
+}
+
+ACPI_EXPORT_SYMBOL(acpi_unload_table)
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index e5e041413581..109b2f14b6c6 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -460,6 +460,9 @@ ACPI_EXTERNAL_RETURN_STATUS(acpi_status ACPI_INIT_FUNCTION
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
acpi_load_table(struct acpi_table_header *table))
+ACPI_EXTERNAL_RETURN_STATUS(acpi_status
+ acpi_unload_table(u32 table_index))
+
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
acpi_unload_parent_table(acpi_handle object))
--
2.21.0
next prev parent reply other threads:[~2019-10-24 19:13 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-24 18:55 [PATCH 00/12] ACPICA version 20191018 Erik Schmauss
2019-10-24 18:55 ` [PATCH 01/12] ACPICA: Results from Clang changes/fixes From Clang V5.0.1. Mostly "set but never read" warnings Erik Schmauss
2019-10-24 18:55 ` [PATCH 02/12] ACPICA: Win OSL: Replace get_tick_count with get_tick_count64 Erik Schmauss
2019-10-24 18:55 ` [PATCH 03/12] ACPICA: More Clang changes - V8.0.1 Fixed all "dead assignment" warnings Erik Schmauss
2019-10-24 18:55 ` Erik Schmauss [this message]
2019-10-24 18:55 ` [PATCH 05/12] ACPICA: make acpi_load_table() return table index Erik Schmauss
2019-10-25 8:19 ` Andy Shevchenko
2019-10-25 8:22 ` Rafael J. Wysocki
2019-10-24 18:55 ` [PATCH 06/12] ACPICA: utilities: add flag to only display data when dumping buffers Erik Schmauss
2019-10-24 18:55 ` [PATCH 07/12] ACPICA: Debugger: add command to dump all fields of a particular subtype Erik Schmauss
2019-10-27 20:57 ` kbuild test robot
2019-10-27 21:33 ` kbuild test robot
2019-10-24 18:55 ` [PATCH 08/12] ACPICA: debugger: surround field unit output with braces '{' Erik Schmauss
2019-10-24 18:55 ` [PATCH 09/12] ACPICA: debugger: add field unit support for acpi_db_get_next_token Erik Schmauss
2019-10-24 18:55 ` [PATCH 10/12] ACPICA: acpiexec: initialize all simple types and field units from user input Erik Schmauss
2019-10-24 18:55 ` [PATCH 11/12] ACPICA: debugger: remove leading whitespaces when converting a string to a buffer Erik Schmauss
2019-10-24 18:55 ` [PATCH 12/12] ACPICA: Update version to 20191018 Erik Schmauss
2019-10-25 9:19 ` [PATCH 00/12] ACPICA version 20191018 Rafael J. Wysocki
2019-10-25 17:08 ` Schmauss, Erik
2019-10-28 15:08 ` 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=20191024185556.4606-5-erik.schmauss@intel.com \
--to=erik.schmauss@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=rafael@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;
as well as URLs for NNTP newsgroup(s).