Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1463555

[PATCH 3/5] ACPICA: Tables: Add new table events indicating table installation/uninstallation

From Lv Zheng <lv.zheng@intel.com>
Newsgroups linux.kernel
Subject [PATCH 3/5] ACPICA: Tables: Add new table events indicating table installation/uninstallation
Date 2016-08-16 11:00 +0200
Message-ID <s6Io1-R5-11@gated-at.bofh.it> (permalink)
References <s6Io1-R5-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


This patch adds 2 new table events to indicate table
installation/uninstallation.

Currently, as ACPICA never uninstalls tables, this patch thus only add
table handler invocation for the table installation event. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
 drivers/acpi/acpica/tbinstal.c |    8 ++++++++
 include/acpi/actypes.h         |    4 +++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/acpi/acpica/tbinstal.c b/drivers/acpi/acpica/tbinstal.c
index d461864..5fdf251 100644
--- a/drivers/acpi/acpica/tbinstal.c
+++ b/drivers/acpi/acpica/tbinstal.c
@@ -301,6 +301,14 @@ acpi_tb_install_standard_table(acpi_physical_address address,
 	acpi_tb_install_table_with_override(&new_table_desc, override,
 					    table_index);
 
+	/* Invoke table handler if present */
+
+	if (acpi_gbl_table_handler) {
+		(void)acpi_gbl_table_handler(ACPI_TABLE_EVENT_INSTALL,
+					     new_table_desc.pointer,
+					     acpi_gbl_table_handler_context);
+	}
+
 release_and_exit:
 
 	/* Release the temporary table descriptor */
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index 892595f..1d798ab 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -1089,7 +1089,9 @@ acpi_status (*acpi_table_handler) (u32 event, void *table, void *context);
 
 #define ACPI_TABLE_EVENT_LOAD           0x0
 #define ACPI_TABLE_EVENT_UNLOAD         0x1
-#define ACPI_NUM_TABLE_EVENTS           2
+#define ACPI_TABLE_EVENT_INSTALL        0x2
+#define ACPI_TABLE_EVENT_UNINSTALL      0x3
+#define ACPI_NUM_TABLE_EVENTS           4
 
 /* Address Spaces (For Operation Regions) */
 
-- 
1.7.10

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/5] ACPI / sysfs: Cleanup sysfs table handling code Lv Zheng <lv.zheng@intel.com> - 2016-08-16 11:00 +0200
  [PATCH 5/5] ACPI / sysfs: Update sysfs signature handling code Lv Zheng <lv.zheng@intel.com> - 2016-08-16 11:00 +0200
  [PATCH 3/5] ACPICA: Tables: Add new table events indicating table installation/uninstallation Lv Zheng <lv.zheng@intel.com> - 2016-08-16 11:00 +0200
  [PATCH 2/5] ACPICA: Tables: Remove wrong table event macros Lv Zheng <lv.zheng@intel.com> - 2016-08-16 11:00 +0200
  [PATCH 1/5] ACPICA: Tables: Remove acpi_tb_install_fixed_table() Lv Zheng <lv.zheng@intel.com> - 2016-08-16 11:00 +0200
  [PATCH 4/5] ACPI / sysfs: Fix an issue for LoadTable opcode Lv Zheng <lv.zheng@intel.com> - 2016-08-16 11:00 +0200
  Re: [PATCH 0/5] ACPI / sysfs: Cleanup sysfs table handling code "Rafael J. Wysocki" <rafael@kernel.org> - 2016-08-16 13:40 +0200
    Re: [PATCH 0/5] ACPI / sysfs: Cleanup sysfs table handling code "Rafael J. Wysocki" <rafael@kernel.org> - 2016-08-17 03:50 +0200
    RE: [PATCH 0/5] ACPI / sysfs: Cleanup sysfs table handling code "Zheng, Lv" <lv.zheng@intel.com> - 2016-08-17 03:50 +0200

csiph-web