From patchwork Fri Feb 14 18:47:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erik Kaneda X-Patchwork-Id: 194413 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C374C3B1BE for ; Fri, 14 Feb 2020 19:08:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F185B24682 for ; Fri, 14 Feb 2020 19:08:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388099AbgBNTI3 (ORCPT ); Fri, 14 Feb 2020 14:08:29 -0500 Received: from mga02.intel.com ([134.134.136.20]:26791 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388080AbgBNTI3 (ORCPT ); Fri, 14 Feb 2020 14:08:29 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Feb 2020 11:08:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,441,1574150400"; d="scan'208";a="227702892" Received: from sibelius.jf.intel.com ([10.54.75.38]) by orsmga008.jf.intel.com with ESMTP; 14 Feb 2020 11:08:24 -0800 From: Erik Kaneda To: "Rafael J . Wysocki" , linux-acpi@vger.kernel.org Cc: Bob Moore , Erik Kaneda Subject: [PATCH 03/10] ACPICA: Fix a comment "enable" fixed events -> "disable" all fixed events. Date: Fri, 14 Feb 2020 10:47:57 -0800 Message-Id: <20200214184804.15114-4-erik.kaneda@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200214184804.15114-1-erik.kaneda@intel.com> References: <20200214184804.15114-1-erik.kaneda@intel.com> MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Bob Moore ACPICA commit af4462c6f41ebc9bf63b5370818c5fd96524e7a9 Link: https://github.com/acpica/acpica/commit/af4462c6 Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda --- drivers/acpi/acpica/evevent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/acpica/evevent.c b/drivers/acpi/acpica/evevent.c index 8c83d8c620dc..89391938193d 100644 --- a/drivers/acpi/acpica/evevent.c +++ b/drivers/acpi/acpica/evevent.c @@ -130,7 +130,7 @@ static acpi_status acpi_ev_fixed_event_initialize(void) /* * Initialize the structure that keeps track of fixed event handlers and - * enable the fixed events. + * disable all of the fixed events. */ for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++) { acpi_gbl_fixed_event_handlers[i].handler = NULL; From patchwork Fri Feb 14 18:47:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erik Kaneda X-Patchwork-Id: 194412 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7E026C3B1BD for ; Fri, 14 Feb 2020 19:08:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 468BA24677 for ; Fri, 14 Feb 2020 19:08:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387995AbgBNTI3 (ORCPT ); Fri, 14 Feb 2020 14:08:29 -0500 Received: from mga02.intel.com ([134.134.136.20]:26791 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388122AbgBNTI3 (ORCPT ); Fri, 14 Feb 2020 14:08:29 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Feb 2020 11:08:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,441,1574150400"; d="scan'208";a="227702893" Received: from sibelius.jf.intel.com ([10.54.75.38]) by orsmga008.jf.intel.com with ESMTP; 14 Feb 2020 11:08:24 -0800 From: Erik Kaneda To: "Rafael J . Wysocki" , linux-acpi@vger.kernel.org Cc: Anchal Agarwal , Balbir Singh , Frank van der Linden , Erik Kaneda , Bob Moore Subject: [PATCH 04/10] ACPICA: Enable sleep button on ACPI legacy wake Date: Fri, 14 Feb 2020 10:47:58 -0800 Message-Id: <20200214184804.15114-5-erik.kaneda@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200214184804.15114-1-erik.kaneda@intel.com> References: <20200214184804.15114-1-erik.kaneda@intel.com> MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Anchal Agarwal ACPICA commit 9383f5b01091e432c05f802a57edc20d329eec1f Hibernation (S4) is triggered in a guest when it recieves a sleep trigger from the hypervisor. When the guest resumes from this power state, it does not see the sleep_enabled bit. In otherwords, the sleep button is not enabled on waking from an S4 state. This causes subsequent invocation of sleep state to fail in the guest. Fix this problem by enabling the sleep button in ACPI legacy wake. Signed-off-by: Anchal Agarwal Reviewed-by: Balbir Singh Reviewed-by: Frank van der Linden [ ek: changelog] Link: https://github.com/acpica/acpica/commit/9383f5b0 Signed-off-by: Erik Kaneda Signed-off-by: Anchal Agarwal Signed-off-by: Bob Moore --- drivers/acpi/acpica/hwsleep.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/acpi/acpica/hwsleep.c b/drivers/acpi/acpica/hwsleep.c index 243a25add28f..317ae870336b 100644 --- a/drivers/acpi/acpica/hwsleep.c +++ b/drivers/acpi/acpica/hwsleep.c @@ -300,6 +300,18 @@ acpi_status acpi_hw_legacy_wake(u8 sleep_state) [ACPI_EVENT_POWER_BUTTON]. status_register_id, ACPI_CLEAR_STATUS); + /* Enable sleep button */ + + (void) + acpi_write_bit_register(acpi_gbl_fixed_event_info + [ACPI_EVENT_SLEEP_BUTTON]. + enable_register_id, ACPI_ENABLE_EVENT); + + (void) + acpi_write_bit_register(acpi_gbl_fixed_event_info + [ACPI_EVENT_SLEEP_BUTTON]. + status_register_id, ACPI_CLEAR_STATUS); + acpi_hw_execute_sleep_method(METHOD_PATHNAME__SST, ACPI_SST_WORKING); return_ACPI_STATUS(status); } From patchwork Fri Feb 14 18:47:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erik Kaneda X-Patchwork-Id: 194414 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E9DCC3B1BF for ; Fri, 14 Feb 2020 19:08:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C71A524649 for ; Fri, 14 Feb 2020 19:08:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388094AbgBNTI3 (ORCPT ); Fri, 14 Feb 2020 14:08:29 -0500 Received: from mga02.intel.com ([134.134.136.20]:26795 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388099AbgBNTI3 (ORCPT ); Fri, 14 Feb 2020 14:08:29 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Feb 2020 11:08:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,441,1574150400"; d="scan'208";a="227702896" Received: from sibelius.jf.intel.com ([10.54.75.38]) by orsmga008.jf.intel.com with ESMTP; 14 Feb 2020 11:08:24 -0800 From: Erik Kaneda To: "Rafael J . Wysocki" , linux-acpi@vger.kernel.org Cc: Bob Moore , Erik Kaneda Subject: [PATCH 05/10] ACPICA: Table Manager: Update comments in a function header Date: Fri, 14 Feb 2020 10:47:59 -0800 Message-Id: <20200214184804.15114-6-erik.kaneda@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200214184804.15114-1-erik.kaneda@intel.com> References: <20200214184804.15114-1-erik.kaneda@intel.com> MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Bob Moore Update acpi_get_table_header to remove text stating that the caller must unmap any returned memory. ACPICA commit 4f3a235cf0044b2d91958b1f99b4ca824c63f948 Link: https://github.com/acpica/acpica/commit/4f3a235c Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda --- drivers/acpi/acpica/tbxface.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/acpi/acpica/tbxface.c b/drivers/acpi/acpica/tbxface.c index f8403d480318..7490429ddbf6 100644 --- a/drivers/acpi/acpica/tbxface.c +++ b/drivers/acpi/acpica/tbxface.c @@ -202,14 +202,14 @@ ACPI_EXPORT_SYMBOL_INIT(acpi_reallocate_root_table) * * PARAMETERS: signature - ACPI signature of needed table * instance - Which instance (for SSDTs) - * out_table_header - The pointer to the table header to fill + * out_table_header - The pointer to the where the table header + * is returned * - * RETURN: Status and pointer to mapped table header + * RETURN: Status and a copy of the table header * - * DESCRIPTION: Finds an ACPI table header. - * - * NOTE: Caller is responsible in unmapping the header with - * acpi_os_unmap_memory + * DESCRIPTION: Finds and returns an ACPI table header. Caller provides the + * memory where a copy of the header is to be returned + * (fixed length). * ******************************************************************************/ acpi_status From patchwork Fri Feb 14 18:48:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erik Kaneda X-Patchwork-Id: 194415 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BBC28C2BA83 for ; Fri, 14 Feb 2020 19:08:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7DA722168B for ; Fri, 14 Feb 2020 19:08:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388101AbgBNTI3 (ORCPT ); Fri, 14 Feb 2020 14:08:29 -0500 Received: from mga02.intel.com ([134.134.136.20]:26795 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387995AbgBNTI1 (ORCPT ); Fri, 14 Feb 2020 14:08:27 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Feb 2020 11:08:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,441,1574150400"; d="scan'208";a="227702902" Received: from sibelius.jf.intel.com ([10.54.75.38]) by orsmga008.jf.intel.com with ESMTP; 14 Feb 2020 11:08:24 -0800 From: Erik Kaneda To: "Rafael J . Wysocki" , linux-acpi@vger.kernel.org Cc: Sven Barth , Bob Moore , Erik Kaneda Subject: [PATCH 07/10] ACPICA: cast length arguement to acpi_ns_build_normalized_path() as u32 Date: Fri, 14 Feb 2020 10:48:01 -0800 Message-Id: <20200214184804.15114-8-erik.kaneda@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200214184804.15114-1-erik.kaneda@intel.com> References: <20200214184804.15114-1-erik.kaneda@intel.com> MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Sven Barth ACPICA commit d216e4c8d886d7fb82697948c4fee8a5777a1a5a Link: https://github.com/acpica/acpica/commit/d216e4c8 Signed-off-by: Sven Barth Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda --- drivers/acpi/acpica/nsnames.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/acpica/nsnames.c b/drivers/acpi/acpica/nsnames.c index 370bbc867745..832b79c4b008 100644 --- a/drivers/acpi/acpica/nsnames.c +++ b/drivers/acpi/acpica/nsnames.c @@ -164,7 +164,7 @@ acpi_ns_handle_to_pathname(acpi_handle target_handle, /* Build the path in the caller buffer */ (void)acpi_ns_build_normalized_path(node, buffer->pointer, - required_size, no_trailing); + (u32)required_size, no_trailing); ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "%s [%X]\n", (char *)buffer->pointer, (u32) required_size)); @@ -315,7 +315,7 @@ char *acpi_ns_get_normalized_pathname(struct acpi_namespace_node *node, /* Build the path in the allocated buffer */ - (void)acpi_ns_build_normalized_path(node, name_buffer, size, + (void)acpi_ns_build_normalized_path(node, name_buffer, (u32)size, no_trailing); ACPI_DEBUG_PRINT_RAW((ACPI_DB_NAMES, "%s: Path \"%s\"\n", From patchwork Fri Feb 14 18:48:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erik Kaneda X-Patchwork-Id: 194417 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4B7C1C3B1BE for ; Fri, 14 Feb 2020 19:08:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1559E24649 for ; Fri, 14 Feb 2020 19:08:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388082AbgBNTIZ (ORCPT ); Fri, 14 Feb 2020 14:08:25 -0500 Received: from mga02.intel.com ([134.134.136.20]:26791 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388080AbgBNTIZ (ORCPT ); Fri, 14 Feb 2020 14:08:25 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Feb 2020 11:08:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,441,1574150400"; d="scan'208";a="227702908" Received: from sibelius.jf.intel.com ([10.54.75.38]) by orsmga008.jf.intel.com with ESMTP; 14 Feb 2020 11:08:24 -0800 From: Erik Kaneda To: "Rafael J . Wysocki" , linux-acpi@vger.kernel.org Cc: Bob Moore , Erik Kaneda Subject: [PATCH 09/10] ACPICA: Fix a couple of typos Date: Fri, 14 Feb 2020 10:48:03 -0800 Message-Id: <20200214184804.15114-10-erik.kaneda@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200214184804.15114-1-erik.kaneda@intel.com> References: <20200214184804.15114-1-erik.kaneda@intel.com> MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Bob Moore Squashed ACPICA commit e93a53d4d312a83a3ec72aa9cfb12d781b4fefca and df52c574572344cd9095b66a0f580d51249deb2a Submitted by: ehaouas@noos.fr Link: https://github.com/acpica/acpica/commit/e93a53d4 Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda --- drivers/acpi/acpica/utobject.c | 2 +- include/acpi/actbl1.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/acpica/utobject.c b/drivers/acpi/acpica/utobject.c index 3e60bdac2200..bbec04c291d2 100644 --- a/drivers/acpi/acpica/utobject.c +++ b/drivers/acpi/acpica/utobject.c @@ -44,7 +44,7 @@ acpi_ut_get_element_length(u8 object_type, * * NOTE: We always allocate the worst-case object descriptor because * these objects are cached, and we want them to be - * one-size-satisifies-any-request. This in itself may not be + * one-size-satisfies-any-request. This in itself may not be * the most memory efficient, but the efficiency of the object * cache should more than make up for this! * diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h index 02d06b79e1cd..43549547ed3e 100644 --- a/include/acpi/actbl1.h +++ b/include/acpi/actbl1.h @@ -862,7 +862,7 @@ enum acpi_erst_instructions { /* Command status return values */ enum acpi_erst_command_status { - ACPI_ERST_SUCESS = 0, + ACPI_ERST_SUCCESS = 0, ACPI_ERST_NO_SPACE = 1, ACPI_ERST_NOT_AVAILABLE = 2, ACPI_ERST_FAILURE = 3,