From patchwork Fri Aug 16 21:43:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schmauss, Erik" X-Patchwork-Id: 11098299 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 86A35912 for ; Fri, 16 Aug 2019 21:58:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 70566286B1 for ; Fri, 16 Aug 2019 21:58:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E60E28AAB; Fri, 16 Aug 2019 21:58:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0A3A1286B1 for ; Fri, 16 Aug 2019 21:58:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727744AbfHPV6d (ORCPT ); Fri, 16 Aug 2019 17:58:33 -0400 Received: from mga11.intel.com ([192.55.52.93]:56320 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727729AbfHPV6c (ORCPT ); Fri, 16 Aug 2019 17:58:32 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Aug 2019 14:58:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,394,1559545200"; d="scan'208";a="206381371" Received: from bartok.jf.intel.com ([10.54.75.137]) by fmsmga002.fm.intel.com with ESMTP; 16 Aug 2019 14:58:31 -0700 From: Erik Schmauss To: rjw@rjwysocki.net, linux-acpi@vger.kernel.org Cc: Colin Ian King , Bob Moore , Erik Schmauss Subject: [PATCH 1/9] ACPICA: Debugger: remove redundant assignment on obj_desc Date: Fri, 16 Aug 2019 14:43:20 -0700 Message-Id: <20190816214328.3900-2-erik.schmauss@intel.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20190816214328.3900-1-erik.schmauss@intel.com> References: <20190816214328.3900-1-erik.schmauss@intel.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Colin Ian King ACPICA commit f530f1acb3128136ad97c715fdaebbbeff283ee2 Pointer obj_desc is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Link: https://github.com/acpica/acpica/commit/f530f1ac Signed-off-by: Colin Ian King Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss --- drivers/acpi/acpica/dbobject.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/acpi/acpica/dbobject.c b/drivers/acpi/acpica/dbobject.c index d220168dca01..f9fc84bc3e84 100644 --- a/drivers/acpi/acpica/dbobject.c +++ b/drivers/acpi/acpica/dbobject.c @@ -394,7 +394,6 @@ void acpi_db_decode_locals(struct acpi_walk_state *walk_state) u8 display_locals = FALSE; node = walk_state->method_node; - obj_desc = walk_state->method_desc; /* There are no locals for the module-level code case */ From patchwork Fri Aug 16 21:43:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schmauss, Erik" X-Patchwork-Id: 11098305 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E87CD1395 for ; Fri, 16 Aug 2019 21:58:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D8C63286B1 for ; Fri, 16 Aug 2019 21:58:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CCCEE28AAB; Fri, 16 Aug 2019 21:58:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E7037286B1 for ; Fri, 16 Aug 2019 21:58:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727746AbfHPV6e (ORCPT ); Fri, 16 Aug 2019 17:58:34 -0400 Received: from mga11.intel.com ([192.55.52.93]:56320 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727732AbfHPV6d (ORCPT ); Fri, 16 Aug 2019 17:58:33 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Aug 2019 14:58:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,394,1559545200"; d="scan'208";a="206381374" Received: from bartok.jf.intel.com ([10.54.75.137]) by fmsmga002.fm.intel.com with ESMTP; 16 Aug 2019 14:58:32 -0700 From: Erik Schmauss To: rjw@rjwysocki.net, linux-acpi@vger.kernel.org Cc: Bob Moore , Erik Schmauss Subject: [PATCH 2/9] ACPICA: Increase total number of possible Owner IDs Date: Fri, 16 Aug 2019 14:43:21 -0700 Message-Id: <20190816214328.3900-3-erik.schmauss@intel.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20190816214328.3900-1-erik.schmauss@intel.com> References: <20190816214328.3900-1-erik.schmauss@intel.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Bob Moore ACPICA commit 1f1652dad88b9d767767bc1f7eb4f7d99e6b5324 From 255 to 4095 possible IDs. Link: https://github.com/acpica/acpica/commit/1f1652da Reported-by: Hedi Berriche Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss --- drivers/acpi/acpica/aclocal.h | 4 ++-- drivers/acpi/acpica/acobject.h | 2 +- drivers/acpi/acpica/acstruct.h | 2 +- drivers/acpi/acpica/acutils.h | 7 ++++--- drivers/acpi/acpica/dbmethod.c | 4 ++++ drivers/acpi/acpica/exdump.c | 6 +++--- drivers/acpi/acpica/nsalloc.c | 2 +- drivers/acpi/acpica/nsdump.c | 2 +- drivers/acpi/acpica/tbdata.c | 1 + drivers/acpi/acpica/uterror.c | 6 +++--- drivers/acpi/acpica/utownerid.c | 12 ++++++------ include/acpi/acconfig.h | 4 ++-- include/acpi/actypes.h | 4 ++-- 13 files changed, 31 insertions(+), 25 deletions(-) diff --git a/drivers/acpi/acpica/aclocal.h b/drivers/acpi/acpica/aclocal.h index 13d513b81589..1ea52576f0a2 100644 --- a/drivers/acpi/acpica/aclocal.h +++ b/drivers/acpi/acpica/aclocal.h @@ -134,12 +134,12 @@ struct acpi_namespace_node { union acpi_operand_object *object; /* Interpreter object */ u8 descriptor_type; /* Differentiate object descriptor types */ u8 type; /* ACPI Type associated with this name */ - u8 flags; /* Miscellaneous flags */ - acpi_owner_id owner_id; /* Node creator */ + u16 flags; /* Miscellaneous flags */ union acpi_name_union name; /* ACPI Name, always 4 chars per ACPI spec */ struct acpi_namespace_node *parent; /* Parent node */ struct acpi_namespace_node *child; /* First child */ struct acpi_namespace_node *peer; /* First peer */ + acpi_owner_id owner_id; /* Node creator */ /* * The following fields are used by the ASL compiler and disassembler only diff --git a/drivers/acpi/acpica/acobject.h b/drivers/acpi/acpica/acobject.h index b2ef703d7df8..8def0e3d690f 100644 --- a/drivers/acpi/acpica/acobject.h +++ b/drivers/acpi/acpica/acobject.h @@ -153,8 +153,8 @@ struct acpi_object_method { } dispatch; u32 aml_length; - u8 thread_count; acpi_owner_id owner_id; + u8 thread_count; }; /* Flags for info_flags field above */ diff --git a/drivers/acpi/acpica/acstruct.h b/drivers/acpi/acpica/acstruct.h index 8a4e6b4aaf2c..218ff4c8b817 100644 --- a/drivers/acpi/acpica/acstruct.h +++ b/drivers/acpi/acpica/acstruct.h @@ -167,9 +167,9 @@ struct acpi_evaluate_info { u32 return_flags; /* Used for return value analysis */ u32 return_btype; /* Bitmapped type of the returned object */ u16 param_count; /* Count of the input argument list */ + u16 node_flags; /* Same as Node->Flags */ u8 pass_number; /* Parser pass number */ u8 return_object_type; /* Object type of the returned object */ - u8 node_flags; /* Same as Node->Flags */ u8 flags; /* General flags */ }; diff --git a/drivers/acpi/acpica/acutils.h b/drivers/acpi/acpica/acutils.h index 9022537567e9..bcbc51a92dde 100644 --- a/drivers/acpi/acpica/acutils.h +++ b/drivers/acpi/acpica/acutils.h @@ -690,18 +690,19 @@ void ACPI_INTERNAL_VAR_XFACE acpi_ut_predefined_warning(const char *module_name, u32 line_number, char *pathname, - u8 node_flags, const char *format, ...); + u16 node_flags, const char *format, ...); void ACPI_INTERNAL_VAR_XFACE acpi_ut_predefined_info(const char *module_name, u32 line_number, - char *pathname, u8 node_flags, const char *format, ...); + char *pathname, + u16 node_flags, const char *format, ...); void ACPI_INTERNAL_VAR_XFACE acpi_ut_predefined_bios_error(const char *module_name, u32 line_number, char *pathname, - u8 node_flags, const char *format, ...); + u16 node_flags, const char *format, ...); void acpi_ut_prefixed_namespace_error(const char *module_name, diff --git a/drivers/acpi/acpica/dbmethod.c b/drivers/acpi/acpica/dbmethod.c index d8b7a0fe92ec..76a15b6ffc5d 100644 --- a/drivers/acpi/acpica/dbmethod.c +++ b/drivers/acpi/acpica/dbmethod.c @@ -302,6 +302,10 @@ acpi_status acpi_db_disassemble_method(char *name) } status = acpi_ut_allocate_owner_id(&obj_desc->method.owner_id); + if (ACPI_FAILURE(status)) { + return (status); + } + walk_state->owner_id = obj_desc->method.owner_id; /* Push start scope on scope stack and make it current */ diff --git a/drivers/acpi/acpica/exdump.c b/drivers/acpi/acpica/exdump.c index 6526b2deeaad..a9bc938a3b55 100644 --- a/drivers/acpi/acpica/exdump.c +++ b/drivers/acpi/acpica/exdump.c @@ -94,7 +94,7 @@ static struct acpi_exdump_info acpi_ex_dump_method[9] = { "Parameter Count"}, {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.sync_level), "Sync Level"}, {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(method.mutex), "Mutex"}, - {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.owner_id), "Owner Id"}, + {ACPI_EXD_UINT16, ACPI_EXD_OFFSET(method.owner_id), "Owner Id"}, {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.thread_count), "Thread Count"}, {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(method.aml_length), "Aml Length"}, {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(method.aml_start), "Aml Start"} @@ -269,8 +269,8 @@ static struct acpi_exdump_info acpi_ex_dump_field_common[7] = { static struct acpi_exdump_info acpi_ex_dump_node[7] = { {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_node), NULL}, - {ACPI_EXD_UINT8, ACPI_EXD_NSOFFSET(flags), "Flags"}, - {ACPI_EXD_UINT8, ACPI_EXD_NSOFFSET(owner_id), "Owner Id"}, + {ACPI_EXD_UINT16, ACPI_EXD_NSOFFSET(flags), "Flags"}, + {ACPI_EXD_UINT16, ACPI_EXD_NSOFFSET(owner_id), "Owner Id"}, {ACPI_EXD_LIST, ACPI_EXD_NSOFFSET(object), "Object List"}, {ACPI_EXD_NODE, ACPI_EXD_NSOFFSET(parent), "Parent"}, {ACPI_EXD_NODE, ACPI_EXD_NSOFFSET(child), "Child"}, diff --git a/drivers/acpi/acpica/nsalloc.c b/drivers/acpi/acpica/nsalloc.c index 6eb63db72249..fe9b3639a87d 100644 --- a/drivers/acpi/acpica/nsalloc.c +++ b/drivers/acpi/acpica/nsalloc.c @@ -241,7 +241,7 @@ void acpi_ns_install_node(struct acpi_walk_state *walk_state, struct acpi_namesp node->type = (u8) type; ACPI_DEBUG_PRINT((ACPI_DB_NAMES, - "%4.4s (%s) [Node %p Owner %X] added to %4.4s (%s) [Node %p]\n", + "%4.4s (%s) [Node %p Owner %3.3X] added to %4.4s (%s) [Node %p]\n", acpi_ut_get_node_name(node), acpi_ut_get_type_name(node->type), node, owner_id, acpi_ut_get_node_name(parent_node), diff --git a/drivers/acpi/acpica/nsdump.c b/drivers/acpi/acpica/nsdump.c index 1b12c172e115..9731d7cf1b83 100644 --- a/drivers/acpi/acpica/nsdump.c +++ b/drivers/acpi/acpica/nsdump.c @@ -197,7 +197,7 @@ acpi_ns_dump_one_object(acpi_handle obj_handle, /* Now we can print out the pertinent information */ - acpi_os_printf(" %-12s %p %2.2X ", + acpi_os_printf(" %-12s %p %3.3X ", acpi_ut_get_type_name(type), this_node, this_node->owner_id); diff --git a/drivers/acpi/acpica/tbdata.c b/drivers/acpi/acpica/tbdata.c index 91a4b984f224..309440010ab2 100644 --- a/drivers/acpi/acpica/tbdata.c +++ b/drivers/acpi/acpica/tbdata.c @@ -750,6 +750,7 @@ acpi_status acpi_tb_delete_namespace_by_owner(u32 table_index) if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } + acpi_ns_delete_namespace_by_owner(owner_id); acpi_ut_release_write_lock(&acpi_gbl_namespace_rw_lock); return_ACPI_STATUS(status); diff --git a/drivers/acpi/acpica/uterror.c b/drivers/acpi/acpica/uterror.c index 075457341bad..918aca7c4db4 100644 --- a/drivers/acpi/acpica/uterror.c +++ b/drivers/acpi/acpica/uterror.c @@ -39,7 +39,7 @@ void ACPI_INTERNAL_VAR_XFACE acpi_ut_predefined_warning(const char *module_name, u32 line_number, char *pathname, - u8 node_flags, const char *format, ...) + u16 node_flags, const char *format, ...) { va_list arg_list; @@ -81,7 +81,7 @@ acpi_ut_predefined_warning(const char *module_name, void ACPI_INTERNAL_VAR_XFACE acpi_ut_predefined_info(const char *module_name, u32 line_number, - char *pathname, u8 node_flags, const char *format, ...) + char *pathname, u16 node_flags, const char *format, ...) { va_list arg_list; @@ -124,7 +124,7 @@ void ACPI_INTERNAL_VAR_XFACE acpi_ut_predefined_bios_error(const char *module_name, u32 line_number, char *pathname, - u8 node_flags, const char *format, ...) + u16 node_flags, const char *format, ...) { va_list arg_list; diff --git a/drivers/acpi/acpica/utownerid.c b/drivers/acpi/acpica/utownerid.c index 5eb8b76ce9d8..d3525ef8ed28 100644 --- a/drivers/acpi/acpica/utownerid.c +++ b/drivers/acpi/acpica/utownerid.c @@ -38,7 +38,7 @@ acpi_status acpi_ut_allocate_owner_id(acpi_owner_id *owner_id) if (*owner_id) { ACPI_ERROR((AE_INFO, - "Owner ID [0x%2.2X] already exists", *owner_id)); + "Owner ID [0x%3.3X] already exists", *owner_id)); return_ACPI_STATUS(AE_ALREADY_EXISTS); } @@ -88,14 +88,14 @@ acpi_status acpi_ut_allocate_owner_id(acpi_owner_id *owner_id) /* * Construct encoded ID from the index and bit position * - * Note: Last [j].k (bit 255) is never used and is marked + * Note: Last [j].k (bit 4095) is never used and is marked * permanently allocated (prevents +1 overflow) */ *owner_id = (acpi_owner_id)((k + 1) + ACPI_MUL_32(j)); ACPI_DEBUG_PRINT((ACPI_DB_VALUES, - "Allocated OwnerId: %2.2X\n", + "Allocated OwnerId: 0x%3.3X\n", (unsigned int)*owner_id)); goto exit; } @@ -116,7 +116,7 @@ acpi_status acpi_ut_allocate_owner_id(acpi_owner_id *owner_id) */ status = AE_OWNER_ID_LIMIT; ACPI_ERROR((AE_INFO, - "Could not allocate new OwnerId (255 max), AE_OWNER_ID_LIMIT")); + "Could not allocate new OwnerId (4095 max), AE_OWNER_ID_LIMIT")); exit: (void)acpi_ut_release_mutex(ACPI_MTX_CACHES); @@ -153,7 +153,7 @@ void acpi_ut_release_owner_id(acpi_owner_id *owner_id_ptr) /* Zero is not a valid owner_ID */ if (owner_id == 0) { - ACPI_ERROR((AE_INFO, "Invalid OwnerId: 0x%2.2X", owner_id)); + ACPI_ERROR((AE_INFO, "Invalid OwnerId: 0x%3.3X", owner_id)); return_VOID; } @@ -179,7 +179,7 @@ void acpi_ut_release_owner_id(acpi_owner_id *owner_id_ptr) acpi_gbl_owner_id_mask[index] ^= bit; } else { ACPI_ERROR((AE_INFO, - "Release of non-allocated OwnerId: 0x%2.2X", + "Attempted release of non-allocated OwnerId: 0x%3.3X", owner_id + 1)); } diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h index 16a83959e616..42d573172e53 100644 --- a/include/acpi/acconfig.h +++ b/include/acpi/acconfig.h @@ -95,9 +95,9 @@ #define ACPI_DEFAULT_PAGE_SIZE 4096 /* Must be power of 2 */ -/* owner_id tracking. 8 entries allows for 255 owner_ids */ +/* owner_id tracking. 128 entries allows for 4095 owner_ids */ -#define ACPI_NUM_OWNERID_MASKS 8 +#define ACPI_NUM_OWNERID_MASKS 128 /* Size of the root table array is increased by this increment */ diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index ad6892a24015..e31ef75a22a1 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h @@ -442,8 +442,8 @@ typedef void *acpi_handle; /* Actually a ptr to a NS Node */ /* Owner IDs are used to track namespace nodes for selective deletion */ -typedef u8 acpi_owner_id; -#define ACPI_OWNER_ID_MAX 0xFF +typedef u16 acpi_owner_id; +#define ACPI_OWNER_ID_MAX 0xFFF /* 4095 possible owner IDs */ #define ACPI_INTEGER_BIT_SIZE 64 #define ACPI_MAX_DECIMAL_DIGITS 20 /* 2^64 = 18,446,744,073,709,551,616 */ From patchwork Fri Aug 16 21:43:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schmauss, Erik" X-Patchwork-Id: 11098303 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 074961395 for ; Fri, 16 Aug 2019 21:58:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EC53128AA7 for ; Fri, 16 Aug 2019 21:58:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E0982288D9; Fri, 16 Aug 2019 21:58:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8AE2F28AA7 for ; Fri, 16 Aug 2019 21:58:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727748AbfHPV6d (ORCPT ); Fri, 16 Aug 2019 17:58:33 -0400 Received: from mga11.intel.com ([192.55.52.93]:56323 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727746AbfHPV6d (ORCPT ); Fri, 16 Aug 2019 17:58:33 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Aug 2019 14:58:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,394,1559545200"; d="scan'208";a="206381378" Received: from bartok.jf.intel.com ([10.54.75.137]) by fmsmga002.fm.intel.com with ESMTP; 16 Aug 2019 14:58:32 -0700 From: Erik Schmauss To: rjw@rjwysocki.net, linux-acpi@vger.kernel.org Cc: Bob Moore , Erik Schmauss Subject: [PATCH 3/9] ACPICA: Macros: remove pointer math on a null pointer Date: Fri, 16 Aug 2019 14:43:22 -0700 Message-Id: <20190816214328.3900-4-erik.schmauss@intel.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20190816214328.3900-1-erik.schmauss@intel.com> References: <20190816214328.3900-1-erik.schmauss@intel.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Bob Moore ACPICA commit 02bbca5070e42d298c9b824300aa0eb8a082d797 Causes warnings on some compilers and/or tools. Changed ACPI_TO_POINTER to use ACPI_CAST_PTR instead of using arithmetic. Link: https://github.com/acpica/acpica/commit/02bbca50 Reported-by: Qian Cai Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss --- include/acpi/actypes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index e31ef75a22a1..f52c83eaedc4 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h @@ -506,7 +506,7 @@ typedef u64 acpi_integer; /* Pointer/Integer type conversions */ -#define ACPI_TO_POINTER(i) ACPI_ADD_PTR (void, (void *) 0, (acpi_size) (i)) +#define ACPI_TO_POINTER(i) ACPI_CAST_PTR (void, (acpi_size) (i)) #define ACPI_TO_INTEGER(p) ACPI_PTR_DIFF (p, (void *) 0) #define ACPI_OFFSET(d, f) ACPI_PTR_DIFF (&(((d *) 0)->f), (void *) 0) #define ACPI_PHYSADDR_TO_PTR(i) ACPI_TO_POINTER(i) From patchwork Fri Aug 16 21:43:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schmauss, Erik" X-Patchwork-Id: 11098309 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 427801398 for ; Fri, 16 Aug 2019 21:58:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3307E288D9 for ; Fri, 16 Aug 2019 21:58:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2730F28AB0; Fri, 16 Aug 2019 21:58:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B0179288D9 for ; Fri, 16 Aug 2019 21:58:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727726AbfHPV6h (ORCPT ); Fri, 16 Aug 2019 17:58:37 -0400 Received: from mga11.intel.com ([192.55.52.93]:56320 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727682AbfHPV6d (ORCPT ); Fri, 16 Aug 2019 17:58:33 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Aug 2019 14:58:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,394,1559545200"; d="scan'208";a="206381382" Received: from bartok.jf.intel.com ([10.54.75.137]) by fmsmga002.fm.intel.com with ESMTP; 16 Aug 2019 14:58:32 -0700 From: Erik Schmauss To: rjw@rjwysocki.net, linux-acpi@vger.kernel.org Cc: Bob Moore , Erik Schmauss Subject: [PATCH 4/9] ACPICA: Fix issues with arg types within printf format strings Date: Fri, 16 Aug 2019 14:43:23 -0700 Message-Id: <20190816214328.3900-5-erik.schmauss@intel.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20190816214328.3900-1-erik.schmauss@intel.com> References: <20190816214328.3900-1-erik.schmauss@intel.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Bob Moore ACPICA commit db2638ccaac84b61e92f34d60c3630ff5217f852 Link: https://github.com/acpica/acpica/commit/db2638cc Link: https://github.com/acpica/acpica/commit/634c3085 Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss --- drivers/acpi/acpica/dbhistry.c | 2 +- drivers/acpi/acpica/dbinput.c | 2 +- drivers/acpi/acpica/dbstats.c | 22 ++++++++++------------ drivers/acpi/acpica/nsrepair2.c | 2 +- 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/drivers/acpi/acpica/dbhistry.c b/drivers/acpi/acpica/dbhistry.c index 7809bd94a18d..47d2e5059849 100644 --- a/drivers/acpi/acpica/dbhistry.c +++ b/drivers/acpi/acpica/dbhistry.c @@ -121,7 +121,7 @@ void acpi_db_display_history(void) for (i = 0; i < acpi_gbl_num_history; i++) { if (acpi_gbl_history_buffer[history_index].command) { - acpi_os_printf("%3ld %s\n", + acpi_os_printf("%3u %s\n", acpi_gbl_history_buffer[history_index]. cmd_num, acpi_gbl_history_buffer[history_index]. diff --git a/drivers/acpi/acpica/dbinput.c b/drivers/acpi/acpica/dbinput.c index 3e5f95390f0d..32e4f0c6b5df 100644 --- a/drivers/acpi/acpica/dbinput.c +++ b/drivers/acpi/acpica/dbinput.c @@ -593,7 +593,7 @@ static u32 acpi_db_get_line(char *input_buffer) input_buffer)) { acpi_os_printf ("Buffer overflow while parsing input line (max %u characters)\n", - sizeof(acpi_gbl_db_parsed_buf)); + (u32)sizeof(acpi_gbl_db_parsed_buf)); return (0); } diff --git a/drivers/acpi/acpica/dbstats.c b/drivers/acpi/acpica/dbstats.c index bf620937c79b..4f00351dcbb1 100644 --- a/drivers/acpi/acpica/dbstats.c +++ b/drivers/acpi/acpica/dbstats.c @@ -341,17 +341,17 @@ acpi_status acpi_db_display_statistics(char *type_arg) "ACPI_TYPE", "NODES", "OBJECTS"); for (i = 0; i < ACPI_TYPE_NS_NODE_MAX; i++) { - acpi_os_printf("%16.16s % 10ld% 10ld\n", + acpi_os_printf("%16.16s % 10u% 10u\n", acpi_ut_get_type_name(i), acpi_gbl_node_type_count[i], acpi_gbl_obj_type_count[i]); } - acpi_os_printf("%16.16s % 10ld% 10ld\n", "Misc/Unknown", + acpi_os_printf("%16.16s % 10u% 10u\n", "Misc/Unknown", acpi_gbl_node_type_count_misc, acpi_gbl_obj_type_count_misc); - acpi_os_printf("%16.16s % 10ld% 10ld\n", "TOTALS:", + acpi_os_printf("%16.16s % 10u% 10u\n", "TOTALS:", acpi_gbl_num_nodes, acpi_gbl_num_objects); break; @@ -379,18 +379,16 @@ acpi_status acpi_db_display_statistics(char *type_arg) case CMD_STAT_MISC: acpi_os_printf("\nMiscellaneous Statistics:\n\n"); - acpi_os_printf("Calls to AcpiPsFind:.. ........% 7ld\n", - acpi_gbl_ps_find_count); - acpi_os_printf("Calls to AcpiNsLookup:..........% 7ld\n", - acpi_gbl_ns_lookup_count); + acpi_os_printf("%-28s: %7lu\n", "Calls to AcpiPsFind", + (u64)acpi_gbl_ps_find_count); + acpi_os_printf("%-28s: %7lu\n", "Calls to AcpiNsLookup", + (u64)acpi_gbl_ns_lookup_count); - acpi_os_printf("\n"); - - acpi_os_printf("Mutex usage:\n\n"); + acpi_os_printf("\nMutex usage:\n\n"); for (i = 0; i < ACPI_NUM_MUTEX; i++) { - acpi_os_printf("%-28s: % 7ld\n", + acpi_os_printf("%-28s: %7lu\n", acpi_ut_get_mutex_name(i), - acpi_gbl_mutex_info[i].use_count); + (u64)acpi_gbl_mutex_info[i].use_count); } break; diff --git a/drivers/acpi/acpica/nsrepair2.c b/drivers/acpi/acpica/nsrepair2.c index 8d776256b213..663d85e0adba 100644 --- a/drivers/acpi/acpica/nsrepair2.c +++ b/drivers/acpi/acpica/nsrepair2.c @@ -126,7 +126,7 @@ static const struct acpi_repair_info acpi_ns_repairable_names[] = { #define ACPI_FDE_FIELD_COUNT 5 #define ACPI_FDE_BYTE_BUFFER_SIZE 5 -#define ACPI_FDE_DWORD_BUFFER_SIZE (ACPI_FDE_FIELD_COUNT * sizeof (u32)) +#define ACPI_FDE_DWORD_BUFFER_SIZE (ACPI_FDE_FIELD_COUNT * (u32) sizeof (u32)) /****************************************************************************** * From patchwork Fri Aug 16 21:43:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schmauss, Erik" X-Patchwork-Id: 11098307 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E53A6912 for ; Fri, 16 Aug 2019 21:58:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D672028AA7 for ; Fri, 16 Aug 2019 21:58:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CAD8528AAB; Fri, 16 Aug 2019 21:58:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 71BEB286B1 for ; Fri, 16 Aug 2019 21:58:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727758AbfHPV6h (ORCPT ); Fri, 16 Aug 2019 17:58:37 -0400 Received: from mga11.intel.com ([192.55.52.93]:56323 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727726AbfHPV6d (ORCPT ); Fri, 16 Aug 2019 17:58:33 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Aug 2019 14:58:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,394,1559545200"; d="scan'208";a="206381386" Received: from bartok.jf.intel.com ([10.54.75.137]) by fmsmga002.fm.intel.com with ESMTP; 16 Aug 2019 14:58:33 -0700 From: Erik Schmauss To: rjw@rjwysocki.net, linux-acpi@vger.kernel.org Cc: Bob Moore , Erik Schmauss Subject: [PATCH 5/9] ACPICA: iASL,acpi_dump: Improve y/n query Date: Fri, 16 Aug 2019 14:43:24 -0700 Message-Id: <20190816214328.3900-6-erik.schmauss@intel.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20190816214328.3900-1-erik.schmauss@intel.com> References: <20190816214328.3900-1-erik.schmauss@intel.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Bob Moore The y/n query is used for file overwrite. Use fgetc, check for standalone newline. ACPICA commit f9eb60ead76e5b2b6e578b553f592452ccfca47a Link: https://github.com/acpica/acpica/commit/f9eb60ea Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss --- tools/power/acpi/tools/acpidump/apfiles.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/power/acpi/tools/acpidump/apfiles.c b/tools/power/acpi/tools/acpidump/apfiles.c index a42cfcaa3293..16d919bd133b 100644 --- a/tools/power/acpi/tools/acpidump/apfiles.c +++ b/tools/power/acpi/tools/acpidump/apfiles.c @@ -29,18 +29,24 @@ static int ap_is_existing_file(char *pathname) { #if !defined(_GNU_EFI) && !defined(_EDK2_EFI) struct stat stat_info; + int in_char; if (!stat(pathname, &stat_info)) { fprintf(stderr, "Target path already exists, overwrite? [y|n] "); - if (getchar() != 'y') { + in_char = fgetc(stdin); + if (in_char == '\n') { + in_char = fgetc(stdin); + } + + if (in_char != 'y' && in_char != 'Y') { return (-1); } } #endif - return 0; + return (0); } /****************************************************************************** From patchwork Fri Aug 16 21:43:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schmauss, Erik" X-Patchwork-Id: 11098315 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B7F645701 for ; Fri, 16 Aug 2019 21:58:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A432B28AA7 for ; Fri, 16 Aug 2019 21:58:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9833628AAB; Fri, 16 Aug 2019 21:58:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CF837286B1 for ; Fri, 16 Aug 2019 21:58:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727682AbfHPV6h (ORCPT ); Fri, 16 Aug 2019 17:58:37 -0400 Received: from mga11.intel.com ([192.55.52.93]:56326 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727732AbfHPV6f (ORCPT ); Fri, 16 Aug 2019 17:58:35 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Aug 2019 14:58:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,394,1559545200"; d="scan'208";a="206381391" Received: from bartok.jf.intel.com ([10.54.75.137]) by fmsmga002.fm.intel.com with ESMTP; 16 Aug 2019 14:58:33 -0700 From: Erik Schmauss To: rjw@rjwysocki.net, linux-acpi@vger.kernel.org Cc: Bob Moore , Erik Schmauss Subject: [PATCH 6/9] ACPICA: Fully deploy ACPI_PRINTF_LIKE macro Macro was not being used across all "printf-like" functions. Also, cleanup all calls to such functions now that they are analyzed by the compiler (gcc). Both in 32-bit mode and 64-bit mode. Date: Fri, 16 Aug 2019 14:43:25 -0700 Message-Id: <20190816214328.3900-7-erik.schmauss@intel.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20190816214328.3900-1-erik.schmauss@intel.com> References: <20190816214328.3900-1-erik.schmauss@intel.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Bob Moore ACPICA commit d06def132a8852d02c9c7fee60f17b2011066e8e Link: https://github.com/acpica/acpica/commit/d06def13 Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss --- drivers/acpi/acpica/acutils.h | 3 ++ drivers/acpi/acpica/dbinput.c | 8 +-- drivers/acpi/acpica/dbstats.c | 94 +++++++++++++++++----------------- drivers/acpi/acpica/nsaccess.c | 2 +- drivers/acpi/acpica/utdebug.c | 4 +- include/acpi/acpiosxf.h | 1 + 6 files changed, 58 insertions(+), 54 deletions(-) diff --git a/drivers/acpi/acpica/acutils.h b/drivers/acpi/acpica/acutils.h index bcbc51a92dde..601808be86d1 100644 --- a/drivers/acpi/acpica/acutils.h +++ b/drivers/acpi/acpica/acutils.h @@ -686,18 +686,21 @@ void acpi_ut_delete_address_lists(void); /* * utxferror - various error/warning output functions */ +ACPI_PRINTF_LIKE(5) void ACPI_INTERNAL_VAR_XFACE acpi_ut_predefined_warning(const char *module_name, u32 line_number, char *pathname, u16 node_flags, const char *format, ...); +ACPI_PRINTF_LIKE(5) void ACPI_INTERNAL_VAR_XFACE acpi_ut_predefined_info(const char *module_name, u32 line_number, char *pathname, u16 node_flags, const char *format, ...); +ACPI_PRINTF_LIKE(5) void ACPI_INTERNAL_VAR_XFACE acpi_ut_predefined_bios_error(const char *module_name, u32 line_number, diff --git a/drivers/acpi/acpica/dbinput.c b/drivers/acpi/acpica/dbinput.c index 32e4f0c6b5df..55a7e10998d8 100644 --- a/drivers/acpi/acpica/dbinput.c +++ b/drivers/acpi/acpica/dbinput.c @@ -853,24 +853,24 @@ acpi_db_command_dispatch(char *input_buffer, if (param_count == 0) { acpi_os_printf - ("Current debug level for file output is: %8.8lX\n", + ("Current debug level for file output is: %8.8X\n", acpi_gbl_db_debug_level); acpi_os_printf - ("Current debug level for console output is: %8.8lX\n", + ("Current debug level for console output is: %8.8X\n", acpi_gbl_db_console_debug_level); } else if (param_count == 2) { temp = acpi_gbl_db_console_debug_level; acpi_gbl_db_console_debug_level = strtoul(acpi_gbl_db_args[1], NULL, 16); acpi_os_printf - ("Debug Level for console output was %8.8lX, now %8.8lX\n", + ("Debug Level for console output was %8.8X, now %8.8X\n", temp, acpi_gbl_db_console_debug_level); } else { temp = acpi_gbl_db_debug_level; acpi_gbl_db_debug_level = strtoul(acpi_gbl_db_args[1], NULL, 16); acpi_os_printf - ("Debug Level for file output was %8.8lX, now %8.8lX\n", + ("Debug Level for file output was %8.8X, now %8.8X\n", temp, acpi_gbl_db_debug_level); } break; diff --git a/drivers/acpi/acpica/dbstats.c b/drivers/acpi/acpica/dbstats.c index 4f00351dcbb1..3af88e70238c 100644 --- a/drivers/acpi/acpica/dbstats.c +++ b/drivers/acpi/acpica/dbstats.c @@ -341,17 +341,17 @@ acpi_status acpi_db_display_statistics(char *type_arg) "ACPI_TYPE", "NODES", "OBJECTS"); for (i = 0; i < ACPI_TYPE_NS_NODE_MAX; i++) { - acpi_os_printf("%16.16s % 10u% 10u\n", + acpi_os_printf("%16.16s %10u %10u\n", acpi_ut_get_type_name(i), acpi_gbl_node_type_count[i], acpi_gbl_obj_type_count[i]); } - acpi_os_printf("%16.16s % 10u% 10u\n", "Misc/Unknown", + acpi_os_printf("%16.16s %10u %10u\n", "Misc/Unknown", acpi_gbl_node_type_count_misc, acpi_gbl_obj_type_count_misc); - acpi_os_printf("%16.16s % 10u% 10u\n", "TOTALS:", + acpi_os_printf("%16.16s %10u %10u\n", "TOTALS:", acpi_gbl_num_nodes, acpi_gbl_num_objects); break; @@ -379,16 +379,16 @@ acpi_status acpi_db_display_statistics(char *type_arg) case CMD_STAT_MISC: acpi_os_printf("\nMiscellaneous Statistics:\n\n"); - acpi_os_printf("%-28s: %7lu\n", "Calls to AcpiPsFind", - (u64)acpi_gbl_ps_find_count); - acpi_os_printf("%-28s: %7lu\n", "Calls to AcpiNsLookup", - (u64)acpi_gbl_ns_lookup_count); + acpi_os_printf("%-28s: %7u\n", "Calls to AcpiPsFind", + acpi_gbl_ps_find_count); + acpi_os_printf("%-28s: %7u\n", "Calls to AcpiNsLookup", + acpi_gbl_ns_lookup_count); acpi_os_printf("\nMutex usage:\n\n"); for (i = 0; i < ACPI_NUM_MUTEX; i++) { - acpi_os_printf("%-28s: %7lu\n", + acpi_os_printf("%-28s: %7u\n", acpi_ut_get_mutex_name(i), - (u64)acpi_gbl_mutex_info[i].use_count); + acpi_gbl_mutex_info[i].use_count); } break; @@ -397,87 +397,87 @@ acpi_status acpi_db_display_statistics(char *type_arg) acpi_os_printf("\nInternal object sizes:\n\n"); acpi_os_printf("Common %3d\n", - sizeof(struct acpi_object_common)); + (u32)sizeof(struct acpi_object_common)); acpi_os_printf("Number %3d\n", - sizeof(struct acpi_object_integer)); + (u32)sizeof(struct acpi_object_integer)); acpi_os_printf("String %3d\n", - sizeof(struct acpi_object_string)); + (u32)sizeof(struct acpi_object_string)); acpi_os_printf("Buffer %3d\n", - sizeof(struct acpi_object_buffer)); + (u32)sizeof(struct acpi_object_buffer)); acpi_os_printf("Package %3d\n", - sizeof(struct acpi_object_package)); + (u32)sizeof(struct acpi_object_package)); acpi_os_printf("BufferField %3d\n", - sizeof(struct acpi_object_buffer_field)); + (u32)sizeof(struct acpi_object_buffer_field)); acpi_os_printf("Device %3d\n", - sizeof(struct acpi_object_device)); + (u32)sizeof(struct acpi_object_device)); acpi_os_printf("Event %3d\n", - sizeof(struct acpi_object_event)); + (u32)sizeof(struct acpi_object_event)); acpi_os_printf("Method %3d\n", - sizeof(struct acpi_object_method)); + (u32)sizeof(struct acpi_object_method)); acpi_os_printf("Mutex %3d\n", - sizeof(struct acpi_object_mutex)); + (u32)sizeof(struct acpi_object_mutex)); acpi_os_printf("Region %3d\n", - sizeof(struct acpi_object_region)); + (u32)sizeof(struct acpi_object_region)); acpi_os_printf("PowerResource %3d\n", - sizeof(struct acpi_object_power_resource)); + (u32)sizeof(struct acpi_object_power_resource)); acpi_os_printf("Processor %3d\n", - sizeof(struct acpi_object_processor)); + (u32)sizeof(struct acpi_object_processor)); acpi_os_printf("ThermalZone %3d\n", - sizeof(struct acpi_object_thermal_zone)); + (u32)sizeof(struct acpi_object_thermal_zone)); acpi_os_printf("RegionField %3d\n", - sizeof(struct acpi_object_region_field)); + (u32)sizeof(struct acpi_object_region_field)); acpi_os_printf("BankField %3d\n", - sizeof(struct acpi_object_bank_field)); + (u32)sizeof(struct acpi_object_bank_field)); acpi_os_printf("IndexField %3d\n", - sizeof(struct acpi_object_index_field)); + (u32)sizeof(struct acpi_object_index_field)); acpi_os_printf("Reference %3d\n", - sizeof(struct acpi_object_reference)); + (u32)sizeof(struct acpi_object_reference)); acpi_os_printf("Notify %3d\n", - sizeof(struct acpi_object_notify_handler)); + (u32)sizeof(struct acpi_object_notify_handler)); acpi_os_printf("AddressSpace %3d\n", - sizeof(struct acpi_object_addr_handler)); + (u32)sizeof(struct acpi_object_addr_handler)); acpi_os_printf("Extra %3d\n", - sizeof(struct acpi_object_extra)); + (u32)sizeof(struct acpi_object_extra)); acpi_os_printf("Data %3d\n", - sizeof(struct acpi_object_data)); + (u32)sizeof(struct acpi_object_data)); acpi_os_printf("\n"); acpi_os_printf("ParseObject %3d\n", - sizeof(struct acpi_parse_obj_common)); + (u32)sizeof(struct acpi_parse_obj_common)); acpi_os_printf("ParseObjectNamed %3d\n", - sizeof(struct acpi_parse_obj_named)); + (u32)sizeof(struct acpi_parse_obj_named)); acpi_os_printf("ParseObjectAsl %3d\n", - sizeof(struct acpi_parse_obj_asl)); + (u32)sizeof(struct acpi_parse_obj_asl)); acpi_os_printf("OperandObject %3d\n", - sizeof(union acpi_operand_object)); + (u32)sizeof(union acpi_operand_object)); acpi_os_printf("NamespaceNode %3d\n", - sizeof(struct acpi_namespace_node)); + (u32)sizeof(struct acpi_namespace_node)); acpi_os_printf("AcpiObject %3d\n", - sizeof(union acpi_object)); + (u32)sizeof(union acpi_object)); acpi_os_printf("\n"); acpi_os_printf("Generic State %3d\n", - sizeof(union acpi_generic_state)); + (u32)sizeof(union acpi_generic_state)); acpi_os_printf("Common State %3d\n", - sizeof(struct acpi_common_state)); + (u32)sizeof(struct acpi_common_state)); acpi_os_printf("Control State %3d\n", - sizeof(struct acpi_control_state)); + (u32)sizeof(struct acpi_control_state)); acpi_os_printf("Update State %3d\n", - sizeof(struct acpi_update_state)); + (u32)sizeof(struct acpi_update_state)); acpi_os_printf("Scope State %3d\n", - sizeof(struct acpi_scope_state)); + (u32)sizeof(struct acpi_scope_state)); acpi_os_printf("Parse Scope %3d\n", - sizeof(struct acpi_pscope_state)); + (u32)sizeof(struct acpi_pscope_state)); acpi_os_printf("Package State %3d\n", - sizeof(struct acpi_pkg_state)); + (u32)sizeof(struct acpi_pkg_state)); acpi_os_printf("Thread State %3d\n", - sizeof(struct acpi_thread_state)); + (u32)sizeof(struct acpi_thread_state)); acpi_os_printf("Result Values %3d\n", - sizeof(struct acpi_result_values)); + (u32)sizeof(struct acpi_result_values)); acpi_os_printf("Notify Info %3d\n", - sizeof(struct acpi_notify_info)); + (u32)sizeof(struct acpi_notify_info)); break; case CMD_STAT_STACK: diff --git a/drivers/acpi/acpica/nsaccess.c b/drivers/acpi/acpica/nsaccess.c index 2566e2d4c780..3f045b5953b2 100644 --- a/drivers/acpi/acpica/nsaccess.c +++ b/drivers/acpi/acpica/nsaccess.c @@ -598,7 +598,7 @@ acpi_ns_lookup(union acpi_generic_state *scope_info, if (flags & ACPI_NS_PREFIX_MUST_EXIST) { acpi_os_printf(ACPI_MSG_BIOS_ERROR "Object does not exist: %4.4s\n", - &simple_name); + (char *)&simple_name); } #endif /* Name not found in ACPI namespace */ diff --git a/drivers/acpi/acpica/utdebug.c b/drivers/acpi/acpica/utdebug.c index 01b1b36c8a8e..5b169b5f0f1a 100644 --- a/drivers/acpi/acpica/utdebug.c +++ b/drivers/acpi/acpica/utdebug.c @@ -158,7 +158,7 @@ acpi_debug_print(u32 requested_debug_level, * Display the module name, current line number, thread ID (if requested), * current procedure nesting level, and the current procedure name */ - acpi_os_printf("%9s-%04ld ", module_name, line_number); + acpi_os_printf("%9s-%04d ", module_name, line_number); #ifdef ACPI_APPLICATION /* @@ -177,7 +177,7 @@ acpi_debug_print(u32 requested_debug_level, fill_count = 0; } - acpi_os_printf("[%02ld] %*s", + acpi_os_printf("[%02d] %*s", acpi_gbl_nesting_level, acpi_gbl_nesting_level + 1, " "); acpi_os_printf("%s%*s: ", acpi_ut_trim_function_name(function_name), fill_count, diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h index 1b59fb61f67d..2e63b7b390f5 100644 --- a/include/acpi/acpiosxf.h +++ b/include/acpi/acpiosxf.h @@ -330,6 +330,7 @@ acpi_status acpi_os_enter_sleep(u8 sleep_state, u32 rega_value, u32 regb_value); * Debug print routines */ #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_printf +ACPI_PRINTF_LIKE(1) void ACPI_INTERNAL_VAR_XFACE acpi_os_printf(const char *format, ...); #endif From patchwork Fri Aug 16 21:43:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schmauss, Erik" X-Patchwork-Id: 11098311 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8FAE65700 for ; Fri, 16 Aug 2019 21:58:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 790C728AA7 for ; Fri, 16 Aug 2019 21:58:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6DC5928AB0; Fri, 16 Aug 2019 21:58:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EF3EB28AA7 for ; Fri, 16 Aug 2019 21:58:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727732AbfHPV6h (ORCPT ); Fri, 16 Aug 2019 17:58:37 -0400 Received: from mga11.intel.com ([192.55.52.93]:56323 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727753AbfHPV6h (ORCPT ); Fri, 16 Aug 2019 17:58:37 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Aug 2019 14:58:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,394,1559545200"; d="scan'208";a="206381394" Received: from bartok.jf.intel.com ([10.54.75.137]) by fmsmga002.fm.intel.com with ESMTP; 16 Aug 2019 14:58:33 -0700 From: Erik Schmauss To: rjw@rjwysocki.net, linux-acpi@vger.kernel.org Cc: Jung-uk Kim , Bob Moore , Erik Schmauss Subject: [PATCH 7/9] ACPICA: Differentiate Windows 8.1 from Windows 8. Date: Fri, 16 Aug 2019 14:43:26 -0700 Message-Id: <20190816214328.3900-8-erik.schmauss@intel.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20190816214328.3900-1-erik.schmauss@intel.com> References: <20190816214328.3900-1-erik.schmauss@intel.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jung-uk Kim ACPICA commit 66db7b38f61e63f11e48a0ea993d92b12e0a17ca Link: https://github.com/acpica/acpica/commit/66db7b38 Signed-off-by: Jung-uk Kim Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss --- drivers/acpi/acpica/utosi.c | 2 +- include/acpi/actypes.h | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/acpi/acpica/utosi.c b/drivers/acpi/acpica/utosi.c index 688c61a90725..fc09d234fe62 100644 --- a/drivers/acpi/acpica/utosi.c +++ b/drivers/acpi/acpica/utosi.c @@ -65,7 +65,7 @@ static struct acpi_interface_info acpi_default_supported_interfaces[] = { {"Windows 2006 SP2", NULL, 0, ACPI_OSI_WIN_VISTA_SP2}, /* Windows Vista SP2 - Added 09/2010 */ {"Windows 2009", NULL, 0, ACPI_OSI_WIN_7}, /* Windows 7 and Server 2008 R2 - Added 09/2009 */ {"Windows 2012", NULL, 0, ACPI_OSI_WIN_8}, /* Windows 8 and Server 2012 - Added 08/2012 */ - {"Windows 2013", NULL, 0, ACPI_OSI_WIN_8}, /* Windows 8.1 and Server 2012 R2 - Added 01/2014 */ + {"Windows 2013", NULL, 0, ACPI_OSI_WIN_8_1}, /* Windows 8.1 and Server 2012 R2 - Added 01/2014 */ {"Windows 2015", NULL, 0, ACPI_OSI_WIN_10}, /* Windows 10 - Added 03/2015 */ {"Windows 2016", NULL, 0, ACPI_OSI_WIN_10_RS1}, /* Windows 10 version 1607 - Added 12/2017 */ {"Windows 2017", NULL, 0, ACPI_OSI_WIN_10_RS2}, /* Windows 10 version 1703 - Added 12/2017 */ diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index f52c83eaedc4..10c10b9d18ae 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h @@ -1265,12 +1265,13 @@ typedef enum { #define ACPI_OSI_WIN_VISTA_SP2 0x0A #define ACPI_OSI_WIN_7 0x0B #define ACPI_OSI_WIN_8 0x0C -#define ACPI_OSI_WIN_10 0x0D -#define ACPI_OSI_WIN_10_RS1 0x0E -#define ACPI_OSI_WIN_10_RS2 0x0F -#define ACPI_OSI_WIN_10_RS3 0x10 -#define ACPI_OSI_WIN_10_RS4 0x11 -#define ACPI_OSI_WIN_10_RS5 0x12 +#define ACPI_OSI_WIN_8_1 0x0D +#define ACPI_OSI_WIN_10 0x0E +#define ACPI_OSI_WIN_10_RS1 0x0F +#define ACPI_OSI_WIN_10_RS2 0x10 +#define ACPI_OSI_WIN_10_RS3 0x11 +#define ACPI_OSI_WIN_10_RS4 0x12 +#define ACPI_OSI_WIN_10_RS5 0x13 /* Definitions of getopt */ From patchwork Fri Aug 16 21:43:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schmauss, Erik" X-Patchwork-Id: 11098313 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AADCA912 for ; Fri, 16 Aug 2019 21:58:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 99BAF286B1 for ; Fri, 16 Aug 2019 21:58:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7C32B28AB2; Fri, 16 Aug 2019 21:58:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1ABCA28AAC for ; Fri, 16 Aug 2019 21:58:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727753AbfHPV6h (ORCPT ); Fri, 16 Aug 2019 17:58:37 -0400 Received: from mga11.intel.com ([192.55.52.93]:56320 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727755AbfHPV6h (ORCPT ); Fri, 16 Aug 2019 17:58:37 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Aug 2019 14:58:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,394,1559545200"; d="scan'208";a="206381397" Received: from bartok.jf.intel.com ([10.54.75.137]) by fmsmga002.fm.intel.com with ESMTP; 16 Aug 2019 14:58:34 -0700 From: Erik Schmauss To: rjw@rjwysocki.net, linux-acpi@vger.kernel.org Cc: Jung-uk Kim , Bob Moore , Erik Schmauss Subject: [PATCH 8/9] ACPICA: Add "Windows 2019" string to _OSI support. Date: Fri, 16 Aug 2019 14:43:27 -0700 Message-Id: <20190816214328.3900-9-erik.schmauss@intel.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20190816214328.3900-1-erik.schmauss@intel.com> References: <20190816214328.3900-1-erik.schmauss@intel.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jung-uk Kim ACPICA commit 32fffb242800b0202986e86d9b0e16f88a23de66 Link: https://github.com/acpica/acpica/commit/32fffb24 Signed-off-by: Jung-uk Kim Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss --- drivers/acpi/acpica/utosi.c | 1 + include/acpi/actypes.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/acpi/acpica/utosi.c b/drivers/acpi/acpica/utosi.c index fc09d234fe62..ad2b218039d0 100644 --- a/drivers/acpi/acpica/utosi.c +++ b/drivers/acpi/acpica/utosi.c @@ -72,6 +72,7 @@ static struct acpi_interface_info acpi_default_supported_interfaces[] = { {"Windows 2017.2", NULL, 0, ACPI_OSI_WIN_10_RS3}, /* Windows 10 version 1709 - Added 02/2018 */ {"Windows 2018", NULL, 0, ACPI_OSI_WIN_10_RS4}, /* Windows 10 version 1803 - Added 11/2018 */ {"Windows 2018.2", NULL, 0, ACPI_OSI_WIN_10_RS5}, /* Windows 10 version 1809 - Added 11/2018 */ + {"Windows 2019", NULL, 0, ACPI_OSI_WIN_10_19H1}, /* Windows 10 version 1903 - Added 08/2019 */ /* Feature Group Strings */ diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 10c10b9d18ae..2f3f28c7cea3 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h @@ -1272,6 +1272,7 @@ typedef enum { #define ACPI_OSI_WIN_10_RS3 0x11 #define ACPI_OSI_WIN_10_RS4 0x12 #define ACPI_OSI_WIN_10_RS5 0x13 +#define ACPI_OSI_WIN_10_19H1 0x14 /* Definitions of getopt */ From patchwork Fri Aug 16 21:43:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schmauss, Erik" X-Patchwork-Id: 11098317 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DE50D5702 for ; Fri, 16 Aug 2019 21:58:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC616286B1 for ; Fri, 16 Aug 2019 21:58:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C0F02288D9; Fri, 16 Aug 2019 21:58:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7BD9628AB1 for ; Fri, 16 Aug 2019 21:58:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727755AbfHPV6h (ORCPT ); Fri, 16 Aug 2019 17:58:37 -0400 Received: from mga11.intel.com ([192.55.52.93]:56326 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727757AbfHPV6h (ORCPT ); Fri, 16 Aug 2019 17:58:37 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Aug 2019 14:58:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,394,1559545200"; d="scan'208";a="206381400" Received: from bartok.jf.intel.com ([10.54.75.137]) by fmsmga002.fm.intel.com with ESMTP; 16 Aug 2019 14:58:34 -0700 From: Erik Schmauss To: rjw@rjwysocki.net, linux-acpi@vger.kernel.org Cc: Bob Moore , Erik Schmauss Subject: [PATCH 9/9] ACPICA: Update version to 20190816. Date: Fri, 16 Aug 2019 14:43:28 -0700 Message-Id: <20190816214328.3900-10-erik.schmauss@intel.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20190816214328.3900-1-erik.schmauss@intel.com> References: <20190816214328.3900-1-erik.schmauss@intel.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Bob Moore ACPICA commit db29ce57ced39ec610667c4b946bc3bb38bc8efa Version 20190816. Link: https://github.com/acpica/acpica/commit/db29ce57 Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss --- include/acpi/acpixf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 4ed603a3b448..e5e041413581 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h @@ -12,7 +12,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20190703 +#define ACPI_CA_VERSION 0x20190816 #include #include