Skip to contentSkip to conversation

ACPICA: 20141107 Release

PATCH In review Lv Zheng 2 participants 8 messages Nov 27, 2014 – Dec 3, 2014

Subsystems (2)
lore
Share & tools
lore

Lv Zheng

author
#0 lore raw

cover ACPICA: 20141107 Release

The 20141107 ACPICA kernel-resident subsystem updates are linuxized based on the pm/linux-next branch to form this patchset.

The patchset has passed the following build/boot tests. Build tests are performed as follows:
1. i386 + default + COFNIG_ACPI=y
2. i386 + allyes + CONFIG_ACPI=y
3. i386 + default + COFNIG_ACPI=n
4. i386 + allyes + CONFIG_ACPI=n
5. x86_64 + default + COFNIG_ACPI=y
6. x86_64 + allyes + CONFIG_ACPI=y
7. x86_64 + default + COFNIG_ACPI=n
8. x86_64 + allyes + CONFIG_ACPI=n
Boot tests are performed as follows:
1. i386 + default + COFNIG_ACPI=y
2. x86_64 + default + COFNIG_ACPI=y
Where:
1. i386: machine named as "Dell Inspiron Mini 1010"
2. x86_64: machine named as "HP Compaq 8200 Elite SFF PC"
3. default: kernel configuration with following items enabled:
All hardware drivers related to the machines of i386/x86_64 All drivers/acpi configurations
All platform drivers

The divergences checking result:
Before applying (20140926 Release):
852 lines
After applying (20141107 Release):
852 lines

Bob Moore (6):
ACPICA: iASL: Add support for to_PLD macro.
ACPICA: acpiexec: Add option to specify an object initialization
file.
ACPICA: Disassembler: Add support for C-style operators and
expressions.
ACPICA: Disassembler: Update for C-style expressions.
ACPICA: Disassembler: Emit correct string for 0 stop bits.
ACPICA: Update version to 20141107.

 drivers/acpi/acpica/acglobal.h |    1 +
 drivers/acpi/acpica/aclocal.h  |    3 +++
 drivers/acpi/acpica/utresrc.c  |    2 +-
 drivers/acpi/acpica/utxface.c  |    4 +++-
 drivers/acpi/acpica/utxfinit.c |   11 +++++++++++
 include/acpi/acbuffer.h        |   14 +++++++++++---
 include/acpi/acpixf.h          |    2 +-
 7 files changed, 31 insertions(+), 6 deletions(-)
Signature · 1 line
1.7.10
author
#1 lore raw

PATCH 1/6 ACPICA: iASL: Add support for to_PLD macro.

From: Bob Moore <[email protected]>

This macro is intended to simplify the constuction of _PLD buffers.
NOTE: Prototype only, subject to change before this macro is added to the ACPI specification. David E. Box.

---
 drivers/acpi/acpica/utxface.c |    4 +++-
 include/acpi/acbuffer.h       |   14 +++++++++++---
 2 files changed, 14 insertions(+), 4 deletions(-)
