All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/30] ACPICA: 20160629 Release
@ 2016-08-04  8:36 Lv Zheng
  2016-08-04  8:36 ` [PATCH 01/30] ACPICA: Fix deconstification warnings (-Wcast-qual) with function traces Lv Zheng
                   ` (29 more replies)
  0 siblings, 30 replies; 37+ messages in thread
From: Lv Zheng @ 2016-08-04  8:36 UTC (permalink / raw)
  To: Rafael J. Wysocki, Rafael J. Wysocki, Len Brown
  Cc: Lv Zheng, Lv Zheng, linux-acpi

The 20160629 ACPICA kernel-resident subsystem updates are linuxized based
on the linux-pm/linux-next branch.

The patchset has passed the following build/boot tests.
Build tests are performed as follows:
1. i386 + allyes
2. i386 + allno
3. i386 + default + ACPI_DEBUGGER=y
4. i386 + default + ACPI_DEBUGGER=n + ACPI_DEBUG=y
5. i386 + default + ACPI_DEBUG=n + ACPI=y
6. i386 + default + ACPI=n
7. x86_64 + allyes
8. x86_64 + allno
9. x86_64 + default + ACPI_DEBUGGER=y
10.x86_64 + default + ACPI_DEBUGGER=n + ACPI_DEBUG=y
11.x86_64 + default + ACPI_DEBUG=n + ACPI=y
12.x86_64 + default + ACPI=n
Boot tests are performed as follows:
1. i386 + default + ACPI_DEBUGGER=y
2. x86_64 + default + ACPI_DEBUGGER=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 "drivers/platform" drivers
   All other drivers that link the APIs provided by ACPICA subsystem

The divergences checking result:
Before applying (20160422 Release):
  494 lines
After applying (20160629 Release):
  508 lines

Bob Moore (8):
  ACPICA: Interpreter: Remove temporary code for External() opcode
  ACPICA: Debugger: Extend some max line lengths
  ACPICA: Disassembler: Add option to emit embedded External
    operators/opcodes
  ACPICA: Simplify configuration for "Max Loops" system parameter
  ACPICA: iASL/Disassembler: Add a check for missing filename
  ACPICA: Use os_allocate_zeroed
  ACPICA: FADT support cleanup
  ACPICA: Update version to 20160629

Jung-uk Kim (2):
  ACPICA: Fix deconstification warnings (-Wcast-qual) with function
    traces.
  ACPICA: Fix deconstification warnings (-Wcast-qual) with
    acpi_ns_root_initialize().

Lv Zheng (20):
  ACPICA: Utilities: Introduce facility to allow Linux to set correct
    logging levels
  ACPICA: Divergence: Port declarators back to ACPICA
  ACPICA: Events: Introduce acpi_mask_gpe() to implement GPE masking
    mechanism
  ACPI / sysfs: Update /sys/firmware/acpi/interrupts/gpexx using new
    GPE masking mechanism
  ACPI / sysfs: Provide quirk mechanism to prevent GPE flooding
  ACPICA: Debugger: Fix wrong inclusions in dbfileio.c
  ACPICA: OSL: Add correct acpi_gbl_debug_timeout export to allow
    acpiexec to link
  ACPICA: acpidump: Fix a duplicate variable definition
  ACPICA: Applications: Enable USE_NATIVE_ALLOCATE_ZEROED environment
    for all applications
  ACPICA: Clib: Fix build issues when ACPI_USE_STANDARD_HEADERS is not
    defined by converting size_t to acpi_size
  ACPICA: Clib: Cleanup va_arg related code
  ACPICA: Clib: Fix wrong mini C library usage
  ACPICA: Clib/EFI: Fix wrong order of standard integer types/IO
    handles
  ACPICA: MSVC9: Fix <sys/stat.h> inclusion order issue
  ACPICA: Clib: Add -nostdinc support for EFI layer
  ACPICA: Clib: Eliminate acpi_os_XXXFile()/acpi_log_error and link
    clibrary fxxx()/errno/perror() instead
  ACPICA: Applications: Fix a potential issue that help messages may be
    dumped to acpi_gbl_debug_file
  ACPICA: EFI: Port acpidump to EDK2 environment
  ACPICA: OSL: Cleanup the inclusion order of the compiler-specific
    headers
  ACPICA: OSL: Fix a regression that old GCC requires a workaround for
    strchr()

 Documentation/kernel-parameters.txt                |   10 +
 drivers/acpi/acpica/acapps.h                       |   10 +-
 drivers/acpi/acpica/acevents.h                     |    3 +
 drivers/acpi/acpica/acglobal.h                     |    2 +
 drivers/acpi/acpica/aclocal.h                      |    2 +
 drivers/acpi/acpica/actables.h                     |    3 +-
 drivers/acpi/acpica/acutils.h                      |   36 ++--
 drivers/acpi/acpica/dbfileio.c                     |   20 +-
 drivers/acpi/acpica/dbobject.c                     |    4 +-
 drivers/acpi/acpica/dsutils.c                      |   17 +-
 drivers/acpi/acpica/evgpe.c                        |   57 +++++
 drivers/acpi/acpica/evxfgpe.c                      |   43 ++++
 drivers/acpi/acpica/hwgpe.c                        |   23 ++-
 drivers/acpi/acpica/nsaccess.c                     |    6 +-
 drivers/acpi/acpica/nsdump.c                       |    2 +-
 drivers/acpi/acpica/tbfadt.c                       |   10 +-
 drivers/acpi/acpica/tbutils.c                      |    3 +-
 drivers/acpi/acpica/tbxface.c                      |    4 +-
 drivers/acpi/acpica/tbxfload.c                     |    4 +-
 drivers/acpi/acpica/tbxfroot.c                     |    5 +-
 drivers/acpi/acpica/utbuffer.c                     |   30 ++-
 drivers/acpi/acpica/utdebug.c                      |   61 +++---
 drivers/acpi/acpica/utdecode.c                     |    2 +-
 drivers/acpi/acpica/utinit.c                       |    2 +-
 drivers/acpi/acpica/utpredef.c                     |    2 -
 drivers/acpi/acpica/utprint.c                      |  105 ++++++++--
 drivers/acpi/acpica/uttrack.c                      |    4 +-
 drivers/acpi/acpica/utxface.c                      |    2 +-
 drivers/acpi/acpica/utxfinit.c                     |    6 +-
 drivers/acpi/internal.h                            |    1 +
 drivers/acpi/scan.c                                |    1 +
 drivers/acpi/sleep.c                               |    2 +-
 drivers/acpi/sysfs.c                               |   89 +++++++-
 include/acpi/acconfig.h                            |    4 +
 include/acpi/acoutput.h                            |    6 +-
 include/acpi/acpiosxf.h                            |   43 +---
 include/acpi/acpixf.h                              |   37 ++--
 include/acpi/actbl.h                               |  164 ++++++++-------
 include/acpi/actypes.h                             |   48 ++---
 include/acpi/platform/acenv.h                      |   90 +++-----
 include/acpi/platform/acenvex.h                    |   21 +-
 include/acpi/platform/acgcc.h                      |   17 +-
 include/acpi/platform/acgccex.h                    |   58 ++++++
 include/acpi/platform/aclinux.h                    |   22 +-
 include/acpi/platform/aclinuxex.h                  |    2 +-
 tools/power/acpi/common/cmfsize.c                  |   13 +-
 tools/power/acpi/common/getopt.c                   |    4 +-
 .../acpi/os_specific/service_layers/oslibcfs.c     |  217 --------------------
 .../acpi/os_specific/service_layers/osunixxf.c     |    3 -
 tools/power/acpi/tools/acpidump/Makefile           |    1 -
 tools/power/acpi/tools/acpidump/acpidump.h         |   12 +-
 tools/power/acpi/tools/acpidump/apdump.c           |   71 +++----
 tools/power/acpi/tools/acpidump/apfiles.c          |   56 ++---
 tools/power/acpi/tools/acpidump/apmain.c           |   33 +--
 54 files changed, 796 insertions(+), 697 deletions(-)
 create mode 100644 include/acpi/platform/acgccex.h
 delete mode 100644 tools/power/acpi/os_specific/service_layers/oslibcfs.c

-- 
1.7.10


^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 01/30] ACPICA: Fix deconstification warnings (-Wcast-qual) with function traces.
  2016-08-04  8:36 [PATCH 00/30] ACPICA: 20160629 Release Lv Zheng
@ 2016-08-04  8:36 ` Lv Zheng
  2016-08-04  8:42   ` [UPDATE PATCH " Lv Zheng
  2016-08-04  8:42 ` [PATCH 02/30] ACPICA: Fix deconstification warnings (-Wcast-qual) with acpi_ns_root_initialize() Lv Zheng
                   ` (28 subsequent siblings)
  29 siblings, 1 reply; 37+ messages in thread
From: Lv Zheng @ 2016-08-04  8:36 UTC (permalink / raw)
  To: Rafael J. Wysocki, Rafael J. Wysocki, Len Brown
  Cc: Lv Zheng, Lv Zheng, linux-acpi, Bob Moore

From: Jung-uk Kim <jkim@free_BSD.org>

ACPICA commit f722da0372261331b74d3ac67645bba912a21643

Link: https://github.com/acpica/acpica/commit/f722da03
Signed-off-by: Jung-uk Kim <jkim@free_BSD.org>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
 drivers/acpi/acpica/acutils.h  |    5 +++++
 drivers/acpi/acpica/utdebug.c  |   37 +++++++++++++++++++++++++++++++++++++
 drivers/acpi/acpica/utdecode.c |    2 +-
 include/acpi/acoutput.h        |    6 +++++-
 4 files changed, 48 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/acpica/acutils.h b/drivers/acpi/acpica/acutils.h
index a7dbb2b..0bb6325 100644
--- a/drivers/acpi/acpica/acutils.h
+++ b/drivers/acpi/acpica/acutils.h
@@ -318,6 +318,11 @@ acpi_ut_ptr_exit(u32 line_number,
 		 const char *module_name, u32 component_id, u8 *ptr);
 
 void
+acpi_ut_str_exit(u32 line_number,
+		 const char *function_name,
+		 const char *module_name, u32 component_id, const char *string);
+
+void
 acpi_ut_debug_dump_buffer(u8 *buffer, u32 count, u32 display, u32 component_id);
 
 void acpi_ut_dump_buffer(u8 *buffer, u32 count, u32 display, u32 offset);
diff --git a/drivers/acpi/acpica/utdebug.c b/drivers/acpi/acpica/utdebug.c
index 5744222..84c0853 100644
--- a/drivers/acpi/acpica/utdebug.c
+++ b/drivers/acpi/acpica/utdebug.c
@@ -562,6 +562,43 @@ acpi_ut_ptr_exit(u32 line_number,
 
 /*******************************************************************************
  *
+ * FUNCTION:    acpi_ut_str_exit
+ *
+ * PARAMETERS:  line_number         - Caller's line number
+ *              function_name       - Caller's procedure name
+ *              module_name         - Caller's module name
+ *              component_id        - Caller's component ID
+ *              string              - String to display
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is
+ *              set in debug_level. Prints exit value also.
+ *
+ ******************************************************************************/
+
+void
+acpi_ut_str_exit(u32 line_number,
+		 const char *function_name,
+		 const char *module_name, u32 component_id, const char *string)
+{
+
+	/* Check if enabled up-front for performance */
+
+	if (ACPI_IS_DEBUG_ENABLED(ACPI_LV_FUNCTIONS, component_id)) {
+		acpi_debug_print(ACPI_LV_FUNCTIONS,
+				 line_number, function_name, module_name,
+				 component_id, "%s %s\n",
+				 acpi_gbl_function_exit_prefix, string);
+	}
+
+	if (acpi_gbl_nesting_level) {
+		acpi_gbl_nesting_level--;
+	}
+}
+
+/*******************************************************************************
+ *
  * FUNCTION:    acpi_trace_point
  *
  * PARAMETERS:  type                - Trace event type
diff --git a/drivers/acpi/acpica/utdecode.c b/drivers/acpi/acpica/utdecode.c
index efd7988..15728ad 100644
--- a/drivers/acpi/acpica/utdecode.c
+++ b/drivers/acpi/acpica/utdecode.c
@@ -253,7 +253,7 @@ const char *acpi_ut_get_object_type_name(union acpi_operand_object *obj_desc)
 		return_PTR("Invalid object");
 	}
 
-	return_PTR(acpi_ut_get_type_name(obj_desc->common.type));
+	return_STR(acpi_ut_get_type_name(obj_desc->common.type));
 }
 
 /*******************************************************************************
diff --git a/include/acpi/acoutput.h b/include/acpi/acoutput.h
index 34f601e..48eb4dd 100644
--- a/include/acpi/acoutput.h
+++ b/include/acpi/acoutput.h
@@ -366,7 +366,7 @@
 	ACPI_TRACE_ENTRY (name, acpi_ut_trace_u32, u32, value)
 
 #define ACPI_FUNCTION_TRACE_STR(name, string) \
-	ACPI_TRACE_ENTRY (name, acpi_ut_trace_str, char *, string)
+	ACPI_TRACE_ENTRY (name, acpi_ut_trace_str, const char *, string)
 
 #define ACPI_FUNCTION_ENTRY() \
 	acpi_ut_track_stack_ptr()
@@ -425,6 +425,9 @@
 #define return_PTR(pointer) \
 	ACPI_TRACE_EXIT (acpi_ut_ptr_exit, void *, pointer)
 
+#define return_STR(string) \
+	ACPI_TRACE_EXIT (acpi_ut_str_exit, const char *, string)
+
 #define return_VALUE(value) \
 	ACPI_TRACE_EXIT (acpi_ut_value_exit, u64, value)
 
@@ -478,6 +481,7 @@
 #define return_VOID                     return
 #define return_ACPI_STATUS(s)           return(s)
 #define return_PTR(s)                   return(s)
+#define return_STR(s)                   return(s)
 #define return_VALUE(s)                 return(s)
 #define return_UINT8(s)                 return(s)
 #define return_UINT32(s)                return(s)
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [UPDATE PATCH 01/30] ACPICA: Fix deconstification warnings (-Wcast-qual) with function traces.
  2016-08-04  8:36 ` [PATCH 01/30] ACPICA: Fix deconstification warnings (-Wcast-qual) with function traces Lv Zheng
@ 2016-08-04  8:42   ` Lv Zheng
  0 siblings, 0 replies; 37+ messages in thread
From: Lv Zheng @ 2016-08-04  8:42 UTC (permalink / raw)
  To: Rafael J. Wysocki, Rafael J. Wysocki, Len Brown
  Cc: Lv Zheng, Lv Zheng, linux-acpi, Jung-uk Kim, Bob Moore

From: Jung-uk Kim <jkim@FreeBSD.org>

(update due to email address wrongly converted by acpisrc)

ACPICA commit f722da0372261331b74d3ac67645bba912a21643

Link: https://github.com/acpica/acpica/commit/f722da03
Signed-off-by: Jung-uk Kim <jkim@FreeBSD.org>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
 drivers/acpi/acpica/acutils.h  |    5 +++++
 drivers/acpi/acpica/utdebug.c  |   37 +++++++++++++++++++++++++++++++++++++
 drivers/acpi/acpica/utdecode.c |    2 +-
 include/acpi/acoutput.h        |    6 +++++-
 4 files changed, 48 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/acpica/acutils.h b/drivers/acpi/acpica/acutils.h
index a7dbb2b..0bb6325 100644
--- a/drivers/acpi/acpica/acutils.h
+++ b/drivers/acpi/acpica/acutils.h
@@ -318,6 +318,11 @@ acpi_ut_ptr_exit(u32 line_number,
 		 const char *module_name, u32 component_id, u8 *ptr);
 
 void
+acpi_ut_str_exit(u32 line_number,
+		 const char *function_name,
+		 const char *module_name, u32 component_id, const char *string);
+
+void
 acpi_ut_debug_dump_buffer(u8 *buffer, u32 count, u32 display, u32 component_id);
 
 void acpi_ut_dump_buffer(u8 *buffer, u32 count, u32 display, u32 offset);
diff --git a/drivers/acpi/acpica/utdebug.c b/drivers/acpi/acpica/utdebug.c
index 5744222..84c0853 100644
--- a/drivers/acpi/acpica/utdebug.c
+++ b/drivers/acpi/acpica/utdebug.c
@@ -562,6 +562,43 @@ acpi_ut_ptr_exit(u32 line_number,
 
 /*******************************************************************************
  *
+ * FUNCTION:    acpi_ut_str_exit
+ *
+ * PARAMETERS:  line_number         - Caller's line number
+ *              function_name       - Caller's procedure name
+ *              module_name         - Caller's module name
+ *              component_id        - Caller's component ID
+ *              string              - String to display
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is
+ *              set in debug_level. Prints exit value also.
+ *
+ ******************************************************************************/
+
+void
+acpi_ut_str_exit(u32 line_number,
+		 const char *function_name,
+		 const char *module_name, u32 component_id, const char *string)
+{
+
+	/* Check if enabled up-front for performance */
+
+	if (ACPI_IS_DEBUG_ENABLED(ACPI_LV_FUNCTIONS, component_id)) {
+		acpi_debug_print(ACPI_LV_FUNCTIONS,
+				 line_number, function_name, module_name,
+				 component_id, "%s %s\n",
+				 acpi_gbl_function_exit_prefix, string);
+	}
+
+	if (acpi_gbl_nesting_level) {
+		acpi_gbl_nesting_level--;
+	}
+}
+
+/*******************************************************************************
+ *
  * FUNCTION:    acpi_trace_point
  *
  * PARAMETERS:  type                - Trace event type
diff --git a/drivers/acpi/acpica/utdecode.c b/drivers/acpi/acpica/utdecode.c
index efd7988..15728ad 100644
--- a/drivers/acpi/acpica/utdecode.c
+++ b/drivers/acpi/acpica/utdecode.c
@@ -253,7 +253,7 @@ const char *acpi_ut_get_object_type_name(union acpi_operand_object *obj_desc)
 		return_PTR("Invalid object");
 	}
 
-	return_PTR(acpi_ut_get_type_name(obj_desc->common.type));
+	return_STR(acpi_ut_get_type_name(obj_desc->common.type));
 }
 
 /*******************************************************************************
diff --git a/include/acpi/acoutput.h b/include/acpi/acoutput.h
index 34f601e..48eb4dd 100644
--- a/include/acpi/acoutput.h
+++ b/include/acpi/acoutput.h
@@ -366,7 +366,7 @@
 	ACPI_TRACE_ENTRY (name, acpi_ut_trace_u32, u32, value)
 
 #define ACPI_FUNCTION_TRACE_STR(name, string) \
-	ACPI_TRACE_ENTRY (name, acpi_ut_trace_str, char *, string)
+	ACPI_TRACE_ENTRY (name, acpi_ut_trace_str, const char *, string)
 
 #define ACPI_FUNCTION_ENTRY() \
 	acpi_ut_track_stack_ptr()
@@ -425,6 +425,9 @@
 #define return_PTR(pointer) \
 	ACPI_TRACE_EXIT (acpi_ut_ptr_exit, void *, pointer)
 
+#define return_STR(string) \
+	ACPI_TRACE_EXIT (acpi_ut_str_exit, const char *, string)
+
 #define return_VALUE(value) \
 	ACPI_TRACE_EXIT (acpi_ut_value_exit, u64, value)
 
@@ -478,6 +481,7 @@
 #define return_VOID                     return
 #define return_ACPI_STATUS(s)           return(s)
 #define return_PTR(s)                   return(s)
+#define return_STR(s)                   return(s)
 #define return_VALUE(s)                 return(s)
 #define return_UINT8(s)                 return(s)
 #define return_UINT32(s)                return(s)
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 02/30] ACPICA: Fix deconstification warnings (-Wcast-qual) with acpi_ns_root_initialize().
  2016-08-04  8:36 [PATCH 00/30] ACPICA: 20160629 Release Lv Zheng
  2016-08-04  8:36 ` [PATCH 01/30] ACPICA: Fix deconstification warnings (-Wcast-qual) with function traces Lv Zheng
@ 2016-08-04  8:42 ` Lv Zheng
  2016-08-04  8:42 ` [PATCH 03/30] ACPICA: Interpreter: Remove temporary code for External() opcode Lv Zheng
                   ` (27 subsequent siblings)
  29 siblings, 0 replies; 37+ messages in thread
From: Lv Zheng @ 2016-08-04  8:42 UTC (permalink / raw)
  To: Rafael J. Wysocki, Rafael J. Wysocki, Len Brown
  Cc: Lv Zheng, Lv Zheng, linux-acpi, Jung-uk Kim, Bob Moore

From: Jung-uk Kim <jkim@FreeBSD.org>

ACPICA commit 8b3b57c9d11d9c322e09cb06bedac7aa783458fd

Link: https://github.com/acpica/acpica/commit/8b3b57c9
Signed-off-by: Jung-uk Kim <jkim@FreeBSD.org>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
 drivers/acpi/acpica/nsaccess.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/acpi/acpica/nsaccess.c b/drivers/acpi/acpica/nsaccess.c
index 426a630..73f98d3 100644
--- a/drivers/acpi/acpica/nsaccess.c
+++ b/drivers/acpi/acpica/nsaccess.c
@@ -108,9 +108,9 @@ acpi_status acpi_ns_root_initialize(void)
 		}
 
 		status =
-		    acpi_ns_lookup(NULL, (char *)init_val->name, init_val->type,
-				   ACPI_IMODE_LOAD_PASS2, ACPI_NS_NO_UPSEARCH,
-				   NULL, &new_node);
+		    acpi_ns_lookup(NULL, ACPI_CAST_PTR(char, init_val->name),
+				   init_val->type, ACPI_IMODE_LOAD_PASS2,
+				   ACPI_NS_NO_UPSEARCH, NULL, &new_node);
 		if (ACPI_FAILURE(status)) {
 			ACPI_EXCEPTION((AE_INFO, status,
 					"Could not create predefined name %s",
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 03/30] ACPICA: Interpreter: Remove temporary code for External() opcode
  2016-08-04  8:36 [PATCH 00/30] ACPICA: 20160629 Release Lv Zheng
  2016-08-04  8:36 ` [PATCH 01/30] ACPICA: Fix deconstification warnings (-Wcast-qual) with function traces Lv Zheng
  2016-08-04  8:42 ` [PATCH 02/30] ACPICA: Fix deconstification warnings (-Wcast-qual) with acpi_ns_root_initialize() Lv Zheng
@ 2016-08-04  8:42 ` Lv Zheng
  2016-08-04  8:42 ` [PATCH 04/30] ACPICA: Utilities: Introduce facility to allow Linux to set correct logging levels Lv Zheng
                   ` (26 subsequent siblings)
  29 siblings, 0 replies; 37+ messages in thread
From: Lv Zheng @ 2016-08-04  8:42 UTC (permalink / raw)
  To: Rafael J. Wysocki, Rafael J. Wysocki, Len Brown
  Cc: Lv Zheng, Lv Zheng, linux-acpi, Bob Moore

From: Bob Moore <robert.moore@intel.com>

ACPICA commit f2d349f8a11efc0f438ad6903564f3a6755dc6b9

The interpreter should never see this opcode (it is used by
disassemblers), so the final implementation is to return an
error.

Link: https://github.com/acpica/acpica/commit/f2d349f8
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
 drivers/acpi/acpica/dsutils.c |   17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/drivers/acpi/acpica/dsutils.c b/drivers/acpi/acpica/dsutils.c
index f393de9..7d8ef52 100644
--- a/drivers/acpi/acpica/dsutils.c
+++ b/drivers/acpi/acpica/dsutils.c
@@ -565,15 +565,14 @@ acpi_ds_create_operand(struct acpi_walk_state *walk_state,
 					status = AE_OK;
 				} else if (parent_op->common.aml_opcode ==
 					   AML_EXTERNAL_OP) {
-
-					/* TBD: May only be temporary */
-
-					obj_desc =
-					    acpi_ut_create_string_object((acpi_size)name_length);
-
-					strncpy(obj_desc->string.pointer,
-						name_string, name_length);
-					status = AE_OK;
+					/*
+					 * This opcode should never appear here. It is used only
+					 * by AML disassemblers and is surrounded by an If(0)
+					 * by the ASL compiler.
+					 *
+					 * Therefore, if we see it here, it is a serious error.
+					 */
+					status = AE_AML_BAD_OPCODE;
 				} else {
 					/*
 					 * We just plain didn't find it -- which is a
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 04/30] ACPICA: Utilities: Introduce facility to allow Linux to set correct logging levels
  2016-08-04  8:36 [PATCH 00/30] ACPICA: 20160629 Release Lv Zheng
                   ` (2 preceding siblings ...)
  2016-08-04  8:42 ` [PATCH 03/30] ACPICA: Interpreter: Remove temporary code for External() opcode Lv Zheng
@ 2016-08-04  8:42 ` Lv Zheng
  2016-08-04  8:42 ` [PATCH 05/30] ACPICA: Debugger: Extend some max line lengths Lv Zheng
                   ` (25 subsequent siblings)
  29 siblings, 0 replies; 37+ messages in thread
From: Lv Zheng @ 2016-08-04  8:42 UTC (permalink / raw)
  To: Rafael J. Wysocki, Rafael J. Wysocki, Len Brown
  Cc: Lv Zheng, Lv Zheng, linux-acpi, Bob Moore

ACPICA commit 58c9e7b83ae35247e430c39363f55b6f70fa04a2

It is reported that the logging level of the ACPICA messages are not
correct in the Linux kernel. This patch fixes this issue. Lv Zheng.

Link: https://github.com/acpica/acpica/commit/58c9e7b8
Link: https://bugzilla.kernel.org/show_bug.cgi?id=117461
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
 drivers/acpi/acpica/acutils.h   |   12 ++++++++++++
 include/acpi/platform/aclinux.h |    8 ++++++++
 2 files changed, 20 insertions(+)

diff --git a/drivers/acpi/acpica/acutils.h b/drivers/acpi/acpica/acutils.h
index 0bb6325..91269a6 100644
--- a/drivers/acpi/acpica/acutils.h
+++ b/drivers/acpi/acpica/acutils.h
@@ -114,13 +114,25 @@ extern const char *acpi_gbl_pt_decode[];
 /*
  * Common error message prefixes
  */
+#ifndef ACPI_MSG_ERROR
 #define ACPI_MSG_ERROR          "ACPI Error: "
+#endif
+#ifndef ACPI_MSG_EXCEPTION
 #define ACPI_MSG_EXCEPTION      "ACPI Exception: "
+#endif
+#ifndef ACPI_MSG_WARNING
 #define ACPI_MSG_WARNING        "ACPI Warning: "
+#endif
+#ifndef ACPI_MSG_INFO
 #define ACPI_MSG_INFO           "ACPI: "
+#endif
 
+#ifndef ACPI_MSG_BIOS_ERROR
 #define ACPI_MSG_BIOS_ERROR     "ACPI BIOS Error (bug): "
+#endif
+#ifndef ACPI_MSG_BIOS_WARNING
 #define ACPI_MSG_BIOS_WARNING   "ACPI BIOS Warning (bug): "
+#endif
 
 /*
  * Common message suffix
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h
index 93b61b1..296a276 100644
--- a/include/acpi/platform/aclinux.h
+++ b/include/acpi/platform/aclinux.h
@@ -168,6 +168,14 @@
 #define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_next_filename
 #define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_close_directory
 
+#define ACPI_MSG_ERROR          KERN_ERR "ACPI Error: "
+#define ACPI_MSG_EXCEPTION      KERN_ERR "ACPI Exception: "
+#define ACPI_MSG_WARNING        KERN_WARNING "ACPI Warning: "
+#define ACPI_MSG_INFO           KERN_INFO "ACPI: "
+
+#define ACPI_MSG_BIOS_ERROR     KERN_ERR "ACPI BIOS Error (bug): "
+#define ACPI_MSG_BIOS_WARNING   KERN_WARNING "ACPI BIOS Warning (bug): "
+
 #else				/* !__KERNEL__ */
 
 #include <stdarg.h>
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 05/30] ACPICA: Debugger: Extend some max line lengths
  2016-08-04  8:36 [PATCH 00/30] ACPICA: 20160629 Release Lv Zheng
                   ` (3 preceding siblings ...)
  2016-08-04  8:42 ` [PATCH 04/30] ACPICA: Utilities: Introduce facility to allow Linux to set correct logging levels Lv Zheng
@ 2016-08-04  8:42 ` Lv Zheng
  2016-08-04  8:43 ` [PATCH 06/30] ACPICA: Disassembler: Add option to emit embedded External operators/opcodes Lv Zheng
                   ` (24 subsequent siblings)
  29 siblings, 0 replies; 37+ messages in thread
From: Lv Zheng @ 2016-08-04  8:42 UTC (permalink / raw)
  To: Rafael J. Wysocki, Rafael J. Wysocki, Len Brown
  Cc: Lv Zheng, Lv Zheng, linux-acpi, Bob Moore

From: Bob Moore <robert.moore@intel.com>

ACPICA commit 622063bae684490191c8e8b10bf18e86d0ab4ebf

Fix a couple of arbitrarily small output line lengths.

Link: https://github.com/acpica/acpica/commit/622063ba
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
 drivers/acpi/acpica/dbobject.c |    4 ++--
 drivers/acpi/acpica/nsdump.c   |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/acpi/acpica/dbobject.c b/drivers/acpi/acpica/dbobject.c
index 1d59e8b..08eaaf3 100644
--- a/drivers/acpi/acpica/dbobject.c
+++ b/drivers/acpi/acpica/dbobject.c
@@ -142,11 +142,11 @@ void acpi_db_decode_internal_object(union acpi_operand_object *obj_desc)
 
 	case ACPI_TYPE_STRING:
 
-		acpi_os_printf("(%u) \"%.24s",
+		acpi_os_printf("(%u) \"%.60s",
 			       obj_desc->string.length,
 			       obj_desc->string.pointer);
 
-		if (obj_desc->string.length > 24) {
+		if (obj_desc->string.length > 60) {
 			acpi_os_printf("...");
 		} else {
 			acpi_os_printf("\"");
diff --git a/drivers/acpi/acpica/nsdump.c b/drivers/acpi/acpica/nsdump.c
index ce1f860..84f35dd 100644
--- a/drivers/acpi/acpica/nsdump.c
+++ b/drivers/acpi/acpica/nsdump.c
@@ -338,7 +338,7 @@ acpi_ns_dump_one_object(acpi_handle obj_handle,
 		case ACPI_TYPE_STRING:
 
 			acpi_os_printf("Len %.2X ", obj_desc->string.length);
-			acpi_ut_print_string(obj_desc->string.pointer, 32);
+			acpi_ut_print_string(obj_desc->string.pointer, 80);
 			acpi_os_printf("\n");
 			break;
 
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 06/30] ACPICA: Disassembler: Add option to emit embedded External operators/opcodes
  2016-08-04  8:36 [PATCH 00/30] ACPICA: 20160629 Release Lv Zheng
                   ` (4 preceding siblings ...)
  2016-08-04  8:42 ` [PATCH 05/30] ACPICA: Debugger: Extend some max line lengths Lv Zheng
@ 2016-08-04  8:43 ` Lv Zheng
  2016-08-04  8:43 ` [PATCH 07/30] ACPICA: Simplify configuration for "Max Loops" system parameter Lv Zheng
                   ` (23 subsequent siblings)
  29 siblings, 0 replies; 37+ messages in thread
From: Lv Zheng @ 2016-08-04  8:43 UTC (permalink / raw)
  To: Rafael J. Wysocki, Rafael J. Wysocki, Len Brown
  Cc: Lv Zheng, Lv Zheng, linux-acpi, Bob Moore

From: Bob Moore <robert.moore@intel.com>

ACPICA commit 152a8ca2c7fc877d6aff0f9d0965184ef2ddce5c

Opcode 0x15 was added in ACPI 6.0 for disassemblers.
The disassembler by default does not emit the actual opcodes, they
are used internally. Option added for internal debugging only.

This patch doesn't affect Linux kernel as disassembler is not in
the Linux kernel.

Link: https://github.com/acpica/acpica/commit/152a8ca2
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
 drivers/acpi/acpica/acglobal.h |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h
index fded776..8c2c504 100644
--- a/drivers/acpi/acpica/acglobal.h
+++ b/drivers/acpi/acpica/acglobal.h
@@ -317,6 +317,7 @@ ACPI_INIT_GLOBAL(u8, acpi_gbl_ignore_noop_operator, FALSE);
 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_GLOBAL(u8, acpi_gbl_dm_opt_disasm);
 ACPI_GLOBAL(u8, acpi_gbl_dm_opt_listing);
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 07/30] ACPICA: Simplify configuration for "Max Loops" system parameter
  2016-08-04  8:36 [PATCH 00/30] ACPICA: 20160629 Release Lv Zheng
                   ` (5 preceding siblings ...)
  2016-08-04  8:43 ` [PATCH 06/30] ACPICA: Disassembler: Add option to emit embedded External operators/opcodes Lv Zheng
