From patchwork Mon Oct 17 19:03:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lv Zheng X-Patchwork-Id: 9380247 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CC3EF608A7 for ; Mon, 17 Oct 2016 19:04:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B2A3C28D53 for ; Mon, 17 Oct 2016 19:04:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A76B028D59; Mon, 17 Oct 2016 19:04:29 +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=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 5800728D53 for ; Mon, 17 Oct 2016 19:04:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933230AbcJQTEL (ORCPT ); Mon, 17 Oct 2016 15:04:11 -0400 Received: from mail-qk0-f195.google.com ([209.85.220.195]:34216 "EHLO mail-qk0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934954AbcJQTDy (ORCPT ); Mon, 17 Oct 2016 15:03:54 -0400 Received: by mail-qk0-f195.google.com with SMTP id n189so14972942qke.1 for ; Mon, 17 Oct 2016 12:03:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=wUTpKmv51sWumHNZdnS+5DJjaO3nBBbNI6orwmX9hJo=; b=JHxmYEb6zQRwlwd/IC7ZMxGDUPlFJ1rb9vL6nT1Y3mkPeBAlRHpT21jq7jP4zOItpH +eGjR9okt9D6ug6UBYxFmj7RqMLM46Gw/p8xmNvr58R2ZsHbVE1XZKQb4MHiP7rONGKa 8qEuyREa3RgCioT3veaMrkubHY8YpFibpr/StM7YDnrSvkYo8swJqS466XImIOMliuXP HcWURElFCRAjE7wIWB/KdYad3Pg/e1gT/E3c88dprgVmoU3YB/y1TchBRqEZ0tX6PTeq Qws80ZwUPnpXGQRo4NkpQEld6fHAdZI0wauimhF3h72UaVkXikyvVfZY+IeRtqcCEJ38 QN5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=wUTpKmv51sWumHNZdnS+5DJjaO3nBBbNI6orwmX9hJo=; b=MDm7gRE2AWXVnlb+tXVOFRn7XfNm/zBcpW6rrUYVKZldKdXpOFlEMFtXJvvMYsyVWa Ytgqp+PSs72ohEpkgzMkKOytidV8T9IkU6VSYRCWQfsjdJirOeylms/LAqgHkSkTKAUq ctIlmDt4BwKtaLUd8OSOFfMCNdSJTpiy5Y6eluenaVt3YIltU81ZnxmC8atwa7fg9+SZ Xs3GSx57bfBcv3meDLujLRNsBcP/d+4MzIwFx1LmX8Ph/469pIUMcWpzqbvLz40tn5rv nx4tZf9kpKEfUWN8lutbkD2W7e9mpDMCmvufCeCCvbXhk+/L1kK+chwY7BW6QOKuDrv1 VJTQ== X-Gm-Message-State: AA6/9Rn4dXsNMtt/KA2M1PUh8VGhXxbXRGO7EUgKICWja9pshymGNtoUTdn7Sjrqetc5Ow== X-Received: by 10.55.114.131 with SMTP id n125mr18301839qkc.17.1476731033379; Mon, 17 Oct 2016 12:03:53 -0700 (PDT) Received: from localhost.localdomain (h3.246.129.40.static.ip.windstream.net. [40.129.246.3]) by smtp.gmail.com with ESMTPSA id s16sm15816243qtc.25.2016.10.17.12.03.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 17 Oct 2016 12:03:52 -0700 (PDT) From: Lv Zheng X-Google-Original-From: Lv Zheng To: "Rafael J . Wysocki" , "Rafael J . Wysocki" , Robert Moore , Len Brown , Lv Zheng , "David E . Box" Cc: linux-acpi@vger.kernel.org Subject: [PATCH 5/7] ACPICA: Disassembler: Fix for Divide() support, new support for test suite Date: Tue, 18 Oct 2016 03:03:39 +0800 Message-Id: <214d84a471d141ac688949ee679101a57f5ca17a.1476725675.git.lv.zheng@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: 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 4b367408659af08fd44839866ec301285284e6f4 Fixes a problem with complex expressions where an illegal mix of legacy ASL and ASL+ could be emitted. Adds new support for ASLTS that disables some disassembler optimizations could be changed during a conversion to ASL+. These expressions are now emitted in legacy ASL instead of ASL+. Link: https://github.com/acpica/acpica/commit/4b367408 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng --- drivers/acpi/acpica/acglobal.h | 1 + drivers/acpi/acpica/aclocal.h | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h index 17f7bb8..b549e6d 100644 --- a/drivers/acpi/acpica/acglobal.h +++ b/drivers/acpi/acpica/acglobal.h @@ -318,6 +318,7 @@ ACPI_INIT_GLOBAL(u8, acpi_gbl_cstyle_disassembly, TRUE); ACPI_INIT_GLOBAL(u8, acpi_gbl_force_aml_disassembly, FALSE); ACPI_INIT_GLOBAL(u8, acpi_gbl_dm_opt_verbose, TRUE); ACPI_INIT_GLOBAL(u8, acpi_gbl_dm_emit_external_opcodes, FALSE); +ACPI_INIT_GLOBAL(u8, acpi_gbl_do_disassembler_optimizations, TRUE); ACPI_GLOBAL(u8, acpi_gbl_dm_opt_disasm); ACPI_GLOBAL(u8, acpi_gbl_dm_opt_listing); diff --git a/drivers/acpi/acpica/aclocal.h b/drivers/acpi/acpica/aclocal.h index dff1207..7926600 100644 --- a/drivers/acpi/acpica/aclocal.h +++ b/drivers/acpi/acpica/aclocal.h @@ -765,7 +765,7 @@ union acpi_parse_value { union acpi_parse_value value; /* Value or args associated with the opcode */\ u8 arg_list_length; /* Number of elements in the arg list */\ ACPI_DISASM_ONLY_MEMBERS (\ - u8 disasm_flags; /* Used during AML disassembly */\ + u16 disasm_flags; /* Used during AML disassembly */\ u8 disasm_opcode; /* Subtype used for disassembly */\ char *operator_symbol;/* Used for C-style operator name strings */\ char aml_op_name[16]) /* Op name (debug only) */ @@ -868,14 +868,15 @@ struct acpi_parse_state { /* Parse object disasm_flags */ -#define ACPI_PARSEOP_IGNORE 0x01 -#define ACPI_PARSEOP_PARAMETER_LIST 0x02 -#define ACPI_PARSEOP_EMPTY_TERMLIST 0x04 -#define ACPI_PARSEOP_PREDEFINED_CHECKED 0x08 -#define ACPI_PARSEOP_CLOSING_PAREN 0x10 -#define ACPI_PARSEOP_COMPOUND_ASSIGNMENT 0x20 -#define ACPI_PARSEOP_ASSIGNMENT 0x40 -#define ACPI_PARSEOP_ELSEIF 0x80 +#define ACPI_PARSEOP_IGNORE 0x0001 +#define ACPI_PARSEOP_PARAMETER_LIST 0x0002 +#define ACPI_PARSEOP_EMPTY_TERMLIST 0x0004 +#define ACPI_PARSEOP_PREDEFINED_CHECKED 0x0008 +#define ACPI_PARSEOP_CLOSING_PAREN 0x0010 +#define ACPI_PARSEOP_COMPOUND_ASSIGNMENT 0x0020 +#define ACPI_PARSEOP_ASSIGNMENT 0x0040 +#define ACPI_PARSEOP_ELSEIF 0x0080 +#define ACPI_PARSEOP_LEGACY_ASL_ONLY 0x0100 /***************************************************************************** *