From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753461AbcHPIxX (ORCPT ); Tue, 16 Aug 2016 04:53:23 -0400 Received: from mga03.intel.com ([134.134.136.65]:63964 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753428AbcHPIxV (ORCPT ); Tue, 16 Aug 2016 04:53:21 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,529,1464678000"; d="scan'208";a="749321124" From: Lv Zheng To: "Rafael J. Wysocki" , "Rafael J. Wysocki" , Len Brown Cc: Lv Zheng , Lv Zheng , , linux-acpi@vger.kernel.org Subject: [PATCH 3/5] ACPICA: Tables: Add new table events indicating table installation/uninstallation Date: Tue, 16 Aug 2016 16:53:01 +0800 Message-Id: <3475c7a63173c57eedd5181650b4d94db9e8f06b.1471337441.git.lv.zheng@intel.com> X-Mailer: git-send-email 1.7.10 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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