@ 2016-08-04  8:43 ` Lv Zheng
  2016-08-04  8:43 ` [PATCH 08/30] ACPICA: Divergence: Port declarators back to ACPICA Lv Zheng
                   ` (22 subsequent siblings)
  29 siblings, 0 replies; 37+ messages in thread
From: Lv Zheng @ 2016-08-04  8:43 UTC (permalink / raw)
  To: Rafael J. Wysocki, Rafael J. Wysocki, Len Brown
  Cc: Lv Zheng, Lv Zheng, linux-acpi, Bob Moore

From: Bob Moore <robert.moore@intel.com>

ACPICA commit 857c510d70e18eecc275dd3087807a18bae8aa51

Allow for static configuration of this parameter. It is used
to abort out of infinite loops caused by non-response from
hardware.

Link: https://github.com/acpica/acpica/commit/857c510d
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
 drivers/acpi/acpica/utinit.c |    2 +-
 include/acpi/acconfig.h      |    4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/acpi/acpica/utinit.c b/drivers/acpi/acpica/utinit.c
index f91f724..1711fdf 100644
--- a/drivers/acpi/acpica/utinit.c
+++ b/drivers/acpi/acpica/utinit.c
@@ -206,7 +206,7 @@ acpi_status acpi_ut_init_globals(void)
 	acpi_gbl_next_owner_id_offset = 0;
 	acpi_gbl_debugger_configuration = DEBUGGER_THREADING;
 	acpi_gbl_osi_mutex = NULL;
-	acpi_gbl_max_loop_iterations = 0xFFFF;
+	acpi_gbl_max_loop_iterations = ACPI_MAX_LOOP_COUNT;
 
 	/* Hardware oriented */
 
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h
index fe2e3ac..12c2882 100644
--- a/include/acpi/acconfig.h
+++ b/include/acpi/acconfig.h
@@ -144,6 +144,10 @@
 
 #define ACPI_ADDRESS_RANGE_MAX          2
 
+/* Maximum number of While() loops before abort */
+
+#define ACPI_MAX_LOOP_COUNT             0xFFFF
+
 /******************************************************************************
  *
  * ACPI Specification constants (Do not change unless the specification changes)
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 08/30] ACPICA: Divergence: Port declarators back to ACPICA
  2016-08-04  8:36 [PATCH 00/30] ACPICA: 20160629 Release Lv Zheng
                   ` (6 preceding siblings ...)
  2016-08-04  8:43 ` [PATCH 07/30] ACPICA: Simplify configuration for "Max Loops" system parameter Lv Zheng
@ 2016-08-04  8:43 ` Lv Zheng
  2016-08-04  8:43 ` [PATCH 09/30] ACPICA: iASL/Disassembler: Add a check for missing filename Lv Zheng
                   ` (21 subsequent siblings)
  29 siblings, 0 replies; 37+ messages in thread
From: Lv Zheng @ 2016-08-04  8:43 UTC (permalink / raw)
  To: Rafael J. Wysocki, Rafael J. Wysocki, Len Brown
  Cc: Lv Zheng, Lv Zheng, linux-acpi, Bob Moore

ACPICA commit c160cae765412f5736cf88a9ebcc6138aa761a48

Linux uses asmlinkage and sparse macros to mark function symbols.  This
leads to the divergences between the Linux and the ACPICA.
This patch ports such declarators back to ACPICA. Lv Zheng.

Link: https://github.com/acpica/acpica/commit/c160cae7
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
 drivers/acpi/acpica/actables.h    |    3 ++-
 drivers/acpi/acpica/tbutils.c     |    3 ++-
 drivers/acpi/acpica/tbxface.c     |    4 ++--
 drivers/acpi/acpica/tbxfload.c    |    4 ++--
 drivers/acpi/acpica/tbxfroot.c    |    5 ++++-
 drivers/acpi/acpica/utxface.c     |    2 +-
 drivers/acpi/acpica/utxfinit.c    |    6 +++---
 include/acpi/acpixf.h             |   28 ++++++++++++++++------------
 include/acpi/platform/acenv.h     |    4 ++++
 include/acpi/platform/aclinux.h   |    2 ++
 include/acpi/platform/aclinuxex.h |    2 +-
 11 files changed, 39 insertions(+), 24 deletions(-)

diff --git a/drivers/acpi/acpica/actables.h b/drivers/acpi/acpica/actables.h
index cd5a135..86d4d62 100644
--- a/drivers/acpi/acpica/actables.h
+++ b/drivers/acpi/acpica/actables.h
@@ -159,7 +159,8 @@ acpi_status
 acpi_tb_install_fixed_table(acpi_physical_address address,
 			    char *signature, u32 *table_index);
 
-acpi_status acpi_tb_parse_root_table(acpi_physical_address rsdp_address);
+acpi_status ACPI_INIT_FUNCTION
+acpi_tb_parse_root_table(acpi_physical_address rsdp_address);
 
 /*
  * tbxfload
diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c
index e285539..51eb07c 100644
--- a/drivers/acpi/acpica/tbutils.c
+++ b/drivers/acpi/acpica/tbutils.c
@@ -252,7 +252,8 @@ acpi_tb_get_root_table_entry(u8 *table_entry, u32 table_entry_size)
  *
  ******************************************************************************/
 