drivers/acpi/acpica/utxface.c +3 -1
index 502a849..49c873c 100644
@@ -531,7 +531,9 @@ acpi_decode_pld_buffer(u8 *in_buffer,
 	ACPI_MOVE_32_TO_32(&dword, &buffer[0]);
 	pld_info->revision = ACPI_PLD_GET_REVISION(&dword);
 	pld_info->ignore_color = ACPI_PLD_GET_IGNORE_COLOR(&dword);
-	pld_info->color = ACPI_PLD_GET_COLOR(&dword);
+	pld_info->red = ACPI_PLD_GET_RED(&dword);
+	pld_info->green = ACPI_PLD_GET_GREEN(&dword);
+	pld_info->blue = ACPI_PLD_GET_BLUE(&dword);
 
 	/* Second 32-bit DWord */
 
include/acpi/acbuffer.h +11 -3
index 88cb477..d5ec6c8 100644
@@ -111,7 +111,9 @@ struct acpi_gtm_info {
 struct acpi_pld_info {
 	u8 revision;
 	u8 ignore_color;
-	u32 color;
+	u8 red;
+	u8 green;
+	u8 blue;
 	u16 width;
 	u16 height;
 	u8 user_visible;
@@ -155,8 +157,14 @@ struct acpi_pld_info {
 #define ACPI_PLD_GET_IGNORE_COLOR(dword)        ACPI_GET_BITS (dword, 7, ACPI_1BIT_MASK)
 #define ACPI_PLD_SET_IGNORE_COLOR(dword,value)  ACPI_SET_BITS (dword, 7, ACPI_1BIT_MASK, value)	/* Offset 7, Len 1 */
 
-#define ACPI_PLD_GET_COLOR(dword)               ACPI_GET_BITS (dword, 8, ACPI_24BIT_MASK)
-#define ACPI_PLD_SET_COLOR(dword,value)         ACPI_SET_BITS (dword, 8, ACPI_24BIT_MASK, value)	/* Offset 8, Len 24 */
+#define ACPI_PLD_GET_RED(dword)                 ACPI_GET_BITS (dword, 8, ACPI_8BIT_MASK)
+#define ACPI_PLD_SET_RED(dword,value)           ACPI_SET_BITS (dword, 8, ACPI_8BIT_MASK, value)	/* Offset 8, Len 8 */
+
+#define ACPI_PLD_GET_GREEN(dword)               ACPI_GET_BITS (dword, 16, ACPI_8BIT_MASK)
+#define ACPI_PLD_SET_GREEN(dword,value)         ACPI_SET_BITS (dword, 16, ACPI_8BIT_MASK, value)	/* Offset 16, Len 8 */
+
+#define ACPI_PLD_GET_BLUE(dword)                ACPI_GET_BITS (dword, 24, ACPI_8BIT_MASK)
+#define ACPI_PLD_SET_BLUE(dword,value)          ACPI_SET_BITS (dword, 24, ACPI_8BIT_MASK, value)	/* Offset 24, Len 8 */
 
 /* Second 32-bit dword, bits 33:63 */
 
Signature · 1 line
1.7.10
author
#2 lore raw

PATCH 2/6 ACPICA: acpiexec: Add option to specify an object initialization file.

In reply to Lv Zheng

From: Bob Moore <[email protected]>

This option (-fi) allows the specification of a file that is used to specify initialization values for individual namespace objects. Each line in the file is in the format:

<ACPI pathname> <Integer Value>

This patch only affects acpiexec which is not in the Linux kernel.

---
 drivers/acpi/acpica/utxfinit.c |   11 +++++++++++
 1 file changed, 11 insertions(+)
drivers/acpi/acpica/utxfinit.c +11 -0
index 13380d8..b1fd688 100644
@@ -53,6 +53,9 @@
 #define _COMPONENT          ACPI_UTILITIES
 ACPI_MODULE_NAME("utxfinit")
 
+/* For acpi_exec only */
+void ae_do_object_overrides(void);
+
 /*******************************************************************************
  *
  * FUNCTION:    acpi_initialize_subsystem
@@ -65,6 +68,7 @@ ACPI_MODULE_NAME("utxfinit")
  *              called, so any early initialization belongs here.
  *
  ******************************************************************************/
+
 acpi_status __init acpi_initialize_subsystem(void)
 {
 	acpi_status status;
@@ -275,6 +279,13 @@ acpi_status __init acpi_initialize_objects(u32 flags)
 			return_ACPI_STATUS(status);
 		}
 	}
+#ifdef ACPI_EXEC_APP
+	/*
+	 * This call implements the "initialization file" option for acpi_exec.
+	 * This is the precise point that we want to perform the overrides.
+	 */
+	ae_do_object_overrides();
+#endif
 
 	/*
 	 * Execute any module-level code that was detected during the table load
Signature · 1 line
1.7.10
author
#3 lore raw

PATCH 3/6 ACPICA: Disassembler: Add support for C-style operators and expressions.

In reply to Lv Zheng

From: Bob Moore <[email protected]>

Now emit ASL+ code which includes C-style operators. Optionally, legacy text ASL operators can still be emitted.

This patch only affects compiler/disassembler support which is not in the Linux kernel.

---
 drivers/acpi/acpica/acglobal.h |    1 +
 drivers/acpi/acpica/aclocal.h  |    2 ++
 2 files changed, 3 insertions(+)
drivers/acpi/acpica/acglobal.h +1 -0
index ebf02cc..7f60582 100644
@@ -305,6 +305,7 @@ ACPI_INIT_GLOBAL(u8, acpi_gbl_db_output_flags, ACPI_DB_CONSOLE_OUTPUT);
 
 ACPI_INIT_GLOBAL(u8, acpi_gbl_no_resource_disassembly, FALSE);
 ACPI_INIT_GLOBAL(u8, acpi_gbl_ignore_noop_operator, FALSE);
+ACPI_INIT_GLOBAL(u8, acpi_gbl_cstyle_disassembly, TRUE);
 
 ACPI_GLOBAL(u8, acpi_gbl_db_opt_disasm);
 ACPI_GLOBAL(u8, acpi_gbl_db_opt_verbose);
drivers/acpi/acpica/aclocal.h +2 -0
index c00e7e4..1c218d9 100644
@@ -722,6 +722,7 @@ union acpi_parse_value {
 	ACPI_DISASM_ONLY_MEMBERS (\
 	u8                              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) */
 
 /* Flags for disasm_flags field above */
@@ -827,6 +828,7 @@ struct acpi_parse_state {
 #define ACPI_PARSEOP_EMPTY_TERMLIST     0x04
 #define ACPI_PARSEOP_PREDEF_CHECKED     0x08
 #define ACPI_PARSEOP_SPECIAL            0x10
+#define ACPI_PARSEOP_COMPOUND           0x20
 
 /*****************************************************************************
  *
Signature · 1 line
1.7.10
author
#4 lore raw

PATCH 4/6 ACPICA: Disassembler: Update for C-style expressions.

In reply to Lv Zheng

From: Bob Moore <[email protected]>

Add extra set of parens for assignments within an expression.

This patch only affects compiler support which is not in the Linux kernel.

---
 drivers/acpi/acpica/aclocal.h |    1 +
 1 file changed, 1 insertion(+)
drivers/acpi/acpica/aclocal.h +1 -0
index 1c218d9..80c74e9 100644
@@ -829,6 +829,7 @@ struct acpi_parse_state {
 #define ACPI_PARSEOP_PREDEF_CHECKED     0x08
 #define ACPI_PARSEOP_SPECIAL            0x10
 #define ACPI_PARSEOP_COMPOUND           0x20
+#define ACPI_PARSEOP_ASSIGNMENT         0x40
 
 /*****************************************************************************
  *
Signature · 1 line
1.7.10
author
#5 lore raw

PATCH 5/6 ACPICA: Disassembler: Emit correct string for 0 stop bits.

In reply to Lv Zheng

From: Bob Moore <[email protected]>

Was stop_bits_none, corrected to stop_bits_zero.
David E. Box.

---
 drivers/acpi/acpica/utresrc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/acpica/utresrc.c +1 -1
index 5cd017c..bc1ff82 100644
@@ -263,7 +263,7 @@ const char *acpi_gbl_bpb_decode[] = {
 /* UART serial bus stop bits */
 
 const char *acpi_gbl_sb_decode[] = {
-	"StopBitsNone",
+	"StopBitsZero",
 	"StopBitsOne",
 	"StopBitsOnePlusHalf",
 	"StopBitsTwo"
Signature · 1 line
1.7.10
author
#6 lore raw

PATCH 6/6 ACPICA: Update version to 20141107.

In reply to Lv Zheng

From: Bob Moore <[email protected]>

Version 20141107.

---
 include/acpi/acpixf.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/acpi/acpixf.h +1 -1
index ab2acf6..5ba7846 100644
@@ -46,7 +46,7 @@
 
 /* Current ACPICA subsystem version in YYYYMMDD format */
 
-#define ACPI_CA_VERSION                 0x20140926
+#define ACPI_CA_VERSION                 0x20141107
 
 #include <acpi/acconfig.h>
 #include <acpi/actypes.h>
Signature · 1 line
1.7.10
#7 lore raw
In reply to Lv Zheng
Quoted 40 lines · Lv Zheng

The 20141107 ACPICA kernel-resident subsystem updates are linuxized based on the pm/linux-next branch to form this patchset.

The patchset has passed the following build/boot tests. Build tests are performed as follows:
1. i386 + default + COFNIG_ACPI=y
2. i386 + allyes + CONFIG_ACPI=y
3. i386 + default + COFNIG_ACPI=n
4. i386 + allyes + CONFIG_ACPI=n
5. x86_64 + default + COFNIG_ACPI=y
6. x86_64 + allyes + CONFIG_ACPI=y
7. x86_64 + default + COFNIG_ACPI=n
8. x86_64 + allyes + CONFIG_ACPI=n
Boot tests are performed as follows:
1. i386 + default + COFNIG_ACPI=y
2. x86_64 + default + COFNIG_ACPI=y
Where:
1. i386: machine named as "Dell Inspiron Mini 1010"
2. x86_64: machine named as "HP Compaq 8200 Elite SFF PC"
3. default: kernel configuration with following items enabled:
All hardware drivers related to the machines of i386/x86_64 All drivers/acpi configurations
All platform drivers

The divergences checking result:
Before applying (20140926 Release):
852 lines
After applying (20141107 Release):
852 lines

Bob Moore (6):
ACPICA: iASL: Add support for to_PLD macro.
ACPICA: acpiexec: Add option to specify an object initialization
file.
ACPICA: Disassembler: Add support for C-style operators and
expressions.
ACPICA: Disassembler: Update for C-style expressions.
ACPICA: Disassembler: Emit correct string for 0 stop bits.
ACPICA: Update version to 20141107.

Quoted 8 lines
 drivers/acpi/acpica/acglobal.h |    1 +
 drivers/acpi/acpica/aclocal.h  |    3 +++
 drivers/acpi/acpica/utresrc.c  |    2 +-
 drivers/acpi/acpica/utxface.c  |    4 +++-
 drivers/acpi/acpica/utxfinit.c |   11 +++++++++++
 include/acpi/acbuffer.h        |   14 +++++++++++---
 include/acpi/acpixf.h          |    2 +-
 7 files changed, 31 insertions(+), 6 deletions(-)

All queued up for 3.19-rc1, thanks!

Signature · 2 lines
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.