linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lv Zheng <lv.zheng@intel.com>
To: "Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
	"Rafael J . Wysocki" <rjw@rjwysocki.net>,
	Len Brown <len.brown@intel.com>
Cc: Lv Zheng <lv.zheng@intel.com>, Lv Zheng <zetalog@gmail.com>,
	linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
	"David E. Box" <david.e.box@linux.intel.com>,
	Bob Moore <robert.moore@intel.com>
Subject: [PATCH 11/18] ACPICA: Disassembler: Add Switch/Case disassembly support
Date: Wed, 28 Dec 2016 15:29:17 +0800	[thread overview]
Message-ID: <ea863e5a350f61c96f3a486f7d51afd85fa1d29d.1482821486.git.lv.zheng@intel.com> (raw)
In-Reply-To: <cover.1482821486.git.lv.zheng@intel.com>

From: "David E. Box" <david.e.box@linux.intel.com>

ACPICA commit 0f6cc80e8af519a3c31184367b0a9be7a399cf53

iasl compiles Switch/Case statements into a single iteration While
loop with If/Else statements. This patch adds support to recognize
this generated compiler output and disassemble it back to the original
Switch statement.

Linux kernel is not affected by this patch.

Link: https://github.com/acpica/acpica/commit/0f6cc80e
Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
 drivers/acpi/acpica/aclocal.h | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/acpica/aclocal.h b/drivers/acpi/acpica/aclocal.h
index 7926600..7b97801 100644
--- a/drivers/acpi/acpica/aclocal.h
+++ b/drivers/acpi/acpica/aclocal.h
@@ -770,7 +770,7 @@ union acpi_parse_value {
 	char                            *operator_symbol;/* Used for C-style operator name strings */\
 	char                            aml_op_name[16])	/* Op name (debug only) */
 
-/* Flags for disasm_flags field above */
+/* Internal opcodes for disasm_opcode field above */
 
 #define ACPI_DASM_BUFFER                0x00	/* Buffer is a simple data buffer */
 #define ACPI_DASM_RESOURCE              0x01	/* Buffer is a Resource Descriptor */
@@ -783,7 +783,10 @@ union acpi_parse_value {
 #define ACPI_DASM_LNOT_PREFIX           0x08	/* Start of a Lnot_equal (etc.) pair of opcodes */
 #define ACPI_DASM_LNOT_SUFFIX           0x09	/* End  of a Lnot_equal (etc.) pair of opcodes */
 #define ACPI_DASM_HID_STRING            0x0A	/* String is a _HID or _CID */
-#define ACPI_DASM_IGNORE                0x0B	/* Not used at this time */
+#define ACPI_DASM_IGNORE_SINGLE         0x0B	/* Ignore the opcode but not it's children */
+#define ACPI_DASM_SWITCH_PREDICATE      0x0C	/* Object is a predicate for a Switch or Case block */
+#define ACPI_DASM_CASE                  0x0D	/* If/Else is a Case in a Switch/Case block */
+#define ACPI_DASM_DEFAULT               0x0E	/* Else is a Default in a Switch/Case block */
 
 /*
  * Generic operation (for example:  If, While, Store)
-- 
2.7.4

  parent reply	other threads:[~2016-12-28  7:29 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-28  7:28 [PATCH 00/18] ACPICA 20161222 Release Lv Zheng
2016-12-28  7:28 ` [PATCH 01/18] ACPICA: Debugger: Rename debugger OSL names Lv Zheng
2016-12-28  7:28 ` [PATCH 02/18] ACPICA: Hardware: Remove bit_offset masking support Lv Zheng
2016-12-28  7:28 ` [PATCH 03/18] ACPICA: Hardware: Add access_width/bit_offset support in acpi_hw_write() Lv Zheng
2016-12-28  7:28 ` [PATCH 04/18] ACPICA: Utilities: Add power of two rounding support Lv Zheng
2016-12-28  7:28 ` [PATCH 05/18] ACPICA: Hardware: Sort access bit width algorithm Lv Zheng
2016-12-28  7:28 ` [PATCH 06/18] ACPICA: Macro header: Fix some typos in comments. No functional change Lv Zheng
2016-12-28  7:28 ` [PATCH 07/18] ACPICA: Hardware: Add sleep register hooks Lv Zheng
2016-12-28  7:28 ` [PATCH 08/18] ACPICA: Linux-specific header: Add support for s390x compilation Lv Zheng
2016-12-28  7:29 ` [PATCH 09/18] ACPICA: MSVC: Fix MSVC6 build issues Lv Zheng
2016-12-28  7:29 ` [PATCH 10/18] ACPICA: EFI: Add efihello demo application Lv Zheng
2016-12-28  7:29 ` Lv Zheng [this message]
2016-12-28  7:29 ` [PATCH 12/18] ACPICA: Utilities: Update debug output Lv Zheng
2016-12-28  7:29 ` [PATCH 13/18] ACPICA: Resources: Not a valid resource if buffer length too long Lv Zheng
2016-12-28  7:29 ` [PATCH 15/18] ACPICA: Parser: Allow method invocations as target operands Lv Zheng
2016-12-28  7:29 ` [PATCH 16/18] ACPICA: Fix a problem with recent extra support for control method invocations Lv Zheng
2016-12-28  7:29 ` [PATCH 17/18] ACPICA: Parser: Update parse info table for some operators Lv Zheng
2016-12-28  7:30 ` [PATCH 18/18] ACPICA: Update version to 20161222 Lv Zheng
2017-01-02 22:19 ` [PATCH 00/18] ACPICA 20161222 Release Rafael J. Wysocki
2017-01-03  5:23   ` Zheng, Lv

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ea863e5a350f61c96f3a486f7d51afd85fa1d29d.1482821486.git.lv.zheng@intel.com \
    --to=lv.zheng@intel.com \
    --cc=david.e.box@linux.intel.com \
    --cc=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rjw@rjwysocki.net \
    --cc=robert.moore@intel.com \
    --cc=zetalog@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).