-acpi_status __init acpi_tb_parse_root_table(acpi_physical_address rsdp_address)
+acpi_status ACPI_INIT_FUNCTION
+acpi_tb_parse_root_table(acpi_physical_address rsdp_address)
 {
 	struct acpi_table_rsdp *rsdp;
 	u32 table_entry_size;
diff --git a/drivers/acpi/acpica/tbxface.c b/drivers/acpi/acpica/tbxface.c
index 3ecec93..4ab6b9c 100644
--- a/drivers/acpi/acpica/tbxface.c
+++ b/drivers/acpi/acpica/tbxface.c
@@ -98,7 +98,7 @@ acpi_status acpi_allocate_root_table(u32 initial_table_count)
  *
  ******************************************************************************/
 
-acpi_status __init
+acpi_status ACPI_INIT_FUNCTION
 acpi_initialize_tables(struct acpi_table_desc *initial_table_array,
 		       u32 initial_table_count, u8 allow_resize)
 {
@@ -164,7 +164,7 @@ ACPI_EXPORT_SYMBOL_INIT(acpi_initialize_tables)
  *              kernel.
  *
  ******************************************************************************/
-acpi_status __init acpi_reallocate_root_table(void)
+acpi_status ACPI_INIT_FUNCTION acpi_reallocate_root_table(void)
 {
 	acpi_status status;
 
diff --git a/drivers/acpi/acpica/tbxfload.c b/drivers/acpi/acpica/tbxfload.c
index ac71abc..e0cc919 100644
--- a/drivers/acpi/acpica/tbxfload.c
+++ b/drivers/acpi/acpica/tbxfload.c
@@ -63,7 +63,7 @@ ACPI_MODULE_NAME("tbxfload")
  * DESCRIPTION: Load the ACPI tables from the RSDT/XSDT
  *
  ******************************************************************************/
-acpi_status __init acpi_load_tables(void)
+acpi_status ACPI_INIT_FUNCTION acpi_load_tables(void)
 {
 	acpi_status status;
 
@@ -272,7 +272,7 @@ unlock_and_exit:
  *
  ******************************************************************************/
 
-acpi_status __init
+acpi_status ACPI_INIT_FUNCTION
 acpi_install_table(acpi_physical_address address, u8 physical)
 {
 	acpi_status status;
diff --git a/drivers/acpi/acpica/tbxfroot.c b/drivers/acpi/acpica/tbxfroot.c
index adb6cfc..0adb1c7 100644
--- a/drivers/acpi/acpica/tbxfroot.c
+++ b/drivers/acpi/acpica/tbxfroot.c
@@ -142,7 +142,8 @@ acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp *rsdp)
  *
  ******************************************************************************/
 
-acpi_status __init acpi_find_root_pointer(acpi_physical_address *table_address)
+acpi_status ACPI_INIT_FUNCTION
+acpi_find_root_pointer(acpi_physical_address *table_address)
 {
 	u8 *table_ptr;
 	u8 *mem_rover;
@@ -244,6 +245,8 @@ acpi_status __init acpi_find_root_pointer(acpi_physical_address *table_address)
 	return_ACPI_STATUS(AE_NOT_FOUND);
 }
 
+ACPI_EXPORT_SYMBOL_INIT(acpi_find_root_pointer)
+
 /*******************************************************************************
  *
  * FUNCTION:    acpi_tb_scan_memory_for_rsdp
diff --git a/drivers/acpi/acpica/utxface.c b/drivers/acpi/acpica/utxface.c
index d9e6aac..ec503c8 100644
--- a/drivers/acpi/acpica/utxface.c
+++ b/drivers/acpi/acpica/utxface.c
@@ -61,7 +61,7 @@ ACPI_MODULE_NAME("utxface")
  * DESCRIPTION: Shutdown the ACPICA subsystem and release all resources.
  *
  ******************************************************************************/
-acpi_status __init acpi_terminate(void)
+acpi_status ACPI_INIT_FUNCTION acpi_terminate(void)
 {
 	acpi_status status;
 
diff --git a/drivers/acpi/acpica/utxfinit.c b/drivers/acpi/acpica/utxfinit.c
index 75b5f27..d6d9462 100644
--- a/drivers/acpi/acpica/utxfinit.c
+++ b/drivers/acpi/acpica/utxfinit.c
@@ -69,7 +69,7 @@ void ae_do_object_overrides(void);
  *
  ******************************************************************************/
 
-acpi_status __init acpi_initialize_subsystem(void)
+acpi_status ACPI_INIT_FUNCTION acpi_initialize_subsystem(void)
 {
 	acpi_status status;
 
@@ -141,7 +141,7 @@ ACPI_EXPORT_SYMBOL_INIT(acpi_initialize_subsystem)
  *              Puts system into ACPI mode if it isn't already.
  *
  ******************************************************************************/
-acpi_status __init acpi_enable_subsystem(u32 flags)
+acpi_status ACPI_INIT_FUNCTION acpi_enable_subsystem(u32 flags)
 {
 	acpi_status status = AE_OK;
 
@@ -239,7 +239,7 @@ ACPI_EXPORT_SYMBOL_INIT(acpi_enable_subsystem)
  *              objects and executing AML code for Regions, buffers, etc.
  *
  ******************************************************************************/
-acpi_status __init acpi_initialize_objects(u32 flags)
+acpi_status ACPI_INIT_FUNCTION acpi_initialize_objects(u32 flags)
 {
 	acpi_status status = AE_OK;
 
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index 1ff3a76..875964d 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -416,18 +416,19 @@ ACPI_GLOBAL(u8, acpi_gbl_system_awake_and_running);
 /*
  * Initialization
  */
-ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init
+ACPI_EXTERNAL_RETURN_STATUS(acpi_status ACPI_INIT_FUNCTION
 			    acpi_initialize_tables(struct acpi_table_desc
 						   *initial_storage,
 						   u32 initial_table_count,
 						   u8 allow_resize))
-ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_initialize_subsystem(void))
-
-ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_enable_subsystem(u32 flags))
-
-ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init
-			    acpi_initialize_objects(u32 flags))
-ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_terminate(void))
+ACPI_EXTERNAL_RETURN_STATUS(acpi_status ACPI_INIT_FUNCTION
+			     acpi_initialize_subsystem(void))
+ACPI_EXTERNAL_RETURN_STATUS(acpi_status ACPI_INIT_FUNCTION
+			     acpi_enable_subsystem(u32 flags))
+ACPI_EXTERNAL_RETURN_STATUS(acpi_status ACPI_INIT_FUNCTION
+			     acpi_initialize_objects(u32 flags))
+ACPI_EXTERNAL_RETURN_STATUS(acpi_status ACPI_INIT_FUNCTION
+			     acpi_terminate(void))
 
 /*
  * Miscellaneous global interfaces
@@ -467,7 +468,7 @@ ACPI_EXTERNAL_RETURN_STATUS(acpi_status
 /*
  * ACPI table load/unload interfaces
  */
-ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init
+ACPI_EXTERNAL_RETURN_STATUS(acpi_status ACPI_INIT_FUNCTION
 			    acpi_install_table(acpi_physical_address address,
 					       u8 physical))
 
@@ -476,14 +477,17 @@ ACPI_EXTERNAL_RETURN_STATUS(acpi_status
 
 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
 			    acpi_unload_parent_table(acpi_handle object))
-ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_load_tables(void))
+
+ACPI_EXTERNAL_RETURN_STATUS(acpi_status ACPI_INIT_FUNCTION
+			    acpi_load_tables(void))
 
 /*
  * ACPI table manipulation interfaces
  */
-ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_reallocate_root_table(void))
+ACPI_EXTERNAL_RETURN_STATUS(acpi_status ACPI_INIT_FUNCTION
+			    acpi_reallocate_root_table(void))
 
-ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init
+ACPI_EXTERNAL_RETURN_STATUS(acpi_status ACPI_INIT_FUNCTION
 			    acpi_find_root_pointer(acpi_physical_address
 						   *rsdp_address))
 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h
index 86b5a84..ed959e5 100644
--- a/include/acpi/platform/acenv.h
+++ b/include/acpi/platform/acenv.h
@@ -403,4 +403,8 @@ typedef char *va_list;
 #endif				/* ACPI_APPLICATION */
 #endif				/* ACPI_FILE */
 
+#ifndef ACPI_INIT_FUNCTION
+#define ACPI_INIT_FUNCTION
+#endif
+
 #endif				/* __ACENV_H__ */
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h
index 296a276..cde6f33 100644
--- a/include/acpi/platform/aclinux.h
+++ b/include/acpi/platform/aclinux.h
@@ -92,6 +92,8 @@
 #include <asm/acenv.h>
 #endif
 
+#define ACPI_INIT_FUNCTION __init
+
 #ifndef CONFIG_ACPI
 
 /* External globals for __KERNEL__, stubs is needed */
diff --git a/include/acpi/platform/aclinuxex.h b/include/acpi/platform/aclinuxex.h
index f8bb0d8..a5509d8 100644
--- a/include/acpi/platform/aclinuxex.h
+++ b/include/acpi/platform/aclinuxex.h
@@ -71,7 +71,7 @@
 /*
  * Overrides for in-kernel ACPICA
  */
-acpi_status __init acpi_os_initialize(void);
+acpi_status ACPI_INIT_FUNCTION acpi_os_initialize(void);
 
 acpi_status acpi_os_terminate(void);
 
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 09/30] ACPICA: iASL/Disassembler: Add a check for missing filename
  2016-08-04  8:36 [PATCH 00/30] ACPICA: 20160629 Release Lv Zheng
                   ` (7 preceding siblings ...)
  2016-08-04  8:43 ` [PATCH 08/30] ACPICA: Divergence: Port declarators back to ACPICA Lv Zheng
@ 2016-08-04  8:43 ` Lv Zheng
  2016-08-04  8:43 ` [PATCH 10/30] ACPICA: Use os_allocate_zeroed Lv Zheng
                   ` (20 subsequent siblings)
  29 siblings, 0 replies; 37+ messages in thread
From: Lv Zheng @ 2016-08-04  8:43 UTC (permalink / raw)
  To: Rafael J. Wysocki, Rafael J. Wysocki, Len Brown
  Cc: Lv Zheng, Lv Zheng, linux-acpi, Bob Moore

From: Bob Moore <robert.moore@intel.com>

ACPICA commit fc0f12b1eff6253f83e599a7ee1765fcc8e42dcc

Add check for required filename for the -d and -da options.
ACPICA BZ 1285.

Link: https://github.com/acpica/acpica/commit/fc0f12b1
Link: https://bugs.acpica.org/show_bug.cgi?id=1285
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
 tools/power/acpi/common/getopt.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/power/acpi/common/getopt.c b/tools/power/acpi/common/getopt.c
index 0bd343f..e9e8091 100644
--- a/tools/power/acpi/common/getopt.c
+++ b/tools/power/acpi/common/getopt.c
@@ -94,7 +94,7 @@ int acpi_getopt_argument(int argc, char **argv)
 		acpi_gbl_optarg =
 		    &argv[acpi_gbl_optind++][(int)(current_char_ptr + 1)];
 	} else if (++acpi_gbl_optind >= argc) {
-		ACPI_OPTION_ERROR("Option requires an argument: -", 'v');
+		ACPI_OPTION_ERROR("\nOption requires an argument", 0);
 
 		current_char_ptr = 1;
 		return (-1);
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 10/30] ACPICA: Use os_allocate_zeroed
  2016-08-04  8:36 [PATCH 00/30] ACPICA: 20160629 Release Lv Zheng
                   ` (8 preceding siblings ...)
  2016-08-04  8:43 ` [PATCH 09/30] ACPICA: iASL/Disassembler: Add a check for missing filename Lv Zheng
@ 2016-08-04  8:43 ` Lv Zheng
  2016-08-04  8:43 ` [PATCH 11/30] ACPICA: Events: Introduce acpi_mask_gpe() to implement GPE masking mechanism Lv Zheng
                   ` (19 subsequent siblings)
  29 siblings, 0 replies; 37+ messages in thread
From: Lv Zheng @ 2016-08-04  8:43 UTC (permalink / raw)
  To: Rafael J. Wysocki, Rafael J. Wysocki, Len Brown
  Cc: Lv Zheng, Lv Zheng, linux-acpi, Bob Moore, Amitoj Kaur Chawla

From: Bob Moore <robert.moore@intel.com>

ACPICA commit 2b896c59e53243c95600f2a3f7e1fd02c044cb37

Eliminates an unnecessary memset.
Change proposed by: Amitoj Kaur Chawla <amitoj1606@gmail.com>

Link: https://github.com/acpica/acpica/commit/2b896c59
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
 drivers/acpi/acpica/uttrack.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/acpi/acpica/uttrack.c b/drivers/acpi/acpica/uttrack.c
index 0df07df..df31d71 100644
--- a/drivers/acpi/acpica/uttrack.c
+++ b/drivers/acpi/acpica/uttrack.c
@@ -95,13 +95,11 @@ acpi_ut_create_list(const char *list_name,
 {
 	struct acpi_memory_list *cache;
 
-	cache = acpi_os_allocate(sizeof(struct acpi_memory_list));
+	cache = acpi_os_allocate_zeroed(sizeof(struct acpi_memory_list));
 	if (!cache) {
 		return (AE_NO_MEMORY);
 	}
 
-	memset(cache, 0, sizeof(struct acpi_memory_list));
-
 	cache->list_name = list_name;
 	cache->object_size = object_size;
 
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 11/30] ACPICA: Events: Introduce acpi_mask_gpe() to implement GPE masking mechanism
  2016-08-04  8:36 [PATCH 00/30] ACPICA: 20160629 Release Lv Zheng
                   ` (9 preceding siblings ...)
  2016-08-04  8:43 ` [PATCH 10/30] ACPICA: Use os_allocate_zeroed Lv Zheng
@ 2016-08-04  8:43 ` Lv Zheng
  2016-08-04  8:43 ` [PATCH 12/30] ACPI / sysfs: Update /sys/firmware/acpi/interrupts/gpexx using new " Lv Zheng
                   ` (18 subsequent siblings)
  29 siblings, 0 replies; 37+ messages in thread
From: Lv Zheng @ 2016-08-04  8:43 UTC (permalink / raw)
  To: Rafael J. Wysocki, Rafael J. Wysocki, Len Brown
  Cc: Lv Zheng, Lv Zheng, linux-acpi, Bob Moore

ACPICA commit 23a417ca406a527e7ae1710893e59a8b6db30e14

There is a facility in Linux, developers can control the enabling/disabling
of a GPE via /sys/firmware/acpi/interrupts/gpexx. This is mainly for
debugging purposes.

But many users expect to use this facility to implement quirks to mask a
specific GPE when there is a gap in Linux causing this GPE to flood. This
is not working correctly because currently this facility invokes
enabling/disabling counting based GPE driver APIs:
 acpi_enable_gpe()/acpi_disable_gpe()
and the GPE drivers can still affect the count to mess up the GPE
masking purposes.

However, most of the IRQ chip designs allow masking/unmasking IRQs via a
masking bit which is different from the enabled bit to achieve the same
purpose. But the GPE hardware doesn't contain such a feature, this brings
the trouble.

In this patch, we introduce a software mechanism to implement the GPE
masking feature, and acpi_mask_gpe() are provided to the OSPMs to
mask/unmask GPEs in the above mentioned situation instead of
acpi_enable_gpe()/acpi_disable_gpe(). ACPICA BZ 1102. Lv Zheng.

Link: https://github.com/acpica/acpica/commit/23a417ca
Link: https://bugs.acpica.org/show_bug.cgi?id=1102
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
 drivers/acpi/acpica/acevents.h |    3 +++
 drivers/acpi/acpica/aclocal.h  |    2 ++
 drivers/acpi/acpica/evgpe.c    |   57 ++++++++++++++++++++++++++++++++++++++++
 drivers/acpi/acpica/evxfgpe.c  |   43 ++++++++++++++++++++++++++++++
 drivers/acpi/acpica/hwgpe.c    |   23 ++++++++++++----
 include/acpi/acpixf.h          |    4 +++
 include/acpi/actypes.h         |   39 ++++++++++++++-------------
 7 files changed, 148 insertions(+), 23 deletions(-)

diff --git a/drivers/acpi/acpica/acevents.h b/drivers/acpi/acpica/acevents.h
index 77af91c..92fa47c 100644
--- a/drivers/acpi/acpica/acevents.h
+++ b/drivers/acpi/acpica/acevents.h
@@ -86,6 +86,9 @@ acpi_ev_update_gpe_enable_mask(struct acpi_gpe_event_info *gpe_event_info);
 acpi_status acpi_ev_enable_gpe(struct acpi_gpe_event_info *gpe_event_info);
 
 acpi_status
+acpi_ev_mask_gpe(struct acpi_gpe_event_info *gpe_event_info, u8 is_masked);
+
+acpi_status
 acpi_ev_add_gpe_reference(struct acpi_gpe_event_info *gpe_event_info);
 
 acpi_status
diff --git a/drivers/acpi/acpica/aclocal.h b/drivers/acpi/acpica/aclocal.h
index 13331d7..dff1207 100644
--- a/drivers/acpi/acpica/aclocal.h
+++ b/drivers/acpi/acpica/aclocal.h
@@ -484,6 +484,7 @@ struct acpi_gpe_event_info {
 	u8 flags;		/* Misc info about this GPE */
 	u8 gpe_number;		/* This GPE */
 	u8 runtime_count;	/* References to a run GPE */
+	u8 disable_for_dispatch;	/* Masked during dispatching */
 };
 
 /* Information about a GPE register pair, one per each status/enable pair in an array */
@@ -494,6 +495,7 @@ struct acpi_gpe_register_info {
 	u16 base_gpe_number;	/* Base GPE number for this register */
 	u8 enable_for_wake;	/* GPEs to keep enabled when sleeping */
 	u8 enable_for_run;	/* GPEs to keep enabled when running */
+	u8 mask_for_run;	/* GPEs to keep masked when running */
 	u8 enable_mask;		/* Current mask of enabled GPEs */
 };
 
diff --git a/drivers/acpi/acpica/evgpe.c b/drivers/acpi/acpica/evgpe.c
index 4b4949c..bdb10be 100644
--- a/drivers/acpi/acpica/evgpe.c
+++ b/drivers/acpi/acpica/evgpe.c
@@ -130,6 +130,60 @@ acpi_status acpi_ev_enable_gpe(struct acpi_gpe_event_info *gpe_event_info)
 
 /*******************************************************************************
  *
+ * FUNCTION:    acpi_ev_mask_gpe
+ *
+ * PARAMETERS:  gpe_event_info          - GPE to be blocked/unblocked
+ *              is_masked               - Whether the GPE is masked or not
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Unconditionally mask/unmask a GPE during runtime.
+ *
+ ******************************************************************************/
+
+acpi_status
+acpi_ev_mask_gpe(struct acpi_gpe_event_info *gpe_event_info, u8 is_masked)
+{
+	struct acpi_gpe_register_info *gpe_register_info;
+	u32 register_bit;
+
+	ACPI_FUNCTION_TRACE(ev_mask_gpe);
+
+	gpe_register_info = gpe_event_info->register_info;
+	if (!gpe_register_info) {
+		return_ACPI_STATUS(AE_NOT_EXIST);
+	}
+
+	register_bit = acpi_hw_get_gpe_register_bit(gpe_event_info);
+
+	/* Perform the action */
+
+	if (is_masked) {
+		if (register_bit & gpe_register_info->mask_for_run) {
+			return_ACPI_STATUS(AE_BAD_PARAMETER);
+		}
+
+		(void)acpi_hw_low_set_gpe(gpe_event_info, ACPI_GPE_DISABLE);
+		ACPI_SET_BIT(gpe_register_info->mask_for_run, (u8)register_bit);
+	} else {
+		if (!(register_bit & gpe_register_info->mask_for_run)) {
+			return_ACPI_STATUS(AE_BAD_PARAMETER);
+		}
+
+		ACPI_CLEAR_BIT(gpe_register_info->mask_for_run,
+			       (u8)register_bit);
+		if (gpe_event_info->runtime_count
+		    && !gpe_event_info->disable_for_dispatch) {
+			(void)acpi_hw_low_set_gpe(gpe_event_info,
+						  ACPI_GPE_ENABLE);
+		}
+	}
+
+	return_ACPI_STATUS(AE_OK);
+}
+
+/*******************************************************************************
+ *
  * FUNCTION:    acpi_ev_add_gpe_reference
  *
  * PARAMETERS:  gpe_event_info          - Add a reference to this GPE
@@ -674,6 +728,7 @@ acpi_status acpi_ev_finish_gpe(struct acpi_gpe_event_info *gpe_event_info)
 	 * in the event_info.
 	 */
 	(void)acpi_hw_low_set_gpe(gpe_event_info, ACPI_GPE_CONDITIONAL_ENABLE);
+	gpe_event_info->disable_for_dispatch = FALSE;
 	return (AE_OK);
 }
 
@@ -737,6 +792,8 @@ acpi_ev_gpe_dispatch(struct acpi_namespace_node *gpe_device,
 		}
 	}
 
+	gpe_event_info->disable_for_dispatch = TRUE;
+
 	/*
 	 * Dispatch the GPE to either an installed handler or the control
 	 * method associated with this GPE (_Lxx or _Exx). If a handler
diff --git a/drivers/acpi/acpica/evxfgpe.c b/drivers/acpi/acpica/evxfgpe.c
index 17cfef7..d7a3b27 100644
--- a/drivers/acpi/acpica/evxfgpe.c
+++ b/drivers/acpi/acpica/evxfgpe.c
@@ -235,11 +235,13 @@ acpi_status acpi_set_gpe(acpi_handle gpe_device, u32 gpe_number, u8 action)
 	case ACPI_GPE_ENABLE:
 
 		status = acpi_hw_low_set_gpe(gpe_event_info, ACPI_GPE_ENABLE);
+		gpe_event_info->disable_for_dispatch = FALSE;
 		break;
 
 	case ACPI_GPE_DISABLE:
 
 		status = acpi_hw_low_set_gpe(gpe_event_info, ACPI_GPE_DISABLE);
+		gpe_event_info->disable_for_dispatch = TRUE;
 		break;
 
 	default:
@@ -257,6 +259,47 @@ ACPI_EXPORT_SYMBOL(acpi_set_gpe)
 
 /*******************************************************************************
  *
+ * FUNCTION:    acpi_mask_gpe
+ *
+ * PARAMETERS:  gpe_device          - Parent GPE Device. NULL for GPE0/GPE1
+ *              gpe_number          - GPE level within the GPE block
+ *              is_masked           - Whether the GPE is masked or not
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Unconditionally mask/unmask the an individual GPE, ex., to
+ *              prevent a GPE flooding.
+ *
+ ******************************************************************************/
+acpi_status acpi_mask_gpe(acpi_handle gpe_device, u32 gpe_number, u8 is_masked)
+{
+	struct acpi_gpe_event_info *gpe_event_info;
+	acpi_status status;
+	acpi_cpu_flags flags;
+
+	ACPI_FUNCTION_TRACE(acpi_mask_gpe);
+
+	flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock);
+
+	/* Ensure that we have a valid GPE number */
+
+	gpe_event_info = acpi_ev_get_gpe_event_info(gpe_device, gpe_number);
+	if (!gpe_event_info) {
+		status = AE_BAD_PARAMETER;
+		goto unlock_and_exit;
+	}
+
+	status = acpi_ev_mask_gpe(gpe_event_info, is_masked);
+
+unlock_and_exit:
+	acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
+	return_ACPI_STATUS(status);
+}
+
+ACPI_EXPORT_SYMBOL(acpi_mask_gpe)
+
+/*******************************************************************************
+ *
  * FUNCTION:    acpi_mark_gpe_for_wake
  *
  * PARAMETERS:  gpe_device          - Parent GPE Device. NULL for GPE0/GPE1
diff --git a/drivers/acpi/acpica/hwgpe.c b/drivers/acpi/acpica/hwgpe.c
index bdecd5e..76b0e35 100644
--- a/drivers/acpi/acpica/hwgpe.c
+++ b/drivers/acpi/acpica/hwgpe.c
@@ -98,7 +98,7 @@ acpi_status
 acpi_hw_low_set_gpe(struct acpi_gpe_event_info *gpe_event_info, u32 action)
 {
 	struct acpi_gpe_register_info *gpe_register_info;
-	acpi_status status;
+	acpi_status status = AE_OK;
 	u32 enable_mask;
 	u32 register_bit;
 
@@ -148,9 +148,14 @@ acpi_hw_low_set_gpe(struct acpi_gpe_event_info *gpe_event_info, u32 action)
 		return (AE_BAD_PARAMETER);
 	}
 
-	/* Write the updated enable mask */
+	if (!(register_bit & gpe_register_info->mask_for_run)) {
 
-	status = acpi_hw_write(enable_mask, &gpe_register_info->enable_address);
+		/* Write the updated enable mask */
+
+		status =
+		    acpi_hw_write(enable_mask,
+				  &gpe_register_info->enable_address);
+	}
 	return (status);
 }
 
@@ -242,6 +247,12 @@ acpi_hw_get_gpe_status(struct acpi_gpe_event_info *gpe_event_info,
 		local_event_status |= ACPI_EVENT_FLAG_ENABLED;
 	}
 
+	/* GPE currently masked? (masked for runtime?) */
+
+	if (register_bit & gpe_register_info->mask_for_run) {
+		local_event_status |= ACPI_EVENT_FLAG_MASKED;
+	}
+
 	/* GPE enabled for wake? */
 
 	if (register_bit & gpe_register_info->enable_for_wake) {
@@ -397,6 +408,7 @@ acpi_hw_enable_runtime_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
 	u32 i;
 	acpi_status status;
 	struct acpi_gpe_register_info *gpe_register_info;
+	u8 enable_mask;
 
 	/* NOTE: assumes that all GPEs are currently disabled */
 
@@ -410,9 +422,10 @@ acpi_hw_enable_runtime_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
 
 		/* Enable all "runtime" GPEs in this register */
 
+		enable_mask = gpe_register_info->enable_for_run &
+		    ~gpe_register_info->mask_for_run;
 		status =
-		    acpi_hw_gpe_enable_write(gpe_register_info->enable_for_run,
-					     gpe_register_info);
+		    acpi_hw_gpe_enable_write(enable_mask, gpe_register_info);
 		if (ACPI_FAILURE(status)) {
 			return (status);
 		}
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index 875964d..c2d4b9c 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -736,6 +736,10 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
 						u32 gpe_number))
 
 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
+				acpi_mask_gpe(acpi_handle gpe_device,
+					      u32 gpe_number, u8 is_masked))
+
+ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
 				acpi_mark_gpe_for_wake(acpi_handle gpe_device,
 						       u32 gpe_number))
 
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index cb389ef..fa4bd6a 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -732,16 +732,17 @@ typedef u32 acpi_event_type;
  * The encoding of acpi_event_status is illustrated below.
  * Note that a set bit (1) indicates the property is TRUE
  * (e.g. if bit 0 is set then the event is enabled).
- * +-------------+-+-+-+-+-+
- * |   Bits 31:5 |4|3|2|1|0|
- * +-------------+-+-+-+-+-+
- *          |     | | | | |
- *          |     | | | | +- Enabled?
- *          |     | | | +--- Enabled for wake?
- *          |     | | +----- Status bit set?
- *          |     | +------- Enable bit set?
- *          |     +--------- Has a handler?
- *          +--------------- <Reserved>
+ * +-------------+-+-+-+-+-+-+
+ * |   Bits 31:6 |5|4|3|2|1|0|
+ * +-------------+-+-+-+-+-+-+
+ *          |     | | | | | |
+ *          |     | | | | | +- Enabled?
+ *          |     | | | | +--- Enabled for wake?
+ *          |     | | | +----- Status bit set?
+ *          |     | | +------- Enable bit set?
+ *          |     | +--------- Has a handler?
+ *          |     +----------- Masked?
+ *          +----------------- <Reserved>
  */
 typedef u32 acpi_event_status;
 
@@ -751,6 +752,7 @@ typedef u32 acpi_event_status;
 #define ACPI_EVENT_FLAG_STATUS_SET      (acpi_event_status) 0x04
 #define ACPI_EVENT_FLAG_ENABLE_SET      (acpi_event_status) 0x08
 #define ACPI_EVENT_FLAG_HAS_HANDLER     (acpi_event_status) 0x10
+#define ACPI_EVENT_FLAG_MASKED          (acpi_event_status) 0x20
 #define ACPI_EVENT_FLAG_SET             ACPI_EVENT_FLAG_STATUS_SET
 
 /* Actions for acpi_set_gpe, acpi_gpe_wakeup, acpi_hw_low_set_gpe */
@@ -761,14 +763,15 @@ typedef u32 acpi_event_status;
 
 /*
  * GPE info flags - Per GPE
- * +-------+-+-+---+
- * |  7:5  |4|3|2:0|
- * +-------+-+-+---+
- *     |    | |  |
- *     |    | |  +-- Type of dispatch:to method, handler, notify, or none
- *     |    | +----- Interrupt type: edge or level triggered
- *     |    +------- Is a Wake GPE
- *     +------------ <Reserved>
+ * +---+-+-+-+---+
+ * |7:6|5|4|3|2:0|
+ * +---+-+-+-+---+
+ *   |  | | |  |
+ *   |  | | |  +-- Type of dispatch:to method, handler, notify, or none
+ *   |  | | +----- Interrupt type: edge or level triggered
+ *   |  | +------- Is a Wake GPE
+ *   |  +--------- Is GPE masked by the software GPE masking machanism
+ *   +------------ <Reserved>
  */
 #define ACPI_GPE_DISPATCH_NONE          (u8) 0x00
 #define ACPI_GPE_DISPATCH_METHOD        (u8) 0x01
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 12/30] ACPI / sysfs: Update /sys/firmware/acpi/interrupts/gpexx using new GPE masking mechanism
  2016-08-04  8:36 [PATCH 00/30] ACPICA: 20160629 Release Lv Zheng
                   ` (10 preceding siblings ...)
  2016-08-04  8:43 ` [PATCH 11/30] ACPICA: Events: Introduce acpi_mask_gpe() to implement GPE masking mechanism Lv Zheng
@ 2016-08-04  8:43 ` Lv Zheng
  2016-08-04  8:43 ` [PATCH 13/30] ACPI / sysfs: Provide quirk mechanism to prevent GPE flooding Lv Zheng
                   ` (17 subsequent siblings)
  29 siblings, 0 replies; 37+ messages in thread
From: Lv Zheng @ 2016-08-04  8:43 UTC (permalink / raw)
  To: Rafael J. Wysocki, Rafael J. Wysocki, Len Brown
  Cc: Lv Zheng, Lv Zheng, linux-acpi

Now GPE can be masked via new acpi_mask_gpe() API, this patch modifies
/sys/firmware/acpi/interrupts/gpexx to use this new facility.

Writes "mask/unmask" to this file now invoke acpi_mask_gpe().

Reads from this file now returns new "EN/STS" when the corresponding GPE
hardware register's EN/STS bits are flagged, and new "masked/unmasked"
attribute to indicate the status of the masking mechanism.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
 drivers/acpi/sleep.c |    2 +-
 drivers/acpi/sysfs.c |   33 +++++++++++++++++++++++++--------
 2 files changed, 26 insertions(+), 9 deletions(-)

diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index 2b38c1b..9788663 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -572,7 +572,7 @@ static int acpi_suspend_enter(suspend_state_t pm_state)
 
 		acpi_get_event_status(ACPI_EVENT_POWER_BUTTON, &pwr_btn_status);
 
-		if (pwr_btn_status & ACPI_EVENT_FLAG_SET) {
+		if (pwr_btn_status & ACPI_EVENT_FLAG_STATUS_SET) {
 			acpi_clear_event(ACPI_EVENT_POWER_BUTTON);
 			/* Flag for later */
 			pwr_btn_event_pending = true;
diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c
index 358165e..703c993 100644
--- a/drivers/acpi/sysfs.c
+++ b/drivers/acpi/sysfs.c
@@ -597,14 +597,27 @@ static ssize_t counter_show(struct kobject *kobj,
 	if (result)
 		goto end;
 
+	if (status & ACPI_EVENT_FLAG_ENABLE_SET)
+		size += sprintf(buf + size, "  EN");
+	else
+		size += sprintf(buf + size, "    ");
+	if (status & ACPI_EVENT_FLAG_STATUS_SET)
+		size += sprintf(buf + size, " STS");
+	else
+		size += sprintf(buf + size, "    ");
+
 	if (!(status & ACPI_EVENT_FLAG_HAS_HANDLER))
-		size += sprintf(buf + size, "   invalid");
+		size += sprintf(buf + size, " invalid     ");
 	else if (status & ACPI_EVENT_FLAG_ENABLED)
-		size += sprintf(buf + size, "   enabled");
+		size += sprintf(buf + size, " enabled     ");
 	else if (status & ACPI_EVENT_FLAG_WAKE_ENABLED)
-		size += sprintf(buf + size, "   wake_enabled");
+		size += sprintf(buf + size, " wake_enabled");
 	else
-		size += sprintf(buf + size, "   disabled");
+		size += sprintf(buf + size, " disabled    ");
+	if (status & ACPI_EVENT_FLAG_MASKED)
+		size += sprintf(buf + size, " masked  ");
+	else
+		size += sprintf(buf + size, " unmasked");
 
 end:
 	size += sprintf(buf + size, "\n");
@@ -655,8 +668,12 @@ static ssize_t counter_set(struct kobject *kobj,
 			 !(status & ACPI_EVENT_FLAG_ENABLED))
 			result = acpi_enable_gpe(handle, index);
 		else if (!strcmp(buf, "clear\n") &&
-			 (status & ACPI_EVENT_FLAG_SET))
+			 (status & ACPI_EVENT_FLAG_STATUS_SET))
 			result = acpi_clear_gpe(handle, index);
+		else if (!strcmp(buf, "mask\n"))
+			result = acpi_mask_gpe(handle, index, TRUE);
+		else if (!strcmp(buf, "unmask\n"))
+			result = acpi_mask_gpe(handle, index, FALSE);
 		else if (!kstrtoul(buf, 0, &tmp))
 			all_counters[index].count = tmp;
 		else
@@ -664,13 +681,13 @@ static ssize_t counter_set(struct kobject *kobj,
 	} else if (index < num_gpes + ACPI_NUM_FIXED_EVENTS) {
 		int event = index - num_gpes;
 		if (!strcmp(buf, "disable\n") &&
-		    (status & ACPI_EVENT_FLAG_ENABLED))
+		    (status & ACPI_EVENT_FLAG_ENABLE_SET))
 			result = acpi_disable_event(event, ACPI_NOT_ISR);
 		else if (!strcmp(buf, "enable\n") &&
-			 !(status & ACPI_EVENT_FLAG_ENABLED))
+			 !(status & ACPI_EVENT_FLAG_ENABLE_SET))
 			result = acpi_enable_event(event, ACPI_NOT_ISR);
 		else if (!strcmp(buf, "clear\n") &&
-			 (status & ACPI_EVENT_FLAG_SET))
+			 (status & ACPI_EVENT_FLAG_STATUS_SET))
 			result = acpi_clear_event(event);
 		else if (!kstrtoul(buf, 0, &tmp))
 			all_counters[index].count = tmp;
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 13/30] ACPI / sysfs: Provide quirk mechanism to prevent GPE flooding
  2016-08-04  8:36 [PATCH 00/30] ACPICA: 20160629 Release Lv Zheng
                   ` (11 preceding siblings ...)
  2016-08-04  8:43 ` [PATCH 12/30] ACPI / sysfs: Update /sys/firmware/acpi/interrupts/gpexx using new " Lv Zheng
@ 2016-08-04  8:43 ` Lv Zheng
  2016-08-08 20:24   ` Rafael J. Wysocki
  2016-08-04  8:43 ` [PATCH 14/30] ACPICA: FADT support cleanup Lv Zheng
                   ` (16 subsequent siblings)
  29 siblings, 1 reply; 37+ messages in thread
From: Lv Zheng @ 2016-08-04  8:43 UTC (permalink / raw)
  To: Rafael J. Wysocki, Rafael J. Wysocki, Len Brown
  Cc: Lv Zheng, Lv Zheng, linux-acpi

Sometimes, the users may require a quirk to be provided from ACPI subsystem
core to prevent a GPE from flooding. Normally, if a GPE cannot be
dispatched, ACPICA core automatically prevents the GPE from firing. But
there are cases the GPE is dispatched by _Lxx/_Exx provided via AML table,
and OSPM is lacking of the knowledge to get _Lxx/_Exx correctly executed to
handle the GPE, thus the GPE flooding may still occur.

This patch provides a quirk mechanism to stop this kind of GPE flooding.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=53071
Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/887793
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
 Documentation/kernel-parameters.txt |   10 +++++++
 drivers/acpi/internal.h             |    1 +
 drivers/acpi/scan.c                 |    1 +
 drivers/acpi/sysfs.c                |   56 +++++++++++++++++++++++++++++++++++
 4 files changed, 68 insertions(+)

diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 769db83..06db98d 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -274,6 +274,16 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
 			use by PCI
 			Format: <irq>,<irq>...
 
+	acpi_mask_gpe=  [HW,ACPI]
+			Due to the existence of _Lxx/_Exx, some GPEs triggered
+			by unsupported hardware/firmware features can result in
+			GPE floodings that cannot be automatically disabled by
+			the GPE dispatcher.
+			This facility can be used to prevent such uncontrolled
+			GPE floodings.
+			Format: <int>
+			Support masking of GPEs numbered from 0x00 to 0x63.
+
 	acpi_no_auto_serialize	[HW,ACPI]
 			Disable auto-serialization of AML methods
 			AML control methods that contain the opcodes to create
diff --git a/drivers/acpi/internal.h b/drivers/acpi/internal.h
index 940218f..63052a8 100644
--- a/drivers/acpi/internal.h
+++ b/drivers/acpi/internal.h
@@ -37,6 +37,7 @@ void acpi_amba_init(void);
 static inline void acpi_amba_init(void) {}
 #endif
 int acpi_sysfs_init(void);
+void acpi_gpe_apply_masked_gpes(void);
 void acpi_container_init(void);
 void acpi_memory_hotplug_init(void);
 #ifdef	CONFIG_ACPI_HOTPLUG_IOAPIC
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 405056b..4e89702 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -1969,6 +1969,7 @@ int __init acpi_scan_init(void)
 		}
 	}
 
+	acpi_gpe_apply_masked_gpes();
 	acpi_update_all_gpes();
 
 	acpi_scan_initialized = true;
diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c
index 703c993..fecbf42 100644
--- a/drivers/acpi/sysfs.c
+++ b/drivers/acpi/sysfs.c
@@ -702,6 +702,62 @@ end:
 	return result ? result : size;
 }
 
+/*
+ * A Quirk Mechanism for GPE Flooding Prevention:
+ *
+ * Quirks may be needed to prevent GPE flooding on a specific GPE. The
+ * flooding typically cannot be detected and automatically prevented by
+ * ACPI_GPE_DISPATCH_NONE check because there is a _Lxx/_Exx prepared in
+ * the AML tables. This normally indicates a feature gap in Linux, thus
+ * instead of providing endless quirk tables, we provide a boot parameter
+ * for those who want this quirk. For example, if the users want to prevent
+ * the GPE flooding for GPE 00, they need to specify the following boot
+ * parameter:
+ *   acpi_mask_gpe=0x00
+ * The masking status can be modified by the following runtime controlling
+ * interface:
+ *   echo unmask > /sys/firmware/acpi/interrupts/gpe00
+ */
+
+/*
+ * Currently, the GPE flooding prevention only supports to mask the GPEs
+ * numbered from 00 to 63.
+ */
+#define ACPI_MASKABLE_GPE_MAX	64
+
+static u64 acpi_masked_gpes;
+
+static int __init acpi_gpe_set_masked_gpes(char *val)
+{
+	u8 gpe;
+
+	if (kstrtou8(val, 0, &gpe) || gpe > ACPI_MASKABLE_GPE_MAX)
+		return -EINVAL;
+	acpi_masked_gpes |= ((u64)1<<gpe);
+
+	return 1;
+}
+__setup("acpi_mask_gpe=", acpi_gpe_set_masked_gpes);
+
+void acpi_gpe_apply_masked_gpes(void)
+{
+	acpi_handle handle;
+	acpi_status status;
+	u8 gpe;
+
+	for (gpe = 0;
+	     gpe < min_t(u8, ACPI_MASKABLE_GPE_MAX, acpi_current_gpe_count);
+	     gpe++) {
+		if (acpi_masked_gpes & ((u64)1<<gpe)) {
+			status = acpi_get_gpe_device(gpe, &handle);
+			if (ACPI_SUCCESS(status)) {
+				pr_info("Masking GPE 0x%x.\n", gpe);
+				(void)acpi_mask_gpe(handle, gpe, TRUE);
+			}
+		}
+	}
+}
+
 void acpi_irq_stats_init(void)
 {
 	acpi_status status;
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 14/30] ACPICA: FADT support cleanup
  2016-08-04  8:36 [PATCH 00/30] ACPICA: 20160629 Release Lv Zheng
                   ` (12 preceding siblings ...)
  2016-08-04  8:43 ` [PATCH 13/30] ACPI / sysfs: Provide quirk mechanism to prevent GPE flooding Lv Zheng
