From patchwork Fri Jan 22 00:23:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erik Kaneda X-Patchwork-Id: 368738 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=-21.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, 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 1D3A1C433E6 for ; Fri, 22 Jan 2021 00:57:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A67D922CAE for ; Fri, 22 Jan 2021 00:57:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726268AbhAVA5K (ORCPT ); Thu, 21 Jan 2021 19:57:10 -0500 Received: from mga06.intel.com ([134.134.136.31]:34968 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726236AbhAVA5C (ORCPT ); Thu, 21 Jan 2021 19:57:02 -0500 IronPort-SDR: FUs0xunQCYXAqW4tG8SGngGjAtDR2bh6Debr6GRf86YqiQulpdGN7iHNo/H5MulZJzSX5gfq5M E6JlHEaoTe1w== X-IronPort-AV: E=McAfee;i="6000,8403,9871"; a="240908708" X-IronPort-AV: E=Sophos;i="5.79,365,1602572400"; d="scan'208";a="240908708" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jan 2021 16:56:21 -0800 IronPort-SDR: t78x6BQScjotYTKcGEXhxDdEtKUJATr6SJ+dsUj29oub9J7R/hA+wl6MwjrGnpGR7QC3LkxB1B M5Jdop0Y4duQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,365,1602572400"; d="scan'208";a="427595528" Received: from sibelius.jf.intel.com ([10.54.75.166]) by orsmga001.jf.intel.com with ESMTP; 21 Jan 2021 16:56:21 -0800 From: Erik Kaneda To: "Rafael J . Wysocki" , ACPI Devel Maling List Cc: Maximilian Luz , Bob Moore , Erik Kaneda Subject: [PATCH v2 1/9] ACPICA: Fix exception code class checks Date: Thu, 21 Jan 2021 16:23:49 -0800 Message-Id: <20210122002357.370836-2-erik.kaneda@intel.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210122002357.370836-1-erik.kaneda@intel.com> References: <20210122002357.370836-1-erik.kaneda@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Maximilian Luz ACPICA commit 1a3a549286ea9db07d7ec700e7a70dd8bcc4354e The macros to classify different AML exception codes are broken. For instance, ACPI_ENV_EXCEPTION(Status) will always evaluate to zero due to #define AE_CODE_ENVIRONMENTAL 0x0000 #define ACPI_ENV_EXCEPTION(Status) (Status & AE_CODE_ENVIRONMENTAL) Similarly, ACPI_AML_EXCEPTION(Status) will evaluate to a non-zero value for error codes of type AE_CODE_PROGRAMMER, AE_CODE_ACPI_TABLES, as well as AE_CODE_AML, and not just AE_CODE_AML as the name suggests. This commit fixes those checks. Fixes: e884d78aab26 ("AML Parser: ignore all exceptions that result from incorrect AML during table load") Link: https://github.com/acpica/acpica/commit/1a3a5492 Signed-off-by: Maximilian Luz Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda --- include/acpi/acexcep.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/acpi/acexcep.h b/include/acpi/acexcep.h index 2fc624a61769..f8a4afb0279a 100644 --- a/include/acpi/acexcep.h +++ b/include/acpi/acexcep.h @@ -59,11 +59,11 @@ struct acpi_exception_info { #define AE_OK (acpi_status) 0x0000 -#define ACPI_ENV_EXCEPTION(status) (status & AE_CODE_ENVIRONMENTAL) -#define ACPI_AML_EXCEPTION(status) (status & AE_CODE_AML) -#define ACPI_PROG_EXCEPTION(status) (status & AE_CODE_PROGRAMMER) -#define ACPI_TABLE_EXCEPTION(status) (status & AE_CODE_ACPI_TABLES) -#define ACPI_CNTL_EXCEPTION(status) (status & AE_CODE_CONTROL) +#define ACPI_ENV_EXCEPTION(status) (((status) & AE_CODE_MASK) == AE_CODE_ENVIRONMENTAL) +#define ACPI_AML_EXCEPTION(status) (((status) & AE_CODE_MASK) == AE_CODE_AML) +#define ACPI_PROG_EXCEPTION(status) (((status) & AE_CODE_MASK) == AE_CODE_PROGRAMMER) +#define ACPI_TABLE_EXCEPTION(status) (((status) & AE_CODE_MASK) == AE_CODE_ACPI_TABLES) +#define ACPI_CNTL_EXCEPTION(status) (((status) & AE_CODE_MASK) == AE_CODE_CONTROL) /* * Environmental exceptions From patchwork Fri Jan 22 00:23:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erik Kaneda X-Patchwork-Id: 368736 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=-21.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, 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 D672CC433E0 for ; Fri, 22 Jan 2021 00:58:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9941222CAE for ; Fri, 22 Jan 2021 00:58:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726205AbhAVA6d (ORCPT ); Thu, 21 Jan 2021 19:58:33 -0500 Received: from mga06.intel.com ([134.134.136.31]:35025 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726057AbhAVA6L (ORCPT ); Thu, 21 Jan 2021 19:58:11 -0500 IronPort-SDR: SvrMTw5VlNffCx0TuTd7VKEmFtHRq+A4yQEtXl7oBE/vdIS2zpXBPc4A4E1mlS4jhrUYmnTjw5 X7R+NOR7zXXQ== X-IronPort-AV: E=McAfee;i="6000,8403,9871"; a="240908709" X-IronPort-AV: E=Sophos;i="5.79,365,1602572400"; d="scan'208";a="240908709" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jan 2021 16:56:21 -0800 IronPort-SDR: R9Ez2DH8LSsppE7yhqSl2pDZ6l7jHgWnCAVFQdMqSgYblqw89nCUY63uNfirdfoGOv0c6AxnWd Z3477qgjI8CA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,365,1602572400"; d="scan'208";a="427595530" Received: from sibelius.jf.intel.com ([10.54.75.166]) by orsmga001.jf.intel.com with ESMTP; 21 Jan 2021 16:56:21 -0800 From: Erik Kaneda To: "Rafael J . Wysocki" , ACPI Devel Maling List Cc: Maximilian Luz , Bob Moore , Erik Kaneda Subject: [PATCH v2 2/9] ACPICA: Clean up exception code class checks Date: Thu, 21 Jan 2021 16:23:50 -0800 Message-Id: <20210122002357.370836-3-erik.kaneda@intel.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210122002357.370836-1-erik.kaneda@intel.com> References: <20210122002357.370836-1-erik.kaneda@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Maximilian Luz ACPICA commit 5a8390fbd4c5c60da0b6d4ba53b5ee34fda9a0cb With the exception code class check macros fixed in the previous commit, let us now use those to simplify exception class checks across acpica. Link: https://github.com/acpica/acpica/commit/5a8390fb Signed-off-by: Maximilian Luz Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda --- drivers/acpi/acpica/dbobject.c | 2 +- drivers/acpi/acpica/dsdebug.c | 2 +- drivers/acpi/acpica/psloop.c | 3 +-- drivers/acpi/acpica/psparse.c | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/acpi/acpica/dbobject.c b/drivers/acpi/acpica/dbobject.c index 4b4c530a0654..95ab91b35f29 100644 --- a/drivers/acpi/acpica/dbobject.c +++ b/drivers/acpi/acpica/dbobject.c @@ -47,7 +47,7 @@ acpi_db_dump_method_info(acpi_status status, struct acpi_walk_state *walk_state) /* Ignore control codes, they are not errors */ - if ((status & AE_CODE_MASK) == AE_CODE_CONTROL) { + if (ACPI_CNTL_EXCEPTION(status)) { return; } diff --git a/drivers/acpi/acpica/dsdebug.c b/drivers/acpi/acpica/dsdebug.c index 63bc5f19fb82..2c22e3eff535 100644 --- a/drivers/acpi/acpica/dsdebug.c +++ b/drivers/acpi/acpica/dsdebug.c @@ -100,7 +100,7 @@ acpi_ds_dump_method_stack(acpi_status status, /* Ignore control codes, they are not errors */ - if ((status & AE_CODE_MASK) == AE_CODE_CONTROL) { + if (ACPI_CNTL_EXCEPTION(status)) { return_VOID; } diff --git a/drivers/acpi/acpica/psloop.c b/drivers/acpi/acpica/psloop.c index 3cf0687b9915..1ba17cf16c41 100644 --- a/drivers/acpi/acpica/psloop.c +++ b/drivers/acpi/acpica/psloop.c @@ -264,8 +264,7 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state) ACPI_TO_POINTER (TRUE)); if (ACPI_FAILURE(status) - && ((status & AE_CODE_MASK) != - AE_CODE_CONTROL)) { + && !ACPI_CNTL_EXCEPTION(status)) { if (status == AE_AML_NO_RETURN_VALUE) { ACPI_EXCEPTION((AE_INFO, status, "Invoked method did not return a value")); diff --git a/drivers/acpi/acpica/psparse.c b/drivers/acpi/acpica/psparse.c index bd3caf735be3..06490a137982 100644 --- a/drivers/acpi/acpica/psparse.c +++ b/drivers/acpi/acpica/psparse.c @@ -383,7 +383,7 @@ acpi_ps_next_parse_state(struct acpi_walk_state *walk_state, default: status = callback_status; - if ((callback_status & AE_CODE_MASK) == AE_CODE_CONTROL) { + if (ACPI_CNTL_EXCEPTION(callback_status)) { status = AE_OK; } break; From patchwork Fri Jan 22 00:23:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erik Kaneda X-Patchwork-Id: 368604 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp1046366jam; Thu, 21 Jan 2021 16:58:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJxDO4VuH3mhVeBI9psZJ2yEmG0l2k/DoPTXNG+/GjnhsnGa6AsZT/mUX9mn1AVxgIQqEtu+ X-Received: by 2002:a50:9dc3:: with SMTP id l3mr1412780edk.198.1611277126247; Thu, 21 Jan 2021 16:58:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611277126; cv=none; d=google.com; s=arc-20160816; b=f9DxQU9H64fnQkI8xotsugqeF8nx1KAzJl6PxJ4QZEF1nQcsUjudQcTdPSjZsmcxtN sGAcmQAz2kGa4XNud5STB63oCEDIlZq4Atyz6p5Sb9NnuOEP4h7p7944T5TueWq85z+7 /h9zjV5oXy3zpDqzCkbt7Z/ABd9UeebqKmsR/rvNZJNGsfOl89byF3pnWC9oiXMRNHaz 9VUuksFeVsnB7McwzuqBbbngFZ4yzRAs2i0PMbK4U35Zlu/6rJIENWW4N7PvKkML7DN5 J902Ma+tOooHoEjxnNwZrUqi55FBdcQIesVzPoQBkLSMdbopQmqBbfceijegUMI+j4cX 1uVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=FMKH6/rEW0ybH4I7M+/mmhCeLpCuWFCjUYH9+uq/T2U=; b=LvHeqlnbvPNxjMyEvDxOy2PQsV2EUurolkvJgl+kp6GEU2VMIZsxhLzeEud0aaExkd mX7H3cxoj/nf4qhvu/XnMbrcAEEhTNCYkukkHKLJh5+3RWR8ysH8315792Zvddcy44D7 Pvri3JsvMCbFqn9X6Sa7hsyG+SGP22ge03Xntv8KcJmOsRp2aW9iMKEGlHgK40Yunj/k jem+2IaUBOZ1wX8Rhw5UD9Y9bH5g5lYrzIWaRNVQpqkoK5J+wPJYlmIVwlpuhrfk3jVc gO3KhLONBckbSbatU0Z5C8xR88n9GCqbgqk/U1A23ARjm7OTigvLY/mHjLMBAJdUbF8x RxWQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-acpi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-acpi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t5si2304920ejb.381.2021.01.21.16.58.46; Thu, 21 Jan 2021 16:58:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-acpi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-acpi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-acpi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726057AbhAVA6i (ORCPT + 4 others); Thu, 21 Jan 2021 19:58:38 -0500 Received: from mga06.intel.com ([134.134.136.31]:35006 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726362AbhAVA6a (ORCPT ); Thu, 21 Jan 2021 19:58:30 -0500 IronPort-SDR: GTcjyvmwZ79Jym/ubvVIZGXSZH2QZpmWmZ5vkNKoOTZqKkhGHRohvt/ivuWA0C7bukSkzc/T+4 OA+FMvOznVnQ== X-IronPort-AV: E=McAfee;i="6000,8403,9871"; a="240908710" X-IronPort-AV: E=Sophos;i="5.79,365,1602572400"; d="scan'208";a="240908710" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jan 2021 16:56:22 -0800 IronPort-SDR: KzwYIucmcdV49YJwvXCqNm7Uf1qd8OIbMOnxBCyw+kRp5vTJtej3MiQkJePOTiznuz1OOPU0kJ ECK9A+poeozQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,365,1602572400"; d="scan'208";a="427595534" Received: from sibelius.jf.intel.com ([10.54.75.166]) by orsmga001.jf.intel.com with ESMTP; 21 Jan 2021 16:56:21 -0800 From: Erik Kaneda To: "Rafael J . Wysocki" , ACPI Devel Maling List Cc: Nick Desaulniers , Robert Moore , Jon Hunter , Erik Kaneda Subject: [PATCH v2 3/9] ACPICA: ACPICA: fix -Wfallthrough Date: Thu, 21 Jan 2021 16:23:51 -0800 Message-Id: <20210122002357.370836-4-erik.kaneda@intel.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210122002357.370836-1-erik.kaneda@intel.com> References: <20210122002357.370836-1-erik.kaneda@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Nick Desaulniers ACPICA commit 4b9135f5774caa796ddf826448811e8e7f08ef2f GCC 7.1 gained -Wimplicit-fallthrough to warn on implicit fallthrough, as well as __attribute__((__fallthrough__)) and comments to explicitly denote that cases of fallthrough were intentional. Clang also supports this warning and statement attribute, but not the comment form. Robert Moore provides additional context about the lint comments being removed. They were for "an old version of PC-Lint, which we don't use anymore." Drop those. This will help us enable -Wimplicit-fallthrough throughout the Linux kernel. Suggested-by: Robert Moore Reported-by: Jon Hunter Link: https://github.com/acpica/acpica/commit/4b9135f5 Signed-off-by: Nick Desaulniers Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda --- drivers/acpi/acpica/dscontrol.c | 2 +- drivers/acpi/acpica/dswexec.c | 3 +-- drivers/acpi/acpica/dswload.c | 2 +- drivers/acpi/acpica/dswload2.c | 2 +- drivers/acpi/acpica/exfldio.c | 2 +- drivers/acpi/acpica/exresop.c | 4 ++-- drivers/acpi/acpica/exstore.c | 4 ++-- drivers/acpi/acpica/hwgpe.c | 2 +- drivers/acpi/acpica/utdelete.c | 2 +- include/acpi/actypes.h | 6 ++++++ include/acpi/platform/acgcc.h | 15 +++++++++++++++ 11 files changed, 32 insertions(+), 12 deletions(-) -- 2.29.2 diff --git a/drivers/acpi/acpica/dscontrol.c b/drivers/acpi/acpica/dscontrol.c index 4b5b6e859f62..b58ffc7acdb9 100644 --- a/drivers/acpi/acpica/dscontrol.c +++ b/drivers/acpi/acpica/dscontrol.c @@ -62,7 +62,7 @@ acpi_ds_exec_begin_control_op(struct acpi_walk_state *walk_state, } } - /*lint -fallthrough */ + ACPI_FALLTHROUGH; case AML_IF_OP: /* diff --git a/drivers/acpi/acpica/dswexec.c b/drivers/acpi/acpica/dswexec.c index 1d4f8c81028c..4a9799246fae 100644 --- a/drivers/acpi/acpica/dswexec.c +++ b/drivers/acpi/acpica/dswexec.c @@ -598,8 +598,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state) break; } - /* Fall through */ - /*lint -fallthrough */ + ACPI_FALLTHROUGH; case AML_INT_EVAL_SUBTREE_OP: diff --git a/drivers/acpi/acpica/dswload.c b/drivers/acpi/acpica/dswload.c index 27069325b6de..dd97c86f8e41 100644 --- a/drivers/acpi/acpica/dswload.c +++ b/drivers/acpi/acpica/dswload.c @@ -224,7 +224,7 @@ acpi_ds_load1_begin_op(struct acpi_walk_state *walk_state, break; } - /*lint -fallthrough */ + ACPI_FALLTHROUGH; default: diff --git a/drivers/acpi/acpica/dswload2.c b/drivers/acpi/acpica/dswload2.c index edadbe146506..d9a3dfca7555 100644 --- a/drivers/acpi/acpica/dswload2.c +++ b/drivers/acpi/acpica/dswload2.c @@ -214,7 +214,7 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state, break; } - /*lint -fallthrough */ + ACPI_FALLTHROUGH; default: diff --git a/drivers/acpi/acpica/exfldio.c b/drivers/acpi/acpica/exfldio.c index ade35ff1c7ba..cde24e0fa6a8 100644 --- a/drivers/acpi/acpica/exfldio.c +++ b/drivers/acpi/acpica/exfldio.c @@ -434,7 +434,7 @@ acpi_ex_field_datum_io(union acpi_operand_object *obj_desc, * region_field case and write the datum to the Operation Region */ - /*lint -fallthrough */ + ACPI_FALLTHROUGH; case ACPI_TYPE_LOCAL_REGION_FIELD: /* diff --git a/drivers/acpi/acpica/exresop.c b/drivers/acpi/acpica/exresop.c index 4d1b22971d58..4a0f8b8bfe62 100644 --- a/drivers/acpi/acpica/exresop.c +++ b/drivers/acpi/acpica/exresop.c @@ -198,7 +198,7 @@ acpi_ex_resolve_operands(u16 opcode, target_op = AML_DEBUG_OP; - /*lint -fallthrough */ + ACPI_FALLTHROUGH; case ACPI_REFCLASS_ARG: case ACPI_REFCLASS_LOCAL: @@ -264,7 +264,7 @@ acpi_ex_resolve_operands(u16 opcode, * Else not a string - fall through to the normal Reference * case below */ - /*lint -fallthrough */ + ACPI_FALLTHROUGH; case ARGI_REFERENCE: /* References: */ case ARGI_INTEGER_REF: diff --git a/drivers/acpi/acpica/exstore.c b/drivers/acpi/acpica/exstore.c index 3adc0a29d890..8fe33051275d 100644 --- a/drivers/acpi/acpica/exstore.c +++ b/drivers/acpi/acpica/exstore.c @@ -96,7 +96,7 @@ acpi_ex_store(union acpi_operand_object *source_desc, return_ACPI_STATUS(AE_OK); } - /*lint -fallthrough */ + ACPI_FALLTHROUGH; default: @@ -422,7 +422,7 @@ acpi_ex_store_object_to_node(union acpi_operand_object *source_desc, break; } - /* Fallthrough */ + ACPI_FALLTHROUGH; case ACPI_TYPE_DEVICE: case ACPI_TYPE_EVENT: diff --git a/drivers/acpi/acpica/hwgpe.c b/drivers/acpi/acpica/hwgpe.c index b13a4ed5bc63..0c84300e915c 100644 --- a/drivers/acpi/acpica/hwgpe.c +++ b/drivers/acpi/acpica/hwgpe.c @@ -167,7 +167,7 @@ acpi_hw_low_set_gpe(struct acpi_gpe_event_info *gpe_event_info, u32 action) return (AE_BAD_PARAMETER); } - /*lint -fallthrough */ + ACPI_FALLTHROUGH; case ACPI_GPE_ENABLE: diff --git a/drivers/acpi/acpica/utdelete.c b/drivers/acpi/acpica/utdelete.c index 4c0d4e434196..624a26794d55 100644 --- a/drivers/acpi/acpica/utdelete.c +++ b/drivers/acpi/acpica/utdelete.c @@ -112,7 +112,7 @@ static void acpi_ut_delete_internal_obj(union acpi_operand_object *object) gpe_block); } - /*lint -fallthrough */ + ACPI_FALLTHROUGH; case ACPI_TYPE_PROCESSOR: case ACPI_TYPE_THERMAL: diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 647cb11d0a0a..2a32593691bc 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h @@ -1286,4 +1286,10 @@ typedef enum { #define ACPI_OPT_END -1 +/* Definitions for explicit fallthrough */ + +#ifndef ACPI_FALLTHROUGH +#define ACPI_FALLTHROUGH do {} while(0) +#endif + #endif /* __ACTYPES_H__ */ diff --git a/include/acpi/platform/acgcc.h b/include/acpi/platform/acgcc.h index 7d63d03cf507..91f7a02c798a 100644 --- a/include/acpi/platform/acgcc.h +++ b/include/acpi/platform/acgcc.h @@ -54,4 +54,19 @@ typedef __builtin_va_list va_list; #define ACPI_USE_NATIVE_MATH64 +/* GCC did not support __has_attribute until 5.1. */ + +#ifndef __has_attribute +#define __has_attribute(x) 0 +#endif + +/* + * Explictly mark intentional explicit fallthrough to silence + * -Wimplicit-fallthrough in GCC 7.1+. + */ + +#if __has_attribute(__fallthrough__) +#define ACPI_FALLTHROUGH __attribute__((__fallthrough__)) +#endif + #endif /* __ACGCC_H__ */ From patchwork Fri Jan 22 00:23:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erik Kaneda X-Patchwork-Id: 368737 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=-21.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, 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 3B1ECC433E6 for ; Fri, 22 Jan 2021 00:58:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 082AB20769 for ; Fri, 22 Jan 2021 00:58:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726296AbhAVA6B (ORCPT ); Thu, 21 Jan 2021 19:58:01 -0500 Received: from mga06.intel.com ([134.134.136.31]:35006 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726302AbhAVA5v (ORCPT ); Thu, 21 Jan 2021 19:57:51 -0500 IronPort-SDR: h0bCeONCNs/3soY0fRjW7xX0huUW9U8n+RxAkCP02YCBRnWnnf6mZ6Rz0X7tMRH7WTtGgzC78S DniCAi/qGIBQ== X-IronPort-AV: E=McAfee;i="6000,8403,9871"; a="240908712" X-IronPort-AV: E=Sophos;i="5.79,365,1602572400"; d="scan'208";a="240908712" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jan 2021 16:56:22 -0800 IronPort-SDR: fS4caoW5PbQi0mtlss5+rYrN4DpXaB8fC141a27uxSH0FFoIOLBS2qiLGxfewePUP7gdTUM3V/ gv3aeUaVcXUQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,365,1602572400"; d="scan'208";a="427595541" Received: from sibelius.jf.intel.com ([10.54.75.166]) by orsmga001.jf.intel.com with ESMTP; 21 Jan 2021 16:56:21 -0800 From: Erik Kaneda To: "Rafael J . Wysocki" , ACPI Devel Maling List Cc: Bob Moore , Erik Kaneda Subject: [PATCH v2 5/9] ACPICA: Update version to 20201217 Version 20201217. Date: Thu, 21 Jan 2021 16:23:53 -0800 Message-Id: <20210122002357.370836-6-erik.kaneda@intel.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210122002357.370836-1-erik.kaneda@intel.com> References: <20210122002357.370836-1-erik.kaneda@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Bob Moore ACPICA commit 830dcc2b4fd2de8f0c63f1c366f51da276fe3d85 Link: https://github.com/acpica/acpica/commit/830dcc2b Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda --- 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 0bba8b8c350e..be76e40769cb 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 0x20201113 +#define ACPI_CA_VERSION 0x20201217 #include #include From patchwork Fri Jan 22 00:23:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erik Kaneda X-Patchwork-Id: 368735 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=-21.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, 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 F2526C433E0 for ; Fri, 22 Jan 2021 00:59:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B0AF522CAE for ; Fri, 22 Jan 2021 00:59:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726414AbhAVA67 (ORCPT ); Thu, 21 Jan 2021 19:58:59 -0500 Received: from mga06.intel.com ([134.134.136.31]:34968 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726354AbhAVA6U (ORCPT ); Thu, 21 Jan 2021 19:58:20 -0500 IronPort-SDR: U4vZNREFSr480iGaMjzbDvSI3HbGWi/pNBqHkIv7aw9EhC0sVb+udRsJoU5xpd/AVF3e/Wl3h6 jzlG/V3oz/SQ== X-IronPort-AV: E=McAfee;i="6000,8403,9871"; a="240908713" X-IronPort-AV: E=Sophos;i="5.79,365,1602572400"; d="scan'208";a="240908713" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jan 2021 16:56:22 -0800 IronPort-SDR: o8Ahrrj9+r80eDPXXWLbF6OIRtEcgldMJYCs6L+gWLBoc9WozuapefWNM1PnAk0cSdgmvw6QLp TfIe/f3TzN0g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,365,1602572400"; d="scan'208";a="427595543" Received: from sibelius.jf.intel.com ([10.54.75.166]) by orsmga001.jf.intel.com with ESMTP; 21 Jan 2021 16:56:21 -0800 From: Erik Kaneda To: "Rafael J . Wysocki" , ACPI Devel Maling List Cc: Al Stone , Bob Moore , Erik Kaneda Subject: [PATCH v2 6/9] ACPICA: Remove the MTMR (Mid-Timer) table Date: Thu, 21 Jan 2021 16:23:54 -0800 Message-Id: <20210122002357.370836-7-erik.kaneda@intel.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210122002357.370836-1-erik.kaneda@intel.com> References: <20210122002357.370836-1-erik.kaneda@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Al Stone ACPICA commit 2c39dcccda4dc250a44379ae086b8b1a3fdad115 This table is no longer in use, and is not officially defined in the ACPI specification. Link: https://github.com/acpica/acpica/commit/2c39dccc Signed-off-by: Al Stone Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda --- include/acpi/actbl2.h | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index ec66779cb193..94bfc0c2a893 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h @@ -33,7 +33,6 @@ #define ACPI_SIG_MPST "MPST" /* Memory Power State Table */ #define ACPI_SIG_MSCT "MSCT" /* Maximum System Characteristics Table */ #define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */ -#define ACPI_SIG_MTMR "MTMR" /* MID Timer table */ #define ACPI_SIG_NFIT "NFIT" /* NVDIMM Firmware Interface Table */ #define ACPI_SIG_PCCT "PCCT" /* Platform Communications Channel Table */ #define ACPI_SIG_PDTT "PDTT" /* Platform Debug Trigger Table */ @@ -935,29 +934,6 @@ struct acpi_table_msdm { struct acpi_table_header header; /* Common ACPI table header */ }; -/******************************************************************************* - * - * MTMR - MID Timer Table - * Version 1 - * - * Conforms to "Simple Firmware Interface Specification", - * Draft 0.8.2, Oct 19, 2010 - * NOTE: The ACPI MTMR is equivalent to the SFI MTMR table. - * - ******************************************************************************/ - -struct acpi_table_mtmr { - struct acpi_table_header header; /* Common ACPI table header */ -}; - -/* MTMR entry */ - -struct acpi_mtmr_entry { - struct acpi_generic_address physical_address; - u32 frequency; - u32 irq; -}; - /******************************************************************************* * * NFIT - NVDIMM Interface Table (ACPI 6.0+) From patchwork Fri Jan 22 00:23:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erik Kaneda X-Patchwork-Id: 368734 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=-21.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, 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 90EF5C433DB for ; Fri, 22 Jan 2021 00:59:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5396D22CAE for ; Fri, 22 Jan 2021 00:59:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726375AbhAVA7W (ORCPT ); Thu, 21 Jan 2021 19:59:22 -0500 Received: from mga06.intel.com ([134.134.136.31]:34968 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726362AbhAVA7U (ORCPT ); Thu, 21 Jan 2021 19:59:20 -0500 IronPort-SDR: l8KI4Wp2FqrqBCCMA7CRRREMDEGSY9KkirQFnLlwqO3hSb/yNbMOQMxPBRd6s+wIUwEB37ccBl Mus9Dt7D3dMQ== X-IronPort-AV: E=McAfee;i="6000,8403,9871"; a="240908716" X-IronPort-AV: E=Sophos;i="5.79,365,1602572400"; d="scan'208";a="240908716" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jan 2021 16:56:22 -0800 IronPort-SDR: iKkpDLjM1kyx+9MB2xSDAN8z8PgKVeApbKYvJ1xjo6SjdOSDnTkB3fiqom+7enObaMzmkVxJ+E V5JkttFfxj0Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,365,1602572400"; d="scan'208";a="427595553" Received: from sibelius.jf.intel.com ([10.54.75.166]) by orsmga001.jf.intel.com with ESMTP; 21 Jan 2021 16:56:22 -0800 From: Erik Kaneda To: "Rafael J . Wysocki" , ACPI Devel Maling List Cc: Bob Moore , Erik Kaneda Subject: [PATCH v2 9/9] ACPICA: Update version to 20210105 Date: Thu, 21 Jan 2021 16:23:57 -0800 Message-Id: <20210122002357.370836-10-erik.kaneda@intel.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210122002357.370836-1-erik.kaneda@intel.com> References: <20210122002357.370836-1-erik.kaneda@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Bob Moore ACPICA commit 28cb42013541950cf378582a5a5a5587061498ca Version 20210105. Link: https://github.com/acpica/acpica/commit/28cb4201 Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda --- 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 be76ba3166cf..370293ee8399 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 0x20201217 +#define ACPI_CA_VERSION 0x20210105 #include #include