@ 2016-08-04  8:43 ` Lv Zheng
  2016-08-04  8:44 ` [PATCH 15/30] ACPICA: Debugger: Fix wrong inclusions in dbfileio.c Lv Zheng
                   ` (15 subsequent siblings)
  29 siblings, 0 replies; 37+ messages in thread
From: Lv Zheng @ 2016-08-04  8:43 UTC (permalink / raw)
  To: Rafael J. Wysocki, Rafael J. Wysocki, Len Brown
  Cc: Lv Zheng, Lv Zheng, linux-acpi, Bob Moore

From: Bob Moore <robert.moore@intel.com>

ACPICA commit 34ccd43af3fd1870fddfac0617dd0ba706963558

Remove all vestiges of the version 2 FADT which never was included
in the ACPI specification.
This enabled significant cleanup of both the data table compiler
and the disassembler.
Added many clarification comments to associate each FADT version
with the version of the ACPI spec where it was originally
defined.

Link: https://github.com/acpica/acpica/commit/34ccd43a
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
 drivers/acpi/acpica/tbfadt.c |   10 +--
 include/acpi/actbl.h         |  164 ++++++++++++++++++++++++------------------
 2 files changed, 100 insertions(+), 74 deletions(-)

diff --git a/drivers/acpi/acpica/tbfadt.c b/drivers/acpi/acpica/tbfadt.c
index 6208069..016bcdc 100644
--- a/drivers/acpi/acpica/tbfadt.c
+++ b/drivers/acpi/acpica/tbfadt.c
@@ -476,17 +476,19 @@ static void acpi_tb_convert_fadt(void)
 	u32 i;
 
 	/*
-	 * For ACPI 1.0 FADTs (revision 1 or 2), ensure that reserved fields which
+	 * For ACPI 1.0 FADTs (revision 1), ensure that reserved fields which
 	 * should be zero are indeed zero. This will workaround BIOSs that
 	 * inadvertently place values in these fields.
 	 *
 	 * The ACPI 1.0 reserved fields that will be zeroed are the bytes located
 	 * at offset 45, 55, 95, and the word located at offset 109, 110.
 	 *
-	 * Note: The FADT revision value is unreliable. Only the length can be
-	 * trusted.
+	 * Note: The FADT revision value is unreliable because of BIOS errors.
+	 * The table length is instead used as the final word on the version.
+	 *
+	 * Note: FADT revision 3 is the ACPI 2.0 version of the FADT.
 	 */
-	if (acpi_gbl_FADT.header.length <= ACPI_FADT_V2_SIZE) {
+	if (acpi_gbl_FADT.header.length <= ACPI_FADT_V3_SIZE) {
 		acpi_gbl_FADT.preferred_profile = 0;
 		acpi_gbl_FADT.pstate_control = 0;
 		acpi_gbl_FADT.cst_control = 0;
diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h
index c19700e..1b949e0 100644
--- a/include/acpi/actbl.h
+++ b/include/acpi/actbl.h
@@ -230,62 +230,72 @@ struct acpi_table_facs {
 /* Fields common to all versions of the FADT */
 
 struct acpi_table_fadt {
-	struct acpi_table_header header;	/* Common ACPI table header */
-	u32 facs;		/* 32-bit physical address of FACS */
-	u32 dsdt;		/* 32-bit physical address of DSDT */
-	u8 model;		/* System Interrupt Model (ACPI 1.0) - not used in ACPI 2.0+ */
-	u8 preferred_profile;	/* Conveys preferred power management profile to OSPM. */
-	u16 sci_interrupt;	/* System vector of SCI interrupt */
-	u32 smi_command;	/* 32-bit Port address of SMI command port */
-	u8 acpi_enable;		/* Value to write to SMI_CMD to enable ACPI */
-	u8 acpi_disable;	/* Value to write to SMI_CMD to disable ACPI */
-	u8 s4_bios_request;	/* Value to write to SMI_CMD to enter S4BIOS state */
-	u8 pstate_control;	/* Processor performance state control */
-	u32 pm1a_event_block;	/* 32-bit port address of Power Mgt 1a Event Reg Blk */
-	u32 pm1b_event_block;	/* 32-bit port address of Power Mgt 1b Event Reg Blk */
-	u32 pm1a_control_block;	/* 32-bit port address of Power Mgt 1a Control Reg Blk */
-	u32 pm1b_control_block;	/* 32-bit port address of Power Mgt 1b Control Reg Blk */
-	u32 pm2_control_block;	/* 32-bit port address of Power Mgt 2 Control Reg Blk */
-	u32 pm_timer_block;	/* 32-bit port address of Power Mgt Timer Ctrl Reg Blk */
-	u32 gpe0_block;		/* 32-bit port address of General Purpose Event 0 Reg Blk */
-	u32 gpe1_block;		/* 32-bit port address of General Purpose Event 1 Reg Blk */
-	u8 pm1_event_length;	/* Byte Length of ports at pm1x_event_block */
-	u8 pm1_control_length;	/* Byte Length of ports at pm1x_control_block */
-	u8 pm2_control_length;	/* Byte Length of ports at pm2_control_block */
-	u8 pm_timer_length;	/* Byte Length of ports at pm_timer_block */
-	u8 gpe0_block_length;	/* Byte Length of ports at gpe0_block */
-	u8 gpe1_block_length;	/* Byte Length of ports at gpe1_block */
-	u8 gpe1_base;		/* Offset in GPE number space where GPE1 events start */
-	u8 cst_control;		/* Support for the _CST object and C-States change notification */
-	u16 c2_latency;		/* Worst case HW latency to enter/exit C2 state */
-	u16 c3_latency;		/* Worst case HW latency to enter/exit C3 state */
-	u16 flush_size;		/* Processor memory cache line width, in bytes */
-	u16 flush_stride;	/* Number of flush strides that need to be read */
-	u8 duty_offset;		/* Processor duty cycle index in processor P_CNT reg */
-	u8 duty_width;		/* Processor duty cycle value bit width in P_CNT register */
-	u8 day_alarm;		/* Index to day-of-month alarm in RTC CMOS RAM */
-	u8 month_alarm;		/* Index to month-of-year alarm in RTC CMOS RAM */
-	u8 century;		/* Index to century in RTC CMOS RAM */
-	u16 boot_flags;		/* IA-PC Boot Architecture Flags (see below for individual flags) */
-	u8 reserved;		/* Reserved, must be zero */
-	u32 flags;		/* Miscellaneous flag bits (see below for individual flags) */
-	struct acpi_generic_address reset_register;	/* 64-bit address of the Reset register */
-	u8 reset_value;		/* Value to write to the reset_register port to reset the system */
-	u16 arm_boot_flags;	/* ARM-Specific Boot Flags (see below for individual flags) (ACPI 5.1) */
-	u8 minor_revision;	/* FADT Minor Revision (ACPI 5.1) */
-	u64 Xfacs;		/* 64-bit physical address of FACS */
-	u64 Xdsdt;		/* 64-bit physical address of DSDT */
-	struct acpi_generic_address xpm1a_event_block;	/* 64-bit Extended Power Mgt 1a Event Reg Blk address */
-	struct acpi_generic_address xpm1b_event_block;	/* 64-bit Extended Power Mgt 1b Event Reg Blk address */
-	struct acpi_generic_address xpm1a_control_block;	/* 64-bit Extended Power Mgt 1a Control Reg Blk address */
-	struct acpi_generic_address xpm1b_control_block;	/* 64-bit Extended Power Mgt 1b Control Reg Blk address */
-	struct acpi_generic_address xpm2_control_block;	/* 64-bit Extended Power Mgt 2 Control Reg Blk address */
-	struct acpi_generic_address xpm_timer_block;	/* 64-bit Extended Power Mgt Timer Ctrl Reg Blk address */
-	struct acpi_generic_address xgpe0_block;	/* 64-bit Extended General Purpose Event 0 Reg Blk address */
-	struct acpi_generic_address xgpe1_block;	/* 64-bit Extended General Purpose Event 1 Reg Blk address */
-	struct acpi_generic_address sleep_control;	/* 64-bit Sleep Control register (ACPI 5.0) */
-	struct acpi_generic_address sleep_status;	/* 64-bit Sleep Status register (ACPI 5.0) */
-	u64 hypervisor_id;	/* Hypervisor Vendor ID (ACPI 6.0) */
+	struct acpi_table_header header;	/* [V1] Common ACPI table header */
+	u32 facs;		/* [V1] 32-bit physical address of FACS */
+	u32 dsdt;		/* [V1] 32-bit physical address of DSDT */
+	u8 model;		/* [V1] System Interrupt Model (ACPI 1.0) - not used in ACPI 2.0+ */
+	u8 preferred_profile;	/* [V1] Conveys preferred power management profile to OSPM. */
+	u16 sci_interrupt;	/* [V1] System vector of SCI interrupt */
+	u32 smi_command;	/* [V1] 32-bit Port address of SMI command port */
+	u8 acpi_enable;		/* [V1] Value to write to SMI_CMD to enable ACPI */
+	u8 acpi_disable;	/* [V1] Value to write to SMI_CMD to disable ACPI */
+	u8 s4_bios_request;	/* [V1] Value to write to SMI_CMD to enter S4BIOS state */
+	u8 pstate_control;	/* [V1] Processor performance state control */
+	u32 pm1a_event_block;	/* [V1] 32-bit port address of Power Mgt 1a Event Reg Blk */
+	u32 pm1b_event_block;	/* [V1] 32-bit port address of Power Mgt 1b Event Reg Blk */
+	u32 pm1a_control_block;	/* [V1] 32-bit port address of Power Mgt 1a Control Reg Blk */
+	u32 pm1b_control_block;	/* [V1] 32-bit port address of Power Mgt 1b Control Reg Blk */
+	u32 pm2_control_block;	/* [V1] 32-bit port address of Power Mgt 2 Control Reg Blk */
+	u32 pm_timer_block;	/* [V1] 32-bit port address of Power Mgt Timer Ctrl Reg Blk */
+	u32 gpe0_block;		/* [V1] 32-bit port address of General Purpose Event 0 Reg Blk */
+	u32 gpe1_block;		/* [V1] 32-bit port address of General Purpose Event 1 Reg Blk */
+	u8 pm1_event_length;	/* [V1] Byte Length of ports at pm1x_event_block */
+	u8 pm1_control_length;	/* [V1] Byte Length of ports at pm1x_control_block */
+	u8 pm2_control_length;	/* [V1] Byte Length of ports at pm2_control_block */
+	u8 pm_timer_length;	/* [V1] Byte Length of ports at pm_timer_block */
+	u8 gpe0_block_length;	/* [V1] Byte Length of ports at gpe0_block */
+	u8 gpe1_block_length;	/* [V1] Byte Length of ports at gpe1_block */
+	u8 gpe1_base;		/* [V1] Offset in GPE number space where GPE1 events start */
+	u8 cst_control;		/* [V1] Support for the _CST object and C-States change notification */
+	u16 c2_latency;		/* [V1] Worst case HW latency to enter/exit C2 state */
+	u16 c3_latency;		/* [V1] Worst case HW latency to enter/exit C3 state */
+	u16 flush_size;		/* [V1] Processor memory cache line width, in bytes */
+	u16 flush_stride;	/* [V1] Number of flush strides that need to be read */
+	u8 duty_offset;		/* [V1] Processor duty cycle index in processor P_CNT reg */
+	u8 duty_width;		/* [V1] Processor duty cycle value bit width in P_CNT register */
+	u8 day_alarm;		/* [V1] Index to day-of-month alarm in RTC CMOS RAM */
+	u8 month_alarm;		/* [V1] Index to month-of-year alarm in RTC CMOS RAM */
+	u8 century;		/* [V1] Index to century in RTC CMOS RAM */
+	u16 boot_flags;		/* [V3] IA-PC Boot Architecture Flags (see below for individual flags) */
+	u8 reserved;		/* [V1] Reserved, must be zero */
+	u32 flags;		/* [V1] Miscellaneous flag bits (see below for individual flags) */
+	/* End of Version 1 FADT fields (ACPI 1.0) */
+
+	struct acpi_generic_address reset_register;	/* [V3] 64-bit address of the Reset register */
+	u8 reset_value;		/* [V3] Value to write to the reset_register port to reset the system */
+	u16 arm_boot_flags;	/* [V5] ARM-Specific Boot Flags (see below for individual flags) (ACPI 5.1) */
+	u8 minor_revision;	/* [V5] FADT Minor Revision (ACPI 5.1) */
+	u64 Xfacs;		/* [V3] 64-bit physical address of FACS */
+	u64 Xdsdt;		/* [V3] 64-bit physical address of DSDT */
+	struct acpi_generic_address xpm1a_event_block;	/* [V3] 64-bit Extended Power Mgt 1a Event Reg Blk address */
+	struct acpi_generic_address xpm1b_event_block;	/* [V3] 64-bit Extended Power Mgt 1b Event Reg Blk address */
+	struct acpi_generic_address xpm1a_control_block;	/* [V3] 64-bit Extended Power Mgt 1a Control Reg Blk address */
+	struct acpi_generic_address xpm1b_control_block;	/* [V3] 64-bit Extended Power Mgt 1b Control Reg Blk address */
+	struct acpi_generic_address xpm2_control_block;	/* [V3] 64-bit Extended Power Mgt 2 Control Reg Blk address */
+	struct acpi_generic_address xpm_timer_block;	/* [V3] 64-bit Extended Power Mgt Timer Ctrl Reg Blk address */
+	struct acpi_generic_address xgpe0_block;	/* [V3] 64-bit Extended General Purpose Event 0 Reg Blk address */
+	struct acpi_generic_address xgpe1_block;	/* [V3] 64-bit Extended General Purpose Event 1 Reg Blk address */
+	/* End of Version 3 FADT fields (ACPI 2.0) */
+
+	struct acpi_generic_address sleep_control;	/* [V4] 64-bit Sleep Control register (ACPI 5.0) */
+	/* End of Version 4 FADT fields (ACPI 3.0 and ACPI 4.0) (Field was originally reserved in ACPI 3.0) */
+
+	struct acpi_generic_address sleep_status;	/* [V5] 64-bit Sleep Status register (ACPI 5.0) */
+	/* End of Version 5 FADT fields (ACPI 5.0) */
+
+	u64 hypervisor_id;	/* [V6] Hypervisor Vendor ID (ACPI 6.0) */
+	/* End of Version 6 FADT fields (ACPI 6.0) */
+
 };
 
 /* Masks for FADT IA-PC Boot Architecture Flags (boot_flags) [Vx]=Introduced in this FADT revision */
@@ -301,8 +311,8 @@ struct acpi_table_fadt {
 
 /* Masks for FADT ARM Boot Architecture Flags (arm_boot_flags) ACPI 5.1 */
 
-#define ACPI_FADT_PSCI_COMPLIANT    (1)	/* 00: [V5+] PSCI 0.2+ is implemented */
-#define ACPI_FADT_PSCI_USE_HVC      (1<<1)	/* 01: [V5+] HVC must be used instead of SMC as the PSCI conduit */
+#define ACPI_FADT_PSCI_COMPLIANT    (1)	/* 00: [V5] PSCI 0.2+ is implemented */
+#define ACPI_FADT_PSCI_USE_HVC      (1<<1)	/* 01: [V5] HVC must be used instead of SMC as the PSCI conduit */
 
 /* Masks for FADT flags */
 
@@ -399,20 +409,34 @@ struct acpi_table_desc {
  * match the expected length. In other words, the length of the
  * FADT is the bottom line as to what the version really is.
  *
- * For reference, the values below are as follows:
- *     FADT V1 size: 0x074
- *     FADT V2 size: 0x084
- *     FADT V3 size: 0x0F4
- *     FADT V4 size: 0x0F4
- *     FADT V5 size: 0x10C
- *     FADT V6 size: 0x114
+ * NOTE: There is no officialy released V2 of the FADT. This
+ * version was used only for prototyping and testing during the
+ * 32-bit to 64-bit transition. V3 was the first official 64-bit
+ * version of the FADT.
+ *
+ * Update this list of defines when a new version of the FADT is
+ * added to the ACPI specification. Note that the FADT version is
+ * only incremented when new fields are appended to the existing
+ * version. Therefore, the FADT version is competely independent
+ * from the version of the ACPI specification where it is
+ * defined.
+ *
+ * For reference, the various FADT lengths are as follows:
+ *     FADT V1 size: 0x074      ACPI 1.0
+ *     FADT V3 size: 0x0F4      ACPI 2.0
+ *     FADT V4 size: 0x100      ACPI 3.0 and ACPI 4.0
+ *     FADT V5 size: 0x10C      ACPI 5.0
+ *     FADT V6 size: 0x114      ACPI 6.0
  */
-#define ACPI_FADT_V1_SIZE       (u32) (ACPI_FADT_OFFSET (flags) + 4)
-#define ACPI_FADT_V2_SIZE       (u32) (ACPI_FADT_OFFSET (minor_revision) + 1)
-#define ACPI_FADT_V3_SIZE       (u32) (ACPI_FADT_OFFSET (sleep_control))
-#define ACPI_FADT_V5_SIZE       (u32) (ACPI_FADT_OFFSET (hypervisor_id))
-#define ACPI_FADT_V6_SIZE       (u32) (sizeof (struct acpi_table_fadt))
+#define ACPI_FADT_V1_SIZE       (u32) (ACPI_FADT_OFFSET (flags) + 4)	/* ACPI 1.0 */
+#define ACPI_FADT_V3_SIZE       (u32) (ACPI_FADT_OFFSET (sleep_control))	/* ACPI 2.0 */
+#define ACPI_FADT_V4_SIZE       (u32) (ACPI_FADT_OFFSET (sleep_status))	/* ACPI 3.0 and ACPI 4.0 */
+#define ACPI_FADT_V5_SIZE       (u32) (ACPI_FADT_OFFSET (hypervisor_id))	/* ACPI 5.0 */
+#define ACPI_FADT_V6_SIZE       (u32) (sizeof (struct acpi_table_fadt))	/* ACPI 6.0 */
+
+/* Update these when new FADT versions are added */
 
+#define ACPI_FADT_MAX_VERSION   6
 #define ACPI_FADT_CONFORMANCE   "ACPI 6.1 (FADT version 6)"
 
 #endif				/* __ACTBL_H__ */
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 15/30] ACPICA: Debugger: Fix wrong inclusions in dbfileio.c
  2016-08-04  8:36 [PATCH 00/30] ACPICA: 20160629 Release Lv Zheng
                   ` (13 preceding siblings ...)
  2016-08-04  8:43 ` [PATCH 14/30] ACPICA: FADT support cleanup Lv Zheng
@ 2016-08-04  8:44 ` Lv Zheng
  2016-08-04  8:44 ` [PATCH 16/30] ACPICA: OSL: Add correct acpi_gbl_debug_timeout export to allow acpiexec to link Lv Zheng
                   ` (14 subsequent siblings)
  29 siblings, 0 replies; 37+ messages in thread
From: Lv Zheng @ 2016-08-04  8:44 UTC (permalink / raw)
  To: Rafael J. Wysocki, Rafael J. Wysocki, Len Brown
  Cc: Lv Zheng, Lv Zheng, linux-acpi, Bob Moore

ACPICA commit 649eb441fbef21965d10a1aca6ff41dcf23f8e05

dbfileio.c implements debugger functionalities that can only be used by the
application layer debugger (acpiexec), thus it should always include
<acapps.h> and thus shouldn't include <stdio.h> separately. Lv Zheng.

Link: https://github.com/acpica/acpica/commit/649eb441
Link: https://bugs.acpica.org/show_bug.cgi?id=1292
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
 drivers/acpi/acpica/dbfileio.c |   20 ++++++--------------
 1 file changed, 6 insertions(+), 14 deletions(-)

diff --git a/drivers/acpi/acpica/dbfileio.c b/drivers/acpi/acpica/dbfileio.c
index 4832879..6f05b8c 100644
--- a/drivers/acpi/acpica/dbfileio.c
+++ b/drivers/acpi/acpica/dbfileio.c
@@ -46,14 +46,12 @@
 #include "accommon.h"
 #include "acdebug.h"
 #include "actables.h"
-#include <stdio.h>
-#ifdef ACPI_APPLICATION
-#include "acapps.h"
-#endif
 
 #define _COMPONENT          ACPI_CA_DEBUGGER
 ACPI_MODULE_NAME("dbfileio")
 
+#ifdef ACPI_APPLICATION
+#include "acapps.h"
 #ifdef ACPI_DEBUGGER
 /*******************************************************************************
  *
@@ -69,8 +67,6 @@ ACPI_MODULE_NAME("dbfileio")
 void acpi_db_close_debug_file(void)
 {
 
-#ifdef ACPI_APPLICATION
-
 	if (acpi_gbl_debug_file) {
 		fclose(acpi_gbl_debug_file);
 		acpi_gbl_debug_file = NULL;
@@ -78,7 +74,6 @@ void acpi_db_close_debug_file(void)
 		acpi_os_printf("Debug output file %s closed\n",
 			       acpi_gbl_db_debug_filename);
 	}
-#endif
 }
 
 /*******************************************************************************
@@ -96,8 +91,6 @@ void acpi_db_close_debug_file(void)
 void acpi_db_open_debug_file(char *name)
 {
 
-#ifdef ACPI_APPLICATION
-
 	acpi_db_close_debug_file();
 	acpi_gbl_debug_file = fopen(name, "w+");
 	if (!acpi_gbl_debug_file) {
@@ -109,8 +102,6 @@ void acpi_db_open_debug_file(char *name)
 	strncpy(acpi_gbl_db_debug_filename, name,
 		sizeof(acpi_gbl_db_debug_filename));
 	acpi_gbl_db_output_to_file = TRUE;
-
-#endif
 }
 #endif
 
@@ -152,12 +143,13 @@ acpi_status acpi_db_load_tables(struct acpi_new_table_desc *list_head)
 			return (status);
 		}
 
-		fprintf(stderr,
-			"Acpi table [%4.4s] successfully installed and loaded\n",
-			table->signature);
+		acpi_os_printf
+		    ("Acpi table [%4.4s] successfully installed and loaded\n",
+		     table->signature);
 
 		table_list_head = table_list_head->next;
 	}
 
 	return (AE_OK);
 }
+#endif
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 16/30] ACPICA: OSL: Add correct acpi_gbl_debug_timeout export to allow acpiexec to link
  2016-08-04  8:36 [PATCH 00/30] ACPICA: 20160629 Release Lv Zheng
                   ` (14 preceding siblings ...)
  2016-08-04  8:44 ` [PATCH 15/30] ACPICA: Debugger: Fix wrong inclusions in dbfileio.c Lv Zheng
@ 2016-08-04  8:44 ` Lv Zheng
  2016-08-04  8:44 ` [PATCH 17/30] ACPICA: acpidump: Fix a duplicate variable definition Lv Zheng
                   ` (13 subsequent siblings)
  29 siblings, 0 replies; 37+ messages in thread
From: Lv Zheng @ 2016-08-04  8:44 UTC (permalink / raw)
  To: Rafael J. Wysocki, Rafael J. Wysocki, Len Brown
  Cc: Lv Zheng, Lv Zheng, linux-acpi, Bob Moore

ACPICA commit 408198c8c9786f9f104ee925020c3ab1701906e4

The acpi_gbl_debug_timeout which is used by acpiexec -et option now is only
implemented in oswinxf.c and used for WIN32 builds. This makes it very
difficult to remember that we need to add this variable to other os
specific layer files in order for linking. This patch makes it a global
option dependent on ACPI_APPLICATION so that it can always be linked by the
applications. Lv Zheng.

Link: https://github.com/acpica/acpica/commit/408198c8
Link: https://bugs.acpica.org/show_bug.cgi?id=1295
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
 drivers/acpi/acpica/acglobal.h                         |    1 +
 tools/power/acpi/os_specific/service_layers/osunixxf.c |    3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h
index 8c2c504..750fa82 100644
--- a/drivers/acpi/acpica/acglobal.h
+++ b/drivers/acpi/acpica/acglobal.h
@@ -383,6 +383,7 @@ ACPI_GLOBAL(const char, *acpi_gbl_pld_shape_list[]);
 
 ACPI_INIT_GLOBAL(ACPI_FILE, acpi_gbl_debug_file, NULL);
 ACPI_INIT_GLOBAL(ACPI_FILE, acpi_gbl_output_file, NULL);
+ACPI_INIT_GLOBAL(u8, acpi_gbl_debug_timeout, FALSE);
 
 /* Print buffer */
 
diff --git a/tools/power/acpi/os_specific/service_layers/osunixxf.c b/tools/power/acpi/os_specific/service_layers/osunixxf.c
index 88aa66e..8d8003c 100644
--- a/tools/power/acpi/os_specific/service_layers/osunixxf.c
+++ b/tools/power/acpi/os_specific/service_layers/osunixxf.c
@@ -63,10 +63,7 @@
 #define _COMPONENT          ACPI_OS_SERVICES
 ACPI_MODULE_NAME("osunixxf")
 
-u8 acpi_gbl_debug_timeout = FALSE;
-
 /* Upcalls to acpi_exec */
-
 void
 ae_table_override(struct acpi_table_header *existing_table,
 		  struct acpi_table_header **new_table);
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 17/30] ACPICA: acpidump: Fix a duplicate variable definition
  2016-08-04  8:36 [PATCH 00/30] ACPICA: 20160629 Release Lv Zheng
                   ` (15 preceding siblings ...)
  2016-08-04  8:44 ` [PATCH 16/30] ACPICA: OSL: Add correct acpi_gbl_debug_timeout export to allow acpiexec to link Lv Zheng
@ 2016-08-04  8:44 ` Lv Zheng
  2016-08-04  8:44 ` [PATCH 18/30] ACPICA: Applications: Enable USE_NATIVE_ALLOCATE_ZEROED environment for all applications Lv Zheng
                   ` (12 subsequent siblings)
  29 siblings, 0 replies; 37+ messages in thread
From: Lv Zheng @ 2016-08-04  8:44 UTC (permalink / raw)
  To: Rafael J. Wysocki, Rafael J. Wysocki, Len Brown
  Cc: Lv Zheng, Lv Zheng, linux-acpi, Bob Moore

ACPICA commit 080f99d5b29313380accd00d2b9768e809eb417b

acpi_gbl_integer_byte_width has already been instantiated by ACPI_GLOBAL() in
acglobal.h. Lv Zheng.

Link: https://github.com/acpica/acpica/commit/080f99d5
Link: https://bugs.acpica.org/show_bug.cgi?id=1301
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
 tools/power/acpi/tools/acpidump/acpidump.h |    6 ------
 tools/power/acpi/tools/acpidump/apmain.c   |    1 +
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/tools/power/acpi/tools/acpidump/acpidump.h b/tools/power/acpi/tools/acpidump/acpidump.h
index 025c232..94dd8a1 100644
--- a/tools/power/acpi/tools/acpidump/acpidump.h
+++ b/tools/power/acpi/tools/acpidump/acpidump.h
@@ -72,12 +72,6 @@ EXTERN ACPI_FILE INIT_GLOBAL(gbl_output_file, NULL);
 EXTERN char INIT_GLOBAL(*gbl_output_filename, NULL);
 EXTERN u64 INIT_GLOBAL(gbl_rsdp_base, 0);
 
-/* Globals required for use with ACPICA modules */
-
-#ifdef _DECLARE_GLOBALS
-u8 acpi_gbl_integer_byte_width = 8;
-#endif
-
 /* Action table used to defer requested options */
 
 struct ap_dump_action {
diff --git a/tools/power/acpi/tools/acpidump/apmain.c b/tools/power/acpi/tools/acpidump/apmain.c
index 7692e6b..cd6c097 100644
--- a/tools/power/acpi/tools/acpidump/apmain.c
+++ b/tools/power/acpi/tools/acpidump/apmain.c
@@ -315,6 +315,7 @@ int ACPI_SYSTEM_XFACE acpi_main(int argc, char *argv[])
 	ACPI_DEBUG_INITIALIZE();	/* For debug version only */
 	acpi_os_initialize();
 	gbl_output_file = ACPI_FILE_OUT;
+	acpi_gbl_integer_byte_width = 8;
 
 	/* Process command line options */
 
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 18/30] ACPICA: Applications: Enable USE_NATIVE_ALLOCATE_ZEROED environment for all applications
  2016-08-04  8:36 [PATCH 00/30] ACPICA: 20160629 Release Lv Zheng
                   ` (16 preceding siblings ...)
  2016-08-04  8:44 ` [PATCH 17/30] ACPICA: acpidump: Fix a duplicate variable definition Lv Zheng
@ 2016-08-04  8:44 ` Lv Zheng
  2016-08-04  8:44 ` [PATCH 19/30] ACPICA: Clib: Fix build issues when ACPI_USE_STANDARD_HEADERS is not defined by converting size_t to acpi_size Lv Zheng
                   ` (11 subsequent siblings)
  29 siblings, 0 replies; 37+ messages in thread
From: Lv Zheng @ 2016-08-04  8:44 UTC (permalink / raw)
  To: Rafael J. Wysocki, Rafael J. Wysocki, Len Brown
  Cc: Lv Zheng, Lv Zheng, linux-acpi, Bob Moore

ACPICA commit 56920e2093d612ac6338dd8eb0fa89231446198f

We now safe to enable USE_NATIVE_ALLOCATE_ZEROED for all applications as
there are implementations in oswinxf.c, osunixxf.c and osefixf.c. Lv Zheng.

Link: https://github.com/acpica/acpica/commit/56920e20
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
 include/acpi/platform/acenv.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h
index ed959e5..50ae2d6 100644
--- a/include/acpi/platform/acenv.h
+++ b/include/acpi/platform/acenv.h
@@ -78,6 +78,7 @@
 	(defined ACPI_EXAMPLE_APP)
 #define ACPI_APPLICATION
 #define ACPI_SINGLE_THREADED
+#define USE_NATIVE_ALLOCATE_ZEROED
 #endif
 
 /* iASL configuration */
@@ -124,7 +125,6 @@
 
 #ifdef ACPI_DUMP_APP
 #define ACPI_USE_NATIVE_MEMORY_MAPPING
-#define USE_NATIVE_ALLOCATE_ZEROED
 #endif
 
 /* acpi_names/Example configuration. Hardware disabled */
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 19/30] ACPICA: Clib: Fix build issues when ACPI_USE_STANDARD_HEADERS is not defined by converting size_t to acpi_size
  2016-08-04  8:36 [PATCH 00/30] ACPICA: 20160629 Release Lv Zheng
                   ` (17 preceding siblings ...)
  2016-08-04  8:44 ` [PATCH 18/30] ACPICA: Applications: Enable USE_NATIVE_ALLOCATE_ZEROED environment for all applications Lv Zheng
@ 2016-08-04  8:44 ` Lv Zheng
  2016-08-04  8:44 ` [PATCH 20/30] ACPICA: Clib: Cleanup va_arg related code Lv Zheng
                   ` (10 subsequent siblings)
  29 siblings, 0 replies; 37+ messages in thread
From: Lv Zheng @ 2016-08-04  8:44 UTC (permalink / raw)
  To: Rafael J. Wysocki, Rafael J. Wysocki, Len Brown
  Cc: Lv Zheng, Lv Zheng, linux-acpi, Bob Moore

ACPICA commit 7cf411136c69ef0b8f184b96599eb45c15b89226

When standard size_t is not defined due to ACPI_USE_STANDARD_HEADERS=n,
we shouldn't use size_t, but should use acpi_size instead. This fixes such
build issue. Lv Zheng.

Link: https://github.com/acpica/acpica/commit/7cf41113
Link: https://bugs.acpica.org/show_bug.cgi?id=1296
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
 tools/power/acpi/tools/acpidump/apfiles.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/power/acpi/tools/acpidump/apfiles.c b/tools/power/acpi/tools/acpidump/apfiles.c
index 5fcd970..c527521 100644
--- a/tools/power/acpi/tools/acpidump/apfiles.c
+++ b/tools/power/acpi/tools/acpidump/apfiles.c
@@ -134,7 +134,7 @@ int ap_write_to_binary_file(struct acpi_table_header *table, u32 instance)
 	char filename[ACPI_NAME_SIZE + 16];
 	char instance_str[16];
 	ACPI_FILE file;
-	size_t actual;
+	acpi_size actual;
 	u32 table_length;
 
 	/* Obtain table length */
@@ -211,7 +211,7 @@ struct acpi_table_header *ap_get_table_from_file(char *pathname,
 	struct acpi_table_header *buffer = NULL;
 	ACPI_FILE file;
 	u32 file_size;
-	size_t actual;
+	acpi_size actual;
 
 	/* Must use binary mode */
 
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 20/30] ACPICA: Clib: Cleanup va_arg related code
  2016-08-04  8:36 [PATCH 00/30] ACPICA: 20160629 Release Lv Zheng
                   ` (18 preceding siblings ...)
  2016-08-04  8:44 ` [PATCH 19/30] ACPICA: Clib: Fix build issues when ACPI_USE_STANDARD_HEADERS is not defined by converting size_t to acpi_size Lv Zheng
@ 2016-08-04  8:44 ` Lv Zheng
  2016-08-04  8:44 ` [PATCH 21/30] ACPICA: Clib: Fix wrong mini C library usage Lv Zheng
                   ` (9 subsequent siblings)
  29 siblings, 0 replies; 37+ messages in thread
From: Lv Zheng @ 2016-08-04  8:44 UTC (permalink / raw)
  To: Rafael J. Wysocki, Rafael J. Wysocki, Len Brown
  Cc: Lv Zheng, Lv Zheng, linux-acpi, Bob Moore

ACPICA commit 32701b33cdc48d9bc43da8c9274cf172135b68fc

We in fact is always using the compiler specific stdarg.h for GCC even
when ACPI_USE_STANDARD_HEADERS is not defined. So that the va_arg usages
can always be correct for different compiler options.

Likewise, the va_arg implemented in acenv.h is actually MSVC specific,
this patch also moves it to acmsvc.h and tunes acwin.h to correctly use
it.

After cleaning up, this patch removes all <stdarg.h> inclusions from
other files, but doesn't touch the BSD headers. Lv Zheng.

Link: https://github.com/acpica/acpica/commit/32701b33
Link: https://bugs.acpica.org/show_bug.cgi?id=1298
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
 include/acpi/platform/acenv.h   |   40 ---------------------------------------
 include/acpi/platform/acgcc.h   |    6 ++++++
 include/acpi/platform/aclinux.h |    1 -
 3 files changed, 6 insertions(+), 41 deletions(-)

diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h
index 50ae2d6..f405113 100644
--- a/include/acpi/platform/acenv.h
+++ b/include/acpi/platform/acenv.h
@@ -342,52 +342,12 @@
 
 /* Use the standard headers from the standard locations */
 
-#include <stdarg.h>
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
 
 #endif				/* ACPI_USE_STANDARD_HEADERS */
 
-/* We will be linking to the standard Clib functions */
-
-#else
-
-/******************************************************************************
- *
- * Not using native C library, use local implementations
- *
- *****************************************************************************/
-
-/*
- * Use local definitions of C library macros and functions. These function
- * implementations may not be as efficient as an inline or assembly code
- * implementation provided by a native C library, but they are functionally
- * equivalent.
- */
-#ifndef va_arg
-
-#ifndef _VALIST
-#define _VALIST
-typedef char *va_list;
-#endif				/* _VALIST */
-
-/* Storage alignment properties */
-
-#define  _AUPBND                (sizeof (acpi_native_int) - 1)
-#define  _ADNBND                (sizeof (acpi_native_int) - 1)
-
-/* Variable argument list macro definitions */
-
-#define _bnd(X, bnd)            (((sizeof (X)) + (bnd)) & (~(bnd)))
-#define va_arg(ap, T)           (*(T *)(((ap) += (_bnd (T, _AUPBND))) - (_bnd (T,_ADNBND))))
-#define va_end(ap)              (ap = (va_list) NULL)
-#define va_start(ap, A)         (void) ((ap) = (((char *) &(A)) + (_bnd (A,_AUPBND))))
-
-#endif				/* va_arg */
-
-/* Use the local (ACPICA) definitions of the clib functions */
-
 #endif				/* ACPI_USE_SYSTEM_CLIBRARY */
 
 #ifndef ACPI_FILE
diff --git a/include/acpi/platform/acgcc.h b/include/acpi/platform/acgcc.h
index c5a216c..9f79e98 100644
--- a/include/acpi/platform/acgcc.h
+++ b/include/acpi/platform/acgcc.h
@@ -44,6 +44,12 @@
 #ifndef __ACGCC_H__
 #define __ACGCC_H__
 
+/*
+ * Use compiler specific <stdarg.h> is a good practice for even when
+ * -nostdinc is specified (i.e., ACPI_USE_STANDARD_HEADERS undefined.
+ */
+#include <stdarg.h>
+
 #define ACPI_INLINE             __inline__
 
 /* Function name is used for debug output. Non-ANSI, compiler-dependent */
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h
index cde6f33..447c33f 100644
--- a/include/acpi/platform/aclinux.h
+++ b/include/acpi/platform/aclinux.h
@@ -180,7 +180,6 @@
 
 #else				/* !__KERNEL__ */
 
-#include <stdarg.h>
 #include <string.h>
 #include <stdlib.h>
 #include <ctype.h>
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 21/30] ACPICA: Clib: Fix wrong mini C library usage
  2016-08-04  8:36 [PATCH 00/30] ACPICA: 20160629 Release Lv Zheng
                   ` (19 preceding siblings ...)
  2016-08-04  8:44 ` [PATCH 20/30] ACPICA: Clib: Cleanup va_arg related code Lv Zheng
@ 2016-08-04  8:44 ` Lv Zheng
  2016-08-04  8:44 ` [PATCH 22/30] ACPICA: Clib/EFI: Fix wrong order of standard integer types/IO handles Lv Zheng
                   ` (8 subsequent siblings)
  29 siblings, 0 replies; 37+ messages in thread
From: Lv Zheng @ 2016-08-04  8:44 UTC (permalink / raw)
  To: Rafael J. Wysocki, Rafael J. Wysocki, Len Brown
  Cc: Lv Zheng, Lv Zheng, linux-acpi, Bob Moore

ACPICA commit 4aab18466b56f3660f27cffd3c0160900737f844

When mini C library is used, we should have the following macros undefined.
The only user should be the EFI applications:
  ACPI_USE_SYSTEM_CLIBRARY=n
  ACPI_USE_STANDARD_HEADERS=n
All other applications uses the compiler specific library:
  ACPI_USE_SYSTEM_CLIBRARY=y
  ACPI_USE_STANDARD_HEADERS=y
Linux/BSD kernels are the kind of hosts providing C library but does not
provide the standard headers:
  ACPI_USE_SYSTEM_CLIBRARY=y
  ACPI_USE_STANDARD_HEADERS=n
But the above logic hasn't been synchronized between the header files.

This patch synchronizes all header files to correct C library usages for
different platforms. This patch moves all ACPI_USE_SYSTEM_CLIRARY and
ACPI_USE_STANDARD_HEADERS to the top most lines of a platform specific
header.

After synchronization, ACPI_USE_SYSTEM_CLIRARY definition can be removed
for ACPI_APPLICATION. Lv Zheng.

Link: https://github.com/acpica/acpica/commit/4aab1846
Link: https://bugs.acpica.org/show_bug.cgi?id=1299
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
 include/acpi/platform/acenv.h   |    7 ++-----
 include/acpi/platform/aclinux.h |    7 ++++---
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h
index f405113..ee5c0b9 100644
--- a/include/acpi/platform/acenv.h
+++ b/include/acpi/platform/acenv.h
@@ -149,7 +149,6 @@
 /* Common for all ACPICA applications */
 
 #ifdef ACPI_APPLICATION
-#define ACPI_USE_SYSTEM_CLIBRARY
 #define ACPI_USE_LOCAL_CACHE
 #endif
 
@@ -326,7 +325,8 @@
  * ACPI_USE_SYSTEM_CLIBRARY - Define this if linking to an actual C library.
  *      Otherwise, local versions of string/memory functions will be used.
  * ACPI_USE_STANDARD_HEADERS - Define this if linking to a C library and
- *      the standard header files may be used.
+ *      the standard header files may be used. Defining this implies that
+ *      ACPI_USE_SYSTEM_CLIBRARY has been defined.
  *
  * The ACPICA subsystem only uses low level C library functions that do not
  * call operating system services and may therefore be inlined in the code.
@@ -334,7 +334,6 @@
  * It may be necessary to tailor these include files to the target
  * generation environment.
  */
-#ifdef ACPI_USE_SYSTEM_CLIBRARY
 
 /* Use the standard C library headers. We want to keep these to a minimum. */
 
@@ -348,8 +347,6 @@
 
 #endif				/* ACPI_USE_STANDARD_HEADERS */
 
-#endif				/* ACPI_USE_SYSTEM_CLIBRARY */
-
 #ifndef ACPI_FILE
 #ifdef ACPI_APPLICATION
 #include <stdio.h>
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h
index 447c33f..1380ec7 100644
--- a/include/acpi/platform/aclinux.h
+++ b/include/acpi/platform/aclinux.h
@@ -180,10 +180,11 @@
 
 #else				/* !__KERNEL__ */
 
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
+#define ACPI_USE_STANDARD_HEADERS
+
+#ifdef ACPI_USE_STANDARD_HEADERS
 #include <unistd.h>
+#endif
 
 /* Define/disable kernel-specific declarators */
 
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 22/30] ACPICA: Clib/EFI: Fix wrong order of standard integer types/IO handles
  2016-08-04  8:36 [PATCH 00/30] ACPICA: 20160629 Release Lv Zheng
                   ` (20 preceding siblings ...)
  2016-08-04  8:44 ` [PATCH 21/30] ACPICA: Clib: Fix wrong mini C library usage Lv Zheng
@ 2016-08-04  8:44 ` Lv Zheng
  2016-08-04  8:44 ` [PATCH 23/30] ACPICA: MSVC9: Fix <sys/stat.h> inclusion order issue Lv Zheng
                   ` (7 subsequent siblings)
  29 siblings, 0 replies; 37+ messages in thread
From: Lv Zheng @ 2016-08-04  8:44 UTC (permalink / raw)
  To: Rafael J. Wysocki, Rafael J. Wysocki, Len Brown
  Cc: Lv Zheng, Lv Zheng, linux-acpi, Bob Moore

ACPICA commit 7f9b359b7c78c69b07f62eb2d58f710c351fd75d

EFI header should use standard C library stuffs (integer types and IO
handles) rather than implementing such standard stuffs.
This patch fixes this issue by:
1. Implementing standard integer types for ACPI_USE_STANDARD_HADERS=n;
2. Defining EFI types using standard integer types and standard IO handles;
3. Tuning header inclusion order and environment definition order;
4. Removing wrong standard header inclusion from ACPICA core files;
5. Moving several application headers from acpidump.h to acenv.h.
This patch corrects some of them. Lv Zheng.

Except some harmless header inclusion re-ordering, Linux kernel is not
affected by this change.

Link: https://github.com/acpica/acpica/commit/7f9b359b
Link: https://bugs.acpica.org/show_bug.cgi?id=1300
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
 drivers/acpi/acpica/acapps.h               |    2 --
 drivers/acpi/acpica/utpredef.c             |    2 --
 include/acpi/platform/acenv.h              |   23 ++++++++++++++---------
 include/acpi/platform/acenvex.h            |   14 ++++++++------
 tools/power/acpi/common/cmfsize.c          |    1 -
 tools/power/acpi/tools/acpidump/acpidump.h |    5 -----
 6 files changed, 22 insertions(+), 25 deletions(-)

diff --git a/drivers/acpi/acpica/acapps.h b/drivers/acpi/acpica/acapps.h
index ca2c060..247f30c 100644
--- a/drivers/acpi/acpica/acapps.h
+++ b/drivers/acpi/acpica/acapps.h
@@ -44,8 +44,6 @@
 #ifndef _ACAPPS
 #define _ACAPPS
 
-#include <stdio.h>
-
 /* Common info for tool signons */
 
 #define ACPICA_NAME                 "Intel ACPI Component Architecture"
diff --git a/drivers/acpi/acpica/utpredef.c b/drivers/acpi/acpica/utpredef.c
index 770a177..ce18346 100644
--- a/drivers/acpi/acpica/utpredef.c
+++ b/drivers/acpi/acpica/utpredef.c
@@ -176,8 +176,6 @@ void acpi_ut_get_expected_return_types(char *buffer, u32 expected_btypes)
  ******************************************************************************/
 
 #if (defined ACPI_ASL_COMPILER || defined ACPI_HELP_APP)
-#include <stdio.h>
-#include <string.h>
 
 /* Local prototypes */
 
diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h
index ee5c0b9..1e2fe95 100644
--- a/include/acpi/platform/acenv.h
+++ b/include/acpi/platform/acenv.h
@@ -209,18 +209,20 @@
 #elif defined(__OS2__)
 #include "acos2.h"
 
-#elif defined(_AED_EFI)
-#include "acefi.h"
-
-#elif defined(_GNU_EFI)
-#include "acefi.h"
-
 #elif defined(__HAIKU__)
 #include "achaiku.h"
 
 #elif defined(__QNX__)
 #include "acqnx.h"
 
+/*
+ * EFI applications can be built with -nostdlib, in this case, it must be
+ * included after including all other host environmental definitions, in
+ * order to override the definitions.
+ */
+#elif defined(_AED_EFI) || defined(_GNU_EFI)
+#include "acefi.h"
+
 #else
 
 /* Unknown environment */
@@ -344,12 +346,16 @@
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
+#ifdef ACPI_APPLICATION
+#include <stdio.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <sys/stat.h>
+#endif
 
 #endif				/* ACPI_USE_STANDARD_HEADERS */
 
-#ifndef ACPI_FILE
 #ifdef ACPI_APPLICATION
-#include <stdio.h>
 #define ACPI_FILE              FILE *
 #define ACPI_FILE_OUT          stdout
 #define ACPI_FILE_ERR          stderr
@@ -358,7 +364,6 @@
 #define ACPI_FILE_OUT          NULL
 #define ACPI_FILE_ERR          NULL
 #endif				/* ACPI_APPLICATION */
-#endif				/* ACPI_FILE */
 
 #ifndef ACPI_INIT_FUNCTION
 #define ACPI_INIT_FUNCTION
diff --git a/include/acpi/platform/acenvex.h b/include/acpi/platform/acenvex.h
index 4f15c1d..b672615 100644
--- a/include/acpi/platform/acenvex.h
+++ b/include/acpi/platform/acenvex.h
@@ -59,15 +59,17 @@
 #elif defined(WIN32)
 #include "acwinex.h"
 
-#elif defined(_AED_EFI)
-#include "acefiex.h"
-
-#elif defined(_GNU_EFI)
-#include "acefiex.h"
-
 #elif defined(__DragonFly__)
 #include "acdragonflyex.h"
 
+/*
+ * EFI applications can be built with -nostdlib, in this case, it must be
+ * included after including all other host environmental definitions, in
+ * order to override the definitions.
+ */
+#elif defined(_AED_EFI) || defined(_GNU_EFI)
+#include "acefiex.h"
+
 #endif
 
 /*! [End] no source code translation !*/
diff --git a/tools/power/acpi/common/cmfsize.c b/tools/power/acpi/common/cmfsize.c
index e73a79f..d2240e6 100644
--- a/tools/power/acpi/common/cmfsize.c
+++ b/tools/power/acpi/common/cmfsize.c
@@ -44,7 +44,6 @@
 #include <acpi/acpi.h>
 #include "accommon.h"
 #include "acapps.h"
-#include <stdio.h>
 
 #define _COMPONENT          ACPI_TOOLS
 ACPI_MODULE_NAME("cmfsize")
diff --git a/tools/power/acpi/tools/acpidump/acpidump.h b/tools/power/acpi/tools/acpidump/acpidump.h
index 94dd8a1..9f7db00 100644
--- a/tools/power/acpi/tools/acpidump/acpidump.h
+++ b/tools/power/acpi/tools/acpidump/acpidump.h
@@ -56,11 +56,6 @@
 #include "accommon.h"
 #include "actables.h"
 
-#include <stdio.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <sys/stat.h>
-
 /* Globals */
 
 EXTERN u8 INIT_GLOBAL(gbl_summary_mode, FALSE);
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 23/30] ACPICA: MSVC9: Fix <sys/stat.h> inclusion order issue
  2016-08-04  8:36 [PATCH 00/30] ACPICA: 20160629 Release Lv Zheng
                   ` (21 preceding siblings ...)
  2016-08-04  8:44 ` [PATCH 22/30] ACPICA: Clib/EFI: Fix wrong order of standard integer types/IO handles Lv Zheng
@ 2016-08-04  8:44 ` Lv Zheng
  2016-08-04  8:45 ` [PATCH 24/30] ACPICA: Clib: Add -nostdinc support for EFI layer Lv Zheng
                   ` (6 subsequent siblings)
  29 siblings, 0 replies; 37+ messages in thread
From: Lv Zheng @ 2016-08-04  8:44 UTC (permalink / raw)
  To: Rafael J. Wysocki, Rafael J. Wysocki, Len Brown
  Cc: Lv Zheng, Lv Zheng, linux-acpi, Bob Moore

ACPICA commit 9bb265c2afb9910e46f820d6759648580edabd09

When /Za is specified, headers of some Windows SDKs contain bugs breaking
VC builds, and MSVC9's default SDK is one of such header-buggy library.

In order to solve this issue, many VC developers stop using /Za. However
we've been asked to have this fixed without removing /Za.

In MSVC9 default SDK, this issue can be fixed by restricting <sys/stat.h>
to be the last standard file included by every source file in the projects.
This patch thus moves <sys/stat.h> inclusion to "acapps.h", so that this
issue can be fixed by ensuring that "acapps.h" is always the last standard
file included by all of the ACPICA source files. This is in fact also a
useful cleanup because applications can only include one header (e.x.,
acpidump.h) instead of including acapps.h separately. Lv Zheng.

Except some harmless header inclusion re-ordering, Linux kernel is not
affected by this change.

Link: https://github.com/acpica/acpica/commit/9bb265c2
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
 drivers/acpi/acpica/acapps.h               |    4 ++++
 include/acpi/platform/acenv.h              |    3 ++-
 tools/power/acpi/tools/acpidump/acpidump.h |    1 +
 tools/power/acpi/tools/acpidump/apfiles.c  |    1 -
 tools/power/acpi/tools/acpidump/apmain.c   |    1 -
 5 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/acpi/acpica/acapps.h b/drivers/acpi/acpica/acapps.h
index 247f30c..bc38534 100644
--- a/drivers/acpi/acpica/acapps.h
+++ b/drivers/acpi/acpica/acapps.h
@@ -44,6 +44,10 @@
 #ifndef _ACAPPS
 #define _ACAPPS
 
+#ifdef ACPI_USE_STANDARD_HEADERS
+#include <sys/stat.h>
+#endif				/* ACPI_USE_STANDARD_HEADERS */
+
 /* Common info for tool signons */
 
 #define ACPICA_NAME                 "Intel ACPI Component Architecture"
diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h
index 1e2fe95..3dbfa27 100644
--- a/include/acpi/platform/acenv.h
+++ b/include/acpi/platform/acenv.h
@@ -350,7 +350,8 @@
 #include <stdio.h>
 #include <fcntl.h>
 #include <errno.h>
-#include <sys/stat.h>
+#include <time.h>
+#include <signal.h>
 #endif
 
 #endif				/* ACPI_USE_STANDARD_HEADERS */
diff --git a/tools/power/acpi/tools/acpidump/acpidump.h b/tools/power/acpi/tools/acpidump/acpidump.h
index 9f7db00..00423fc 100644
--- a/tools/power/acpi/tools/acpidump/acpidump.h
+++ b/tools/power/acpi/tools/acpidump/acpidump.h
@@ -55,6 +55,7 @@
 #include <acpi/acpi.h>
 #include "accommon.h"
 #include "actables.h"
+#include "acapps.h"
 
 /* Globals */
 
diff --git a/tools/power/acpi/tools/acpidump/apfiles.c b/tools/power/acpi/tools/acpidump/apfiles.c
index c527521..44a0010 100644
--- a/tools/power/acpi/tools/acpidump/apfiles.c
+++ b/tools/power/acpi/tools/acpidump/apfiles.c
@@ -42,7 +42,6 @@
  */
 
 #include "acpidump.h"
-#include "acapps.h"
 
 /* Local prototypes */
 
diff --git a/tools/power/acpi/tools/acpidump/apmain.c b/tools/power/acpi/tools/acpidump/apmain.c
index cd6c097..17ce0d7 100644
--- a/tools/power/acpi/tools/acpidump/apmain.c
+++ b/tools/power/acpi/tools/acpidump/apmain.c
@@ -43,7 +43,6 @@
 
 #define _DECLARE_GLOBALS
 #include "acpidump.h"
-#include "acapps.h"
 
 /*
  * acpidump - A portable utility for obtaining system ACPI tables and dumping
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 24/30] ACPICA: Clib: Add -nostdinc support for EFI layer
  2016-08-04  8:36 [PATCH 00/30] ACPICA: 20160629 Release Lv Zheng
                   ` (22 preceding siblings ...)
  2016-08-04  8:44 ` [PATCH 23/30] ACPICA: MSVC9: Fix <sys/stat.h> inclusion order issue Lv Zheng
@ 2016-08-04  8:45 ` Lv Zheng
  2016-08-04  8:45 ` [PATCH 26/30] ACPICA: Applications: Fix a potential issue that help messages may be dumped to acpi_gbl_debug_file Lv Zheng
                   ` (5 subsequent siblings)
  29 siblings, 0 replies; 37+ messages in thread
From: Lv Zheng @ 2016-08-04  8:45 UTC (permalink / raw)
  To: Rafael J. Wysocki, Rafael J. Wysocki, Len Brown
  Cc: Lv Zheng, Lv Zheng, linux-acpi, Bob Moore

ACPICA commit d261d40ea168f8e4c4e3986de720b8651c4aba1c

This patch adds sprintf()/snprintf()/vsnprintf()/printf()/vfprintf()
support for OSPMs that have ACPI_USE_SYSTEM_CLIBRARY defined but do not
have ACPI_USE_STANDARD_HEADERS defined.

-iwithprefix include is required to include <stdarg.h> which contains
compiler specific implementation of vargs when -nostdinc is specified.
-fno-builtin is required for GCC to avoid optimization performed printf().
This optimization cannot be automatically disabled by specifying -nostdlib.
Please refer to the Link 1 for the details. However, the build option
changes do not affect Linux kernel builds and are not included. Lv Zheng.

Link 1: http://www.ciselant.de/projects/gcc_printf/gcc_printf.html
Link: https://github.com/acpica/acpica/commit/d261d40e
Link: https://bugs.acpica.org/show_bug.cgi?id=1302
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
 drivers/acpi/acpica/acutils.h             |   19 ------
 drivers/acpi/acpica/utbuffer.c            |   30 ++++-----
 drivers/acpi/acpica/utdebug.c             |    2 +-
 drivers/acpi/acpica/utprint.c             |  104 +++++++++++++++++++++++++----
 tools/power/acpi/tools/acpidump/apdump.c  |    6 +-
 tools/power/acpi/tools/acpidump/apfiles.c |    3 +-
 6 files changed, 109 insertions(+), 55 deletions(-)

diff --git a/drivers/acpi/acpica/acutils.h b/drivers/acpi/acpica/acutils.h
index 91269a6..d899296 100644
--- a/drivers/acpi/acpica/acutils.h
+++ b/drivers/acpi/acpica/acutils.h
@@ -724,25 +724,6 @@ const struct ah_device_id *acpi_ah_match_hardware_id(char *hid);
 const char *acpi_ah_match_uuid(u8 *data);
 
 /*
- * utprint - printf/vprintf output functions
- */
-const char *acpi_ut_scan_number(const char *string, u64 *number_ptr);
-
-const char *acpi_ut_print_number(char *string, u64 number);
-
-int
-acpi_ut_vsnprintf(char *string,
-		  acpi_size size, const char *format, va_list args);
-
-int acpi_ut_snprintf(char *string, acpi_size size, const char *format, ...);
-
-#ifdef ACPI_APPLICATION
-int acpi_ut_file_vprintf(ACPI_FILE file, const char *format, va_list args);
-
-int acpi_ut_file_printf(ACPI_FILE file, const char *format, ...);
-#endif
-
-/*
  * utuuid -- UUID support functions
  */
 #if (defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP || defined ACPI_HELP_APP)
diff --git a/drivers/acpi/acpica/utbuffer.c b/drivers/acpi/acpica/utbuffer.c
index bd31faf..ff29812 100644
--- a/drivers/acpi/acpica/utbuffer.c
+++ b/drivers/acpi/acpica/utbuffer.c
@@ -239,8 +239,7 @@ acpi_ut_dump_buffer_to_file(ACPI_FILE file,
 	u8 buf_char;
 
 	if (!buffer) {
-		acpi_ut_file_printf(file,
-				    "Null Buffer Pointer in DumpBuffer!\n");
+		fprintf(file, "Null Buffer Pointer in DumpBuffer!\n");
 		return;
 	}
 
@@ -254,7 +253,7 @@ acpi_ut_dump_buffer_to_file(ACPI_FILE file,
 
 		/* Print current offset */
 
-		acpi_ut_file_printf(file, "%6.4X: ", (base_offset + i));
+		fprintf(file, "%6.4X: ", (base_offset + i));
 
 		/* Print 16 hex chars */
 
@@ -263,8 +262,7 @@ acpi_ut_dump_buffer_to_file(ACPI_FILE file,
 
 				/* Dump fill spaces */
 
-				acpi_ut_file_printf(file, "%*s",
-						    ((display * 2) + 1), " ");
+				fprintf(file, "%*s", ((display * 2) + 1), " ");
 				j += display;
 				continue;
 			}
@@ -273,34 +271,34 @@ acpi_ut_dump_buffer_to_file(ACPI_FILE file,
 			case DB_BYTE_DISPLAY:
 			default:	/* Default is BYTE display */
 
-				acpi_ut_file_printf(file, "%02X ",
-						    buffer[(acpi_size)i + j]);
+				fprintf(file, "%02X ",
+					buffer[(acpi_size)i + j]);
 				break;
 
 			case DB_WORD_DISPLAY:
 
 				ACPI_MOVE_16_TO_32(&temp32,
 						   &buffer[(acpi_size)i + j]);
-				acpi_ut_file_printf(file, "%04X ", temp32);
+				fprintf(file, "%04X ", temp32);
 				break;
 
 			case DB_DWORD_DISPLAY:
 
 				ACPI_MOVE_32_TO_32(&temp32,
 						   &buffer[(acpi_size)i + j]);
-				acpi_ut_file_printf(file, "%08X ", temp32);
+				fprintf(file, "%08X ", temp32);
 				break;
 
 			case DB_QWORD_DISPLAY:
 
 				ACPI_MOVE_32_TO_32(&temp32,
 						   &buffer[(acpi_size)i + j]);
-				acpi_ut_file_printf(file, "%08X", temp32);
+				fprintf(file, "%08X", temp32);
 
 				ACPI_MOVE_32_TO_32(&temp32,
 						   &buffer[(acpi_size)i + j +
 							   4]);
-				acpi_ut_file_printf(file, "%08X ", temp32);
+				fprintf(file, "%08X ", temp32);
 				break;
 			}
 
@@ -311,24 +309,24 @@ acpi_ut_dump_buffer_to_file(ACPI_FILE file,
 		 * Print the ASCII equivalent characters but watch out for the bad
 		 * unprintable ones (printable chars are 0x20 through 0x7E)
 		 */
-		acpi_ut_file_printf(file, " ");
+		fprintf(file, " ");
 		for (j = 0; j < 16; j++) {
 			if (i + j >= count) {
-				acpi_ut_file_printf(file, "\n");
+				fprintf(file, "\n");
 				return;
 			}
 
 			buf_char = buffer[(acpi_size)i + j];
 			if (isprint(buf_char)) {
-				acpi_ut_file_printf(file, "%c", buf_char);
+				fprintf(file, "%c", buf_char);
 			} else {
-				acpi_ut_file_printf(file, ".");
+				fprintf(file, ".");
 			}
 		}
 
 		/* Done with that line. */
 
-		acpi_ut_file_printf(file, "\n");
+		fprintf(file, "\n");
 		i += 16;
 	}
 
diff --git a/drivers/acpi/acpica/utdebug.c b/drivers/acpi/acpica/utdebug.c
index 84c0853..005a4a2 100644
--- a/drivers/acpi/acpica/utdebug.c
+++ b/drivers/acpi/acpica/utdebug.c
@@ -646,7 +646,7 @@ void ACPI_INTERNAL_VAR_XFACE acpi_log_error(const char *format, ...)
 	va_list args;
 
 	va_start(args, format);
-	(void)acpi_ut_file_vprintf(ACPI_FILE_ERR, format, args);
+	(void)vfprintf(ACPI_FILE_ERR, format, args);
 	va_end(args);
 }
 
diff --git a/drivers/acpi/acpica/utprint.c b/drivers/acpi/acpica/utprint.c
index dd084cf..13b8617 100644
--- a/drivers/acpi/acpica/utprint.c
+++ b/drivers/acpi/acpica/utprint.c
@@ -336,7 +336,7 @@ static char *acpi_ut_format_number(char *string,
 
 /*******************************************************************************
  *
- * FUNCTION:    acpi_ut_vsnprintf
+ * FUNCTION:    vsnprintf
  *
  * PARAMETERS:  string              - String with boundary
  *              size                - Boundary of the string
@@ -349,9 +349,7 @@ static char *acpi_ut_format_number(char *string,
  *
  ******************************************************************************/
 
-int
-acpi_ut_vsnprintf(char *string,
-		  acpi_size size, const char *format, va_list args)
+int vsnprintf(char *string, acpi_size size, const char *format, va_list args)
 {
 	u8 base;
 	u8 type;
@@ -586,7 +584,7 @@ acpi_ut_vsnprintf(char *string,
 
 /*******************************************************************************
  *
- * FUNCTION:    acpi_ut_snprintf
+ * FUNCTION:    snprintf
  *
  * PARAMETERS:  string              - String with boundary
  *              size                - Boundary of the string
@@ -598,13 +596,38 @@ acpi_ut_vsnprintf(char *string,
  *
  ******************************************************************************/
 
-int acpi_ut_snprintf(char *string, acpi_size size, const char *format, ...)
+int snprintf(char *string, acpi_size size, const char *format, ...)
 {
 	va_list args;
 	int length;
 
 	va_start(args, format);
-	length = acpi_ut_vsnprintf(string, size, format, args);
+	length = vsnprintf(string, size, format, args);
+	va_end(args);
+
+	return (length);
+}
+
+/*******************************************************************************
+ *
+ * FUNCTION:    sprintf
+ *
+ * PARAMETERS:  string              - String with boundary
+ *              Format, ...         - Standard printf format
+ *
+ * RETURN:      Number of bytes actually written.
+ *
+ * DESCRIPTION: Formatted output to a string.
+ *
+ ******************************************************************************/
+
+int sprintf(char *string, const char *format, ...)
+{
+	va_list args;
+	int length;
+
+	va_start(args, format);
+	length = vsnprintf(string, ACPI_UINT32_MAX, format, args);
 	va_end(args);
 
 	return (length);
@@ -613,7 +636,60 @@ int acpi_ut_snprintf(char *string, acpi_size size, const char *format, ...)
 #ifdef ACPI_APPLICATION
 /*******************************************************************************
  *
- * FUNCTION:    acpi_ut_file_vprintf
+ * FUNCTION:    vprintf
+ *
+ * PARAMETERS:  format              - Standard printf format
+ *              args                - Argument list
+ *
+ * RETURN:      Number of bytes actually written.
+ *
+ * DESCRIPTION: Formatted output to stdout using argument list pointer.
+ *
+ ******************************************************************************/
+
+int vprintf(const char *format, va_list args)
+{
+	acpi_cpu_flags flags;
+	int length;
+
+	flags = acpi_os_acquire_lock(acpi_gbl_print_lock);
+	length = vsnprintf(acpi_gbl_print_buffer,
+			   sizeof(acpi_gbl_print_buffer), format, args);
+
+	(void)acpi_os_write_file(ACPI_FILE_OUT, acpi_gbl_print_buffer, length,
+				 1);
+	acpi_os_release_lock(acpi_gbl_print_lock, flags);
+
+	return (length);
+}
+
+/*******************************************************************************
+ *
+ * FUNCTION:    printf
+ *
+ * PARAMETERS:  Format, ...         - Standard printf format
+ *
+ * RETURN:      Number of bytes actually written.
+ *
+ * DESCRIPTION: Formatted output to stdout.
+ *
+ ******************************************************************************/
+
+int printf(const char *format, ...)
+{
+	va_list args;
+	int length;
+
+	va_start(args, format);
+	length = vprintf(format, args);
+	va_end(args);
+
+	return (length);
+}
+
+/*******************************************************************************
+ *
+ * FUNCTION:    vfprintf
  *
  * PARAMETERS:  file                - File descriptor
  *              format              - Standard printf format
@@ -625,14 +701,14 @@ int acpi_ut_snprintf(char *string, acpi_size size, const char *format, ...)
  *
  ******************************************************************************/
 
-int acpi_ut_file_vprintf(ACPI_FILE file, const char *format, va_list args)
+int vfprintf(FILE * file, const char *format, va_list args)
 {
 	acpi_cpu_flags flags;
 	int length;
 
 	flags = acpi_os_acquire_lock(acpi_gbl_print_lock);
-	length = acpi_ut_vsnprintf(acpi_gbl_print_buffer,
-				   sizeof(acpi_gbl_print_buffer), format, args);
+	length = vsnprintf(acpi_gbl_print_buffer,
+			   sizeof(acpi_gbl_print_buffer), format, args);
 
 	(void)acpi_os_write_file(file, acpi_gbl_print_buffer, length, 1);
 	acpi_os_release_lock(acpi_gbl_print_lock, flags);
@@ -642,7 +718,7 @@ int acpi_ut_file_vprintf(ACPI_FILE file, const char *format, va_list args)
 
 /*******************************************************************************
  *
- * FUNCTION:    acpi_ut_file_printf
+ * FUNCTION:    fprintf
  *
  * PARAMETERS:  file                - File descriptor
  *              Format, ...         - Standard printf format
@@ -653,13 +729,13 @@ int acpi_ut_file_vprintf(ACPI_FILE file, const char *format, va_list args)
  *
  ******************************************************************************/
 
-int acpi_ut_file_printf(ACPI_FILE file, const char *format, ...)
+int fprintf(FILE * file, const char *format, ...)
 {
 	va_list args;
 	int length;
 
 	va_start(args, format);
-	length = acpi_ut_file_vprintf(file, format, args);
+	length = vfprintf(file, format, args);
 	va_end(args);
 
 	return (length);
diff --git a/tools/power/acpi/tools/acpidump/apdump.c b/tools/power/acpi/tools/acpidump/apdump.c
index fb8f1d9..2a1507c 100644
--- a/tools/power/acpi/tools/acpidump/apdump.c
+++ b/tools/power/acpi/tools/acpidump/apdump.c
@@ -195,13 +195,13 @@ ap_dump_table_buffer(struct acpi_table_header *table,
 	 * Note: simplest to just always emit a 64-bit address. acpi_xtract
 	 * utility can handle this.
 	 */
-	acpi_ut_file_printf(gbl_output_file, "%4.4s @ 0x%8.8X%8.8X\n",
-			    table->signature, ACPI_FORMAT_UINT64(address));
+	fprintf(gbl_output_file, "%4.4s @ 0x%8.8X%8.8X\n",
+		table->signature, ACPI_FORMAT_UINT64(address));
 
 	acpi_ut_dump_buffer_to_file(gbl_output_file,
 				    ACPI_CAST_PTR(u8, table), table_length,
 				    DB_BYTE_DISPLAY, 0);
-	acpi_ut_file_printf(gbl_output_file, "\n");
+	fprintf(gbl_output_file, "\n");
 	return (0);
 }
 
diff --git a/tools/power/acpi/tools/acpidump/apfiles.c b/tools/power/acpi/tools/acpidump/apfiles.c
index 44a0010..71edeb4 100644
--- a/tools/power/acpi/tools/acpidump/apfiles.c
+++ b/tools/power/acpi/tools/acpidump/apfiles.c
@@ -157,8 +157,7 @@ int ap_write_to_binary_file(struct acpi_table_header *table, u32 instance)
 	/* Handle multiple SSDts - create different filenames for each */
 
 	if (instance > 0) {
-		acpi_ut_snprintf(instance_str, sizeof(instance_str), "%u",
-				 instance);
+		snprintf(instance_str, sizeof(instance_str), "%u", instance);
 		strcat(filename, instance_str);
 	}
 
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 26/30] ACPICA: Applications: Fix a potential issue that help messages may be dumped to acpi_gbl_debug_file
  2016-08-04  8:36 [PATCH 00/30] ACPICA: 20160629 Release Lv Zheng
                   ` (23 preceding siblings ...)
  2016-08-04  8:45 ` [PATCH 24/30] ACPICA: Clib: Add -nostdinc support for EFI layer Lv Zheng
@ 2016-08-04  8:45 ` Lv Zheng
  2016-08-04  8:45 ` [PATCH 27/30] ACPICA: EFI: Port acpidump to EDK2 environment Lv Zheng
                   ` (4 subsequent siblings)
  29 siblings, 0 replies; 37+ messages in thread
From: Lv Zheng @ 2016-08-04  8:45 UTC (permalink / raw)
  To: Rafael J. Wysocki, Rafael J. Wysocki, Len Brown
  Cc: Lv Zheng, Lv Zheng, linux-acpi, Bob Moore

ACPICA commit d1b7372c7eb89cdba3d3c239fb07e2fdc5abf880

This is a regression fix, restoring usage macro to its original
implementation.

There is an issue for usage macros, if an command line option changed
acpi_gbl_debug_file, then the follow up usage message may be errornously
dumped to the debug file.
This is just a bug in theory, because currently acpi_gbl_debug_file can only
be modified by acpibin and acpiexec. And this will not trigger such issue
because:
1. For acpibin, acpi_gbl_debug_file will be modified by "-t" option and the
   program exits after processing this option without dumping help message
   or other error options.
2. For acpiexec, acpi_gbl_debug_file will only be modified by the open
   command, which happens after parsing the command line options, so no
   help message will be dumped into the debug file.
But maintaining this logic is difficult, so this patch modifies
acpi_os_printf() into printf() for usage macros so that the help messages are
ensured to be dumped to the stdout. Lv Zheng.

Link: https://github.com/acpica/acpica/commit/d1b7372c
Link: https://bugs.acpica.org/show_bug.cgi?id=1142
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
 drivers/acpi/acpica/acapps.h |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/acpi/acpica/acapps.h b/drivers/acpi/acpica/acapps.h
index bc38534..0bd6307 100644
--- a/drivers/acpi/acpica/acapps.h
+++ b/drivers/acpi/acpica/acapps.h
@@ -83,13 +83,13 @@
 /* Macros for usage messages */
 
 #define ACPI_USAGE_HEADER(usage) \
-	acpi_os_printf ("Usage: %s\nOptions:\n", usage);
+	printf ("Usage: %s\nOptions:\n", usage);
 
 #define ACPI_USAGE_TEXT(description) \
-	acpi_os_printf (description);
+	printf (description);
 
 #define ACPI_OPTION(name, description) \
-	acpi_os_printf (" %-20s%s\n", name, description);
+	printf ("  %-20s%s\n", name, description);
 
 /* Check for unexpected exceptions */
 
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 27/30] ACPICA: EFI: Port acpidump to EDK2 environment
  2016-08-04  8:36 [PATCH 00/30] ACPICA: 20160629 Release Lv Zheng
                   ` (24 preceding siblings ...)
  2016-08-04  8:45 ` [PATCH 26/30] ACPICA: Applications: Fix a potential issue that help messages may be dumped to acpi_gbl_debug_file Lv Zheng
@ 2016-08-04  8:45 ` Lv Zheng
  2016-08-04  8:45 ` [PATCH 28/30] ACPICA: OSL: Cleanup the inclusion order of the compiler-specific headers Lv Zheng
                   ` (3 subsequent siblings)
  29 siblings, 0 replies; 37+ messages in thread
From: Lv Zheng @ 2016-08-04  8:45 UTC (permalink / raw)
  To: Rafael J. Wysocki, Rafael J. Wysocki, Len Brown
  Cc: Lv Zheng, Lv Zheng, linux-acpi, Bob Moore

ACPICA commit 790b8bae858d6d97da6099c9f8485d4760035a0c

Linux kernel is not affected by this change.

Link: https://github.com/acpica/acpica/commit/790b8bae
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
 include/acpi/platform/acenv.h   |    2 +-
 include/acpi/platform/acenvex.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h
index 3dbfa27..f9af0e0 100644
--- a/include/acpi/platform/acenv.h
+++ b/include/acpi/platform/acenv.h
@@ -220,7 +220,7 @@
  * included after including all other host environmental definitions, in
  * order to override the definitions.
  */
-#elif defined(_AED_EFI) || defined(_GNU_EFI)
+#elif defined(_AED_EFI) || defined(_GNU_EFI) || defined(_EDK2_EFI)
 #include "acefi.h"
 
 #else
diff --git a/include/acpi/platform/acenvex.h b/include/acpi/platform/acenvex.h
index b672615..58ca39c 100644
--- a/include/acpi/platform/acenvex.h
+++ b/include/acpi/platform/acenvex.h
@@ -67,7 +67,7 @@
  * included after including all other host environmental definitions, in
  * order to override the definitions.
  */
-#elif defined(_AED_EFI) || defined(_GNU_EFI)
+#elif defined(_AED_EFI) || defined(_GNU_EFI) || defined(_EDK2_EFI)
 #include "acefiex.h"
 
 #endif
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 28/30] ACPICA: OSL: Cleanup the inclusion order of the compiler-specific headers
  2016-08-04  8:36 [PATCH 00/30] ACPICA: 20160629 Release Lv Zheng
                   ` (25 preceding siblings ...)
  2016-08-04  8:45 ` [PATCH 27/30] ACPICA: EFI: Port acpidump to EDK2 environment Lv Zheng
@ 2016-08-04  8:45 ` Lv Zheng
  2016-08-04  8:45 ` [PATCH 29/30] ACPICA: OSL: Fix a regression that old GCC requires a workaround for strchr() Lv Zheng
                   ` (2 subsequent siblings)
  29 siblings, 0 replies; 37+ messages in thread
From: Lv Zheng @ 2016-08-04  8:45 UTC (permalink / raw)
  To: Rafael J. Wysocki, Rafael J. Wysocki, Len Brown
  Cc: Lv Zheng, Lv Zheng, linux-acpi, Bob Moore

ACPICA commit a760a98ec84b1ec782e0bff5f6612af6fb89c10c

Originally compiler specific headers are included by the host-specific
headers. This makes build configuration management very inconvenient. And
many inclusion order issues can be hidden accross different host OSes. It
will then likely that some host builds will be broken just because of
fixing some inclusion order issues for other host builds.

This patch splits the compiler-specific header inclusions out of the
host-specific headers so that compiler-specific inclusion order issues will
not get entangled in the host-specific inclusion orders.

Note that intel compiler defines __GNUC__, so this patch contains special
handling because acintel.h and acgcc.h should be mutual exclusive.

Link: https://github.com/acpica/acpica/commit/a760a98e
Link: https://bugs.acpica.org/show_bug.cgi?id=1303
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
 include/acpi/platform/acenv.h   |   13 ++++++++++++-
 include/acpi/platform/acenvex.h |    8 +++++---
 include/acpi/platform/aclinux.h |    4 ----
 3 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h
index f9af0e0..34cce72 100644
--- a/include/acpi/platform/acenv.h
+++ b/include/acpi/platform/acenv.h
@@ -166,10 +166,21 @@
 /******************************************************************************
  *
  * Host configuration files. The compiler configuration files are included
- * by the host files.
+ * first.
  *
  *****************************************************************************/
 
+#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
+#include <acpi/platform/acgcc.h>
+
+#elif defined(_MSC_VER)
+#include "acmsvc.h"
+
+#elif defined(__INTEL_COMPILER)
+#include "acintel.h"
+
+#endif
+
 #if defined(_LINUX) || defined(__linux__)
 #include <acpi/platform/aclinux.h>
 
diff --git a/include/acpi/platform/acenvex.h b/include/acpi/platform/acenvex.h
index 58ca39c..060fb08 100644
--- a/include/acpi/platform/acenvex.h
+++ b/include/acpi/platform/acenvex.h
@@ -56,9 +56,6 @@
 #if defined(_LINUX) || defined(__linux__)
 #include <acpi/platform/aclinuxex.h>
 
-#elif defined(WIN32)
-#include "acwinex.h"
-
 #elif defined(__DragonFly__)
 #include "acdragonflyex.h"
 
@@ -72,6 +69,11 @@
 
 #endif
 
+#if defined(_MSC_VER)
+#include "acmsvcex.h"
+
+#endif
+
 /*! [End] no source code translation !*/
 
 #endif				/* __ACENVEX_H__ */
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h
index 1380ec7..a5d98d1 100644
--- a/include/acpi/platform/aclinux.h
+++ b/include/acpi/platform/aclinux.h
@@ -215,8 +215,4 @@
 
 #endif				/* __KERNEL__ */
 
-/* Linux uses GCC */
-
-#include <acpi/platform/acgcc.h>
-
 #endif				/* __ACLINUX_H__ */
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 29/30] ACPICA: OSL: Fix a regression that old GCC requires a workaround for strchr()
  2016-08-04  8:36 [PATCH 00/30] ACPICA: 20160629 Release Lv Zheng
                   ` (26 preceding siblings ...)
  2016-08-04  8:45 ` [PATCH 28/30] ACPICA: OSL: Cleanup the inclusion order of the compiler-specific headers Lv Zheng
@ 2016-08-04  8:45 ` Lv Zheng
  2016-08-04  8:45 ` [PATCH 30/30] ACPICA: Update version to 20160629 Lv Zheng
  2016-08-04 16:12 ` [PATCH 00/30] ACPICA: 20160629 Release Al Stone
  29 siblings, 0 replies; 37+ messages in thread
From: Lv Zheng @ 2016-08-04  8:45 UTC (permalink / raw)
  To: Rafael J. Wysocki, Rafael J. Wysocki, Len Brown
  Cc: Lv Zheng, Lv Zheng, linux-acpi, Bob Moore

ACPICA commit be836c36454a624a4fb1d17234080ef8c07993fc

There is a GCC false-warning issue on specific GCC versions that
"strchr" will be preprocessed and extracted to contain
!__buildin_constant_p() checker and it surely is a constant logical
value "1" for strchr() arguments. Then -Wlogical-op errorneously reports a
warning.

The regression is triggered after the standard headers are re-ordered in
the EFI porting task. This patch fixes this regression by moving the
workaround to a new position after including all other standard headers.

Link: https://github.com/acpica/acpica/commit/be836c36
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
 include/acpi/platform/acenvex.h |    5 +++-
 include/acpi/platform/acgcc.h   |   11 --------
 include/acpi/platform/acgccex.h |   58 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 62 insertions(+), 12 deletions(-)
 create mode 100644 include/acpi/platform/acgccex.h

diff --git a/include/acpi/platform/acenvex.h b/include/acpi/platform/acenvex.h
index 060fb08..b3171b9 100644
--- a/include/acpi/platform/acenvex.h
+++ b/include/acpi/platform/acenvex.h
@@ -69,7 +69,10 @@
 
 #endif
 
-#if defined(_MSC_VER)
+#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
+#include "acgccex.h"
+
+#elif defined(_MSC_VER)
 #include "acmsvcex.h"
 
 #endif
diff --git a/include/acpi/platform/acgcc.h b/include/acpi/platform/acgcc.h
index 9f79e98..8f66aaa 100644
--- a/include/acpi/platform/acgcc.h
+++ b/include/acpi/platform/acgcc.h
@@ -70,17 +70,6 @@
  */
 #define ACPI_UNUSED_VAR __attribute__ ((unused))
 
-/*
- * Some versions of gcc implement strchr() with a buggy macro. So,
- * undef it here. Prevents error messages of this form (usually from the
- * file getopt.c):
- *
- * error: logical '&&' with non-zero constant will always evaluate as true
- */
-#ifdef strchr
-#undef strchr
-#endif
-
 /* GCC supports __VA_ARGS__ in macros */
 
 #define COMPILER_VA_MACRO               1
diff --git a/include/acpi/platform/acgccex.h b/include/acpi/platform/acgccex.h
new file mode 100644
index 0000000..46ead2c
--- /dev/null
+++ b/include/acpi/platform/acgccex.h
@@ -0,0 +1,58 @@
+/******************************************************************************
+ *
+ * Name: acgccex.h - Extra GCC specific defines, etc.
+ *
+ *****************************************************************************/
+
+/*
+ * Copyright (C) 2000 - 2016, Intel Corp.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer,
+ *    without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ *    substantially similar to the "NO WARRANTY" disclaimer below
+ *    ("Disclaimer") and any redistribution must be conditioned upon
+ *    including a substantially similar Disclaimer requirement for further
+ *    binary redistribution.
+ * 3. Neither the names of the above-listed copyright holders nor the names
+ *    of any contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGES.
+ */
+
+#ifndef __ACGCCEX_H__
+#define __ACGCCEX_H__
+
+/*
+ * Some versions of gcc implement strchr() with a buggy macro. So,
+ * undef it here. Prevents error messages of this form (usually from the
+ * file getopt.c):
+ *
+ * error: logical '&&' with non-zero constant will always evaluate as true
+ */
+#ifdef strchr
+#undef strchr
+#endif
+
+#endif				/* __ACGCCEX_H__ */
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 30/30] ACPICA: Update version to 20160629
  2016-08-04  8:36 [PATCH 00/30] ACPICA: 20160629 Release Lv Zheng
                   ` (27 preceding siblings ...)
  2016-08-04  8:45 ` [PATCH 29/30] ACPICA: OSL: Fix a regression that old GCC requires a workaround for strchr() Lv Zheng
@ 2016-08-04  8:45 ` Lv Zheng
  2016-08-04 16:12 ` [PATCH 00/30] ACPICA: 20160629 Release Al Stone
  29 siblings, 0 replies; 37+ messages in thread
From: Lv Zheng @ 2016-08-04  8:45 UTC (permalink / raw)
  To: Rafael J. Wysocki, Rafael J. Wysocki, Len Brown
  Cc: Lv Zheng, Lv Zheng, linux-acpi, Bob Moore

From: Bob Moore <robert.moore@intel.com>

ACPICA commit 1e997ab9a5b939533374fd567681f881cb97c4c7

Version 20160629.

Link: https://github.com/acpica/acpica/commit/1e997ab9
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
 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 d94e5c0..8b44717 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -46,7 +46,7 @@
 
 /* Current ACPICA subsystem version in YYYYMMDD format */
 
-#define ACPI_CA_VERSION                 0x20160422
+#define ACPI_CA_VERSION                 0x20160729
 
 #include <acpi/acconfig.h>
 #include <acpi/actypes.h>
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 37+ messages in thread

* Re: [PATCH 00/30] ACPICA: 20160629 Release
  2016-08-04  8:36 [PATCH 00/30] ACPICA: 20160629 Release Lv Zheng
                   ` (28 preceding siblings ...)
  2016-08-04  8:45 ` [PATCH 30/30] ACPICA: Update version to 20160629 Lv Zheng
@ 2016-08-04 16:12 ` Al Stone
  2016-08-05  0:42   ` Zheng, Lv
  29 siblings, 1 reply; 37+ messages in thread
From: Al Stone @ 2016-08-04 16:12 UTC (permalink / raw)
  To: Lv Zheng, Rafael J. Wysocki, Rafael J. Wysocki, Len Brown
  Cc: Lv Zheng, linux-acpi

On 08/04/2016 02:36 AM, Lv Zheng wrote:
> The 20160629 ACPICA kernel-resident subsystem updates are linuxized based
> on the linux-pm/linux-next branch.
> 
> The patchset has passed the following build/boot tests.
> Build tests are performed as follows:
> 1. i386 + allyes
> 2. i386 + allno
> 3. i386 + default + ACPI_DEBUGGER=y
> 4. i386 + default + ACPI_DEBUGGER=n + ACPI_DEBUG=y
> 5. i386 + default + ACPI_DEBUG=n + ACPI=y
> 6. i386 + default + ACPI=n
> 7. x86_64 + allyes
> 8. x86_64 + allno
> 9. x86_64 + default + ACPI_DEBUGGER=y
> 10.x86_64 + default + ACPI_DEBUGGER=n + ACPI_DEBUG=y
> 11.x86_64 + default + ACPI_DEBUG=n + ACPI=y
> 12.x86_64 + default + ACPI=n
> Boot tests are performed as follows:
> 1. i386 + default + ACPI_DEBUGGER=y
> 2. x86_64 + default + ACPI_DEBUGGER=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 "drivers/platform" drivers
>    All other drivers that link the APIs provided by ACPICA subsystem
> 
> The divergences checking result:
> Before applying (20160422 Release):
>   494 lines
> After applying (20160629 Release):
>   508 lines
> 
> Bob Moore (8):
>   ACPICA: Interpreter: Remove temporary code for External() opcode
>   ACPICA: Debugger: Extend some max line lengths
>   ACPICA: Disassembler: Add option to emit embedded External
>     operators/opcodes
>   ACPICA: Simplify configuration for "Max Loops" system parameter
>   ACPICA: iASL/Disassembler: Add a check for missing filename
>   ACPICA: Use os_allocate_zeroed
>   ACPICA: FADT support cleanup
>   ACPICA: Update version to 20160629
> 
> Jung-uk Kim (2):
>   ACPICA: Fix deconstification warnings (-Wcast-qual) with function
>     traces.
>   ACPICA: Fix deconstification warnings (-Wcast-qual) with
>     acpi_ns_root_initialize().
> 
> Lv Zheng (20):
>   ACPICA: Utilities: Introduce facility to allow Linux to set correct
>     logging levels
>   ACPICA: Divergence: Port declarators back to ACPICA
>   ACPICA: Events: Introduce acpi_mask_gpe() to implement GPE masking
>     mechanism
>   ACPI / sysfs: Update /sys/firmware/acpi/interrupts/gpexx using new
>     GPE masking mechanism
>   ACPI / sysfs: Provide quirk mechanism to prevent GPE flooding
>   ACPICA: Debugger: Fix wrong inclusions in dbfileio.c
>   ACPICA: OSL: Add correct acpi_gbl_debug_timeout export to allow
>     acpiexec to link
>   ACPICA: acpidump: Fix a duplicate variable definition
>   ACPICA: Applications: Enable USE_NATIVE_ALLOCATE_ZEROED environment
>     for all applications
>   ACPICA: Clib: Fix build issues when ACPI_USE_STANDARD_HEADERS is not
>     defined by converting size_t to acpi_size
>   ACPICA: Clib: Cleanup va_arg related code
>   ACPICA: Clib: Fix wrong mini C library usage
>   ACPICA: Clib/EFI: Fix wrong order of standard integer types/IO
>     handles
>   ACPICA: MSVC9: Fix <sys/stat.h> inclusion order issue
>   ACPICA: Clib: Add -nostdinc support for EFI layer
>   ACPICA: Clib: Eliminate acpi_os_XXXFile()/acpi_log_error and link
>     clibrary fxxx()/errno/perror() instead
>   ACPICA: Applications: Fix a potential issue that help messages may be
>     dumped to acpi_gbl_debug_file
>   ACPICA: EFI: Port acpidump to EDK2 environment
>   ACPICA: OSL: Cleanup the inclusion order of the compiler-specific
>     headers
>   ACPICA: OSL: Fix a regression that old GCC requires a workaround for
>     strchr()
> 
>  Documentation/kernel-parameters.txt                |   10 +
>  drivers/acpi/acpica/acapps.h                       |   10 +-
>  drivers/acpi/acpica/acevents.h                     |    3 +
>  drivers/acpi/acpica/acglobal.h                     |    2 +
>  drivers/acpi/acpica/aclocal.h                      |    2 +
>  drivers/acpi/acpica/actables.h                     |    3 +-
>  drivers/acpi/acpica/acutils.h                      |   36 ++--
>  drivers/acpi/acpica/dbfileio.c                     |   20 +-
>  drivers/acpi/acpica/dbobject.c                     |    4 +-
>  drivers/acpi/acpica/dsutils.c                      |   17 +-
>  drivers/acpi/acpica/evgpe.c                        |   57 +++++
>  drivers/acpi/acpica/evxfgpe.c                      |   43 ++++
>  drivers/acpi/acpica/hwgpe.c                        |   23 ++-
>  drivers/acpi/acpica/nsaccess.c                     |    6 +-
>  drivers/acpi/acpica/nsdump.c                       |    2 +-
>  drivers/acpi/acpica/tbfadt.c                       |   10 +-
>  drivers/acpi/acpica/tbutils.c                      |    3 +-
>  drivers/acpi/acpica/tbxface.c                      |    4 +-
>  drivers/acpi/acpica/tbxfload.c                     |    4 +-
>  drivers/acpi/acpica/tbxfroot.c                     |    5 +-
>  drivers/acpi/acpica/utbuffer.c                     |   30 ++-
>  drivers/acpi/acpica/utdebug.c                      |   61 +++---
>  drivers/acpi/acpica/utdecode.c                     |    2 +-
>  drivers/acpi/acpica/utinit.c                       |    2 +-
>  drivers/acpi/acpica/utpredef.c                     |    2 -
>  drivers/acpi/acpica/utprint.c                      |  105 ++++++++--
>  drivers/acpi/acpica/uttrack.c                      |    4 +-
>  drivers/acpi/acpica/utxface.c                      |    2 +-
>  drivers/acpi/acpica/utxfinit.c                     |    6 +-
>  drivers/acpi/internal.h                            |    1 +
>  drivers/acpi/scan.c                                |    1 +
>  drivers/acpi/sleep.c                               |    2 +-
>  drivers/acpi/sysfs.c                               |   89 +++++++-
>  include/acpi/acconfig.h                            |    4 +
>  include/acpi/acoutput.h                            |    6 +-
>  include/acpi/acpiosxf.h                            |   43 +---
>  include/acpi/acpixf.h                              |   37 ++--
>  include/acpi/actbl.h                               |  164 ++++++++-------
>  include/acpi/actypes.h                             |   48 ++---
>  include/acpi/platform/acenv.h                      |   90 +++-----
>  include/acpi/platform/acenvex.h                    |   21 +-
>  include/acpi/platform/acgcc.h                      |   17 +-
>  include/acpi/platform/acgccex.h                    |   58 ++++++
>  include/acpi/platform/aclinux.h                    |   22 +-
>  include/acpi/platform/aclinuxex.h                  |    2 +-
>  tools/power/acpi/common/cmfsize.c                  |   13 +-
>  tools/power/acpi/common/getopt.c                   |    4 +-
>  .../acpi/os_specific/service_layers/oslibcfs.c     |  217 --------------------
>  .../acpi/os_specific/service_layers/osunixxf.c     |    3 -
>  tools/power/acpi/tools/acpidump/Makefile           |    1 -
>  tools/power/acpi/tools/acpidump/acpidump.h         |   12 +-
>  tools/power/acpi/tools/acpidump/apdump.c           |   71 +++----
>  tools/power/acpi/tools/acpidump/apfiles.c          |   56 ++---
>  tools/power/acpi/tools/acpidump/apmain.c           |   33 +--
>  54 files changed, 796 insertions(+), 697 deletions(-)
>  create mode 100644 include/acpi/platform/acgccex.h
>  delete mode 100644 tools/power/acpi/os_specific/service_layers/oslibcfs.c
> 

I'm very confused.  I don't see a 20160629 release on the ACPICA .org
download site.  There is a 20160729, though; is this just a typo?  Patch
30/30 indicates it is...

-- 
ciao,
al
-----------------------------------
Al Stone
Software Engineer
Red Hat, Inc.
ahs3@redhat.com
-----------------------------------

^ permalink raw reply	[flat|nested] 37+ messages in thread

* RE: [PATCH 00/30] ACPICA: 20160629 Release
  2016-08-04 16:12 ` [PATCH 00/30] ACPICA: 20160629 Release Al Stone
@ 2016-08-05  0:42   ` Zheng, Lv
  2016-08-05 14:43     ` Al Stone
  0 siblings, 1 reply; 37+ messages in thread
From: Zheng, Lv @ 2016-08-05  0:42 UTC (permalink / raw)
  To: ahs3, Wysocki, Rafael J, Rafael J. Wysocki, Brown, Len
  Cc: Lv Zheng, linux-acpi

Hi,

> From: Al Stone [mailto:ahs3@redhat.com]
> Subject: Re: [PATCH 00/30] ACPICA: 20160629 Release
> 
> On 08/04/2016 02:36 AM, Lv Zheng wrote:
> > The 20160629 ACPICA kernel-resident subsystem updates are linuxized
> based
> > on the linux-pm/linux-next branch.
> >
> > The patchset has passed the following build/boot tests.
> > Build tests are performed as follows:
> > 1. i386 + allyes
> > 2. i386 + allno
> > 3. i386 + default + ACPI_DEBUGGER=y
> > 4. i386 + default + ACPI_DEBUGGER=n + ACPI_DEBUG=y
> > 5. i386 + default + ACPI_DEBUG=n + ACPI=y
> > 6. i386 + default + ACPI=n
> > 7. x86_64 + allyes
> > 8. x86_64 + allno
> > 9. x86_64 + default + ACPI_DEBUGGER=y
> > 10.x86_64 + default + ACPI_DEBUGGER=n + ACPI_DEBUG=y
> > 11.x86_64 + default + ACPI_DEBUG=n + ACPI=y
> > 12.x86_64 + default + ACPI=n
> > Boot tests are performed as follows:
> > 1. i386 + default + ACPI_DEBUGGER=y
> > 2. x86_64 + default + ACPI_DEBUGGER=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 "drivers/platform" drivers
> >    All other drivers that link the APIs provided by ACPICA subsystem
> >
> > The divergences checking result:
> > Before applying (20160422 Release):
> >   494 lines
> > After applying (20160629 Release):
> >   508 lines
> >
> > Bob Moore (8):
> >   ACPICA: Interpreter: Remove temporary code for External() opcode
> >   ACPICA: Debugger: Extend some max line lengths
> >   ACPICA: Disassembler: Add option to emit embedded External
> >     operators/opcodes
> >   ACPICA: Simplify configuration for "Max Loops" system parameter
> >   ACPICA: iASL/Disassembler: Add a check for missing filename
> >   ACPICA: Use os_allocate_zeroed
> >   ACPICA: FADT support cleanup
> >   ACPICA: Update version to 20160629
> >
> > Jung-uk Kim (2):
> >   ACPICA: Fix deconstification warnings (-Wcast-qual) with function
> >     traces.
> >   ACPICA: Fix deconstification warnings (-Wcast-qual) with
> >     acpi_ns_root_initialize().
> >
> > Lv Zheng (20):
> >   ACPICA: Utilities: Introduce facility to allow Linux to set correct
> >     logging levels
> >   ACPICA: Divergence: Port declarators back to ACPICA
> >   ACPICA: Events: Introduce acpi_mask_gpe() to implement GPE masking
> >     mechanism
> >   ACPI / sysfs: Update /sys/firmware/acpi/interrupts/gpexx using new
> >     GPE masking mechanism
> >   ACPI / sysfs: Provide quirk mechanism to prevent GPE flooding
> >   ACPICA: Debugger: Fix wrong inclusions in dbfileio.c
> >   ACPICA: OSL: Add correct acpi_gbl_debug_timeout export to allow
> >     acpiexec to link
> >   ACPICA: acpidump: Fix a duplicate variable definition
> >   ACPICA: Applications: Enable USE_NATIVE_ALLOCATE_ZEROED
> environment
> >     for all applications
> >   ACPICA: Clib: Fix build issues when ACPI_USE_STANDARD_HEADERS is
> not
> >     defined by converting size_t to acpi_size
> >   ACPICA: Clib: Cleanup va_arg related code
> >   ACPICA: Clib: Fix wrong mini C library usage
> >   ACPICA: Clib/EFI: Fix wrong order of standard integer types/IO
> >     handles
> >   ACPICA: MSVC9: Fix <sys/stat.h> inclusion order issue
> >   ACPICA: Clib: Add -nostdinc support for EFI layer
> >   ACPICA: Clib: Eliminate acpi_os_XXXFile()/acpi_log_error and link
> >     clibrary fxxx()/errno/perror() instead
> >   ACPICA: Applications: Fix a potential issue that help messages may be
> >     dumped to acpi_gbl_debug_file
> >   ACPICA: EFI: Port acpidump to EDK2 environment
> >   ACPICA: OSL: Cleanup the inclusion order of the compiler-specific
> >     headers
> >   ACPICA: OSL: Fix a regression that old GCC requires a workaround for
> >     strchr()
> >
> >  Documentation/kernel-parameters.txt                |   10 +
> >  drivers/acpi/acpica/acapps.h                       |   10 +-
> >  drivers/acpi/acpica/acevents.h                     |    3 +
> >  drivers/acpi/acpica/acglobal.h                     |    2 +
> >  drivers/acpi/acpica/aclocal.h                      |    2 +
> >  drivers/acpi/acpica/actables.h                     |    3 +-
> >  drivers/acpi/acpica/acutils.h                      |   36 ++--
> >  drivers/acpi/acpica/dbfileio.c                     |   20 +-
> >  drivers/acpi/acpica/dbobject.c                     |    4 +-
> >  drivers/acpi/acpica/dsutils.c                      |   17 +-
> >  drivers/acpi/acpica/evgpe.c                        |   57 +++++
> >  drivers/acpi/acpica/evxfgpe.c                      |   43 ++++
> >  drivers/acpi/acpica/hwgpe.c                        |   23 ++-
> >  drivers/acpi/acpica/nsaccess.c                     |    6 +-
> >  drivers/acpi/acpica/nsdump.c                       |    2 +-
> >  drivers/acpi/acpica/tbfadt.c                       |   10 +-
> >  drivers/acpi/acpica/tbutils.c                      |    3 +-
> >  drivers/acpi/acpica/tbxface.c                      |    4 +-
> >  drivers/acpi/acpica/tbxfload.c                     |    4 +-
> >  drivers/acpi/acpica/tbxfroot.c                     |    5 +-
> >  drivers/acpi/acpica/utbuffer.c                     |   30 ++-
> >  drivers/acpi/acpica/utdebug.c                      |   61 +++---
> >  drivers/acpi/acpica/utdecode.c                     |    2 +-
> >  drivers/acpi/acpica/utinit.c                       |    2 +-
> >  drivers/acpi/acpica/utpredef.c                     |    2 -
> >  drivers/acpi/acpica/utprint.c                      |  105 ++++++++--
> >  drivers/acpi/acpica/uttrack.c                      |    4 +-
> >  drivers/acpi/acpica/utxface.c                      |    2 +-
> >  drivers/acpi/acpica/utxfinit.c                     |    6 +-
> >  drivers/acpi/internal.h                            |    1 +
> >  drivers/acpi/scan.c                                |    1 +
> >  drivers/acpi/sleep.c                               |    2 +-
> >  drivers/acpi/sysfs.c                               |   89 +++++++-
> >  include/acpi/acconfig.h                            |    4 +
> >  include/acpi/acoutput.h                            |    6 +-
> >  include/acpi/acpiosxf.h                            |   43 +---
> >  include/acpi/acpixf.h                              |   37 ++--
> >  include/acpi/actbl.h                               |  164 ++++++++-------
> >  include/acpi/actypes.h                             |   48 ++---
> >  include/acpi/platform/acenv.h                      |   90 +++-----
> >  include/acpi/platform/acenvex.h                    |   21 +-
> >  include/acpi/platform/acgcc.h                      |   17 +-
> >  include/acpi/platform/acgccex.h                    |   58 ++++++
> >  include/acpi/platform/aclinux.h                    |   22 +-
> >  include/acpi/platform/aclinuxex.h                  |    2 +-
> >  tools/power/acpi/common/cmfsize.c                  |   13 +-
> >  tools/power/acpi/common/getopt.c                   |    4 +-
> >  .../acpi/os_specific/service_layers/oslibcfs.c     |  217 --------------------
> >  .../acpi/os_specific/service_layers/osunixxf.c     |    3 -
> >  tools/power/acpi/tools/acpidump/Makefile           |    1 -
> >  tools/power/acpi/tools/acpidump/acpidump.h         |   12 +-
> >  tools/power/acpi/tools/acpidump/apdump.c           |   71 +++----
> >  tools/power/acpi/tools/acpidump/apfiles.c          |   56 ++---
> >  tools/power/acpi/tools/acpidump/apmain.c           |   33 +--
> >  54 files changed, 796 insertions(+), 697 deletions(-)
> >  create mode 100644 include/acpi/platform/acgccex.h
> >  delete mode 100644
> tools/power/acpi/os_specific/service_layers/oslibcfs.c
> >
> 
> I'm very confused.  I don't see a 20160629 release on the ACPICA .org
> download site.  There is a 20160729, though; is this just a typo?  Patch
> 30/30 indicates it is...
[Lv Zheng] 
I couldn't see 20160729 on acpica.org.
This is the original commit:
https://github.com/acpica/acpica/commit/1e997ab9a

I just followed the rule and generated the ACPICA release according to the indicator in the last commit.
I'm not sure if this is a typo or just a delayed release.

Ciao,
Lv

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 00/30] ACPICA: 20160629 Release
  2016-08-05  0:42   ` Zheng, Lv
@ 2016-08-05 14:43     ` Al Stone
  2016-08-05 22:00       ` Zheng, Lv
  0 siblings, 1 reply; 37+ messages in thread
From: Al Stone @ 2016-08-05 14:43 UTC (permalink / raw)
  To: Zheng, Lv, Wysocki, Rafael J, Rafael J. Wysocki, Brown, Len
  Cc: Lv Zheng, linux-acpi

On 08/04/2016 06:42 PM, Zheng, Lv wrote:
> Hi,
> 
>> From: Al Stone [mailto:ahs3@redhat.com]
>> Subject: Re: [PATCH 00/30] ACPICA: 20160629 Release
>>
>> On 08/04/2016 02:36 AM, Lv Zheng wrote:
>>> The 20160629 ACPICA kernel-resident subsystem updates are linuxized
>> based
>>> on the linux-pm/linux-next branch.
>>>
>>> The patchset has passed the following build/boot tests.
>>> Build tests are performed as follows:
>>> 1. i386 + allyes
>>> 2. i386 + allno
>>> 3. i386 + default + ACPI_DEBUGGER=y
>>> 4. i386 + default + ACPI_DEBUGGER=n + ACPI_DEBUG=y
>>> 5. i386 + default + ACPI_DEBUG=n + ACPI=y
>>> 6. i386 + default + ACPI=n
>>> 7. x86_64 + allyes
>>> 8. x86_64 + allno
>>> 9. x86_64 + default + ACPI_DEBUGGER=y
>>> 10.x86_64 + default + ACPI_DEBUGGER=n + ACPI_DEBUG=y
>>> 11.x86_64 + default + ACPI_DEBUG=n + ACPI=y
>>> 12.x86_64 + default + ACPI=n
>>> Boot tests are performed as follows:
>>> 1. i386 + default + ACPI_DEBUGGER=y
>>> 2. x86_64 + default + ACPI_DEBUGGER=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 "drivers/platform" drivers
>>>    All other drivers that link the APIs provided by ACPICA subsystem
>>>
>>> The divergences checking result:
>>> Before applying (20160422 Release):
>>>   494 lines
>>> After applying (20160629 Release):
>>>   508 lines
>>>
>>> Bob Moore (8):
>>>   ACPICA: Interpreter: Remove temporary code for External() opcode
>>>   ACPICA: Debugger: Extend some max line lengths
>>>   ACPICA: Disassembler: Add option to emit embedded External
>>>     operators/opcodes
>>>   ACPICA: Simplify configuration for "Max Loops" system parameter
>>>   ACPICA: iASL/Disassembler: Add a check for missing filename
>>>   ACPICA: Use os_allocate_zeroed
>>>   ACPICA: FADT support cleanup
>>>   ACPICA: Update version to 20160629
>>>
>>> Jung-uk Kim (2):
>>>   ACPICA: Fix deconstification warnings (-Wcast-qual) with function
>>>     traces.
>>>   ACPICA: Fix deconstification warnings (-Wcast-qual) with
>>>     acpi_ns_root_initialize().
>>>
>>> Lv Zheng (20):
>>>   ACPICA: Utilities: Introduce facility to allow Linux to set correct
>>>     logging levels
>>>   ACPICA: Divergence: Port declarators back to ACPICA
>>>   ACPICA: Events: Introduce acpi_mask_gpe() to implement GPE masking
>>>     mechanism
>>>   ACPI / sysfs: Update /sys/firmware/acpi/interrupts/gpexx using new
>>>     GPE masking mechanism
>>>   ACPI / sysfs: Provide quirk mechanism to prevent GPE flooding
>>>   ACPICA: Debugger: Fix wrong inclusions in dbfileio.c
>>>   ACPICA: OSL: Add correct acpi_gbl_debug_timeout export to allow
>>>     acpiexec to link
>>>   ACPICA: acpidump: Fix a duplicate variable definition
>>>   ACPICA: Applications: Enable USE_NATIVE_ALLOCATE_ZEROED
>> environment
>>>     for all applications
>>>   ACPICA: Clib: Fix build issues when ACPI_USE_STANDARD_HEADERS is
>> not
>>>     defined by converting size_t to acpi_size
>>>   ACPICA: Clib: Cleanup va_arg related code
>>>   ACPICA: Clib: Fix wrong mini C library usage
>>>   ACPICA: Clib/EFI: Fix wrong order of standard integer types/IO
>>>     handles
>>>   ACPICA: MSVC9: Fix <sys/stat.h> inclusion order issue
>>>   ACPICA: Clib: Add -nostdinc support for EFI layer
>>>   ACPICA: Clib: Eliminate acpi_os_XXXFile()/acpi_log_error and link
>>>     clibrary fxxx()/errno/perror() instead
>>>   ACPICA: Applications: Fix a potential issue that help messages may be
>>>     dumped to acpi_gbl_debug_file
>>>   ACPICA: EFI: Port acpidump to EDK2 environment
>>>   ACPICA: OSL: Cleanup the inclusion order of the compiler-specific
>>>     headers
>>>   ACPICA: OSL: Fix a regression that old GCC requires a workaround for
>>>     strchr()
>>>
>>>  Documentation/kernel-parameters.txt                |   10 +
>>>  drivers/acpi/acpica/acapps.h                       |   10 +-
>>>  drivers/acpi/acpica/acevents.h                     |    3 +
>>>  drivers/acpi/acpica/acglobal.h                     |    2 +
>>>  drivers/acpi/acpica/aclocal.h                      |    2 +
>>>  drivers/acpi/acpica/actables.h                     |    3 +-
>>>  drivers/acpi/acpica/acutils.h                      |   36 ++--
>>>  drivers/acpi/acpica/dbfileio.c                     |   20 +-
>>>  drivers/acpi/acpica/dbobject.c                     |    4 +-
>>>  drivers/acpi/acpica/dsutils.c                      |   17 +-
>>>  drivers/acpi/acpica/evgpe.c                        |   57 +++++
>>>  drivers/acpi/acpica/evxfgpe.c                      |   43 ++++
>>>  drivers/acpi/acpica/hwgpe.c                        |   23 ++-
>>>  drivers/acpi/acpica/nsaccess.c                     |    6 +-
>>>  drivers/acpi/acpica/nsdump.c                       |    2 +-
>>>  drivers/acpi/acpica/tbfadt.c                       |   10 +-
>>>  drivers/acpi/acpica/tbutils.c                      |    3 +-
>>>  drivers/acpi/acpica/tbxface.c                      |    4 +-
>>>  drivers/acpi/acpica/tbxfload.c                     |    4 +-
>>>  drivers/acpi/acpica/tbxfroot.c                     |    5 +-
>>>  drivers/acpi/acpica/utbuffer.c                     |   30 ++-
>>>  drivers/acpi/acpica/utdebug.c                      |   61 +++---
>>>  drivers/acpi/acpica/utdecode.c                     |    2 +-
>>>  drivers/acpi/acpica/utinit.c                       |    2 +-
>>>  drivers/acpi/acpica/utpredef.c                     |    2 -
>>>  drivers/acpi/acpica/utprint.c                      |  105 ++++++++--
>>>  drivers/acpi/acpica/uttrack.c                      |    4 +-
>>>  drivers/acpi/acpica/utxface.c                      |    2 +-
>>>  drivers/acpi/acpica/utxfinit.c                     |    6 +-
>>>  drivers/acpi/internal.h                            |    1 +
>>>  drivers/acpi/scan.c                                |    1 +
>>>  drivers/acpi/sleep.c                               |    2 +-
>>>  drivers/acpi/sysfs.c                               |   89 +++++++-
>>>  include/acpi/acconfig.h                            |    4 +
>>>  include/acpi/acoutput.h                            |    6 +-
>>>  include/acpi/acpiosxf.h                            |   43 +---
>>>  include/acpi/acpixf.h                              |   37 ++--
>>>  include/acpi/actbl.h                               |  164 ++++++++-------
>>>  include/acpi/actypes.h                             |   48 ++---
>>>  include/acpi/platform/acenv.h                      |   90 +++-----
>>>  include/acpi/platform/acenvex.h                    |   21 +-
>>>  include/acpi/platform/acgcc.h                      |   17 +-
>>>  include/acpi/platform/acgccex.h                    |   58 ++++++
>>>  include/acpi/platform/aclinux.h                    |   22 +-
>>>  include/acpi/platform/aclinuxex.h                  |    2 +-
>>>  tools/power/acpi/common/cmfsize.c                  |   13 +-
>>>  tools/power/acpi/common/getopt.c                   |    4 +-
>>>  .../acpi/os_specific/service_layers/oslibcfs.c     |  217 --------------------
>>>  .../acpi/os_specific/service_layers/osunixxf.c     |    3 -
>>>  tools/power/acpi/tools/acpidump/Makefile           |    1 -
>>>  tools/power/acpi/tools/acpidump/acpidump.h         |   12 +-
>>>  tools/power/acpi/tools/acpidump/apdump.c           |   71 +++----
>>>  tools/power/acpi/tools/acpidump/apfiles.c          |   56 ++---
>>>  tools/power/acpi/tools/acpidump/apmain.c           |   33 +--
>>>  54 files changed, 796 insertions(+), 697 deletions(-)
>>>  create mode 100644 include/acpi/platform/acgccex.h
>>>  delete mode 100644
>> tools/power/acpi/os_specific/service_layers/oslibcfs.c
>>>
>>
>> I'm very confused.  I don't see a 20160629 release on the ACPICA .org
>> download site.  There is a 20160729, though; is this just a typo?  Patch
>> 30/30 indicates it is...
> [Lv Zheng] 
> I couldn't see 20160729 on acpica.org.
> This is the original commit:
> https://github.com/acpica/acpica/commit/1e997ab9a
> 
> I just followed the rule and generated the ACPICA release according to the indicator in the last commit.
> I'm not sure if this is a typo or just a delayed release.
> 
> Ciao,
> Lv
> 

Weird.  Something is wrong with someone's browser, then (either yours or mine),
or with the website.  When I go to https://www.acpica.org/downloads, there is
no 20160629 listed.  The most recent version is shown as 20160729.

There is also no tag in the git tree for R06_29_16 -- there is a tag for the
R07_29_16 release, though.  The odd thing is the 1e997ab9a commit says it is
the "Version 20160629", and the commit immediately prior to that is 08869b98,
saying "Version 20160729".  I don't really care which one it is supposed to be,
but it's not clear to me which one is correct.

-- 
ciao,
al
-----------------------------------
Al Stone
Software Engineer
Red Hat, Inc.
ahs3@redhat.com
-----------------------------------

^ permalink raw reply	[flat|nested] 37+ messages in thread

* RE: [PATCH 00/30] ACPICA: 20160629 Release
  2016-08-05 14:43     ` Al Stone
@ 2016-08-05 22:00       ` Zheng, Lv
  0 siblings, 0 replies; 37+ messages in thread
From: Zheng, Lv @ 2016-08-05 22:00 UTC (permalink / raw)
  To: ahs3, Wysocki, Rafael J, Rafael J. Wysocki, Brown, Len
  Cc: Lv Zheng, linux-acpi

Hi,

> From: Al Stone [mailto:ahs3@redhat.com]
> Subject: Re: [PATCH 00/30] ACPICA: 20160629 Release
> 
> On 08/04/2016 06:42 PM, Zheng, Lv wrote:
> > Hi,
> >
> >> From: Al Stone [mailto:ahs3@redhat.com]
> >> Subject: Re: [PATCH 00/30] ACPICA: 20160629 Release
> >>
> >> On 08/04/2016 02:36 AM, Lv Zheng wrote:
> >>> The 20160629 ACPICA kernel-resident subsystem updates are
> linuxized
> >> based
> >>> on the linux-pm/linux-next branch.
> >>>
> >>> The patchset has passed the following build/boot tests.
> >>> Build tests are performed as follows:
> >>> 1. i386 + allyes
> >>> 2. i386 + allno
> >>> 3. i386 + default + ACPI_DEBUGGER=y
> >>> 4. i386 + default + ACPI_DEBUGGER=n + ACPI_DEBUG=y
> >>> 5. i386 + default + ACPI_DEBUG=n + ACPI=y
> >>> 6. i386 + default + ACPI=n
> >>> 7. x86_64 + allyes
> >>> 8. x86_64 + allno
> >>> 9. x86_64 + default + ACPI_DEBUGGER=y
> >>> 10.x86_64 + default + ACPI_DEBUGGER=n + ACPI_DEBUG=y
> >>> 11.x86_64 + default + ACPI_DEBUG=n + ACPI=y
> >>> 12.x86_64 + default + ACPI=n
> >>> Boot tests are performed as follows:
> >>> 1. i386 + default + ACPI_DEBUGGER=y
> >>> 2. x86_64 + default + ACPI_DEBUGGER=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 "drivers/platform" drivers
> >>>    All other drivers that link the APIs provided by ACPICA subsystem
> >>>
> >>> The divergences checking result:
> >>> Before applying (20160422 Release):
> >>>   494 lines
> >>> After applying (20160629 Release):
> >>>   508 lines
> >>>
> >>> Bob Moore (8):
> >>>   ACPICA: Interpreter: Remove temporary code for External() opcode
> >>>   ACPICA: Debugger: Extend some max line lengths
> >>>   ACPICA: Disassembler: Add option to emit embedded External
> >>>     operators/opcodes
> >>>   ACPICA: Simplify configuration for "Max Loops" system parameter
> >>>   ACPICA: iASL/Disassembler: Add a check for missing filename
> >>>   ACPICA: Use os_allocate_zeroed
> >>>   ACPICA: FADT support cleanup
> >>>   ACPICA: Update version to 20160629
> >>>
> >>> Jung-uk Kim (2):
> >>>   ACPICA: Fix deconstification warnings (-Wcast-qual) with function
> >>>     traces.
> >>>   ACPICA: Fix deconstification warnings (-Wcast-qual) with
> >>>     acpi_ns_root_initialize().
> >>>
> >>> Lv Zheng (20):
> >>>   ACPICA: Utilities: Introduce facility to allow Linux to set correct
> >>>     logging levels
> >>>   ACPICA: Divergence: Port declarators back to ACPICA
> >>>   ACPICA: Events: Introduce acpi_mask_gpe() to implement GPE
> masking
> >>>     mechanism
> >>>   ACPI / sysfs: Update /sys/firmware/acpi/interrupts/gpexx using new
> >>>     GPE masking mechanism
> >>>   ACPI / sysfs: Provide quirk mechanism to prevent GPE flooding
> >>>   ACPICA: Debugger: Fix wrong inclusions in dbfileio.c
> >>>   ACPICA: OSL: Add correct acpi_gbl_debug_timeout export to allow
> >>>     acpiexec to link
> >>>   ACPICA: acpidump: Fix a duplicate variable definition
> >>>   ACPICA: Applications: Enable USE_NATIVE_ALLOCATE_ZEROED
> >> environment
> >>>     for all applications
> >>>   ACPICA: Clib: Fix build issues when ACPI_USE_STANDARD_HEADERS
> is
> >> not
> >>>     defined by converting size_t to acpi_size
> >>>   ACPICA: Clib: Cleanup va_arg related code
> >>>   ACPICA: Clib: Fix wrong mini C library usage
> >>>   ACPICA: Clib/EFI: Fix wrong order of standard integer types/IO
> >>>     handles
> >>>   ACPICA: MSVC9: Fix <sys/stat.h> inclusion order issue
> >>>   ACPICA: Clib: Add -nostdinc support for EFI layer
> >>>   ACPICA: Clib: Eliminate acpi_os_XXXFile()/acpi_log_error and link
> >>>     clibrary fxxx()/errno/perror() instead
> >>>   ACPICA: Applications: Fix a potential issue that help messages may
> be
> >>>     dumped to acpi_gbl_debug_file
> >>>   ACPICA: EFI: Port acpidump to EDK2 environment
> >>>   ACPICA: OSL: Cleanup the inclusion order of the compiler-specific
> >>>     headers
> >>>   ACPICA: OSL: Fix a regression that old GCC requires a workaround for
> >>>     strchr()
> >>>
> >>>  Documentation/kernel-parameters.txt                |   10 +
> >>>  drivers/acpi/acpica/acapps.h                       |   10 +-
> >>>  drivers/acpi/acpica/acevents.h                     |    3 +
> >>>  drivers/acpi/acpica/acglobal.h                     |    2 +
> >>>  drivers/acpi/acpica/aclocal.h                      |    2 +
> >>>  drivers/acpi/acpica/actables.h                     |    3 +-
> >>>  drivers/acpi/acpica/acutils.h                      |   36 ++--
> >>>  drivers/acpi/acpica/dbfileio.c                     |   20 +-
> >>>  drivers/acpi/acpica/dbobject.c                     |    4 +-
> >>>  drivers/acpi/acpica/dsutils.c                      |   17 +-
> >>>  drivers/acpi/acpica/evgpe.c                        |   57 +++++
> >>>  drivers/acpi/acpica/evxfgpe.c                      |   43 ++++
> >>>  drivers/acpi/acpica/hwgpe.c                        |   23 ++-
> >>>  drivers/acpi/acpica/nsaccess.c                     |    6 +-
> >>>  drivers/acpi/acpica/nsdump.c                       |    2 +-
> >>>  drivers/acpi/acpica/tbfadt.c                       |   10 +-
> >>>  drivers/acpi/acpica/tbutils.c                      |    3 +-
> >>>  drivers/acpi/acpica/tbxface.c                      |    4 +-
> >>>  drivers/acpi/acpica/tbxfload.c                     |    4 +-
> >>>  drivers/acpi/acpica/tbxfroot.c                     |    5 +-
> >>>  drivers/acpi/acpica/utbuffer.c                     |   30 ++-
> >>>  drivers/acpi/acpica/utdebug.c                      |   61 +++---
> >>>  drivers/acpi/acpica/utdecode.c                     |    2 +-
> >>>  drivers/acpi/acpica/utinit.c                       |    2 +-
> >>>  drivers/acpi/acpica/utpredef.c                     |    2 -
> >>>  drivers/acpi/acpica/utprint.c                      |  105 ++++++++--
> >>>  drivers/acpi/acpica/uttrack.c                      |    4 +-
> >>>  drivers/acpi/acpica/utxface.c                      |    2 +-
> >>>  drivers/acpi/acpica/utxfinit.c                     |    6 +-
> >>>  drivers/acpi/internal.h                            |    1 +
> >>>  drivers/acpi/scan.c                                |    1 +
> >>>  drivers/acpi/sleep.c                               |    2 +-
> >>>  drivers/acpi/sysfs.c                               |   89 +++++++-
> >>>  include/acpi/acconfig.h                            |    4 +
> >>>  include/acpi/acoutput.h                            |    6 +-
> >>>  include/acpi/acpiosxf.h                            |   43 +---
> >>>  include/acpi/acpixf.h                              |   37 ++--
> >>>  include/acpi/actbl.h                               |  164 ++++++++-------
> >>>  include/acpi/actypes.h                             |   48 ++---
> >>>  include/acpi/platform/acenv.h                      |   90 +++-----
> >>>  include/acpi/platform/acenvex.h                    |   21 +-
> >>>  include/acpi/platform/acgcc.h                      |   17 +-
> >>>  include/acpi/platform/acgccex.h                    |   58 ++++++
> >>>  include/acpi/platform/aclinux.h                    |   22 +-
> >>>  include/acpi/platform/aclinuxex.h                  |    2 +-
> >>>  tools/power/acpi/common/cmfsize.c                  |   13 +-
> >>>  tools/power/acpi/common/getopt.c                   |    4 +-
> >>>  .../acpi/os_specific/service_layers/oslibcfs.c     |  217 --------------------
> >>>  .../acpi/os_specific/service_layers/osunixxf.c     |    3 -
> >>>  tools/power/acpi/tools/acpidump/Makefile           |    1 -
> >>>  tools/power/acpi/tools/acpidump/acpidump.h         |   12 +-
> >>>  tools/power/acpi/tools/acpidump/apdump.c           |   71 +++----
> >>>  tools/power/acpi/tools/acpidump/apfiles.c          |   56 ++---
> >>>  tools/power/acpi/tools/acpidump/apmain.c           |   33 +--
> >>>  54 files changed, 796 insertions(+), 697 deletions(-)
> >>>  create mode 100644 include/acpi/platform/acgccex.h
> >>>  delete mode 100644
> >> tools/power/acpi/os_specific/service_layers/oslibcfs.c
> >>>
> >>
> >> I'm very confused.  I don't see a 20160629 release on the ACPICA .org
> >> download site.  There is a 20160729, though; is this just a typo?  Patch
> >> 30/30 indicates it is...
> > [Lv Zheng]
> > I couldn't see 20160729 on acpica.org.
> > This is the original commit:
> > https://github.com/acpica/acpica/commit/1e997ab9a
> >
> > I just followed the rule and generated the ACPICA release according to
> the indicator in the last commit.
> > I'm not sure if this is a typo or just a delayed release.
> >
> > Ciao,
> > Lv
> >
> 
> Weird.  Something is wrong with someone's browser, then (either yours or
> mine),
> or with the website.  When I go to https://www.acpica.org/downloads,
> there is
> no 20160629 listed.  The most recent version is shown as 20160729.
[Lv Zheng] 
I was thinking you were talking about the release notes in community or in web's news section.

> 
> There is also no tag in the git tree for R06_29_16 -- there is a tag for the
> R07_29_16 release, though.  The odd thing is the 1e997ab9a commit says
> it is
> the "Version 20160629", and the commit immediately prior to that is
> 08869b98,
> saying "Version 20160729".  I don't really care which one it is supposed to
> be,
> but it's not clear to me which one is correct.
[Lv Zheng] 
Confirmed from Bob that version 20160729 is correct.

However this is just a typo in ACPICA upstream.
We actually only need a unique number to identify ACPICA release when a bug was reported against specific ACPICA version.
And 20160629 is unique for us.

So I feel that we don't need to re-send the entire series to correct this.

Thanks
Lv

> 
> --
> ciao,
> al
> -----------------------------------
> Al Stone
> Software Engineer
> Red Hat, Inc.
> ahs3@redhat.com
> -----------------------------------

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 13/30] ACPI / sysfs: Provide quirk mechanism to prevent GPE flooding
  2016-08-04  8:43 ` [PATCH 13/30] ACPI / sysfs: Provide quirk mechanism to prevent GPE flooding Lv Zheng
@ 2016-08-08 20:24   ` Rafael J. Wysocki
  2016-08-11  3:30     ` Zheng, Lv
  0 siblings, 1 reply; 37+ messages in thread
From: Rafael J. Wysocki @ 2016-08-08 20:24 UTC (permalink / raw)
  To: Lv Zheng; +Cc: Rafael J. Wysocki, Len Brown, Lv Zheng, linux-acpi

On Thursday, August 04, 2016 04:43:51 PM Lv Zheng wrote:
> Sometimes, the users may require a quirk to be provided from ACPI subsystem
> core to prevent a GPE from flooding. Normally, if a GPE cannot be
> dispatched, ACPICA core automatically prevents the GPE from firing. But
> there are cases the GPE is dispatched by _Lxx/_Exx provided via AML table,
> and OSPM is lacking of the knowledge to get _Lxx/_Exx correctly executed to
> handle the GPE, thus the GPE flooding may still occur.
> 
> This patch provides a quirk mechanism to stop this kind of GPE flooding.
> 
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=53071
> Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/887793
> Signed-off-by: Lv Zheng <lv.zheng@intel.com>

I didn't like this patch before and I still don't like it.

Besides, I'd appreciate it if you didn't mix ACPICA release patches with
non-ACPICA ones.

Thanks,
Rafael


^ permalink raw reply	[flat|nested] 37+ messages in thread

* RE: [PATCH 13/30] ACPI / sysfs: Provide quirk mechanism to prevent GPE flooding
  2016-08-08 20:24   ` Rafael J. Wysocki
@ 2016-08-11  3:30     ` Zheng, Lv
  0 siblings, 0 replies; 37+ messages in thread
From: Zheng, Lv @ 2016-08-11  3:30 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: Wysocki, Rafael J, Brown, Len, Lv Zheng, linux-acpi

Hi, Rafael

> From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net]
> Subject: Re: [PATCH 13/30] ACPI / sysfs: Provide quirk mechanism to
> prevent GPE flooding
> 
> On Thursday, August 04, 2016 04:43:51 PM Lv Zheng wrote:
> > Sometimes, the users may require a quirk to be provided from ACPI
> subsystem
> > core to prevent a GPE from flooding. Normally, if a GPE cannot be
> > dispatched, ACPICA core automatically prevents the GPE from firing. But
> > there are cases the GPE is dispatched by _Lxx/_Exx provided via AML
> table,
> > and OSPM is lacking of the knowledge to get _Lxx/_Exx correctly
> executed to
> > handle the GPE, thus the GPE flooding may still occur.
> >
> > This patch provides a quirk mechanism to stop this kind of GPE flooding.
> >
> > Link: https://bugzilla.kernel.org/show_bug.cgi?id=53071
> > Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/887793
> > Signed-off-by: Lv Zheng <lv.zheng@intel.com>
> 
> I didn't like this patch before and I still don't like it.
> 
[Lv Zheng] 
OK.
So please help to drop it from this series.

> Besides, I'd appreciate it if you didn't mix ACPICA release patches with
> non-ACPICA ones.
[Lv Zheng] 
OK.
Sometimes, I'll have to put non-ACPICA materials in the ACPICA release series in order not to break things because of ACPICA upstream changes.
But this patch isn't such kind of required update, it's my fault, please drop it.

Thanks
Lv


^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2016-08-11  3:34 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-04  8:36 [PATCH 00/30] ACPICA: 20160629 Release Lv Zheng
2016-08-04  8:36 ` [PATCH 01/30] ACPICA: Fix deconstification warnings (-Wcast-qual) with function traces Lv Zheng
2016-08-04  8:42   ` [UPDATE PATCH " Lv Zheng
2016-08-04  8:42 ` [PATCH 02/30] ACPICA: Fix deconstification warnings (-Wcast-qual) with acpi_ns_root_initialize() Lv Zheng
2016-08-04  8:42 ` [PATCH 03/30] ACPICA: Interpreter: Remove temporary code for External() opcode Lv Zheng
2016-08-04  8:42 ` [PATCH 04/30] ACPICA: Utilities: Introduce facility to allow Linux to set correct logging levels Lv Zheng
2016-08-04  8:42 ` [PATCH 05/30] ACPICA: Debugger: Extend some max line lengths Lv Zheng
2016-08-04  8:43 ` [PATCH 06/30] ACPICA: Disassembler: Add option to emit embedded External operators/opcodes Lv Zheng
2016-08-04  8:43 ` [PATCH 07/30] ACPICA: Simplify configuration for "Max Loops" system parameter Lv Zheng
2016-08-04  8:43 ` [PATCH 08/30] ACPICA: Divergence: Port declarators back to ACPICA Lv Zheng
2016-08-04  8:43 ` [PATCH 09/30] ACPICA: iASL/Disassembler: Add a check for missing filename Lv Zheng
2016-08-04  8:43 ` [PATCH 10/30] ACPICA: Use os_allocate_zeroed Lv Zheng
2016-08-04  8:43 ` [PATCH 11/30] ACPICA: Events: Introduce acpi_mask_gpe() to implement GPE masking mechanism Lv Zheng
2016-08-04  8:43 ` [PATCH 12/30] ACPI / sysfs: Update /sys/firmware/acpi/interrupts/gpexx using new " Lv Zheng
2016-08-04  8:43 ` [PATCH 13/30] ACPI / sysfs: Provide quirk mechanism to prevent GPE flooding Lv Zheng
2016-08-08 20:24   ` Rafael J. Wysocki
2016-08-11  3:30     ` Zheng, Lv
2016-08-04  8:43 ` [PATCH 14/30] ACPICA: FADT support cleanup Lv Zheng
2016-08-04  8:44 ` [PATCH 15/30] ACPICA: Debugger: Fix wrong inclusions in dbfileio.c Lv Zheng
2016-08-04  8:44 ` [PATCH 16/30] ACPICA: OSL: Add correct acpi_gbl_debug_timeout export to allow acpiexec to link Lv Zheng
2016-08-04  8:44 ` [PATCH 17/30] ACPICA: acpidump: Fix a duplicate variable definition Lv Zheng
2016-08-04  8:44 ` [PATCH 18/30] ACPICA: Applications: Enable USE_NATIVE_ALLOCATE_ZEROED environment for all applications Lv Zheng
2016-08-04  8:44 ` [PATCH 19/30] ACPICA: Clib: Fix build issues when ACPI_USE_STANDARD_HEADERS is not defined by converting size_t to acpi_size Lv Zheng
2016-08-04  8:44 ` [PATCH 20/30] ACPICA: Clib: Cleanup va_arg related code Lv Zheng
2016-08-04  8:44 ` [PATCH 21/30] ACPICA: Clib: Fix wrong mini C library usage Lv Zheng
2016-08-04  8:44 ` [PATCH 22/30] ACPICA: Clib/EFI: Fix wrong order of standard integer types/IO handles Lv Zheng
2016-08-04  8:44 ` [PATCH 23/30] ACPICA: MSVC9: Fix <sys/stat.h> inclusion order issue Lv Zheng
2016-08-04  8:45 ` [PATCH 24/30] ACPICA: Clib: Add -nostdinc support for EFI layer Lv Zheng
2016-08-04  8:45 ` [PATCH 26/30] ACPICA: Applications: Fix a potential issue that help messages may be dumped to acpi_gbl_debug_file Lv Zheng
2016-08-04  8:45 ` [PATCH 27/30] ACPICA: EFI: Port acpidump to EDK2 environment Lv Zheng
2016-08-04  8:45 ` [PATCH 28/30] ACPICA: OSL: Cleanup the inclusion order of the compiler-specific headers Lv Zheng
2016-08-04  8:45 ` [PATCH 29/30] ACPICA: OSL: Fix a regression that old GCC requires a workaround for strchr() Lv Zheng
2016-08-04  8:45 ` [PATCH 30/30] ACPICA: Update version to 20160629 Lv Zheng
2016-08-04 16:12 ` [PATCH 00/30] ACPICA: 20160629 Release Al Stone
2016-08-05  0:42   ` Zheng, Lv
2016-08-05 14:43     ` Al Stone
2016-08-05 22:00       ` Zheng, Lv

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.