All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/16] ACPICA: 20130517 release
@ 2013-06-08  0:57 Lv Zheng
  2013-06-08  0:57 ` [PATCH 01/16] ACPICA: Split buffer dump routines into separate file Lv Zheng
                   ` (17 more replies)
  0 siblings, 18 replies; 77+ messages in thread
From: Lv Zheng @ 2013-06-08  0:57 UTC (permalink / raw)
  To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi

The 20130517 ACPICA kernel resident system updates is linuxized based on
the pm/linux-next branch.
The patch set has passed a build/boot test on the following machines:
Dell Inspiron Mini 1010 (i386)
HP Compaq 8200 Elite SFF PC (x86-64)
With the following kernel configuration items enabled:
  CONFIG_ACPI_AC
  CONFIG_ACPI_BATTERY
  CONFIG_ACPI_NUMA
  CONFIG_ACPI_PROCESSOR
  CONFIG_ACPI_THERMAL
  CONFIG_ACPI_VIDEO
  CONFIG_CPU_FREQ
  CONFIG_I2C_SCMI
  CONFIG_SENSORS_ACPI_POWER
  CONFIG_PANASONIC_LAPTOP
  CONFIG_XO15_EBOOK
No new divergences are introduced in this release.
Please review.

Bob Moore (7):
  ACPICA: Split buffer dump routines into separate file
  ACPICA: Split internal error msg routines to a separate file
  ACPICA: Split table print utilities to a new a separate file
  ACPICA: New: Portable acpidump utility (get system ACPI tables)
  ACPICA: Update interface to AcpiUtValidAcpiName
  ACPICA: Support Mac OS X in Makefile
  ACPICA: Update version to 20130517

Chao Guan (1):
  ACPICA: Standardize all switch() blocks

Lv Zheng (5):
  ACPICA: Add option to disable loading of SSDTs from the RSDT/XSDT
  ACPICA: Do not use extended sleep registers unless HW-reduced bit is
    set
  ACPICA: Move _PRT repair into the standard complex repair module
  ACPICA: Add several repairs for _CST predefined name
  ACPICA: _CST repair: Handle null package entries

Tomasz Nowicki (3):
  ACPICA: ACPICA Termination: Delete global lock pending lock
  ACPICA: Fix possible memory leak in GPE init error path
  ACPICA: Clear events initialized flag upon event component
    termination

 drivers/acpi/acpica/Makefile    |    3 +
 drivers/acpi/acpica/acglobal.h  |    6 +
 drivers/acpi/acpica/acutils.h   |   44 +++++-
 drivers/acpi/acpica/dscontrol.c |    4 +-
 drivers/acpi/acpica/dsfield.c   |    4 +
 drivers/acpi/acpica/dsinit.c    |    1 +
 drivers/acpi/acpica/dsmthdat.c  |    2 +-
 drivers/acpi/acpica/dsobject.c  |    3 +-
 drivers/acpi/acpica/dsopcode.c  |    1 +
 drivers/acpi/acpica/dsutils.c   |    5 +-
 drivers/acpi/acpica/dswexec.c   |    3 +-
 drivers/acpi/acpica/dswload.c   |    7 +-
 drivers/acpi/acpica/dswload2.c  |    4 +
 drivers/acpi/acpica/evglock.c   |    1 +
 drivers/acpi/acpica/evgpe.c     |    6 +-
 drivers/acpi/acpica/evgpeblk.c  |    2 +
 drivers/acpi/acpica/evgpeinit.c |    3 +
 drivers/acpi/acpica/evhandler.c |    7 +
 drivers/acpi/acpica/evmisc.c    |    3 +
 drivers/acpi/acpica/evrgnini.c  |    2 +
 drivers/acpi/acpica/evxfgpe.c   |    3 +
 drivers/acpi/acpica/evxfregn.c  |    1 +
 drivers/acpi/acpica/exconfig.c  |    1 +
 drivers/acpi/acpica/exconvrt.c  |   13 +-
 drivers/acpi/acpica/excreate.c  |    3 -
 drivers/acpi/acpica/exdebug.c   |    2 +
 drivers/acpi/acpica/exdump.c    |    2 +
 drivers/acpi/acpica/exfield.c   |    4 +
 drivers/acpi/acpica/exfldio.c   |    2 -
 drivers/acpi/acpica/exmisc.c    |   12 +-
 drivers/acpi/acpica/exoparg1.c  |   16 +--
 drivers/acpi/acpica/exoparg2.c  |    1 -
 drivers/acpi/acpica/exoparg3.c  |    1 -
 drivers/acpi/acpica/exoparg6.c  |    5 -
 drivers/acpi/acpica/exprep.c    |    7 +
 drivers/acpi/acpica/exregion.c  |   27 +++-
 drivers/acpi/acpica/exresnte.c  |    1 +
 drivers/acpi/acpica/exresolv.c  |    6 +-
 drivers/acpi/acpica/exresop.c   |    9 +-
 drivers/acpi/acpica/exstore.c   |    4 +-
 drivers/acpi/acpica/exstoren.c  |    4 -
 drivers/acpi/acpica/hwacpi.c    |    2 +-
 drivers/acpi/acpica/hwgpe.c     |    3 +
 drivers/acpi/acpica/hwregs.c    |    4 +-
 drivers/acpi/acpica/hwxface.c   |    3 +
 drivers/acpi/acpica/hwxfsleep.c |   12 +-
 drivers/acpi/acpica/nsaccess.c  |    1 +
 drivers/acpi/acpica/nsconvert.c |    3 +
 drivers/acpi/acpica/nsdump.c    |   10 ++
 drivers/acpi/acpica/nsinit.c    |    9 ++
 drivers/acpi/acpica/nspredef.c  |   14 +-
 drivers/acpi/acpica/nsprepkg.c  |    5 -
 drivers/acpi/acpica/nsrepair.c  |    1 +
 drivers/acpi/acpica/nsrepair2.c |  283 +++++++++++++++++++++++++++++++++-----
 drivers/acpi/acpica/nsutils.c   |    3 +
 drivers/acpi/acpica/nsxfeval.c  |    1 +
 drivers/acpi/acpica/psargs.c    |    4 +
 drivers/acpi/acpica/psloop.c    |    2 +-
 drivers/acpi/acpica/psobject.c  |    1 +
 drivers/acpi/acpica/psparse.c   |    3 +-
 drivers/acpi/acpica/pstree.c    |    2 +
 drivers/acpi/acpica/rscalc.c    |    7 +-
 drivers/acpi/acpica/rscreate.c  |   27 ----
 drivers/acpi/acpica/rsdump.c    |   10 ++
 drivers/acpi/acpica/rsmisc.c    |    3 +-
 drivers/acpi/acpica/rsutils.c   |    5 +
 drivers/acpi/acpica/rsxface.c   |    1 +
 drivers/acpi/acpica/tbinstal.c  |    7 +-
 drivers/acpi/acpica/tbprint.c   |  237 ++++++++++++++++++++++++++++++++
 drivers/acpi/acpica/tbutils.c   |  191 +-------------------------
 drivers/acpi/acpica/tbxfload.c  |   25 ++--
 drivers/acpi/acpica/utbuffer.c  |  201 +++++++++++++++++++++++++++
 drivers/acpi/acpica/utcopy.c    |   11 +-
 drivers/acpi/acpica/utdebug.c   |  148 +-------------------
 drivers/acpi/acpica/utdelete.c  |    3 +-
 drivers/acpi/acpica/uterror.c   |  289 +++++++++++++++++++++++++++++++++++++++
 drivers/acpi/acpica/uteval.c    |    7 +-
 drivers/acpi/acpica/utexcep.c   |    1 +
 drivers/acpi/acpica/utids.c     |    3 +
 drivers/acpi/acpica/utmisc.c    |    2 +
 drivers/acpi/acpica/utobject.c  |    5 +-
 drivers/acpi/acpica/utstring.c  |   19 ++-
 drivers/acpi/acpica/uttrack.c   |    8 ++
 drivers/acpi/acpica/utxferror.c |  277 -------------------------------------
 drivers/acpi/osl.c              |   11 ++
 include/acpi/acpiosxf.h         |   18 +++
 include/acpi/acpixf.h           |    3 +-
 include/acpi/actypes.h          |    8 ++
 include/acpi/platform/acenv.h   |    8 +-
 89 files changed, 1353 insertions(+), 783 deletions(-)
 create mode 100644 drivers/acpi/acpica/tbprint.c
 create mode 100644 drivers/acpi/acpica/utbuffer.c
 create mode 100644 drivers/acpi/acpica/uterror.c

-- 
1.7.10


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

* [PATCH 01/16] ACPICA: Split buffer dump routines into separate file
  2013-06-08  0:57 [PATCH 00/16] ACPICA: 20130517 release Lv Zheng
@ 2013-06-08  0:57 ` Lv Zheng
  2013-06-12 15:51   ` Len Brown
  2013-06-08  0:58 ` [PATCH 02/16] ACPICA: Split internal error msg routines to a " Lv Zheng
                   ` (16 subsequent siblings)
  17 siblings, 1 reply; 77+ messages in thread
From: Lv Zheng @ 2013-06-08  0:57 UTC (permalink / raw)
  To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi

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

To enhance configurability of ACPICA.  New file is
utilities/utbuffer.c

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
 drivers/acpi/acpica/Makefile   |    1 +
 drivers/acpi/acpica/utbuffer.c |  201 ++++++++++++++++++++++++++++++++++++++++
 drivers/acpi/acpica/utdebug.c  |  148 +----------------------------
 3 files changed, 203 insertions(+), 147 deletions(-)
 create mode 100644 drivers/acpi/acpica/utbuffer.c

diff --git a/drivers/acpi/acpica/Makefile b/drivers/acpi/acpica/Makefile
index 29b3dab..474901e 100644
--- a/drivers/acpi/acpica/Makefile
+++ b/drivers/acpi/acpica/Makefile
@@ -146,6 +146,7 @@ acpi-y +=		\
 acpi-y +=		\
 	utaddress.o	\
 	utalloc.o	\
+	utbuffer.o	\
 	utcopy.o	\
 	utexcep.o	\
 	utdebug.o	\
diff --git a/drivers/acpi/acpica/utbuffer.c b/drivers/acpi/acpica/utbuffer.c
new file mode 100644
index 0000000..11fde93
--- /dev/null
+++ b/drivers/acpi/acpica/utbuffer.c
@@ -0,0 +1,201 @@
+/******************************************************************************
+ *
+ * Module Name: utbuffer - Buffer dump routines
+ *
+ *****************************************************************************/
+
+/*
+ * Copyright (C) 2000 - 2013, 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.
+ */
+
+#include <acpi/acpi.h>
+#include "accommon.h"
+
+#define _COMPONENT          ACPI_UTILITIES
+ACPI_MODULE_NAME("utbuffer")
+
+/*******************************************************************************
+ *
+ * FUNCTION:    acpi_ut_dump_buffer
+ *
+ * PARAMETERS:  buffer              - Buffer to dump
+ *              count               - Amount to dump, in bytes
+ *              display             - BYTE, WORD, DWORD, or QWORD display:
+ *                                      DB_BYTE_DISPLAY
+ *                                      DB_WORD_DISPLAY
+ *                                      DB_DWORD_DISPLAY
+ *                                      DB_QWORD_DISPLAY
+ *              base_offset         - Beginning buffer offset (display only)
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Generic dump buffer in both hex and ascii.
+ *
+ ******************************************************************************/
+void acpi_ut_dump_buffer(u8 *buffer, u32 count, u32 display, u32 base_offset)
+{
+	u32 i = 0;
+	u32 j;
+	u32 temp32;
+	u8 buf_char;
+
+	if (!buffer) {
+		acpi_os_printf("Null Buffer Pointer in DumpBuffer!\n");
+		return;
+	}
+
+	if ((count < 4) || (count & 0x01)) {
+		display = DB_BYTE_DISPLAY;
+	}
+
+	/* Nasty little dump buffer routine! */
+
+	while (i < count) {
+
+		/* Print current offset */
+
+		acpi_os_printf("%6.4X: ", (base_offset + i));
+
+		/* Print 16 hex chars */
+
+		for (j = 0; j < 16;) {
+			if (i + j >= count) {
+
+				/* Dump fill spaces */
+
+				acpi_os_printf("%*s", ((display * 2) + 1), " ");
+				j += display;
+				continue;
+			}
+
+			switch (display) {
+			case DB_BYTE_DISPLAY:
+			default:	/* Default is BYTE display */
+
+				acpi_os_printf("%02X ",
+					       buffer[(acpi_size) i + j]);
+				break;
+
+			case DB_WORD_DISPLAY:
+
+				ACPI_MOVE_16_TO_32(&temp32,
+						   &buffer[(acpi_size) i + j]);
+				acpi_os_printf("%04X ", temp32);
+				break;
+
+			case DB_DWORD_DISPLAY:
+
+				ACPI_MOVE_32_TO_32(&temp32,
+						   &buffer[(acpi_size) i + j]);
+				acpi_os_printf("%08X ", temp32);
+				break;
+
+			case DB_QWORD_DISPLAY:
+
+				ACPI_MOVE_32_TO_32(&temp32,
+						   &buffer[(acpi_size) i + j]);
+				acpi_os_printf("%08X", temp32);
+
+				ACPI_MOVE_32_TO_32(&temp32,
+						   &buffer[(acpi_size) i + j +
+							   4]);
+				acpi_os_printf("%08X ", temp32);
+				break;
+			}
+
+			j += display;
+		}
+
+		/*
+		 * Print the ASCII equivalent characters but watch out for the bad
+		 * unprintable ones (printable chars are 0x20 through 0x7E)
+		 */
+		acpi_os_printf(" ");
+		for (j = 0; j < 16; j++) {
+			if (i + j >= count) {
+				acpi_os_printf("\n");
+				return;
+			}
+
+			buf_char = buffer[(acpi_size) i + j];
+			if (ACPI_IS_PRINT(buf_char)) {
+				acpi_os_printf("%c", buf_char);
+			} else {
+				acpi_os_printf(".");
+			}
+		}
+
+		/* Done with that line. */
+
+		acpi_os_printf("\n");
+		i += 16;
+	}
+
+	return;
+}
+
+/*******************************************************************************
+ *
+ * FUNCTION:    acpi_ut_debug_dump_buffer
+ *
+ * PARAMETERS:  buffer              - Buffer to dump
+ *              count               - Amount to dump, in bytes
+ *              display             - BYTE, WORD, DWORD, or QWORD display:
+ *                                      DB_BYTE_DISPLAY
+ *                                      DB_WORD_DISPLAY
+ *                                      DB_DWORD_DISPLAY
+ *                                      DB_QWORD_DISPLAY
+ *              component_ID        - Caller's component ID
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Generic dump buffer in both hex and ascii.
+ *
+ ******************************************************************************/
+
+void
+acpi_ut_debug_dump_buffer(u8 *buffer, u32 count, u32 display, u32 component_id)
+{
+
+	/* Only dump the buffer if tracing is enabled */
+
+	if (!((ACPI_LV_TABLES & acpi_dbg_level) &&
+	      (component_id & acpi_dbg_layer))) {
+		return;
+	}
+
+	acpi_ut_dump_buffer(buffer, count, display, 0);
+}
diff --git a/drivers/acpi/acpica/utdebug.c b/drivers/acpi/acpica/utdebug.c
index c57d9cc..5796e11 100644
--- a/drivers/acpi/acpica/utdebug.c
+++ b/drivers/acpi/acpica/utdebug.c
@@ -1,6 +1,6 @@
 /******************************************************************************
  *
- * Module Name: utdebug - Debug print routines
+ * Module Name: utdebug - Debug print/trace routines
  *
  *****************************************************************************/
 
@@ -543,149 +543,3 @@ acpi_ut_ptr_exit(u32 line_number,
 }
 
 #endif
-
-/*******************************************************************************
- *
- * FUNCTION:    acpi_ut_dump_buffer
- *
- * PARAMETERS:  buffer              - Buffer to dump
- *              count               - Amount to dump, in bytes
- *              display             - BYTE, WORD, DWORD, or QWORD display
- *              offset              - Beginning buffer offset (display only)
- *
- * RETURN:      None
- *
- * DESCRIPTION: Generic dump buffer in both hex and ascii.
- *
- ******************************************************************************/
-
-void acpi_ut_dump_buffer(u8 *buffer, u32 count, u32 display, u32 base_offset)
-{
-	u32 i = 0;
-	u32 j;
-	u32 temp32;
-	u8 buf_char;
-
-	if (!buffer) {
-		acpi_os_printf("Null Buffer Pointer in DumpBuffer!\n");
-		return;
-	}
-
-	if ((count < 4) || (count & 0x01)) {
-		display = DB_BYTE_DISPLAY;
-	}
-
-	/* Nasty little dump buffer routine! */
-
-	while (i < count) {
-
-		/* Print current offset */
-
-		acpi_os_printf("%6.4X: ", (base_offset + i));
-
-		/* Print 16 hex chars */
-
-		for (j = 0; j < 16;) {
-			if (i + j >= count) {
-
-				/* Dump fill spaces */
-
-				acpi_os_printf("%*s", ((display * 2) + 1), " ");
-				j += display;
-				continue;
-			}
-
-			switch (display) {
-			case DB_BYTE_DISPLAY:
-			default:	/* Default is BYTE display */
-
-				acpi_os_printf("%02X ",
-					       buffer[(acpi_size) i + j]);
-				break;
-
-			case DB_WORD_DISPLAY:
-
-				ACPI_MOVE_16_TO_32(&temp32,
-						   &buffer[(acpi_size) i + j]);
-				acpi_os_printf("%04X ", temp32);
-				break;
-
-			case DB_DWORD_DISPLAY:
-
-				ACPI_MOVE_32_TO_32(&temp32,
-						   &buffer[(acpi_size) i + j]);
-				acpi_os_printf("%08X ", temp32);
-				break;
-
-			case DB_QWORD_DISPLAY:
-
-				ACPI_MOVE_32_TO_32(&temp32,
-						   &buffer[(acpi_size) i + j]);
-				acpi_os_printf("%08X", temp32);
-
-				ACPI_MOVE_32_TO_32(&temp32,
-						   &buffer[(acpi_size) i + j +
-							   4]);
-				acpi_os_printf("%08X ", temp32);
-				break;
-			}
-
-			j += display;
-		}
-
-		/*
-		 * Print the ASCII equivalent characters but watch out for the bad
-		 * unprintable ones (printable chars are 0x20 through 0x7E)
-		 */
-		acpi_os_printf(" ");
-		for (j = 0; j < 16; j++) {
-			if (i + j >= count) {
-				acpi_os_printf("\n");
-				return;
-			}
-
-			buf_char = buffer[(acpi_size) i + j];
-			if (ACPI_IS_PRINT(buf_char)) {
-				acpi_os_printf("%c", buf_char);
-			} else {
-				acpi_os_printf(".");
-			}
-		}
-
-		/* Done with that line. */
-
-		acpi_os_printf("\n");
-		i += 16;
-	}
-
-	return;
-}
-
-/*******************************************************************************
- *
- * FUNCTION:    acpi_ut_debug_dump_buffer
- *
- * PARAMETERS:  buffer              - Buffer to dump
- *              count               - Amount to dump, in bytes
- *              display             - BYTE, WORD, DWORD, or QWORD display
- *              component_ID        - Caller's component ID
- *
- * RETURN:      None
- *
- * DESCRIPTION: Generic dump buffer in both hex and ascii.
- *
- ******************************************************************************/
-
-void
-acpi_ut_debug_dump_buffer(u8 *buffer, u32 count, u32 display, u32 component_id)
-{
-
-	/* Only dump the buffer if tracing is enabled */
-
-	if (!((ACPI_LV_TABLES & acpi_dbg_level) &&
-	      (component_id & acpi_dbg_layer))) {
-		return;
-	}
-
-	acpi_ut_dump_buffer(buffer, count, display, 0);
-}
-- 
1.7.10


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

* [PATCH 02/16] ACPICA: Split internal error msg routines to a separate file
  2013-06-08  0:57 [PATCH 00/16] ACPICA: 20130517 release Lv Zheng
  2013-06-08  0:57 ` [PATCH 01/16] ACPICA: Split buffer dump routines into separate file Lv Zheng
@ 2013-06-08  0:58 ` Lv Zheng
  2013-06-12 15:52   ` Len Brown
  2013-06-08  0:58 ` [PATCH 03/16] ACPICA: Standardize all switch() blocks Lv Zheng
                   ` (15 subsequent siblings)
  17 siblings, 1 reply; 77+ messages in thread
From: Lv Zheng @ 2013-06-08  0:58 UTC (permalink / raw)
  To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi

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

Improves configurability of ACPICA.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
 drivers/acpi/acpica/Makefile    |    1 +
 drivers/acpi/acpica/acutils.h   |   42 ++++++
 drivers/acpi/acpica/uterror.c   |  289 +++++++++++++++++++++++++++++++++++++++
 drivers/acpi/acpica/uteval.c    |    2 +-
 drivers/acpi/acpica/utxferror.c |  277 -------------------------------------
 5 files changed, 333 insertions(+), 278 deletions(-)
 create mode 100644 drivers/acpi/acpica/uterror.c

diff --git a/drivers/acpi/acpica/Makefile b/drivers/acpi/acpica/Makefile
index 474901e..987bf41 100644
--- a/drivers/acpi/acpica/Makefile
+++ b/drivers/acpi/acpica/Makefile
@@ -152,6 +152,7 @@ acpi-y +=		\
 	utdebug.o	\
 	utdecode.o	\
 	utdelete.o	\
+	uterror.o	\
 	uteval.o	\
 	utglobal.o	\
 	utids.o		\
diff --git a/drivers/acpi/acpica/acutils.h b/drivers/acpi/acpica/acutils.h
index 19e5cf7..d552036 100644
--- a/drivers/acpi/acpica/acutils.h
+++ b/drivers/acpi/acpica/acutils.h
@@ -87,6 +87,48 @@ extern const char *acpi_gbl_fc_decode[];
 extern const char *acpi_gbl_pt_decode[];
 #endif
 
+/*
+ * For the iASL compiler case, the output is redirected to stderr so that
+ * any of the various ACPI errors and warnings do not appear in the output
+ * files, for either the compiler or disassembler portions of the tool.
+ */
+#ifdef ACPI_ASL_COMPILER
+
+#include <stdio.h>
+extern FILE *acpi_gbl_output_file;
+
+#define ACPI_MSG_REDIRECT_BEGIN \
+	FILE                            *output_file = acpi_gbl_output_file; \
+	acpi_os_redirect_output (stderr);
+
+#define ACPI_MSG_REDIRECT_END \
+	acpi_os_redirect_output (output_file);
+
+#else
+/*
+ * non-iASL case - no redirection, nothing to do
+ */
+#define ACPI_MSG_REDIRECT_BEGIN
+#define ACPI_MSG_REDIRECT_END
+#endif
+
+/*
+ * Common error message prefixes
+ */
+#define ACPI_MSG_ERROR          "ACPI Error: "
+#define ACPI_MSG_EXCEPTION      "ACPI Exception: "
+#define ACPI_MSG_WARNING        "ACPI Warning: "
+#define ACPI_MSG_INFO           "ACPI: "
+
+#define ACPI_MSG_BIOS_ERROR     "ACPI BIOS Error (bug): "
+#define ACPI_MSG_BIOS_WARNING   "ACPI BIOS Warning (bug): "
+
+/*
+ * Common message suffix
+ */
+#define ACPI_MSG_SUFFIX \
+	acpi_os_printf (" (%8.8X/%s-%u)\n", ACPI_CA_VERSION, module_name, line_number)
+
 /* Types for Resource descriptor entries */
 
 #define ACPI_INVALID_RESOURCE           0
diff --git a/drivers/acpi/acpica/uterror.c b/drivers/acpi/acpica/uterror.c
new file mode 100644
index 0000000..154fdca
--- /dev/null
+++ b/drivers/acpi/acpica/uterror.c
@@ -0,0 +1,289 @@
+/*******************************************************************************
+ *
+ * Module Name: uterror - Various internal error/warning output functions
+ *
+ ******************************************************************************/
+
+/*
+ * Copyright (C) 2000 - 2013, 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.
+ */
+
+#include <acpi/acpi.h>
+#include "accommon.h"
+#include "acnamesp.h"
+
+#define _COMPONENT          ACPI_UTILITIES
+ACPI_MODULE_NAME("uterror")
+
+/*
+ * This module contains internal error functions that may
+ * be configured out.
+ */
+#if !defined (ACPI_NO_ERROR_MESSAGES)
+/*******************************************************************************
+ *
+ * FUNCTION:    acpi_ut_predefined_warning
+ *
+ * PARAMETERS:  module_name     - Caller's module name (for error output)
+ *              line_number     - Caller's line number (for error output)
+ *              pathname        - Full pathname to the node
+ *              node_flags      - From Namespace node for the method/object
+ *              format          - Printf format string + additional args
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Warnings for the predefined validation module. Messages are
+ *              only emitted the first time a problem with a particular
+ *              method/object is detected. This prevents a flood of error
+ *              messages for methods that are repeatedly evaluated.
+ *
+ ******************************************************************************/
+void ACPI_INTERNAL_VAR_XFACE
+acpi_ut_predefined_warning(const char *module_name,
+			   u32 line_number,
+			   char *pathname,
+			   u8 node_flags, const char *format, ...)
+{
+	va_list arg_list;
+
+	/*
+	 * Warning messages for this method/object will be disabled after the
+	 * first time a validation fails or an object is successfully repaired.
+	 */
+	if (node_flags & ANOBJ_EVALUATED) {
+		return;
+	}
+
+	acpi_os_printf(ACPI_MSG_WARNING "%s: ", pathname);
+
+	va_start(arg_list, format);
+	acpi_os_vprintf(format, arg_list);
+	ACPI_MSG_SUFFIX;
+	va_end(arg_list);
+}
+
+/*******************************************************************************
+ *
+ * FUNCTION:    acpi_ut_predefined_info
+ *
+ * PARAMETERS:  module_name     - Caller's module name (for error output)
+ *              line_number     - Caller's line number (for error output)
+ *              pathname        - Full pathname to the node
+ *              node_flags      - From Namespace node for the method/object
+ *              format          - Printf format string + additional args
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Info messages for the predefined validation module. Messages
+ *              are only emitted the first time a problem with a particular
+ *              method/object is detected. This prevents a flood of
+ *              messages for methods that are repeatedly evaluated.
+ *
+ ******************************************************************************/
+
+void ACPI_INTERNAL_VAR_XFACE
+acpi_ut_predefined_info(const char *module_name,
+			u32 line_number,
+			char *pathname, u8 node_flags, const char *format, ...)
+{
+	va_list arg_list;
+
+	/*
+	 * Warning messages for this method/object will be disabled after the
+	 * first time a validation fails or an object is successfully repaired.
+	 */
+	if (node_flags & ANOBJ_EVALUATED) {
+		return;
+	}
+
+	acpi_os_printf(ACPI_MSG_INFO "%s: ", pathname);
+
+	va_start(arg_list, format);
+	acpi_os_vprintf(format, arg_list);
+	ACPI_MSG_SUFFIX;
+	va_end(arg_list);
+}
+
+/*******************************************************************************
+ *
+ * FUNCTION:    acpi_ut_predefined_bios_error
+ *
+ * PARAMETERS:  module_name     - Caller's module name (for error output)
+ *              line_number     - Caller's line number (for error output)
+ *              pathname        - Full pathname to the node
+ *              node_flags      - From Namespace node for the method/object
+ *              format          - Printf format string + additional args
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: BIOS error message for predefined names. Messages
+ *              are only emitted the first time a problem with a particular
+ *              method/object is detected. This prevents a flood of
+ *              messages for methods that are repeatedly evaluated.
+ *
+ ******************************************************************************/
+
+void ACPI_INTERNAL_VAR_XFACE
+acpi_ut_predefined_bios_error(const char *module_name,
+			      u32 line_number,
+			      char *pathname,
+			      u8 node_flags, const char *format, ...)
+{
+	va_list arg_list;
+
+	/*
+	 * Warning messages for this method/object will be disabled after the
+	 * first time a validation fails or an object is successfully repaired.
+	 */
+	if (node_flags & ANOBJ_EVALUATED) {
+		return;
+	}
+
+	acpi_os_printf(ACPI_MSG_BIOS_ERROR "%s: ", pathname);
+
+	va_start(arg_list, format);
+	acpi_os_vprintf(format, arg_list);
+	ACPI_MSG_SUFFIX;
+	va_end(arg_list);
+}
+
+/*******************************************************************************
+ *
+ * FUNCTION:    acpi_ut_namespace_error
+ *
+ * PARAMETERS:  module_name         - Caller's module name (for error output)
+ *              line_number         - Caller's line number (for error output)
+ *              internal_name       - Name or path of the namespace node
+ *              lookup_status       - Exception code from NS lookup
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Print error message with the full pathname for the NS node.
+ *
+ ******************************************************************************/
+
+void
+acpi_ut_namespace_error(const char *module_name,
+			u32 line_number,
+			const char *internal_name, acpi_status lookup_status)
+{
+	acpi_status status;
+	u32 bad_name;
+	char *name = NULL;
+
+	ACPI_MSG_REDIRECT_BEGIN;
+	acpi_os_printf(ACPI_MSG_ERROR);
+
+	if (lookup_status == AE_BAD_CHARACTER) {
+
+		/* There is a non-ascii character in the name */
+
+		ACPI_MOVE_32_TO_32(&bad_name,
+				   ACPI_CAST_PTR(u32, internal_name));
+		acpi_os_printf("[0x%.8X] (NON-ASCII)", bad_name);
+	} else {
+		/* Convert path to external format */
+
+		status = acpi_ns_externalize_name(ACPI_UINT32_MAX,
+						  internal_name, NULL, &name);
+
+		/* Print target name */
+
+		if (ACPI_SUCCESS(status)) {
+			acpi_os_printf("[%s]", name);
+		} else {
+			acpi_os_printf("[COULD NOT EXTERNALIZE NAME]");
+		}
+
+		if (name) {
+			ACPI_FREE(name);
+		}
+	}
+
+	acpi_os_printf(" Namespace lookup failure, %s",
+		       acpi_format_exception(lookup_status));
+
+	ACPI_MSG_SUFFIX;
+	ACPI_MSG_REDIRECT_END;
+}
+
+/*******************************************************************************
+ *
+ * FUNCTION:    acpi_ut_method_error
+ *
+ * PARAMETERS:  module_name         - Caller's module name (for error output)
+ *              line_number         - Caller's line number (for error output)
+ *              message             - Error message to use on failure
+ *              prefix_node         - Prefix relative to the path
+ *              path                - Path to the node (optional)
+ *              method_status       - Execution status
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Print error message with the full pathname for the method.
+ *
+ ******************************************************************************/
+
+void
+acpi_ut_method_error(const char *module_name,
+		     u32 line_number,
+		     const char *message,
+		     struct acpi_namespace_node *prefix_node,
+		     const char *path, acpi_status method_status)
+{
+	acpi_status status;
+	struct acpi_namespace_node *node = prefix_node;
+
+	ACPI_MSG_REDIRECT_BEGIN;
+	acpi_os_printf(ACPI_MSG_ERROR);
+
+	if (path) {
+		status =
+		    acpi_ns_get_node(prefix_node, path, ACPI_NS_NO_UPSEARCH,
+				     &node);
+		if (ACPI_FAILURE(status)) {
+			acpi_os_printf("[Could not get node by pathname]");
+		}
+	}
+
+	acpi_ns_print_node_pathname(node, message);
+	acpi_os_printf(", %s", acpi_format_exception(method_status));
+
+	ACPI_MSG_SUFFIX;
+	ACPI_MSG_REDIRECT_END;
+}
+
+#endif				/* ACPI_NO_ERROR_MESSAGES */
diff --git a/drivers/acpi/acpica/uteval.c b/drivers/acpi/acpica/uteval.c
index 1673ddd..9d68029 100644
--- a/drivers/acpi/acpica/uteval.c
+++ b/drivers/acpi/acpica/uteval.c
@@ -68,7 +68,7 @@ ACPI_MODULE_NAME("uteval")
  ******************************************************************************/
 
 acpi_status
-acpi_ut_evaluate_object(struct acpi_namespace_node * prefix_node,
+acpi_ut_evaluate_object(struct acpi_namespace_node *prefix_node,
 			char *path,
 			u32 expected_return_btypes,
 			union acpi_operand_object **return_desc)
diff --git a/drivers/acpi/acpica/utxferror.c b/drivers/acpi/acpica/utxferror.c
index 61a2c17..e966a2e 100644
--- a/drivers/acpi/acpica/utxferror.c
+++ b/drivers/acpi/acpica/utxferror.c
@@ -44,7 +44,6 @@
 #include <linux/export.h>
 #include <acpi/acpi.h>
 #include "accommon.h"
-#include "acnamesp.h"
 
 #define _COMPONENT          ACPI_UTILITIES
 ACPI_MODULE_NAME("utxferror")
@@ -52,43 +51,7 @@ ACPI_MODULE_NAME("utxferror")
 /*
  * This module is used for the in-kernel ACPICA as well as the ACPICA
  * tools/applications.
- *
- * For the iASL compiler case, the output is redirected to stderr so that
- * any of the various ACPI errors and warnings do not appear in the output
- * files, for either the compiler or disassembler portions of the tool.
- */
-#ifdef ACPI_ASL_COMPILER
-#include <stdio.h>
-extern FILE *acpi_gbl_output_file;
-
-#define ACPI_MSG_REDIRECT_BEGIN \
-	FILE                            *output_file = acpi_gbl_output_file; \
-	acpi_os_redirect_output (stderr);
-
-#define ACPI_MSG_REDIRECT_END \
-	acpi_os_redirect_output (output_file);
-
-#else
-/*
- * non-iASL case - no redirection, nothing to do
- */
-#define ACPI_MSG_REDIRECT_BEGIN
-#define ACPI_MSG_REDIRECT_END
-#endif
-/*
- * Common message prefixes
  */
-#define ACPI_MSG_ERROR          "ACPI Error: "
-#define ACPI_MSG_EXCEPTION      "ACPI Exception: "
-#define ACPI_MSG_WARNING        "ACPI Warning: "
-#define ACPI_MSG_INFO           "ACPI: "
-#define ACPI_MSG_BIOS_ERROR     "ACPI BIOS Error (bug): "
-#define ACPI_MSG_BIOS_WARNING   "ACPI BIOS Warning (bug): "
-/*
- * Common message suffix
- */
-#define ACPI_MSG_SUFFIX \
-	acpi_os_printf (" (%8.8X/%s-%u)\n", ACPI_CA_VERSION, module_name, line_number)
 /*******************************************************************************
  *
  * FUNCTION:    acpi_error
@@ -285,243 +248,3 @@ acpi_bios_warning(const char *module_name,
 }
 
 ACPI_EXPORT_SYMBOL(acpi_bios_warning)
-
-/*
- * The remainder of this module contains internal error functions that may
- * be configured out.
- */
-#if !defined (ACPI_NO_ERROR_MESSAGES) && !defined (ACPI_BIN_APP)
-/*******************************************************************************
- *
- * FUNCTION:    acpi_ut_predefined_warning
- *
- * PARAMETERS:  module_name     - Caller's module name (for error output)
- *              line_number     - Caller's line number (for error output)
- *              pathname        - Full pathname to the node
- *              node_flags      - From Namespace node for the method/object
- *              format          - Printf format string + additional args
- *
- * RETURN:      None
- *
- * DESCRIPTION: Warnings for the predefined validation module. Messages are
- *              only emitted the first time a problem with a particular
- *              method/object is detected. This prevents a flood of error
- *              messages for methods that are repeatedly evaluated.
- *
- ******************************************************************************/
-void ACPI_INTERNAL_VAR_XFACE
-acpi_ut_predefined_warning(const char *module_name,
-			   u32 line_number,
-			   char *pathname,
-			   u8 node_flags, const char *format, ...)
-{
-	va_list arg_list;
-
-	/*
-	 * Warning messages for this method/object will be disabled after the
-	 * first time a validation fails or an object is successfully repaired.
-	 */
-	if (node_flags & ANOBJ_EVALUATED) {
-		return;
-	}
-
-	acpi_os_printf(ACPI_MSG_WARNING "%s: ", pathname);
-
-	va_start(arg_list, format);
-	acpi_os_vprintf(format, arg_list);
-	ACPI_MSG_SUFFIX;
-	va_end(arg_list);
-}
-
-/*******************************************************************************
- *
- * FUNCTION:    acpi_ut_predefined_info
- *
- * PARAMETERS:  module_name     - Caller's module name (for error output)
- *              line_number     - Caller's line number (for error output)
- *              pathname        - Full pathname to the node
- *              node_flags      - From Namespace node for the method/object
- *              format          - Printf format string + additional args
- *
- * RETURN:      None
- *
- * DESCRIPTION: Info messages for the predefined validation module. Messages
- *              are only emitted the first time a problem with a particular
- *              method/object is detected. This prevents a flood of
- *              messages for methods that are repeatedly evaluated.
- *
- ******************************************************************************/
-
-void ACPI_INTERNAL_VAR_XFACE
-acpi_ut_predefined_info(const char *module_name,
-			u32 line_number,
-			char *pathname, u8 node_flags, const char *format, ...)
-{
-	va_list arg_list;
-
-	/*
-	 * Warning messages for this method/object will be disabled after the
-	 * first time a validation fails or an object is successfully repaired.
-	 */
-	if (node_flags & ANOBJ_EVALUATED) {
-		return;
-	}
-
-	acpi_os_printf(ACPI_MSG_INFO "%s: ", pathname);
-
-	va_start(arg_list, format);
-	acpi_os_vprintf(format, arg_list);
-	ACPI_MSG_SUFFIX;
-	va_end(arg_list);
-}
-
-/*******************************************************************************
- *
- * FUNCTION:    acpi_ut_predefined_bios_error
- *
- * PARAMETERS:  module_name     - Caller's module name (for error output)
- *              line_number     - Caller's line number (for error output)
- *              pathname        - Full pathname to the node
- *              node_flags      - From Namespace node for the method/object
- *              format          - Printf format string + additional args
- *
- * RETURN:      None
- *
- * DESCRIPTION: BIOS error message for predefined names. Messages
- *              are only emitted the first time a problem with a particular
- *              method/object is detected. This prevents a flood of
- *              messages for methods that are repeatedly evaluated.
- *
- ******************************************************************************/
-
-void ACPI_INTERNAL_VAR_XFACE
-acpi_ut_predefined_bios_error(const char *module_name,
-			      u32 line_number,
-			      char *pathname,
-			      u8 node_flags, const char *format, ...)
-{
-	va_list arg_list;
-
-	/*
-	 * Warning messages for this method/object will be disabled after the
-	 * first time a validation fails or an object is successfully repaired.
-	 */
-	if (node_flags & ANOBJ_EVALUATED) {
-		return;
-	}
-
-	acpi_os_printf(ACPI_MSG_BIOS_ERROR "%s: ", pathname);
-
-	va_start(arg_list, format);
-	acpi_os_vprintf(format, arg_list);
-	ACPI_MSG_SUFFIX;
-	va_end(arg_list);
-}
-
-/*******************************************************************************
- *
- * FUNCTION:    acpi_ut_namespace_error
- *
- * PARAMETERS:  module_name         - Caller's module name (for error output)
- *              line_number         - Caller's line number (for error output)
- *              internal_name       - Name or path of the namespace node
- *              lookup_status       - Exception code from NS lookup
- *
- * RETURN:      None
- *
- * DESCRIPTION: Print error message with the full pathname for the NS node.
- *
- ******************************************************************************/
-
-void
-acpi_ut_namespace_error(const char *module_name,
-			u32 line_number,
-			const char *internal_name, acpi_status lookup_status)
-{
-	acpi_status status;
-	u32 bad_name;
-	char *name = NULL;
-
-	ACPI_MSG_REDIRECT_BEGIN;
-	acpi_os_printf(ACPI_MSG_ERROR);
-
-	if (lookup_status == AE_BAD_CHARACTER) {
-
-		/* There is a non-ascii character in the name */
-
-		ACPI_MOVE_32_TO_32(&bad_name,
-				   ACPI_CAST_PTR(u32, internal_name));
-		acpi_os_printf("[0x%.8X] (NON-ASCII)", bad_name);
-	} else {
-		/* Convert path to external format */
-
-		status = acpi_ns_externalize_name(ACPI_UINT32_MAX,
-						  internal_name, NULL, &name);
-
-		/* Print target name */
-
-		if (ACPI_SUCCESS(status)) {
-			acpi_os_printf("[%s]", name);
-		} else {
-			acpi_os_printf("[COULD NOT EXTERNALIZE NAME]");
-		}
-
-		if (name) {
-			ACPI_FREE(name);
-		}
-	}
-
-	acpi_os_printf(" Namespace lookup failure, %s",
-		       acpi_format_exception(lookup_status));
-
-	ACPI_MSG_SUFFIX;
-	ACPI_MSG_REDIRECT_END;
-}
-
-/*******************************************************************************
- *
- * FUNCTION:    acpi_ut_method_error
- *
- * PARAMETERS:  module_name         - Caller's module name (for error output)
- *              line_number         - Caller's line number (for error output)
- *              message             - Error message to use on failure
- *              prefix_node         - Prefix relative to the path
- *              path                - Path to the node (optional)
- *              method_status       - Execution status
- *
- * RETURN:      None
- *
- * DESCRIPTION: Print error message with the full pathname for the method.
- *
- ******************************************************************************/
-
-void
-acpi_ut_method_error(const char *module_name,
-		     u32 line_number,
-		     const char *message,
-		     struct acpi_namespace_node *prefix_node,
-		     const char *path, acpi_status method_status)
-{
-	acpi_status status;
-	struct acpi_namespace_node *node = prefix_node;
-
-	ACPI_MSG_REDIRECT_BEGIN;
-	acpi_os_printf(ACPI_MSG_ERROR);
-
-	if (path) {
-		status =
-		    acpi_ns_get_node(prefix_node, path, ACPI_NS_NO_UPSEARCH,
-				     &node);
-		if (ACPI_FAILURE(status)) {
-			acpi_os_printf("[Could not get node by pathname]");
-		}
-	}
-
-	acpi_ns_print_node_pathname(node, message);
-	acpi_os_printf(", %s", acpi_format_exception(method_status));
-
-	ACPI_MSG_SUFFIX;
-	ACPI_MSG_REDIRECT_END;
-}
-
-#endif				/* ACPI_NO_ERROR_MESSAGES */
-- 
1.7.10


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

* [PATCH 03/16] ACPICA: Standardize all switch() blocks
  2013-06-08  0:57 [PATCH 00/16] ACPICA: 20130517 release Lv Zheng
  2013-06-08  0:57 ` [PATCH 01/16] ACPICA: Split buffer dump routines into separate file Lv Zheng
  2013-06-08  0:58 ` [PATCH 02/16] ACPICA: Split internal error msg routines to a " Lv Zheng
@ 2013-06-08  0:58 ` Lv Zheng
  2013-06-12 15:58   ` Len Brown
  2013-06-08  0:58 ` [PATCH 04/16] ACPICA: Add option to disable loading of SSDTs from the RSDT/XSDT Lv Zheng
                   ` (14 subsequent siblings)
  17 siblings, 1 reply; 77+ messages in thread
From: Lv Zheng @ 2013-06-08  0:58 UTC (permalink / raw)
  To: Rafael J. Wysocki, Robert Moore, Len Brown
  Cc: Lv Zheng, linux-acpi, Chao Guan

From: Chao Guan <chao.guan@intel.com>

After many years, different formatting for switch() has crept in.
This change makes every switch block identical. Chao Guan.
ACPICA bugzilla 997.

Buglink: https://bugs.acpica.org/show_bug.cgi?id=997
Signed-off-by: Chao Guan <chao.guan@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
 drivers/acpi/acpica/dscontrol.c |    4 ++--
 drivers/acpi/acpica/dsfield.c   |    4 ++++
 drivers/acpi/acpica/dsinit.c    |    1 +
 drivers/acpi/acpica/dsmthdat.c  |    2 +-
 drivers/acpi/acpica/dsobject.c  |    3 +--
 drivers/acpi/acpica/dsopcode.c  |    1 +
 drivers/acpi/acpica/dsutils.c   |    5 ++---
 drivers/acpi/acpica/dswexec.c   |    3 +--
 drivers/acpi/acpica/dswload.c   |    7 ++++---
 drivers/acpi/acpica/dswload2.c  |    4 ++++
 drivers/acpi/acpica/evgpe.c     |    6 ++----
 drivers/acpi/acpica/evgpeinit.c |    3 +++
 drivers/acpi/acpica/evhandler.c |    7 +++++++
 drivers/acpi/acpica/evmisc.c    |    1 +
 drivers/acpi/acpica/evrgnini.c  |    2 ++
 drivers/acpi/acpica/evxfgpe.c   |    3 +++
 drivers/acpi/acpica/evxfregn.c  |    1 +
 drivers/acpi/acpica/exconfig.c  |    1 +
 drivers/acpi/acpica/exconvrt.c  |   13 ++++++++++---
 drivers/acpi/acpica/excreate.c  |    3 ---
 drivers/acpi/acpica/exdebug.c   |    2 ++
 drivers/acpi/acpica/exdump.c    |    2 ++
 drivers/acpi/acpica/exfield.c   |    4 ++++
 drivers/acpi/acpica/exfldio.c   |    2 --
 drivers/acpi/acpica/exmisc.c    |   12 +++++++++++-
 drivers/acpi/acpica/exoparg1.c  |   16 ++++++++--------
 drivers/acpi/acpica/exoparg2.c  |    1 -
 drivers/acpi/acpica/exoparg3.c  |    1 -
 drivers/acpi/acpica/exoparg6.c  |    5 -----
 drivers/acpi/acpica/exprep.c    |    7 +++++++
 drivers/acpi/acpica/exregion.c  |   27 +++++++++++++++++++++++----
 drivers/acpi/acpica/exresnte.c  |    1 +
 drivers/acpi/acpica/exresolv.c  |    6 +++++-
 drivers/acpi/acpica/exresop.c   |    9 +++++----
 drivers/acpi/acpica/exstore.c   |    4 +---
 drivers/acpi/acpica/exstoren.c  |    4 ----
 drivers/acpi/acpica/hwacpi.c    |    2 +-
 drivers/acpi/acpica/hwgpe.c     |    3 +++
 drivers/acpi/acpica/hwregs.c    |    4 ++--
 drivers/acpi/acpica/hwxface.c   |    3 +++
 drivers/acpi/acpica/hwxfsleep.c |    4 ++++
 drivers/acpi/acpica/nsaccess.c  |    1 +
 drivers/acpi/acpica/nsconvert.c |    3 +++
 drivers/acpi/acpica/nsdump.c    |   10 ++++++++++
 drivers/acpi/acpica/nsinit.c    |    9 +++++++++
 drivers/acpi/acpica/nspredef.c  |    6 ++++++
 drivers/acpi/acpica/nsprepkg.c  |    5 -----
 drivers/acpi/acpica/nsrepair.c  |    1 +
 drivers/acpi/acpica/nsrepair2.c |    1 +
 drivers/acpi/acpica/nsutils.c   |    3 +++
 drivers/acpi/acpica/nsxfeval.c  |    1 +
 drivers/acpi/acpica/psargs.c    |    4 ++++
 drivers/acpi/acpica/psloop.c    |    2 +-
 drivers/acpi/acpica/psobject.c  |    1 +
 drivers/acpi/acpica/psparse.c   |    3 +--
 drivers/acpi/acpica/pstree.c    |    2 ++
 drivers/acpi/acpica/rscalc.c    |    2 ++
 drivers/acpi/acpica/rsdump.c    |   10 ++++++++++
 drivers/acpi/acpica/rsmisc.c    |    3 ++-
 drivers/acpi/acpica/rsutils.c   |    5 +++++
 drivers/acpi/acpica/rsxface.c   |    1 +
 drivers/acpi/acpica/tbinstal.c  |    4 ++++
 drivers/acpi/acpica/utcopy.c    |   11 +++++++----
 drivers/acpi/acpica/utdelete.c  |    3 ++-
 drivers/acpi/acpica/uteval.c    |    5 +++++
 drivers/acpi/acpica/utexcep.c   |    1 +
 drivers/acpi/acpica/utids.c     |    3 +++
 drivers/acpi/acpica/utmisc.c    |    2 ++
 drivers/acpi/acpica/utobject.c  |    5 ++---
 drivers/acpi/acpica/utstring.c  |   11 +++++++++++
 drivers/acpi/acpica/uttrack.c   |    8 ++++++++
 71 files changed, 242 insertions(+), 77 deletions(-)

diff --git a/drivers/acpi/acpica/dscontrol.c b/drivers/acpi/acpica/dscontrol.c
index 7ea0f16..eb56b66 100644
--- a/drivers/acpi/acpica/dscontrol.c
+++ b/drivers/acpi/acpica/dscontrol.c
@@ -78,7 +78,6 @@ acpi_ds_exec_begin_control_op(struct acpi_walk_state *walk_state,
 
 	switch (op->common.aml_opcode) {
 	case AML_WHILE_OP:
-
 		/*
 		 * If this is an additional iteration of a while loop, continue.
 		 * There is no need to allocate a new control state.
@@ -99,7 +98,6 @@ acpi_ds_exec_begin_control_op(struct acpi_walk_state *walk_state,
 		/*lint -fallthrough */
 
 	case AML_IF_OP:
-
 		/*
 		 * IF/WHILE: Create a new control state to manage these
 		 * constructs. We need to manage these as a stack, in order
@@ -142,6 +140,7 @@ acpi_ds_exec_begin_control_op(struct acpi_walk_state *walk_state,
 		break;
 
 	default:
+
 		break;
 	}
 
@@ -344,6 +343,7 @@ acpi_ds_exec_end_control_op(struct acpi_walk_state * walk_state,
 	case AML_NOOP_OP:
 
 		/* Just do nothing! */
+
 		break;
 
 	case AML_BREAK_POINT_OP:
diff --git a/drivers/acpi/acpica/dsfield.c b/drivers/acpi/acpica/dsfield.c
index feadeed..d4bfe7b 100644
--- a/drivers/acpi/acpica/dsfield.c
+++ b/drivers/acpi/acpica/dsfield.c
@@ -563,21 +563,25 @@ acpi_ds_init_field_objects(union acpi_parse_object *op,
 	 */
 	switch (walk_state->opcode) {
 	case AML_FIELD_OP:
+
 		arg = acpi_ps_get_arg(op, 2);
 		type = ACPI_TYPE_LOCAL_REGION_FIELD;
 		break;
 
 	case AML_BANK_FIELD_OP:
+
 		arg = acpi_ps_get_arg(op, 4);
 		type = ACPI_TYPE_LOCAL_BANK_FIELD;
 		break;
 
 	case AML_INDEX_FIELD_OP:
+
 		arg = acpi_ps_get_arg(op, 3);
 		type = ACPI_TYPE_LOCAL_INDEX_FIELD;
 		break;
 
 	default:
+
 		return_ACPI_STATUS(AE_BAD_PARAMETER);
 	}
 
diff --git a/drivers/acpi/acpica/dsinit.c b/drivers/acpi/acpica/dsinit.c
index bc8e63f..1442420 100644
--- a/drivers/acpi/acpica/dsinit.c
+++ b/drivers/acpi/acpica/dsinit.c
@@ -127,6 +127,7 @@ acpi_ds_init_one_object(acpi_handle obj_handle,
 		break;
 
 	default:
+
 		break;
 	}
 
diff --git a/drivers/acpi/acpica/dsmthdat.c b/drivers/acpi/acpica/dsmthdat.c
index 3da8046..c4b0b36 100644
--- a/drivers/acpi/acpica/dsmthdat.c
+++ b/drivers/acpi/acpica/dsmthdat.c
@@ -285,6 +285,7 @@ acpi_ds_method_data_get_node(u8 type,
 		break;
 
 	default:
+
 		ACPI_ERROR((AE_INFO, "Type %u is invalid", type));
 		return_ACPI_STATUS(AE_TYPE);
 	}
@@ -428,7 +429,6 @@ acpi_ds_method_data_get_value(u8 type,
 				return_ACPI_STATUS(AE_AML_UNINITIALIZED_ARG);
 
 			case ACPI_REFCLASS_LOCAL:
-
 				/*
 				 * No error message for this case, will be trapped again later to
 				 * detect and ignore cases of Store(local_x,local_x)
diff --git a/drivers/acpi/acpica/dsobject.c b/drivers/acpi/acpica/dsobject.c
index e20e9f8..63f0d22 100644
--- a/drivers/acpi/acpica/dsobject.c
+++ b/drivers/acpi/acpica/dsobject.c
@@ -648,7 +648,6 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state,
 
 	switch (obj_desc->common.type) {
 	case ACPI_TYPE_BUFFER:
-
 		/*
 		 * Defer evaluation of Buffer term_arg operand
 		 */
@@ -660,7 +659,6 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state,
 		break;
 
 	case ACPI_TYPE_PACKAGE:
-
 		/*
 		 * Defer evaluation of Package term_arg operand
 		 */
@@ -741,6 +739,7 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state,
 			break;
 
 		default:
+
 			ACPI_ERROR((AE_INFO, "Unknown Integer type 0x%X",
 				    op_info->type));
 			status = AE_AML_OPERAND_TYPE;
diff --git a/drivers/acpi/acpica/dsopcode.c b/drivers/acpi/acpica/dsopcode.c
index ee6367b..1fc1ff1 100644
--- a/drivers/acpi/acpica/dsopcode.c
+++ b/drivers/acpi/acpica/dsopcode.c
@@ -636,6 +636,7 @@ acpi_ds_eval_data_object_operands(struct acpi_walk_state *walk_state,
 		break;
 
 	default:
+
 		return_ACPI_STATUS(AE_AML_BAD_OPCODE);
 	}
 
diff --git a/drivers/acpi/acpica/dsutils.c b/drivers/acpi/acpica/dsutils.c
index 9977899..c666fc0 100644
--- a/drivers/acpi/acpica/dsutils.c
+++ b/drivers/acpi/acpica/dsutils.c
@@ -240,7 +240,6 @@ acpi_ds_is_result_used(union acpi_parse_object * op,
 
 		case AML_IF_OP:
 		case AML_WHILE_OP:
-
 			/*
 			 * If we are executing the predicate AND this is the predicate op,
 			 * we will use the return value
@@ -254,7 +253,9 @@ acpi_ds_is_result_used(union acpi_parse_object * op,
 			break;
 
 		default:
+
 			/* Ignore other control opcodes */
+
 			break;
 		}
 
@@ -263,7 +264,6 @@ acpi_ds_is_result_used(union acpi_parse_object * op,
 		goto result_not_used;
 
 	case AML_CLASS_CREATE:
-
 		/*
 		 * These opcodes allow term_arg(s) as operands and therefore
 		 * the operands can be method calls. The result is used.
@@ -292,7 +292,6 @@ acpi_ds_is_result_used(union acpi_parse_object * op,
 		goto result_not_used;
 
 	default:
-
 		/*
 		 * In all other cases. the parent will actually use the return
 		 * object, so keep it.
diff --git a/drivers/acpi/acpica/dswexec.c b/drivers/acpi/acpica/dswexec.c
index e2199a9..151d924 100644
--- a/drivers/acpi/acpica/dswexec.c
+++ b/drivers/acpi/acpica/dswexec.c
@@ -327,6 +327,7 @@ acpi_ds_exec_begin_op(struct acpi_walk_state *walk_state,
 		break;
 
 	default:
+
 		break;
 	}
 
@@ -488,7 +489,6 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
 			break;
 
 		case AML_TYPE_METHOD_CALL:
-
 			/*
 			 * If the method is referenced from within a package
 			 * declaration, it is not a invocation of the method, just
@@ -582,7 +582,6 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
 
 			switch (op->common.parent->common.aml_opcode) {
 			case AML_NAME_OP:
-
 				/*
 				 * Put the Node on the object stack (Contains the ACPI Name
 				 * of this object)
diff --git a/drivers/acpi/acpica/dswload.c b/drivers/acpi/acpica/dswload.c
index 6e17c0e..95e681a 100644
--- a/drivers/acpi/acpica/dswload.c
+++ b/drivers/acpi/acpica/dswload.c
@@ -74,6 +74,7 @@ acpi_ds_init_callbacks(struct acpi_walk_state *walk_state, u32 pass_number)
 
 	switch (pass_number) {
 	case 1:
+
 		walk_state->parse_flags = ACPI_PARSE_LOAD_PASS1 |
 		    ACPI_PARSE_DELETE_TREE;
 		walk_state->descending_callback = acpi_ds_load1_begin_op;
@@ -81,6 +82,7 @@ acpi_ds_init_callbacks(struct acpi_walk_state *walk_state, u32 pass_number)
 		break;
 
 	case 2:
+
 		walk_state->parse_flags = ACPI_PARSE_LOAD_PASS1 |
 		    ACPI_PARSE_DELETE_TREE;
 		walk_state->descending_callback = acpi_ds_load2_begin_op;
@@ -88,6 +90,7 @@ acpi_ds_init_callbacks(struct acpi_walk_state *walk_state, u32 pass_number)
 		break;
 
 	case 3:
+
 #ifndef ACPI_NO_METHOD_EXECUTION
 		walk_state->parse_flags |= ACPI_PARSE_EXECUTE |
 		    ACPI_PARSE_DELETE_TREE;
@@ -97,6 +100,7 @@ acpi_ds_init_callbacks(struct acpi_walk_state *walk_state, u32 pass_number)
 		break;
 
 	default:
+
 		return (AE_BAD_PARAMETER);
 	}
 
@@ -161,7 +165,6 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state,
 
 	switch (walk_state->opcode) {
 	case AML_SCOPE_OP:
-
 		/*
 		 * The target name of the Scope() operator must exist at this point so
 		 * that we can actually open the scope to enter new names underneath it.
@@ -210,7 +213,6 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state,
 		case ACPI_TYPE_INTEGER:
 		case ACPI_TYPE_STRING:
 		case ACPI_TYPE_BUFFER:
-
 			/*
 			 * These types we will allow, but we will change the type.
 			 * This enables some existing code of the form:
@@ -232,7 +234,6 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state,
 			break;
 
 		case ACPI_TYPE_METHOD:
-
 			/*
 			 * Allow scope change to root during execution of module-level
 			 * code. Root is typed METHOD during this time.
diff --git a/drivers/acpi/acpica/dswload2.c b/drivers/acpi/acpica/dswload2.c
index 4407ff2..b1f8f47 100644
--- a/drivers/acpi/acpica/dswload2.c
+++ b/drivers/acpi/acpica/dswload2.c
@@ -509,6 +509,7 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state)
 			break;
 
 		default:
+
 			/* All NAMED_FIELD opcodes must be handled above */
 			break;
 		}
@@ -548,6 +549,7 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state)
 			break;
 
 		default:
+
 			/* Unknown opcode */
 
 			status = AE_OK;
@@ -674,6 +676,7 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state)
 #endif				/* ACPI_NO_METHOD_EXECUTION */
 
 		default:
+
 			/* All NAMED_COMPLEX opcodes must be handled above */
 			break;
 		}
@@ -721,6 +724,7 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state)
 		break;
 
 	default:
+
 		break;
 	}
 
diff --git a/drivers/acpi/acpica/evgpe.c b/drivers/acpi/acpica/evgpe.c
index ae50d6c..c8a1f7d 100644
--- a/drivers/acpi/acpica/evgpe.c
+++ b/drivers/acpi/acpica/evgpe.c
@@ -529,7 +529,6 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context)
 
 	switch (local_gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) {
 	case ACPI_GPE_DISPATCH_NOTIFY:
-
 		/*
 		 * Implicit notify.
 		 * Dispatch a DEVICE_WAKE notify to the appropriate handler.
@@ -582,7 +581,8 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context)
 		break;
 
 	default:
-		return_VOID;    /* Should never happen */
+
+		return_VOID;	/* Should never happen */
 	}
 
 	/* Defer enabling of GPE until all notify handlers are done */
@@ -754,7 +754,6 @@ acpi_ev_gpe_dispatch(struct acpi_namespace_node *gpe_device,
 
 	case ACPI_GPE_DISPATCH_METHOD:
 	case ACPI_GPE_DISPATCH_NOTIFY:
-
 		/*
 		 * Execute the method associated with the GPE
 		 * NOTE: Level-triggered GPEs are cleared after the method completes.
@@ -770,7 +769,6 @@ acpi_ev_gpe_dispatch(struct acpi_namespace_node *gpe_device,
 		break;
 
 	default:
-
 		/*
 		 * No handler or method to run!
 		 * 03/2010: This case should no longer be possible. We will not allow
diff --git a/drivers/acpi/acpica/evgpeinit.c b/drivers/acpi/acpica/evgpeinit.c
index 72b8f6b..9037f17 100644
--- a/drivers/acpi/acpica/evgpeinit.c
+++ b/drivers/acpi/acpica/evgpeinit.c
@@ -363,14 +363,17 @@ acpi_ev_match_gpe_method(acpi_handle obj_handle,
 	 */
 	switch (name[1]) {
 	case 'L':
+
 		type = ACPI_GPE_LEVEL_TRIGGERED;
 		break;
 
 	case 'E':
+
 		type = ACPI_GPE_EDGE_TRIGGERED;
 		break;
 
 	default:
+
 		/* Unknown method type, just ignore it */
 
 		ACPI_DEBUG_PRINT((ACPI_DB_LOAD,
diff --git a/drivers/acpi/acpica/evhandler.c b/drivers/acpi/acpica/evhandler.c
index d4f8311..068af96 100644
--- a/drivers/acpi/acpica/evhandler.c
+++ b/drivers/acpi/acpica/evhandler.c
@@ -354,36 +354,43 @@ acpi_ev_install_space_handler(struct acpi_namespace_node * node,
 
 		switch (space_id) {
 		case ACPI_ADR_SPACE_SYSTEM_MEMORY:
+
 			handler = acpi_ex_system_memory_space_handler;
 			setup = acpi_ev_system_memory_region_setup;
 			break;
 
 		case ACPI_ADR_SPACE_SYSTEM_IO:
+
 			handler = acpi_ex_system_io_space_handler;
 			setup = acpi_ev_io_space_region_setup;
 			break;
 
 		case ACPI_ADR_SPACE_PCI_CONFIG:
+
 			handler = acpi_ex_pci_config_space_handler;
 			setup = acpi_ev_pci_config_region_setup;
 			break;
 
 		case ACPI_ADR_SPACE_CMOS:
+
 			handler = acpi_ex_cmos_space_handler;
 			setup = acpi_ev_cmos_region_setup;
 			break;
 
 		case ACPI_ADR_SPACE_PCI_BAR_TARGET:
+
 			handler = acpi_ex_pci_bar_space_handler;
 			setup = acpi_ev_pci_bar_region_setup;
 			break;
 
 		case ACPI_ADR_SPACE_DATA_TABLE:
+
 			handler = acpi_ex_data_table_space_handler;
 			setup = NULL;
 			break;
 
 		default:
+
 			status = AE_BAD_PARAMETER;
 			goto unlock_and_exit;
 		}
diff --git a/drivers/acpi/acpica/evmisc.c b/drivers/acpi/acpica/evmisc.c
index c986b23..db59fe3 100644
--- a/drivers/acpi/acpica/evmisc.c
+++ b/drivers/acpi/acpica/evmisc.c
@@ -78,6 +78,7 @@ u8 acpi_ev_is_notify_object(struct acpi_namespace_node *node)
 		return (TRUE);
 
 	default:
+
 		return (FALSE);
 	}
 }
diff --git a/drivers/acpi/acpica/evrgnini.c b/drivers/acpi/acpica/evrgnini.c
index 3bb6167..8354c4f 100644
--- a/drivers/acpi/acpica/evrgnini.c
+++ b/drivers/acpi/acpica/evrgnini.c
@@ -596,7 +596,9 @@ acpi_ev_initialize_region(union acpi_operand_object *region_obj,
 				break;
 
 			default:
+
 				/* Ignore other objects */
+
 				break;
 			}
 
diff --git a/drivers/acpi/acpica/evxfgpe.c b/drivers/acpi/acpica/evxfgpe.c
index aff4cc2..7662f1a 100644
--- a/drivers/acpi/acpica/evxfgpe.c
+++ b/drivers/acpi/acpica/evxfgpe.c
@@ -366,16 +366,19 @@ acpi_set_gpe_wake_mask(acpi_handle gpe_device, u32 gpe_number, u8 action)
 
 	switch (action) {
 	case ACPI_GPE_ENABLE:
+
 		ACPI_SET_BIT(gpe_register_info->enable_for_wake,
 			     (u8)register_bit);
 		break;
 
 	case ACPI_GPE_DISABLE:
+
 		ACPI_CLEAR_BIT(gpe_register_info->enable_for_wake,
 			       (u8)register_bit);
 		break;
 
 	default:
+
 		ACPI_ERROR((AE_INFO, "%u, Invalid action", action));
 		status = AE_BAD_PARAMETER;
 		break;
diff --git a/drivers/acpi/acpica/evxfregn.c b/drivers/acpi/acpica/evxfregn.c
index 96c9e5f..80cecf8 100644
--- a/drivers/acpi/acpica/evxfregn.c
+++ b/drivers/acpi/acpica/evxfregn.c
@@ -139,6 +139,7 @@ acpi_install_address_space_handler(acpi_handle device,
 		break;
 
 	default:
+
 		break;
 	}
 
diff --git a/drivers/acpi/acpica/exconfig.c b/drivers/acpi/acpica/exconfig.c
index a689aac..06d216c 100644
--- a/drivers/acpi/acpica/exconfig.c
+++ b/drivers/acpi/acpica/exconfig.c
@@ -480,6 +480,7 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
 		break;
 
 	default:
+
 		return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
 	}
 
diff --git a/drivers/acpi/acpica/exconvrt.c b/drivers/acpi/acpica/exconvrt.c
index d2b9613..69e4a8c 100644
--- a/drivers/acpi/acpica/exconvrt.c
+++ b/drivers/acpi/acpica/exconvrt.c
@@ -99,6 +99,7 @@ acpi_ex_convert_to_integer(union acpi_operand_object *obj_desc,
 		break;
 
 	default:
+
 		return_ACPI_STATUS(AE_TYPE);
 	}
 
@@ -117,7 +118,6 @@ acpi_ex_convert_to_integer(union acpi_operand_object *obj_desc,
 
 	switch (obj_desc->common.type) {
 	case ACPI_TYPE_STRING:
-
 		/*
 		 * Convert string to an integer - for most cases, the string must be
 		 * hexadecimal as per the ACPI specification. The only exception (as
@@ -161,6 +161,7 @@ acpi_ex_convert_to_integer(union acpi_operand_object *obj_desc,
 	default:
 
 		/* No other types can get here */
+
 		break;
 	}
 
@@ -213,7 +214,6 @@ acpi_ex_convert_to_buffer(union acpi_operand_object *obj_desc,
 		return_ACPI_STATUS(AE_OK);
 
 	case ACPI_TYPE_INTEGER:
-
 		/*
 		 * Create a new Buffer object.
 		 * Need enough space for one integer
@@ -233,7 +233,6 @@ acpi_ex_convert_to_buffer(union acpi_operand_object *obj_desc,
 		break;
 
 	case ACPI_TYPE_STRING:
-
 		/*
 		 * Create a new Buffer object
 		 * Size will be the string length
@@ -258,6 +257,7 @@ acpi_ex_convert_to_buffer(union acpi_operand_object *obj_desc,
 		break;
 
 	default:
+
 		return_ACPI_STATUS(AE_TYPE);
 	}
 
@@ -304,15 +304,18 @@ acpi_ex_convert_to_ascii(u64 integer, u16 base, u8 *string, u8 data_width)
 
 		switch (data_width) {
 		case 1:
+
 			decimal_length = ACPI_MAX8_DECIMAL_DIGITS;
 			break;
 
 		case 4:
+
 			decimal_length = ACPI_MAX32_DECIMAL_DIGITS;
 			break;
 
 		case 8:
 		default:
+
 			decimal_length = ACPI_MAX64_DECIMAL_DIGITS;
 			break;
 		}
@@ -546,6 +549,7 @@ acpi_ex_convert_to_string(union acpi_operand_object * obj_desc,
 		break;
 
 	default:
+
 		return_ACPI_STATUS(AE_TYPE);
 	}
 
@@ -599,6 +603,7 @@ acpi_ex_convert_to_target_type(acpi_object_type destination_type,
 			break;
 
 		default:
+
 			/* No conversion allowed for these types */
 
 			if (destination_type != source_desc->common.type) {
@@ -649,6 +654,7 @@ acpi_ex_convert_to_target_type(acpi_object_type destination_type,
 			break;
 
 		default:
+
 			ACPI_ERROR((AE_INFO,
 				    "Bad destination type during conversion: 0x%X",
 				    destination_type));
@@ -664,6 +670,7 @@ acpi_ex_convert_to_target_type(acpi_object_type destination_type,
 		break;
 
 	default:
+
 		ACPI_ERROR((AE_INFO,
 			    "Unknown Target type ID 0x%X AmlOpcode 0x%X DestType %s",
 			    GET_CURRENT_ARG_TYPE(walk_state->op_info->
diff --git a/drivers/acpi/acpica/excreate.c b/drivers/acpi/acpica/excreate.c
index 26a13f6..269e81d 100644
--- a/drivers/acpi/acpica/excreate.c
+++ b/drivers/acpi/acpica/excreate.c
@@ -103,7 +103,6 @@ acpi_status acpi_ex_create_alias(struct acpi_walk_state *walk_state)
 	case ACPI_TYPE_BUFFER:
 	case ACPI_TYPE_PACKAGE:
 	case ACPI_TYPE_BUFFER_FIELD:
-
 		/*
 		 * These types open a new scope, so we need the NS node in order to access
 		 * any children.
@@ -113,7 +112,6 @@ acpi_status acpi_ex_create_alias(struct acpi_walk_state *walk_state)
 	case ACPI_TYPE_PROCESSOR:
 	case ACPI_TYPE_THERMAL:
 	case ACPI_TYPE_LOCAL_SCOPE:
-
 		/*
 		 * The new alias has the type ALIAS and points to the original
 		 * NS node, not the object itself.
@@ -124,7 +122,6 @@ acpi_status acpi_ex_create_alias(struct acpi_walk_state *walk_state)
 		break;
 
 	case ACPI_TYPE_METHOD:
-
 		/*
 		 * Control method aliases need to be differentiated
 		 */
diff --git a/drivers/acpi/acpica/exdebug.c b/drivers/acpi/acpica/exdebug.c
index 7eb853c..81c72a4 100644
--- a/drivers/acpi/acpica/exdebug.c
+++ b/drivers/acpi/acpica/exdebug.c
@@ -193,6 +193,7 @@ acpi_ex_do_debug_object(union acpi_operand_object *source_desc,
 			return_VOID;
 
 		default:
+
 			break;
 		}
 
@@ -226,6 +227,7 @@ acpi_ex_do_debug_object(union acpi_operand_object *source_desc,
 					break;
 
 				default:
+
 					acpi_ex_do_debug_object((source_desc->
 								 reference.
 								 node)->object,
diff --git a/drivers/acpi/acpica/exdump.c b/drivers/acpi/acpica/exdump.c
index e5a3c24..c740f24 100644
--- a/drivers/acpi/acpica/exdump.c
+++ b/drivers/acpi/acpica/exdump.c
@@ -357,6 +357,7 @@ acpi_ex_dump_object(union acpi_operand_object *obj_desc,
 
 		switch (info->opcode) {
 		case ACPI_EXD_INIT:
+
 			break;
 
 		case ACPI_EXD_TYPE:
@@ -718,6 +719,7 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth)
 		break;
 
 	default:
+
 		/* Unknown Type */
 
 		acpi_os_printf("Unknown Type %X\n", obj_desc->common.type);
diff --git a/drivers/acpi/acpica/exfield.c b/drivers/acpi/acpica/exfield.c
index 7d4bae7..c2a65aa 100644
--- a/drivers/acpi/acpica/exfield.c
+++ b/drivers/acpi/acpica/exfield.c
@@ -331,21 +331,25 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc,
 
 	switch (source_desc->common.type) {
 	case ACPI_TYPE_INTEGER:
+
 		buffer = &source_desc->integer.value;
 		length = sizeof(source_desc->integer.value);
 		break;
 
 	case ACPI_TYPE_BUFFER:
+
 		buffer = source_desc->buffer.pointer;
 		length = source_desc->buffer.length;
 		break;
 
 	case ACPI_TYPE_STRING:
+
 		buffer = source_desc->string.pointer;
 		length = source_desc->string.length;
 		break;
 
 	default:
+
 		return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
 	}
 
diff --git a/drivers/acpi/acpica/exfldio.c b/drivers/acpi/acpica/exfldio.c
index c84ee95..7e0afe7 100644
--- a/drivers/acpi/acpica/exfldio.c
+++ b/drivers/acpi/acpica/exfldio.c
@@ -446,7 +446,6 @@ acpi_ex_field_datum_io(union acpi_operand_object *obj_desc,
 		break;
 
 	case ACPI_TYPE_LOCAL_BANK_FIELD:
-
 		/*
 		 * Ensure that the bank_value is not beyond the capacity of
 		 * the register
@@ -488,7 +487,6 @@ acpi_ex_field_datum_io(union acpi_operand_object *obj_desc,
 		break;
 
 	case ACPI_TYPE_LOCAL_INDEX_FIELD:
-
 		/*
 		 * Ensure that the index_value is not beyond the capacity of
 		 * the register
diff --git a/drivers/acpi/acpica/exmisc.c b/drivers/acpi/acpica/exmisc.c
index 72a2a13..00bf298 100644
--- a/drivers/acpi/acpica/exmisc.c
+++ b/drivers/acpi/acpica/exmisc.c
@@ -105,7 +105,6 @@ acpi_ex_get_object_reference(union acpi_operand_object *obj_desc,
 		break;
 
 	case ACPI_DESC_TYPE_NAMED:
-
 		/*
 		 * A named reference that has already been resolved to a Node
 		 */
@@ -261,20 +260,24 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0,
 	 */
 	switch (operand0->common.type) {
 	case ACPI_TYPE_INTEGER:
+
 		status =
 		    acpi_ex_convert_to_integer(operand1, &local_operand1, 16);
 		break;
 
 	case ACPI_TYPE_STRING:
+
 		status = acpi_ex_convert_to_string(operand1, &local_operand1,
 						   ACPI_IMPLICIT_CONVERT_HEX);
 		break;
 
 	case ACPI_TYPE_BUFFER:
+
 		status = acpi_ex_convert_to_buffer(operand1, &local_operand1);
 		break;
 
 	default:
+
 		ACPI_ERROR((AE_INFO, "Invalid object type: 0x%X",
 			    operand0->common.type));
 		status = AE_AML_INTERNAL;
@@ -519,6 +522,7 @@ acpi_ex_do_logical_numeric_op(u16 opcode,
 		break;
 
 	default:
+
 		status = AE_AML_INTERNAL;
 		break;
 	}
@@ -580,20 +584,24 @@ acpi_ex_do_logical_op(u16 opcode,
 	 */
 	switch (operand0->common.type) {
 	case ACPI_TYPE_INTEGER:
+
 		status =
 		    acpi_ex_convert_to_integer(operand1, &local_operand1, 16);
 		break;
 
 	case ACPI_TYPE_STRING:
+
 		status = acpi_ex_convert_to_string(operand1, &local_operand1,
 						   ACPI_IMPLICIT_CONVERT_HEX);
 		break;
 
 	case ACPI_TYPE_BUFFER:
+
 		status = acpi_ex_convert_to_buffer(operand1, &local_operand1);
 		break;
 
 	default:
+
 		status = AE_AML_INTERNAL;
 		break;
 	}
@@ -636,6 +644,7 @@ acpi_ex_do_logical_op(u16 opcode,
 			break;
 
 		default:
+
 			status = AE_AML_INTERNAL;
 			break;
 		}
@@ -703,6 +712,7 @@ acpi_ex_do_logical_op(u16 opcode,
 			break;
 
 		default:
+
 			status = AE_AML_INTERNAL;
 			break;
 		}
diff --git a/drivers/acpi/acpica/exoparg1.c b/drivers/acpi/acpica/exoparg1.c
index b60c877..814b4a3 100644
--- a/drivers/acpi/acpica/exoparg1.c
+++ b/drivers/acpi/acpica/exoparg1.c
@@ -327,7 +327,6 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state)
 			break;
 
 		case AML_FROM_BCD_OP:	/* from_bcd (BCDValue, Result) */
-
 			/*
 			 * The 64-bit ACPI integer can hold 16 4-bit BCD characters
 			 * (if table is 32-bit, integer can hold 8 BCD characters)
@@ -407,7 +406,6 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state)
 			break;
 
 		case AML_COND_REF_OF_OP:	/* cond_ref_of (source_object, Result) */
-
 			/*
 			 * This op is a little strange because the internal return value is
 			 * different than the return value stored in the result descriptor
@@ -442,13 +440,14 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state)
 			goto cleanup;
 
 		default:
+
 			/* No other opcodes get here */
+
 			break;
 		}
 		break;
 
 	case AML_STORE_OP:	/* Store (Source, Target) */
-
 		/*
 		 * A store operand is typically a number, string, buffer or lvalue
 		 * Be careful about deleting the source object,
@@ -615,7 +614,6 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
 
 	case AML_DECREMENT_OP:	/* Decrement (Operand)  */
 	case AML_INCREMENT_OP:	/* Increment (Operand)  */
-
 		/*
 		 * Create a new integer. Can't just get the base integer and
 		 * increment it because it may be an Arg or Field.
@@ -682,7 +680,6 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
 		break;
 
 	case AML_TYPE_OP:	/* object_type (source_object) */
-
 		/*
 		 * Note: The operand is not resolved at this point because we want to
 		 * get the associated object, not its value. For example, we don't
@@ -709,7 +706,6 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
 		break;
 
 	case AML_SIZE_OF_OP:	/* size_of (source_object) */
-
 		/*
 		 * Note: The operand is not resolved at this point because we want to
 		 * get the associated object, not its value.
@@ -735,10 +731,12 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
 		 */
 		switch (type) {
 		case ACPI_TYPE_INTEGER:
+
 			value = acpi_gbl_integer_byte_width;
 			break;
 
 		case ACPI_TYPE_STRING:
+
 			value = temp_desc->string.length;
 			break;
 
@@ -759,6 +757,7 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
 			break;
 
 		default:
+
 			ACPI_ERROR((AE_INFO,
 				    "Operand must be Buffer/Integer/String/Package - found type %s",
 				    acpi_ut_get_type_name(type)));
@@ -860,9 +859,11 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
 				break;
 
 			case ACPI_TYPE_STRING:
+
 				break;
 
 			default:
+
 				status = AE_AML_OPERAND_TYPE;
 				goto cleanup;
 			}
@@ -923,7 +924,6 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
 			 */
 			switch (operand[0]->reference.class) {
 			case ACPI_REFCLASS_INDEX:
-
 				/*
 				 * The target type for the Index operator must be
 				 * either a Buffer or a Package
@@ -956,7 +956,6 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
 					break;
 
 				case ACPI_TYPE_PACKAGE:
-
 					/*
 					 * Return the referenced element of the package. We must
 					 * add another reference to the referenced object, however.
@@ -999,6 +998,7 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
 				break;
 
 			default:
+
 				ACPI_ERROR((AE_INFO,
 					    "Unknown class in reference(%p) - 0x%2.2X",
 					    operand[0],
diff --git a/drivers/acpi/acpica/exoparg2.c b/drivers/acpi/acpica/exoparg2.c
index b0838a4..d5088f7 100644
--- a/drivers/acpi/acpica/exoparg2.c
+++ b/drivers/acpi/acpica/exoparg2.c
@@ -304,7 +304,6 @@ acpi_status acpi_ex_opcode_2A_1T_1R(struct acpi_walk_state *walk_state)
 		break;
 
 	case AML_TO_STRING_OP:	/* to_string (Buffer, Length, Result) (ACPI 2.0) */
-
 		/*
 		 * Input object is guaranteed to be a buffer at this point (it may have
 		 * been converted.)  Copy the raw buffer data to a new object of
diff --git a/drivers/acpi/acpica/exoparg3.c b/drivers/acpi/acpica/exoparg3.c
index 2d7491f..37656f1 100644
--- a/drivers/acpi/acpica/exoparg3.c
+++ b/drivers/acpi/acpica/exoparg3.c
@@ -155,7 +155,6 @@ acpi_status acpi_ex_opcode_3A_1T_1R(struct acpi_walk_state *walk_state)
 
 	switch (walk_state->opcode) {
 	case AML_MID_OP:	/* Mid (Source[0], Index[1], Length[2], Result[3]) */
-
 		/*
 		 * Create the return object. The Source operand is guaranteed to be
 		 * either a String or a Buffer, so just use its type.
diff --git a/drivers/acpi/acpica/exoparg6.c b/drivers/acpi/acpica/exoparg6.c
index b76b970..879b6cd 100644
--- a/drivers/acpi/acpica/exoparg6.c
+++ b/drivers/acpi/acpica/exoparg6.c
@@ -119,7 +119,6 @@ acpi_ex_do_match(u32 match_op,
 		break;
 
 	case MATCH_MEQ:
-
 		/*
 		 * True if equal: (P[i] == M)
 		 * Change to:     (M == P[i])
@@ -133,7 +132,6 @@ acpi_ex_do_match(u32 match_op,
 		break;
 
 	case MATCH_MLE:
-
 		/*
 		 * True if less than or equal: (P[i] <= M) (P[i] not_greater than M)
 		 * Change to:                  (M >= P[i]) (M not_less than P[i])
@@ -148,7 +146,6 @@ acpi_ex_do_match(u32 match_op,
 		break;
 
 	case MATCH_MLT:
-
 		/*
 		 * True if less than: (P[i] < M)
 		 * Change to:         (M > P[i])
@@ -162,7 +159,6 @@ acpi_ex_do_match(u32 match_op,
 		break;
 
 	case MATCH_MGE:
-
 		/*
 		 * True if greater than or equal: (P[i] >= M) (P[i] not_less than M)
 		 * Change to:                     (M <= P[i]) (M not_greater than P[i])
@@ -177,7 +173,6 @@ acpi_ex_do_match(u32 match_op,
 		break;
 
 	case MATCH_MGT:
-
 		/*
 		 * True if greater than: (P[i] > M)
 		 * Change to:            (M < P[i])
diff --git a/drivers/acpi/acpica/exprep.c b/drivers/acpi/acpica/exprep.c
index 6b728ae..5a58861 100644
--- a/drivers/acpi/acpica/exprep.c
+++ b/drivers/acpi/acpica/exprep.c
@@ -253,26 +253,31 @@ acpi_ex_decode_field_access(union acpi_operand_object *obj_desc,
 
 	case AML_FIELD_ACCESS_BYTE:
 	case AML_FIELD_ACCESS_BUFFER:	/* ACPI 2.0 (SMBus Buffer) */
+
 		byte_alignment = 1;
 		bit_length = 8;
 		break;
 
 	case AML_FIELD_ACCESS_WORD:
+
 		byte_alignment = 2;
 		bit_length = 16;
 		break;
 
 	case AML_FIELD_ACCESS_DWORD:
+
 		byte_alignment = 4;
 		bit_length = 32;
 		break;
 
 	case AML_FIELD_ACCESS_QWORD:	/* ACPI 2.0 */
+
 		byte_alignment = 8;
 		bit_length = 64;
 		break;
 
 	default:
+
 		/* Invalid field access type */
 
 		ACPI_ERROR((AE_INFO, "Unknown field access type 0x%X", access));
@@ -598,7 +603,9 @@ acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info)
 		break;
 
 	default:
+
 		/* No other types should get here */
+
 		break;
 	}
 
diff --git a/drivers/acpi/acpica/exregion.c b/drivers/acpi/acpica/exregion.c
index 182abaf..303429bb 100644
--- a/drivers/acpi/acpica/exregion.c
+++ b/drivers/acpi/acpica/exregion.c
@@ -88,22 +88,27 @@ acpi_ex_system_memory_space_handler(u32 function,
 
 	switch (bit_width) {
 	case 8:
+
 		length = 1;
 		break;
 
 	case 16:
+
 		length = 2;
 		break;
 
 	case 32:
+
 		length = 4;
 		break;
 
 	case 64:
+
 		length = 8;
 		break;
 
 	default:
+
 		ACPI_ERROR((AE_INFO, "Invalid SystemMemory width %u",
 			    bit_width));
 		return_ACPI_STATUS(AE_AML_OPERAND_VALUE);
@@ -214,23 +219,29 @@ acpi_ex_system_memory_space_handler(u32 function,
 		*value = 0;
 		switch (bit_width) {
 		case 8:
-			*value = (u64) ACPI_GET8(logical_addr_ptr);
+
+			*value = (u64)ACPI_GET8(logical_addr_ptr);
 			break;
 
 		case 16:
-			*value = (u64) ACPI_GET16(logical_addr_ptr);
+
+			*value = (u64)ACPI_GET16(logical_addr_ptr);
 			break;
 
 		case 32:
-			*value = (u64) ACPI_GET32(logical_addr_ptr);
+
+			*value = (u64)ACPI_GET32(logical_addr_ptr);
 			break;
 
 		case 64:
-			*value = (u64) ACPI_GET64(logical_addr_ptr);
+
+			*value = (u64)ACPI_GET64(logical_addr_ptr);
 			break;
 
 		default:
+
 			/* bit_width was already validated */
+
 			break;
 		}
 		break;
@@ -239,28 +250,35 @@ acpi_ex_system_memory_space_handler(u32 function,
 
 		switch (bit_width) {
 		case 8:
+
 			ACPI_SET8(logical_addr_ptr, *value);
 			break;
 
 		case 16:
+
 			ACPI_SET16(logical_addr_ptr, *value);
 			break;
 
 		case 32:
+
 			ACPI_SET32(logical_addr_ptr, *value);
 			break;
 
 		case 64:
+
 			ACPI_SET64(logical_addr_ptr, *value);
 			break;
 
 		default:
+
 			/* bit_width was already validated */
+
 			break;
 		}
 		break;
 
 	default:
+
 		status = AE_BAD_PARAMETER;
 		break;
 	}
@@ -320,6 +338,7 @@ acpi_ex_system_io_space_handler(u32 function,
 		break;
 
 	default:
+
 		status = AE_BAD_PARAMETER;
 		break;
 	}
diff --git a/drivers/acpi/acpica/exresnte.c b/drivers/acpi/acpica/exresnte.c
index 8565b6b..acd34f5 100644
--- a/drivers/acpi/acpica/exresnte.c
+++ b/drivers/acpi/acpica/exresnte.c
@@ -248,6 +248,7 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr,
 			break;
 
 		default:
+
 			/* No named references are allowed here */
 
 			ACPI_ERROR((AE_INFO,
diff --git a/drivers/acpi/acpica/exresolv.c b/drivers/acpi/acpica/exresolv.c
index e4f9dfb..ac04278 100644
--- a/drivers/acpi/acpica/exresolv.c
+++ b/drivers/acpi/acpica/exresolv.c
@@ -156,7 +156,6 @@ acpi_ex_resolve_object_to_value(union acpi_operand_object **stack_ptr,
 		switch (ref_type) {
 		case ACPI_REFCLASS_LOCAL:
 		case ACPI_REFCLASS_ARG:
-
 			/*
 			 * Get the local from the method's state info
 			 * Note: this increments the local's object reference count
@@ -309,6 +308,7 @@ acpi_ex_resolve_object_to_value(union acpi_operand_object **stack_ptr,
 		break;
 
 	default:
+
 		break;
 	}
 
@@ -348,10 +348,12 @@ acpi_ex_resolve_multiple(struct acpi_walk_state *walk_state,
 
 	switch (ACPI_GET_DESCRIPTOR_TYPE(obj_desc)) {
 	case ACPI_DESC_TYPE_OPERAND:
+
 		type = obj_desc->common.type;
 		break;
 
 	case ACPI_DESC_TYPE_NAMED:
+
 		type = ((struct acpi_namespace_node *)obj_desc)->type;
 		obj_desc =
 		    acpi_ns_get_attached_object((struct acpi_namespace_node *)
@@ -538,7 +540,9 @@ acpi_ex_resolve_multiple(struct acpi_walk_state *walk_state,
 		break;
 
 	default:
+
 		/* No change to Type required */
+
 		break;
 	}
 
diff --git a/drivers/acpi/acpica/exresop.c b/drivers/acpi/acpica/exresop.c
index 9fb9f5e..00e5af7 100644
--- a/drivers/acpi/acpica/exresop.c
+++ b/drivers/acpi/acpica/exresop.c
@@ -307,7 +307,6 @@ acpi_ex_resolve_operands(u16 opcode,
 		case ARGI_TARGETREF:	/* Allows implicit conversion rules before store */
 		case ARGI_FIXED_TARGET:	/* No implicit conversion before store to target */
 		case ARGI_SIMPLE_TARGET:	/* Name, Local, or arg - no implicit conversion  */
-
 			/*
 			 * Need an operand of type ACPI_TYPE_LOCAL_REFERENCE
 			 * A Namespace Node is OK as-is
@@ -326,7 +325,6 @@ acpi_ex_resolve_operands(u16 opcode,
 			goto next_operand;
 
 		case ARGI_DATAREFOBJ:	/* Store operator only */
-
 			/*
 			 * We don't want to resolve index_op reference objects during
 			 * a store because this would be an implicit de_ref_of operation.
@@ -343,7 +341,9 @@ acpi_ex_resolve_operands(u16 opcode,
 			break;
 
 		default:
+
 			/* All cases covered above */
+
 			break;
 		}
 
@@ -433,7 +433,6 @@ acpi_ex_resolve_operands(u16 opcode,
 			goto next_operand;
 
 		case ARGI_BUFFER:
-
 			/*
 			 * Need an operand of type ACPI_TYPE_BUFFER,
 			 * But we can implicitly convert from a STRING or INTEGER
@@ -459,7 +458,6 @@ acpi_ex_resolve_operands(u16 opcode,
 			goto next_operand;
 
 		case ARGI_STRING:
-
 			/*
 			 * Need an operand of type ACPI_TYPE_STRING,
 			 * But we can implicitly convert from a BUFFER or INTEGER
@@ -562,6 +560,7 @@ acpi_ex_resolve_operands(u16 opcode,
 				break;
 
 			default:
+
 				ACPI_ERROR((AE_INFO,
 					    "Needed [Buffer/String/Package/Reference], found [%s] %p",
 					    acpi_ut_get_object_type_name
@@ -584,6 +583,7 @@ acpi_ex_resolve_operands(u16 opcode,
 				break;
 
 			default:
+
 				ACPI_ERROR((AE_INFO,
 					    "Needed [Buffer/String/Package], found [%s] %p",
 					    acpi_ut_get_object_type_name
@@ -605,6 +605,7 @@ acpi_ex_resolve_operands(u16 opcode,
 				break;
 
 			default:
+
 				ACPI_ERROR((AE_INFO,
 					    "Needed [Region/Buffer], found [%s] %p",
 					    acpi_ut_get_object_type_name
diff --git a/drivers/acpi/acpica/exstore.c b/drivers/acpi/acpica/exstore.c
index 93c6049..2bdba6f 100644
--- a/drivers/acpi/acpica/exstore.c
+++ b/drivers/acpi/acpica/exstore.c
@@ -114,6 +114,7 @@ acpi_ex_store(union acpi_operand_object *source_desc,
 
 	switch (dest_desc->common.type) {
 	case ACPI_TYPE_LOCAL_REFERENCE:
+
 		break;
 
 	case ACPI_TYPE_INTEGER:
@@ -178,7 +179,6 @@ acpi_ex_store(union acpi_operand_object *source_desc,
 		break;
 
 	case ACPI_REFCLASS_DEBUG:
-
 		/*
 		 * Storing to the Debug object causes the value stored to be
 		 * displayed and otherwise has no effect -- see ACPI Specification
@@ -291,7 +291,6 @@ acpi_ex_store_object_to_index(union acpi_operand_object *source_desc,
 		break;
 
 	case ACPI_TYPE_BUFFER_FIELD:
-
 		/*
 		 * Store into a Buffer or String (not actually a real buffer_field)
 		 * at a location defined by an Index.
@@ -447,7 +446,6 @@ acpi_ex_store_object_to_node(union acpi_operand_object *source_desc,
 	case ACPI_TYPE_INTEGER:
 	case ACPI_TYPE_STRING:
 	case ACPI_TYPE_BUFFER:
-
 		/*
 		 * These target types are all of type Integer/String/Buffer, and
 		 * therefore support implicit conversion before the store.
diff --git a/drivers/acpi/acpica/exstoren.c b/drivers/acpi/acpica/exstoren.c
index 1cefe77..20d809d 100644
--- a/drivers/acpi/acpica/exstoren.c
+++ b/drivers/acpi/acpica/exstoren.c
@@ -85,11 +85,9 @@ acpi_ex_resolve_object(union acpi_operand_object **source_desc_ptr,
 		 * These cases all require only Integers or values that
 		 * can be converted to Integers (Strings or Buffers)
 		 */
-
 	case ACPI_TYPE_INTEGER:
 	case ACPI_TYPE_STRING:
 	case ACPI_TYPE_BUFFER:
-
 		/*
 		 * Stores into a Field/Region or into a Integer/Buffer/String
 		 * are all essentially the same. This case handles the
@@ -133,7 +131,6 @@ acpi_ex_resolve_object(union acpi_operand_object **source_desc_ptr,
 
 	case ACPI_TYPE_LOCAL_ALIAS:
 	case ACPI_TYPE_LOCAL_METHOD_ALIAS:
-
 		/*
 		 * All aliases should have been resolved earlier, during the
 		 * operand resolution phase.
@@ -144,7 +141,6 @@ acpi_ex_resolve_object(union acpi_operand_object **source_desc_ptr,
 
 	case ACPI_TYPE_PACKAGE:
 	default:
-
 		/*
 		 * All other types than Alias and the various Fields come here,
 		 * including the untyped case - ACPI_TYPE_ANY.
diff --git a/drivers/acpi/acpica/hwacpi.c b/drivers/acpi/acpica/hwacpi.c
index 579c3a5..3d36df8 100644
--- a/drivers/acpi/acpica/hwacpi.c
+++ b/drivers/acpi/acpica/hwacpi.c
@@ -108,7 +108,6 @@ acpi_status acpi_hw_set_mode(u32 mode)
 		break;
 
 	case ACPI_SYS_MODE_LEGACY:
-
 		/*
 		 * BIOS should clear all fixed status bits and restore fixed event
 		 * enable bits to default
@@ -120,6 +119,7 @@ acpi_status acpi_hw_set_mode(u32 mode)
 		break;
 
 	default:
+
 		return_ACPI_STATUS(AE_BAD_PARAMETER);
 	}
 
diff --git a/drivers/acpi/acpica/hwgpe.c b/drivers/acpi/acpica/hwgpe.c
index 20d02e9..9654050 100644
--- a/drivers/acpi/acpica/hwgpe.c
+++ b/drivers/acpi/acpica/hwgpe.c
@@ -127,14 +127,17 @@ acpi_hw_low_set_gpe(struct acpi_gpe_event_info *gpe_event_info, u32 action)
 		/*lint -fallthrough */
 
 	case ACPI_GPE_ENABLE:
+
 		ACPI_SET_BIT(enable_mask, register_bit);
 		break;
 
 	case ACPI_GPE_DISABLE:
+
 		ACPI_CLEAR_BIT(enable_mask, register_bit);
 		break;
 
 	default:
+
 		ACPI_ERROR((AE_INFO, "Invalid GPE Action, %u", action));
 		return (AE_BAD_PARAMETER);
 	}
diff --git a/drivers/acpi/acpica/hwregs.c b/drivers/acpi/acpica/hwregs.c
index 083d655..8d2e866 100644
--- a/drivers/acpi/acpica/hwregs.c
+++ b/drivers/acpi/acpica/hwregs.c
@@ -419,6 +419,7 @@ acpi_status acpi_hw_register_read(u32 register_id, u32 *return_value)
 		break;
 
 	default:
+
 		ACPI_ERROR((AE_INFO, "Unknown Register ID: 0x%X", register_id));
 		status = AE_BAD_PARAMETER;
 		break;
@@ -491,7 +492,6 @@ acpi_status acpi_hw_register_write(u32 register_id, u32 value)
 		break;
 
 	case ACPI_REGISTER_PM1_CONTROL:	/* PM1 A/B: 16-bit access each */
-
 		/*
 		 * Perform a read first to preserve certain bits (per ACPI spec)
 		 * Note: This includes SCI_EN, we never want to change this bit
@@ -520,7 +520,6 @@ acpi_status acpi_hw_register_write(u32 register_id, u32 value)
 		break;
 
 	case ACPI_REGISTER_PM2_CONTROL:	/* 8-bit access */
-
 		/*
 		 * For control registers, all reserved bits must be preserved,
 		 * as per the ACPI spec.
@@ -555,6 +554,7 @@ acpi_status acpi_hw_register_write(u32 register_id, u32 value)
 		break;
 
 	default:
+
 		ACPI_ERROR((AE_INFO, "Unknown Register ID: 0x%X", register_id));
 		status = AE_BAD_PARAMETER;
 		break;
diff --git a/drivers/acpi/acpica/hwxface.c b/drivers/acpi/acpica/hwxface.c
index f4224e6..5ee7a81 100644
--- a/drivers/acpi/acpica/hwxface.c
+++ b/drivers/acpi/acpica/hwxface.c
@@ -528,10 +528,12 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 *sleep_type_a, u8 *sleep_type_b)
 	elements = info->return_object->package.elements;
 	switch (info->return_object->package.count) {
 	case 0:
+
 		status = AE_AML_PACKAGE_LIMIT;
 		break;
 
 	case 1:
+
 		if (elements[0]->common.type != ACPI_TYPE_INTEGER) {
 			status = AE_AML_OPERAND_TYPE;
 			break;
@@ -545,6 +547,7 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 *sleep_type_a, u8 *sleep_type_b)
 
 	case 2:
 	default:
+
 		if ((elements[0]->common.type != ACPI_TYPE_INTEGER) ||
 		    (elements[1]->common.type != ACPI_TYPE_INTEGER)) {
 			status = AE_AML_OPERAND_TYPE;
diff --git a/drivers/acpi/acpica/hwxfsleep.c b/drivers/acpi/acpica/hwxfsleep.c
index 35eebda..111849c 100644
--- a/drivers/acpi/acpica/hwxfsleep.c
+++ b/drivers/acpi/acpica/hwxfsleep.c
@@ -314,20 +314,24 @@ acpi_status acpi_enter_sleep_state_prep(u8 sleep_state)
 
 	switch (sleep_state) {
 	case ACPI_STATE_S0:
+
 		sst_value = ACPI_SST_WORKING;
 		break;
 
 	case ACPI_STATE_S1:
 	case ACPI_STATE_S2:
 	case ACPI_STATE_S3:
+
 		sst_value = ACPI_SST_SLEEPING;
 		break;
 
 	case ACPI_STATE_S4:
+
 		sst_value = ACPI_SST_SLEEP_CONTEXT;
 		break;
 
 	default:
+
 		sst_value = ACPI_SST_INDICATOR_OFF;	/* Default is off */
 		break;
 	}
diff --git a/drivers/acpi/acpica/nsaccess.c b/drivers/acpi/acpica/nsaccess.c
index 8769cf8..c5316e5 100644
--- a/drivers/acpi/acpica/nsaccess.c
+++ b/drivers/acpi/acpica/nsaccess.c
@@ -151,6 +151,7 @@ acpi_status acpi_ns_root_initialize(void)
 			 */
 			switch (init_val->type) {
 			case ACPI_TYPE_METHOD:
+
 				obj_desc->method.param_count =
 				    (u8) ACPI_TO_INTEGER(val);
 				obj_desc->common.flags |= AOPOBJ_DATA_VALID;
diff --git a/drivers/acpi/acpica/nsconvert.c b/drivers/acpi/acpica/nsconvert.c
index 8f79a9d..acd2964 100644
--- a/drivers/acpi/acpica/nsconvert.c
+++ b/drivers/acpi/acpica/nsconvert.c
@@ -103,6 +103,7 @@ acpi_ns_convert_to_integer(union acpi_operand_object *original_object,
 		break;
 
 	default:
+
 		return (AE_AML_OPERAND_TYPE);
 	}
 
@@ -191,6 +192,7 @@ acpi_ns_convert_to_string(union acpi_operand_object *original_object,
 		break;
 
 	default:
+
 		return (AE_AML_OPERAND_TYPE);
 	}
 
@@ -294,6 +296,7 @@ acpi_ns_convert_to_buffer(union acpi_operand_object *original_object,
 		break;
 
 	default:
+
 		return (AE_AML_OPERAND_TYPE);
 	}
 
diff --git a/drivers/acpi/acpica/nsdump.c b/drivers/acpi/acpica/nsdump.c
index ce6e973..7418c77 100644
--- a/drivers/acpi/acpica/nsdump.c
+++ b/drivers/acpi/acpica/nsdump.c
@@ -244,10 +244,12 @@ acpi_ns_dump_one_object(acpi_handle obj_handle,
 			case ACPI_TYPE_BUFFER:
 			case ACPI_TYPE_STRING:
 			case ACPI_TYPE_METHOD:
+
 				acpi_os_printf("<No attached object>");
 				break;
 
 			default:
+
 				break;
 			}
 
@@ -433,6 +435,7 @@ acpi_ns_dump_one_object(acpi_handle obj_handle,
 			break;
 
 		default:
+
 			break;
 		}
 		break;
@@ -567,32 +570,39 @@ acpi_ns_dump_one_object(acpi_handle obj_handle,
 			goto cleanup;
 
 		case ACPI_TYPE_BUFFER_FIELD:
+
 			obj_desc =
 			    (union acpi_operand_object *)obj_desc->buffer_field.
 			    buffer_obj;
 			break;
 
 		case ACPI_TYPE_PACKAGE:
+
 			obj_desc = (void *)obj_desc->package.elements;
 			break;
 
 		case ACPI_TYPE_METHOD:
+
 			obj_desc = (void *)obj_desc->method.aml_start;
 			break;
 
 		case ACPI_TYPE_LOCAL_REGION_FIELD:
+
 			obj_desc = (void *)obj_desc->field.region_obj;
 			break;
 
 		case ACPI_TYPE_LOCAL_BANK_FIELD:
+
 			obj_desc = (void *)obj_desc->bank_field.region_obj;
 			break;
 
 		case ACPI_TYPE_LOCAL_INDEX_FIELD:
+
 			obj_desc = (void *)obj_desc->index_field.index_obj;
 			break;
 
 		default:
+
 			goto cleanup;
 		}
 
diff --git a/drivers/acpi/acpica/nsinit.c b/drivers/acpi/acpica/nsinit.c
index 23e426f..dd2ceae 100644
--- a/drivers/acpi/acpica/nsinit.c
+++ b/drivers/acpi/acpica/nsinit.c
@@ -266,28 +266,34 @@ acpi_ns_init_one_object(acpi_handle obj_handle,
 
 	switch (type) {
 	case ACPI_TYPE_REGION:
+
 		info->op_region_count++;
 		break;
 
 	case ACPI_TYPE_BUFFER_FIELD:
+
 		info->field_count++;
 		break;
 
 	case ACPI_TYPE_LOCAL_BANK_FIELD:
+
 		info->field_count++;
 		break;
 
 	case ACPI_TYPE_BUFFER:
+
 		info->buffer_count++;
 		break;
 
 	case ACPI_TYPE_PACKAGE:
+
 		info->package_count++;
 		break;
 
 	default:
 
 		/* No init required, just exit now */
+
 		return (AE_OK);
 	}
 
@@ -337,7 +343,9 @@ acpi_ns_init_one_object(acpi_handle obj_handle,
 		break;
 
 	default:
+
 		/* No other types can get here */
+
 		break;
 	}
 
@@ -416,6 +424,7 @@ acpi_ns_find_ini_methods(acpi_handle obj_handle,
 		break;
 
 	default:
+
 		break;
 	}
 
diff --git a/drivers/acpi/acpica/nspredef.c b/drivers/acpi/acpica/nspredef.c
index 5c83a8b..600268d 100644
--- a/drivers/acpi/acpica/nspredef.c
+++ b/drivers/acpi/acpica/nspredef.c
@@ -344,26 +344,32 @@ static u32 acpi_ns_get_bitmapped_type(union acpi_operand_object *return_object)
 
 	switch (return_object->common.type) {
 	case ACPI_TYPE_INTEGER:
+
 		return_btype = ACPI_RTYPE_INTEGER;
 		break;
 
 	case ACPI_TYPE_BUFFER:
+
 		return_btype = ACPI_RTYPE_BUFFER;
 		break;
 
 	case ACPI_TYPE_STRING:
+
 		return_btype = ACPI_RTYPE_STRING;
 		break;
 
 	case ACPI_TYPE_PACKAGE:
+
 		return_btype = ACPI_RTYPE_PACKAGE;
 		break;
 
 	case ACPI_TYPE_LOCAL_REFERENCE:
+
 		return_btype = ACPI_RTYPE_REFERENCE;
 		break;
 
 	default:
+
 		/* Not one of the supported objects, must be incorrect */
 
 		return_btype = ACPI_RTYPE_ANY;
diff --git a/drivers/acpi/acpica/nsprepkg.c b/drivers/acpi/acpica/nsprepkg.c
index ab2a3f4..6d55cef 100644
--- a/drivers/acpi/acpica/nsprepkg.c
+++ b/drivers/acpi/acpica/nsprepkg.c
@@ -136,7 +136,6 @@ acpi_ns_check_package(struct acpi_evaluate_info *info,
 	 */
 	switch (package->ret_info.type) {
 	case ACPI_PTYPE1_FIXED:
-
 		/*
 		 * The package count is fixed and there are no sub-packages
 		 *
@@ -169,7 +168,6 @@ acpi_ns_check_package(struct acpi_evaluate_info *info,
 		break;
 
 	case ACPI_PTYPE1_VAR:
-
 		/*
 		 * The package count is variable, there are no sub-packages, and all
 		 * elements must be of the same type
@@ -186,7 +184,6 @@ acpi_ns_check_package(struct acpi_evaluate_info *info,
 		break;
 
 	case ACPI_PTYPE1_OPTION:
-
 		/*
 		 * The package count is variable, there are no sub-packages. There are
 		 * a fixed number of required elements, and a variable number of
@@ -284,7 +281,6 @@ acpi_ns_check_package(struct acpi_evaluate_info *info,
 	case ACPI_PTYPE2_MIN:
 	case ACPI_PTYPE2_COUNT:
 	case ACPI_PTYPE2_FIX_VAR:
-
 		/*
 		 * These types all return a single Package that consists of a
 		 * variable number of sub-Packages.
@@ -500,7 +496,6 @@ acpi_ns_check_package_list(struct acpi_evaluate_info *info,
 			break;
 
 		case ACPI_PTYPE2_COUNT:
-
 			/*
 			 * First element is the (Integer) count of elements, including
 			 * the count field (the ACPI name is num_elements)
diff --git a/drivers/acpi/acpica/nsrepair.c b/drivers/acpi/acpica/nsrepair.c
index 89caef0..f8e71ea 100644
--- a/drivers/acpi/acpica/nsrepair.c
+++ b/drivers/acpi/acpica/nsrepair.c
@@ -480,6 +480,7 @@ acpi_ns_remove_null_elements(struct acpi_evaluate_info *info,
 	case ACPI_PTYPE2_MIN:
 	case ACPI_PTYPE2_REV_FIXED:
 	case ACPI_PTYPE2_FIX_VAR:
+
 		break;
 
 	default:
diff --git a/drivers/acpi/acpica/nsrepair2.c b/drivers/acpi/acpica/nsrepair2.c
index 39acc4e..daac8da 100644
--- a/drivers/acpi/acpica/nsrepair2.c
+++ b/drivers/acpi/acpica/nsrepair2.c
@@ -320,6 +320,7 @@ acpi_ns_repair_FDE(struct acpi_evaluate_info *info,
 		break;
 
 	default:
+
 		return (AE_AML_OPERAND_TYPE);
 	}
 
diff --git a/drivers/acpi/acpica/nsutils.c b/drivers/acpi/acpica/nsutils.c
index 2808586..08c0b5b 100644
--- a/drivers/acpi/acpica/nsutils.c
+++ b/drivers/acpi/acpica/nsutils.c
@@ -419,10 +419,12 @@ acpi_ns_externalize_name(u32 internal_name_length,
 
 	switch (internal_name[0]) {
 	case AML_ROOT_PREFIX:
+
 		prefix_length = 1;
 		break;
 
 	case AML_PARENT_PREFIX:
+
 		for (i = 0; i < internal_name_length; i++) {
 			if (ACPI_IS_PARENT_PREFIX(internal_name[i])) {
 				prefix_length = i + 1;
@@ -438,6 +440,7 @@ acpi_ns_externalize_name(u32 internal_name_length,
 		break;
 
 	default:
+
 		break;
 	}
 
diff --git a/drivers/acpi/acpica/nsxfeval.c b/drivers/acpi/acpica/nsxfeval.c
index 82bec40..f553cfd 100644
--- a/drivers/acpi/acpica/nsxfeval.c
+++ b/drivers/acpi/acpica/nsxfeval.c
@@ -511,6 +511,7 @@ static void acpi_ns_resolve_references(struct acpi_evaluate_info *info)
 		break;
 
 	default:
+
 		return;
 	}
 
diff --git a/drivers/acpi/acpica/psargs.c b/drivers/acpi/acpica/psargs.c
index 9f25a3d..91a5a69 100644
--- a/drivers/acpi/acpica/psargs.c
+++ b/drivers/acpi/acpica/psargs.c
@@ -629,24 +629,28 @@ static union acpi_parse_object *acpi_ps_get_next_field(struct acpi_parse_state
 
 				switch (opcode) {
 				case AML_BYTE_OP:	/* AML_BYTEDATA_ARG */
+
 					buffer_length =
 					    ACPI_GET8(parser_state->aml);
 					parser_state->aml += 1;
 					break;
 
 				case AML_WORD_OP:	/* AML_WORDDATA_ARG */
+
 					buffer_length =
 					    ACPI_GET16(parser_state->aml);
 					parser_state->aml += 2;
 					break;
 
 				case AML_DWORD_OP:	/* AML_DWORDATA_ARG */
+
 					buffer_length =
 					    ACPI_GET32(parser_state->aml);
 					parser_state->aml += 4;
 					break;
 
 				default:
+
 					buffer_length = 0;
 					break;
 				}
diff --git a/drivers/acpi/acpica/psloop.c b/drivers/acpi/acpica/psloop.c
index 63c4554..065b44a 100644
--- a/drivers/acpi/acpica/psloop.c
+++ b/drivers/acpi/acpica/psloop.c
@@ -164,7 +164,6 @@ acpi_ps_get_arguments(struct acpi_walk_state *walk_state,
 			case AML_IF_OP:
 			case AML_ELSE_OP:
 			case AML_WHILE_OP:
-
 				/*
 				 * Currently supported module-level opcodes are:
 				 * IF/ELSE/WHILE. These appear to be the most common,
@@ -289,6 +288,7 @@ acpi_ps_get_arguments(struct acpi_walk_state *walk_state,
 		default:
 
 			/* No action for all other opcodes */
+
 			break;
 		}
 
diff --git a/drivers/acpi/acpica/psobject.c b/drivers/acpi/acpica/psobject.c
index 12c4028..95dc608 100644
--- a/drivers/acpi/acpica/psobject.c
+++ b/drivers/acpi/acpica/psobject.c
@@ -402,6 +402,7 @@ acpi_ps_complete_op(struct acpi_walk_state *walk_state,
 
 	switch (status) {
 	case AE_OK:
+
 		break;
 
 	case AE_CTRL_TRANSFER:
diff --git a/drivers/acpi/acpica/psparse.c b/drivers/acpi/acpica/psparse.c
index abc4c48..86198a9 100644
--- a/drivers/acpi/acpica/psparse.c
+++ b/drivers/acpi/acpica/psparse.c
@@ -176,10 +176,10 @@ acpi_ps_complete_this_op(struct acpi_walk_state * walk_state,
 
 		switch (parent_info->class) {
 		case AML_CLASS_CONTROL:
+
 			break;
 
 		case AML_CLASS_CREATE:
-
 			/*
 			 * These opcodes contain term_arg operands. The current
 			 * op must be replaced by a placeholder return op
@@ -192,7 +192,6 @@ acpi_ps_complete_this_op(struct acpi_walk_state * walk_state,
 			break;
 
 		case AML_CLASS_NAMED_OBJECT:
-
 			/*
 			 * These opcodes contain term_arg operands. The current
 			 * op must be replaced by a placeholder return op
diff --git a/drivers/acpi/acpica/pstree.c b/drivers/acpi/acpica/pstree.c
index c1934bf..877dc0d 100644
--- a/drivers/acpi/acpica/pstree.c
+++ b/drivers/acpi/acpica/pstree.c
@@ -308,7 +308,9 @@ union acpi_parse_object *acpi_ps_get_child(union acpi_parse_object *op)
 		break;
 
 	default:
+
 		/* All others have no children */
+
 		break;
 	}
 
diff --git a/drivers/acpi/acpica/rscalc.c b/drivers/acpi/acpica/rscalc.c
index 72077fa..608ebb5 100644
--- a/drivers/acpi/acpica/rscalc.c
+++ b/drivers/acpi/acpica/rscalc.c
@@ -352,6 +352,7 @@ acpi_rs_get_aml_length(struct acpi_resource * resource, acpi_size * size_needed)
 			break;
 
 		default:
+
 			break;
 		}
 
@@ -539,6 +540,7 @@ acpi_rs_get_list_length(u8 * aml_buffer,
 			break;
 
 		default:
+
 			break;
 		}
 
diff --git a/drivers/acpi/acpica/rsdump.c b/drivers/acpi/acpica/rsdump.c
index b5fc0db..8a2d498 100644
--- a/drivers/acpi/acpica/rsdump.c
+++ b/drivers/acpi/acpica/rsdump.c
@@ -120,17 +120,20 @@ acpi_rs_dump_descriptor(void *resource, struct acpi_rsdump_info *table)
 			/* Strings */
 
 		case ACPI_RSD_LITERAL:
+
 			acpi_rs_out_string(name,
 					   ACPI_CAST_PTR(char, table->pointer));
 			break;
 
 		case ACPI_RSD_STRING:
+
 			acpi_rs_out_string(name, ACPI_CAST_PTR(char, target));
 			break;
 
 			/* Data items, 8/16/32/64 bit */
 
 		case ACPI_RSD_UINT8:
+
 			if (table->pointer) {
 				acpi_rs_out_string(name, ACPI_CAST_PTR(char,
 								       table->
@@ -142,20 +145,24 @@ acpi_rs_dump_descriptor(void *resource, struct acpi_rsdump_info *table)
 			break;
 
 		case ACPI_RSD_UINT16:
+
 			acpi_rs_out_integer16(name, ACPI_GET16(target));
 			break;
 
 		case ACPI_RSD_UINT32:
+
 			acpi_rs_out_integer32(name, ACPI_GET32(target));
 			break;
 
 		case ACPI_RSD_UINT64:
+
 			acpi_rs_out_integer64(name, ACPI_GET64(target));
 			break;
 
 			/* Flags: 1-bit and 2-bit flags supported */
 
 		case ACPI_RSD_1BITFLAG:
+
 			acpi_rs_out_string(name, ACPI_CAST_PTR(char,
 							       table->
 							       pointer[*target &
@@ -163,6 +170,7 @@ acpi_rs_dump_descriptor(void *resource, struct acpi_rsdump_info *table)
 			break;
 
 		case ACPI_RSD_2BITFLAG:
+
 			acpi_rs_out_string(name, ACPI_CAST_PTR(char,
 							       table->
 							       pointer[*target &
@@ -170,6 +178,7 @@ acpi_rs_dump_descriptor(void *resource, struct acpi_rsdump_info *table)
 			break;
 
 		case ACPI_RSD_3BITFLAG:
+
 			acpi_rs_out_string(name, ACPI_CAST_PTR(char,
 							       table->
 							       pointer[*target &
@@ -258,6 +267,7 @@ acpi_rs_dump_descriptor(void *resource, struct acpi_rsdump_info *table)
 			break;
 
 		default:
+
 			acpi_os_printf("**** Invalid table opcode [%X] ****\n",
 				       table->opcode);
 			return;
diff --git a/drivers/acpi/acpica/rsmisc.c b/drivers/acpi/acpica/rsmisc.c
index d5bf05a..80d1299 100644
--- a/drivers/acpi/acpica/rsmisc.c
+++ b/drivers/acpi/acpica/rsmisc.c
@@ -194,7 +194,6 @@ acpi_rs_convert_aml_to_resource(struct acpi_resource *resource,
 			break;
 
 		case ACPI_RSC_COUNT_GPIO_RES:
-
 			/*
 			 * Vendor data is optional (length/offset may both be zero)
 			 * Examine vendor data length field first
@@ -410,12 +409,14 @@ acpi_rs_convert_aml_to_resource(struct acpi_resource *resource,
 			 */
 			switch (info->resource_offset) {
 			case ACPI_RSC_COMPARE_AML_LENGTH:
+
 				if (aml_resource_length != info->value) {
 					goto exit;
 				}
 				break;
 
 			case ACPI_RSC_COMPARE_VALUE:
+
 				if (ACPI_GET8(source) != info->value) {
 					goto exit;
 				}
diff --git a/drivers/acpi/acpica/rsutils.c b/drivers/acpi/acpica/rsutils.c
index 59bdf37..480b6b4 100644
--- a/drivers/acpi/acpica/rsutils.c
+++ b/drivers/acpi/acpica/rsutils.c
@@ -147,6 +147,7 @@ acpi_rs_move_data(void *destination, void *source, u16 item_count, u8 move_type)
 		case ACPI_RSC_MOVE_GPIO_RES:
 		case ACPI_RSC_MOVE_SERIAL_VEN:
 		case ACPI_RSC_MOVE_SERIAL_RES:
+
 			ACPI_MEMCPY(destination, source, item_count);
 			return;
 
@@ -157,21 +158,25 @@ acpi_rs_move_data(void *destination, void *source, u16 item_count, u8 move_type)
 			 */
 		case ACPI_RSC_MOVE16:
 		case ACPI_RSC_MOVE_GPIO_PIN:
+
 			ACPI_MOVE_16_TO_16(&ACPI_CAST_PTR(u16, destination)[i],
 					   &ACPI_CAST_PTR(u16, source)[i]);
 			break;
 
 		case ACPI_RSC_MOVE32:
+
 			ACPI_MOVE_32_TO_32(&ACPI_CAST_PTR(u32, destination)[i],
 					   &ACPI_CAST_PTR(u32, source)[i]);
 			break;
 
 		case ACPI_RSC_MOVE64:
+
 			ACPI_MOVE_64_TO_64(&ACPI_CAST_PTR(u64, destination)[i],
 					   &ACPI_CAST_PTR(u64, source)[i]);
 			break;
 
 		default:
+
 			return;
 		}
 	}
diff --git a/drivers/acpi/acpica/rsxface.c b/drivers/acpi/acpica/rsxface.c
index c0e5d2d..94e3517 100644
--- a/drivers/acpi/acpica/rsxface.c
+++ b/drivers/acpi/acpica/rsxface.c
@@ -402,6 +402,7 @@ acpi_resource_to_address64(struct acpi_resource *resource,
 		break;
 
 	default:
+
 		return (AE_BAD_PARAMETER);
 	}
 
diff --git a/drivers/acpi/acpica/tbinstal.c b/drivers/acpi/acpica/tbinstal.c
index e57cd38..a04e54d 100644
--- a/drivers/acpi/acpica/tbinstal.c
+++ b/drivers/acpi/acpica/tbinstal.c
@@ -471,15 +471,19 @@ void acpi_tb_delete_table(struct acpi_table_desc *table_desc)
 	}
 	switch (table_desc->flags & ACPI_TABLE_ORIGIN_MASK) {
 	case ACPI_TABLE_ORIGIN_MAPPED:
+
 		acpi_os_unmap_memory(table_desc->pointer, table_desc->length);
 		break;
+
 	case ACPI_TABLE_ORIGIN_ALLOCATED:
+
 		ACPI_FREE(table_desc->pointer);
 		break;
 
 		/* Not mapped or allocated, there is nothing we can do */
 
 	default:
+
 		return;
 	}
 
diff --git a/drivers/acpi/acpica/utcopy.c b/drivers/acpi/acpica/utcopy.c
index e4c9291..1731c27 100644
--- a/drivers/acpi/acpica/utcopy.c
+++ b/drivers/acpi/acpica/utcopy.c
@@ -178,7 +178,6 @@ acpi_ut_copy_isimple_to_esimple(union acpi_operand_object *internal_object,
 
 		switch (internal_object->reference.class) {
 		case ACPI_REFCLASS_NAME:
-
 			/*
 			 * For namepath, return the object handle ("reference")
 			 * We are referring to the namespace node
@@ -264,7 +263,6 @@ acpi_ut_copy_ielement_to_eelement(u8 object_type,
 
 	switch (object_type) {
 	case ACPI_COPY_TYPE_SIMPLE:
-
 		/*
 		 * This is a simple or null object
 		 */
@@ -278,7 +276,6 @@ acpi_ut_copy_ielement_to_eelement(u8 object_type,
 		break;
 
 	case ACPI_COPY_TYPE_PACKAGE:
-
 		/*
 		 * Build the package object
 		 */
@@ -304,6 +301,7 @@ acpi_ut_copy_ielement_to_eelement(u8 object_type,
 		break;
 
 	default:
+
 		return (AE_BAD_PARAMETER);
 	}
 
@@ -481,6 +479,7 @@ acpi_ut_copy_esimple_to_isimple(union acpi_object *external_object,
 		return_ACPI_STATUS(AE_OK);
 
 	default:
+
 		/* All other types are not supported */
 
 		ACPI_ERROR((AE_INFO,
@@ -544,7 +543,9 @@ acpi_ut_copy_esimple_to_isimple(union acpi_object *external_object,
 		break;
 
 	default:
+
 		/* Other types can't get here */
+
 		break;
 	}
 
@@ -800,7 +801,9 @@ acpi_ut_copy_simple_object(union acpi_operand_object *source_desc,
 		break;
 
 	default:
+
 		/* Nothing to do for other simple objects */
+
 		break;
 	}
 
@@ -868,7 +871,6 @@ acpi_ut_copy_ielement_to_ielement(u8 object_type,
 		break;
 
 	case ACPI_COPY_TYPE_PACKAGE:
-
 		/*
 		 * This object is a package - go down another nesting level
 		 * Create and build the package object
@@ -891,6 +893,7 @@ acpi_ut_copy_ielement_to_ielement(u8 object_type,
 		break;
 
 	default:
+
 		return (AE_BAD_PARAMETER);
 	}
 
diff --git a/drivers/acpi/acpica/utdelete.c b/drivers/acpi/acpica/utdelete.c
index 29b9302..d6b33f2 100644
--- a/drivers/acpi/acpica/utdelete.c
+++ b/drivers/acpi/acpica/utdelete.c
@@ -303,6 +303,7 @@ static void acpi_ut_delete_internal_obj(union acpi_operand_object *object)
 		break;
 
 	default:
+
 		break;
 	}
 
@@ -508,7 +509,6 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action)
 		case ACPI_TYPE_PROCESSOR:
 		case ACPI_TYPE_POWER:
 		case ACPI_TYPE_THERMAL:
-
 			/*
 			 * Update the notify objects for these types (if present)
 			 * Two lists, system and device notify handlers.
@@ -623,6 +623,7 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action)
 
 		case ACPI_TYPE_REGION:
 		default:
+
 			break;	/* No subobjects for all other types */
 		}
 
diff --git a/drivers/acpi/acpica/uteval.c b/drivers/acpi/acpica/uteval.c
index 9d68029..ee83adb 100644
--- a/drivers/acpi/acpica/uteval.c
+++ b/drivers/acpi/acpica/uteval.c
@@ -123,22 +123,27 @@ acpi_ut_evaluate_object(struct acpi_namespace_node *prefix_node,
 
 	switch ((info->return_object)->common.type) {
 	case ACPI_TYPE_INTEGER:
+
 		return_btype = ACPI_BTYPE_INTEGER;
 		break;
 
 	case ACPI_TYPE_BUFFER:
+
 		return_btype = ACPI_BTYPE_BUFFER;
 		break;
 
 	case ACPI_TYPE_STRING:
+
 		return_btype = ACPI_BTYPE_STRING;
 		break;
 
 	case ACPI_TYPE_PACKAGE:
+
 		return_btype = ACPI_BTYPE_PACKAGE;
 		break;
 
 	default:
+
 		return_btype = 0;
 		break;
 	}
diff --git a/drivers/acpi/acpica/utexcep.c b/drivers/acpi/acpica/utexcep.c
index b543a14..ff6d9e8 100644
--- a/drivers/acpi/acpica/utexcep.c
+++ b/drivers/acpi/acpica/utexcep.c
@@ -146,6 +146,7 @@ const struct acpi_exception_info *acpi_ut_validate_exception(acpi_status status)
 		break;
 
 	default:
+
 		break;
 	}
 
diff --git a/drivers/acpi/acpica/utids.c b/drivers/acpi/acpica/utids.c
index 43a170a..fa69071 100644
--- a/drivers/acpi/acpica/utids.c
+++ b/drivers/acpi/acpica/utids.c
@@ -341,14 +341,17 @@ acpi_ut_execute_CID(struct acpi_namespace_node *device_node,
 
 		switch (cid_objects[i]->common.type) {
 		case ACPI_TYPE_INTEGER:
+
 			string_area_size += ACPI_EISAID_STRING_SIZE;
 			break;
 
 		case ACPI_TYPE_STRING:
+
 			string_area_size += cid_objects[i]->string.length + 1;
 			break;
 
 		default:
+
 			status = AE_TYPE;
 			goto cleanup;
 		}
diff --git a/drivers/acpi/acpica/utmisc.c b/drivers/acpi/acpica/utmisc.c
index 785fdd0..02f9101 100644
--- a/drivers/acpi/acpica/utmisc.c
+++ b/drivers/acpi/acpica/utmisc.c
@@ -382,10 +382,12 @@ acpi_ut_display_init_pathname(u8 type,
 
 	switch (type) {
 	case ACPI_TYPE_METHOD:
+
 		acpi_os_printf("Executing  ");
 		break;
 
 	default:
+
 		acpi_os_printf("Initializing ");
 		break;
 	}
diff --git a/drivers/acpi/acpica/utobject.c b/drivers/acpi/acpica/utobject.c
index 1099f5c..aa61f66 100644
--- a/drivers/acpi/acpica/utobject.c
+++ b/drivers/acpi/acpica/utobject.c
@@ -129,6 +129,7 @@ union acpi_operand_object *acpi_ut_create_internal_object_dbg(const char
 		break;
 
 	default:
+
 		/* All others have no secondary object */
 		break;
 	}
@@ -353,6 +354,7 @@ u8 acpi_ut_valid_internal_object(void *object)
 		return (TRUE);
 
 	default:
+
 		ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
 				  "%p is not not an ACPI operand obj [%s]\n",
 				  object, acpi_ut_get_descriptor_name(object)));
@@ -509,7 +511,6 @@ acpi_ut_get_simple_object_size(union acpi_operand_object *internal_object,
 
 		switch (internal_object->reference.class) {
 		case ACPI_REFCLASS_NAME:
-
 			/*
 			 * Get the actual length of the full pathname to this object.
 			 * The reference will be converted to the pathname to the object
@@ -525,7 +526,6 @@ acpi_ut_get_simple_object_size(union acpi_operand_object *internal_object,
 			break;
 
 		default:
-
 			/*
 			 * No other reference opcodes are supported.
 			 * Notably, Locals and Args are not supported, but this may be
@@ -585,7 +585,6 @@ acpi_ut_get_element_length(u8 object_type,
 
 	switch (object_type) {
 	case ACPI_COPY_TYPE_SIMPLE:
-
 		/*
 		 * Simple object - just get the size (Null object/entry is handled
 		 * here also) and sum it into the running package length
diff --git a/drivers/acpi/acpica/utstring.c b/drivers/acpi/acpica/utstring.c
index b3e36a8..31a06a1 100644
--- a/drivers/acpi/acpica/utstring.c
+++ b/drivers/acpi/acpica/utstring.c
@@ -186,10 +186,13 @@ acpi_status acpi_ut_strtoul64(char *string, u32 base, u64 *ret_integer)
 	switch (base) {
 	case ACPI_ANY_BASE:
 	case 16:
+
 		break;
 
 	default:
+
 		/* Invalid Base */
+
 		return_ACPI_STATUS(AE_BAD_PARAMETER);
 	}
 
@@ -355,36 +358,44 @@ void acpi_ut_print_string(char *string, u8 max_length)
 
 		switch (string[i]) {
 		case 0x07:
+
 			acpi_os_printf("\\a");	/* BELL */
 			break;
 
 		case 0x08:
+
 			acpi_os_printf("\\b");	/* BACKSPACE */
 			break;
 
 		case 0x0C:
+
 			acpi_os_printf("\\f");	/* FORMFEED */
 			break;
 
 		case 0x0A:
+
 			acpi_os_printf("\\n");	/* LINEFEED */
 			break;
 
 		case 0x0D:
+
 			acpi_os_printf("\\r");	/* CARRIAGE RETURN */
 			break;
 
 		case 0x09:
+
 			acpi_os_printf("\\t");	/* HORIZONTAL TAB */
 			break;
 
 		case 0x0B:
+
 			acpi_os_printf("\\v");	/* VERTICAL TAB */
 			break;
 
 		case '\'':	/* Single Quote */
 		case '\"':	/* Double Quote */
 		case '\\':	/* Backslash */
+
 			acpi_os_printf("\\%c", (int)string[i]);
 			break;
 
diff --git a/drivers/acpi/acpica/uttrack.c b/drivers/acpi/acpica/uttrack.c
index 62774c7..160f13f 100644
--- a/drivers/acpi/acpica/uttrack.c
+++ b/drivers/acpi/acpica/uttrack.c
@@ -603,6 +603,7 @@ void acpi_ut_dump_allocations(u32 component, const char *module)
 					switch (ACPI_GET_DESCRIPTOR_TYPE
 						(descriptor)) {
 					case ACPI_DESC_TYPE_OPERAND:
+
 						if (element->size ==
 						    sizeof(union
 							   acpi_operand_object))
@@ -613,6 +614,7 @@ void acpi_ut_dump_allocations(u32 component, const char *module)
 						break;
 
 					case ACPI_DESC_TYPE_PARSER:
+
 						if (element->size ==
 						    sizeof(union
 							   acpi_parse_object)) {
@@ -622,6 +624,7 @@ void acpi_ut_dump_allocations(u32 component, const char *module)
 						break;
 
 					case ACPI_DESC_TYPE_NAMED:
+
 						if (element->size ==
 						    sizeof(struct
 							   acpi_namespace_node))
@@ -632,6 +635,7 @@ void acpi_ut_dump_allocations(u32 component, const char *module)
 						break;
 
 					default:
+
 						break;
 					}
 
@@ -639,6 +643,7 @@ void acpi_ut_dump_allocations(u32 component, const char *module)
 
 					switch (descriptor_type) {
 					case ACPI_DESC_TYPE_OPERAND:
+
 						acpi_os_printf
 						    ("%12.12s RefCount 0x%04X\n",
 						     acpi_ut_get_type_name
@@ -649,6 +654,7 @@ void acpi_ut_dump_allocations(u32 component, const char *module)
 						break;
 
 					case ACPI_DESC_TYPE_PARSER:
+
 						acpi_os_printf
 						    ("AmlOpcode 0x%04hX\n",
 						     descriptor->op.asl.
@@ -656,6 +662,7 @@ void acpi_ut_dump_allocations(u32 component, const char *module)
 						break;
 
 					case ACPI_DESC_TYPE_NAMED:
+
 						acpi_os_printf("%4.4s\n",
 							       acpi_ut_get_node_name
 							       (&descriptor->
@@ -663,6 +670,7 @@ void acpi_ut_dump_allocations(u32 component, const char *module)
 						break;
 
 					default:
+
 						acpi_os_printf("\n");
 						break;
 					}
-- 
1.7.10
A

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

* [PATCH 04/16] ACPICA: Add option to disable loading of SSDTs from the RSDT/XSDT
  2013-06-08  0:57 [PATCH 00/16] ACPICA: 20130517 release Lv Zheng
                   ` (2 preceding siblings ...)
  2013-06-08  0:58 ` [PATCH 03/16] ACPICA: Standardize all switch() blocks Lv Zheng
@ 2013-06-08  0:58 ` Lv Zheng
  2013-06-08  0:59 ` [PATCH 05/16] ACPICA: Split table print utilities to a new a separate file Lv Zheng
                   ` (13 subsequent siblings)
  17 siblings, 0 replies; 77+ messages in thread
From: Lv Zheng @ 2013-06-08  0:58 UTC (permalink / raw)
  To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi

Optionally do not load any SSDTs from the RSDT/XSDT during
initialization.  This can be useful for overriding SSDTs
using DSDT overriding, thus useful for debugging ACPI
problems on some machines.  Lv Zheng. ACPICA BZ 1005.

Buglink: https://bugs.acpica.org/show_bug.cgi?id=1005
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
 drivers/acpi/acpica/acglobal.h |    6 ++++++
 drivers/acpi/acpica/tbxfload.c |   25 ++++++++++---------------
 drivers/acpi/osl.c             |   11 +++++++++++
 include/acpi/acpixf.h          |    1 +
 4 files changed, 28 insertions(+), 15 deletions(-)

diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h
index 0716092..b8d3811 100644
--- a/drivers/acpi/acpica/acglobal.h
+++ b/drivers/acpi/acpica/acglobal.h
@@ -132,6 +132,12 @@ u8 ACPI_INIT_GLOBAL(acpi_gbl_truncate_io_addresses, FALSE);
  */
 u8 ACPI_INIT_GLOBAL(acpi_gbl_disable_auto_repair, FALSE);
 
+/*
+ * Optionally do not load any SSDTs from the RSDT/XSDT during initialization.
+ * This can be useful for debugging ACPI problems on some machines.
+ */
+u8 ACPI_INIT_GLOBAL(acpi_gbl_disable_ssdt_table_load, FALSE);
+
 /* acpi_gbl_FADT is a local copy of the FADT, converted to a common format. */
 
 struct acpi_table_fadt acpi_gbl_FADT;
diff --git a/drivers/acpi/acpica/tbxfload.c b/drivers/acpi/acpica/tbxfload.c
index 67e046e..0ba9e32 100644
--- a/drivers/acpi/acpica/tbxfload.c
+++ b/drivers/acpi/acpica/tbxfload.c
@@ -53,8 +53,6 @@ ACPI_MODULE_NAME("tbxfload")
 /* Local prototypes */
 static acpi_status acpi_tb_load_namespace(void);
 
-static int no_auto_ssdt;
-
 /*******************************************************************************
  *
  * FUNCTION:    acpi_load_tables
@@ -180,8 +178,16 @@ static acpi_status acpi_tb_load_namespace(void)
 			continue;
 		}
 
-		if (no_auto_ssdt) {
-			printk(KERN_WARNING "ACPI: SSDT ignored due to \"acpi_no_auto_ssdt\"\n");
+		/*
+		 * Optionally do not load any SSDTs from the RSDT/XSDT. This can
+		 * be useful for debugging ACPI problems on some machines.
+		 */
+		if (acpi_gbl_disable_ssdt_table_load) {
+			ACPI_INFO((AE_INFO, "Ignoring %4.4s at %p",
+				   acpi_gbl_root_table_list.tables[i].signature.
+				   ascii, ACPI_CAST_PTR(void,
+							acpi_gbl_root_table_list.
+							tables[i].address)));
 			continue;
 		}
 
@@ -376,14 +382,3 @@ acpi_status acpi_unload_parent_table(acpi_handle object)
 }
 
 ACPI_EXPORT_SYMBOL(acpi_unload_parent_table)
-
-static int __init acpi_no_auto_ssdt_setup(char *s) {
-
-        printk(KERN_NOTICE "ACPI: SSDT auto-load disabled\n");
-
-        no_auto_ssdt = 1;
-
-        return 1;
-}
-
-__setup("acpi_no_auto_ssdt", acpi_no_auto_ssdt_setup);
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index e721863..da6b663 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -1715,6 +1715,17 @@ acpi_status acpi_os_release_object(acpi_cache_t * cache, void *object)
 }
 #endif
 
+static int __init acpi_no_auto_ssdt_setup(char *s)
+{
+        printk(KERN_NOTICE PREFIX "SSDT auto-load disabled\n");
+
+        acpi_gbl_disable_ssdt_table_load = TRUE;
+
+        return 1;
+}
+
+__setup("acpi_no_auto_ssdt", acpi_no_auto_ssdt_setup);
+
 acpi_status __init acpi_os_initialize(void)
 {
 	acpi_os_map_generic_address(&acpi_gbl_FADT.xpm1a_event_block);
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index 1561264..5d9bf46 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -80,6 +80,7 @@ extern bool acpi_gbl_enable_aml_debug_object;
 extern u8 acpi_gbl_copy_dsdt_locally;
 extern u8 acpi_gbl_truncate_io_addresses;
 extern u8 acpi_gbl_disable_auto_repair;
+extern u8 acpi_gbl_disable_ssdt_table_load;
 
 /*
  * Hardware-reduced prototypes. All interfaces that use these macros will
-- 
1.7.10


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

* [PATCH 05/16] ACPICA: Split table print utilities to a new a separate file
  2013-06-08  0:57 [PATCH 00/16] ACPICA: 20130517 release Lv Zheng
                   ` (3 preceding siblings ...)
  2013-06-08  0:58 ` [PATCH 04/16] ACPICA: Add option to disable loading of SSDTs from the RSDT/XSDT Lv Zheng
@ 2013-06-08  0:59 ` Lv Zheng
  2013-06-12 17:03   ` Len Brown
  2013-06-08  0:59 ` [PATCH 06/16] ACPICA: Do not use extended sleep registers unless HW-reduced bit is set Lv Zheng
                   ` (12 subsequent siblings)
  17 siblings, 1 reply; 77+ messages in thread
From: Lv Zheng @ 2013-06-08  0:59 UTC (permalink / raw)
  To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi

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

Improves configurability of ACPICA.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
 drivers/acpi/acpica/Makefile  |    1 +
 drivers/acpi/acpica/tbprint.c |  237 +++++++++++++++++++++++++++++++++++++++++
 drivers/acpi/acpica/tbutils.c |  191 +--------------------------------
 3 files changed, 239 insertions(+), 190 deletions(-)
 create mode 100644 drivers/acpi/acpica/tbprint.c

diff --git a/drivers/acpi/acpica/Makefile b/drivers/acpi/acpica/Makefile
index 987bf41..4383040 100644
--- a/drivers/acpi/acpica/Makefile
+++ b/drivers/acpi/acpica/Makefile
@@ -138,6 +138,7 @@ acpi-y +=		\
 	tbfadt.o	\
 	tbfind.o	\
 	tbinstal.o	\
+	tbprint.o	\
 	tbutils.o	\
 	tbxface.o	\
 	tbxfload.o	\
diff --git a/drivers/acpi/acpica/tbprint.c b/drivers/acpi/acpica/tbprint.c
new file mode 100644
index 0000000..dc963f8
--- /dev/null
+++ b/drivers/acpi/acpica/tbprint.c
@@ -0,0 +1,237 @@
+/******************************************************************************
+ *
+ * Module Name: tbprint - Table output utilities
+ *
+ *****************************************************************************/
+
+/*
+ * Copyright (C) 2000 - 2013, 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.
+ */
+
+#include <acpi/acpi.h>
+#include "accommon.h"
+#include "actables.h"
+
+#define _COMPONENT          ACPI_TABLES
+ACPI_MODULE_NAME("tbprint")
+
+/* Local prototypes */
+static void acpi_tb_fix_string(char *string, acpi_size length);
+
+static void
+acpi_tb_cleanup_table_header(struct acpi_table_header *out_header,
+			     struct acpi_table_header *header);
+
+/*******************************************************************************
+ *
+ * FUNCTION:    acpi_tb_fix_string
+ *
+ * PARAMETERS:  string              - String to be repaired
+ *              length              - Maximum length
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Replace every non-printable or non-ascii byte in the string
+ *              with a question mark '?'.
+ *
+ ******************************************************************************/
+
+static void acpi_tb_fix_string(char *string, acpi_size length)
+{
+
+	while (length && *string) {
+		if (!ACPI_IS_PRINT(*string)) {
+			*string = '?';
+		}
+		string++;
+		length--;
+	}
+}
+
+/*******************************************************************************
+ *
+ * FUNCTION:    acpi_tb_cleanup_table_header
+ *
+ * PARAMETERS:  out_header          - Where the cleaned header is returned
+ *              header              - Input ACPI table header
+ *
+ * RETURN:      Returns the cleaned header in out_header
+ *
+ * DESCRIPTION: Copy the table header and ensure that all "string" fields in
+ *              the header consist of printable characters.
+ *
+ ******************************************************************************/
+
+static void
+acpi_tb_cleanup_table_header(struct acpi_table_header *out_header,
+			     struct acpi_table_header *header)
+{
+
+	ACPI_MEMCPY(out_header, header, sizeof(struct acpi_table_header));
+
+	acpi_tb_fix_string(out_header->signature, ACPI_NAME_SIZE);
+	acpi_tb_fix_string(out_header->oem_id, ACPI_OEM_ID_SIZE);
+	acpi_tb_fix_string(out_header->oem_table_id, ACPI_OEM_TABLE_ID_SIZE);
+	acpi_tb_fix_string(out_header->asl_compiler_id, ACPI_NAME_SIZE);
+}
+
+/*******************************************************************************
+ *
+ * FUNCTION:    acpi_tb_print_table_header
+ *
+ * PARAMETERS:  address             - Table physical address
+ *              header              - Table header
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Print an ACPI table header. Special cases for FACS and RSDP.
+ *
+ ******************************************************************************/
+
+void
+acpi_tb_print_table_header(acpi_physical_address address,
+			   struct acpi_table_header *header)
+{
+	struct acpi_table_header local_header;
+
+	/*
+	 * The reason that the Address is cast to a void pointer is so that we
+	 * can use %p which will work properly on both 32-bit and 64-bit hosts.
+	 */
+	if (ACPI_COMPARE_NAME(header->signature, ACPI_SIG_FACS)) {
+
+		/* FACS only has signature and length fields */
+
+		ACPI_INFO((AE_INFO, "%4.4s %p %05X",
+			   header->signature, ACPI_CAST_PTR(void, address),
+			   header->length));
+	} else if (ACPI_COMPARE_NAME(header->signature, ACPI_SIG_RSDP)) {
+
+		/* RSDP has no common fields */
+
+		ACPI_MEMCPY(local_header.oem_id,
+			    ACPI_CAST_PTR(struct acpi_table_rsdp,
+					  header)->oem_id, ACPI_OEM_ID_SIZE);
+		acpi_tb_fix_string(local_header.oem_id, ACPI_OEM_ID_SIZE);
+
+		ACPI_INFO((AE_INFO, "RSDP %p %05X (v%.2d %6.6s)",
+			   ACPI_CAST_PTR(void, address),
+			   (ACPI_CAST_PTR(struct acpi_table_rsdp, header)->
+			    revision >
+			    0) ? ACPI_CAST_PTR(struct acpi_table_rsdp,
+					       header)->length : 20,
+			   ACPI_CAST_PTR(struct acpi_table_rsdp,
+					 header)->revision,
+			   local_header.oem_id));
+	} else {
+		/* Standard ACPI table with full common header */
+
+		acpi_tb_cleanup_table_header(&local_header, header);
+
+		ACPI_INFO((AE_INFO,
+			   "%4.4s %p %05X (v%.2d %6.6s %8.8s %08X %4.4s %08X)",
+			   local_header.signature, ACPI_CAST_PTR(void, address),
+			   local_header.length, local_header.revision,
+			   local_header.oem_id, local_header.oem_table_id,
+			   local_header.oem_revision,
+			   local_header.asl_compiler_id,
+			   local_header.asl_compiler_revision));
+	}
+}
+
+/*******************************************************************************
+ *
+ * FUNCTION:    acpi_tb_validate_checksum
+ *
+ * PARAMETERS:  table               - ACPI table to verify
+ *              length              - Length of entire table
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Verifies that the table checksums to zero. Optionally returns
+ *              exception on bad checksum.
+ *
+ ******************************************************************************/
+
+acpi_status acpi_tb_verify_checksum(struct acpi_table_header *table, u32 length)
+{
+	u8 checksum;
+
+	/* Compute the checksum on the table */
+
+	checksum = acpi_tb_checksum(ACPI_CAST_PTR(u8, table), length);
+
+	/* Checksum ok? (should be zero) */
+
+	if (checksum) {
+		ACPI_BIOS_WARNING((AE_INFO,
+				   "Incorrect checksum in table [%4.4s] - 0x%2.2X, "
+				   "should be 0x%2.2X",
+				   table->signature, table->checksum,
+				   (u8)(table->checksum - checksum)));
+
+#if (ACPI_CHECKSUM_ABORT)
+		return (AE_BAD_CHECKSUM);
+#endif
+	}
+
+	return (AE_OK);
+}
+
+/*******************************************************************************
+ *
+ * FUNCTION:    acpi_tb_checksum
+ *
+ * PARAMETERS:  buffer          - Pointer to memory region to be checked
+ *              length          - Length of this memory region
+ *
+ * RETURN:      Checksum (u8)
+ *
+ * DESCRIPTION: Calculates circular checksum of memory region.
+ *
+ ******************************************************************************/
+
+u8 acpi_tb_checksum(u8 *buffer, u32 length)
+{
+	u8 sum = 0;
+	u8 *end = buffer + length;
+
+	while (buffer < end) {
+		sum = (u8)(sum + *(buffer++));
+	}
+
+	return (sum);
+}
diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c
index ce3d5db..bffdfc7 100644
--- a/drivers/acpi/acpica/tbutils.c
+++ b/drivers/acpi/acpica/tbutils.c
@@ -1,6 +1,6 @@
 /******************************************************************************
  *
- * Module Name: tbutils   - table utilities
+ * Module Name: tbutils - ACPI Table utilities
  *
  *****************************************************************************/
 
@@ -49,12 +49,6 @@
 ACPI_MODULE_NAME("tbutils")
 
 /* Local prototypes */
-static void acpi_tb_fix_string(char *string, acpi_size length);
-
-static void
-acpi_tb_cleanup_table_header(struct acpi_table_header *out_header,
-			     struct acpi_table_header *header);
-
 static acpi_physical_address
 acpi_tb_get_root_table_entry(u8 *table_entry, u32 table_entry_size);
 
@@ -176,189 +170,6 @@ u8 acpi_tb_tables_loaded(void)
 
 /*******************************************************************************
  *
- * FUNCTION:    acpi_tb_fix_string
- *
- * PARAMETERS:  string              - String to be repaired
- *              length              - Maximum length
- *
- * RETURN:      None
- *
- * DESCRIPTION: Replace every non-printable or non-ascii byte in the string
- *              with a question mark '?'.
- *
- ******************************************************************************/
-
-static void acpi_tb_fix_string(char *string, acpi_size length)
-{
-
-	while (length && *string) {
-		if (!ACPI_IS_PRINT(*string)) {
-			*string = '?';
-		}
-		string++;
-		length--;
-	}
-}
-
-/*******************************************************************************
- *
- * FUNCTION:    acpi_tb_cleanup_table_header
- *
- * PARAMETERS:  out_header          - Where the cleaned header is returned
- *              header              - Input ACPI table header
- *
- * RETURN:      Returns the cleaned header in out_header
- *
- * DESCRIPTION: Copy the table header and ensure that all "string" fields in
- *              the header consist of printable characters.
- *
- ******************************************************************************/
-
-static void
-acpi_tb_cleanup_table_header(struct acpi_table_header *out_header,
-			     struct acpi_table_header *header)
-{
-
-	ACPI_MEMCPY(out_header, header, sizeof(struct acpi_table_header));
-
-	acpi_tb_fix_string(out_header->signature, ACPI_NAME_SIZE);
-	acpi_tb_fix_string(out_header->oem_id, ACPI_OEM_ID_SIZE);
-	acpi_tb_fix_string(out_header->oem_table_id, ACPI_OEM_TABLE_ID_SIZE);
-	acpi_tb_fix_string(out_header->asl_compiler_id, ACPI_NAME_SIZE);
-}
-
-/*******************************************************************************
- *
- * FUNCTION:    acpi_tb_print_table_header
- *
- * PARAMETERS:  address             - Table physical address
- *              header              - Table header
- *
- * RETURN:      None
- *
- * DESCRIPTION: Print an ACPI table header. Special cases for FACS and RSDP.
- *
- ******************************************************************************/
-
-void
-acpi_tb_print_table_header(acpi_physical_address address,
-			   struct acpi_table_header *header)
-{
-	struct acpi_table_header local_header;
-
-	/*
-	 * The reason that the Address is cast to a void pointer is so that we
-	 * can use %p which will work properly on both 32-bit and 64-bit hosts.
-	 */
-	if (ACPI_COMPARE_NAME(header->signature, ACPI_SIG_FACS)) {
-
-		/* FACS only has signature and length fields */
-
-		ACPI_INFO((AE_INFO, "%4.4s %p %05X",
-			   header->signature, ACPI_CAST_PTR(void, address),
-			   header->length));
-	} else if (ACPI_COMPARE_NAME(header->signature, ACPI_SIG_RSDP)) {
-
-		/* RSDP has no common fields */
-
-		ACPI_MEMCPY(local_header.oem_id,
-			    ACPI_CAST_PTR(struct acpi_table_rsdp,
-					  header)->oem_id, ACPI_OEM_ID_SIZE);
-		acpi_tb_fix_string(local_header.oem_id, ACPI_OEM_ID_SIZE);
-
-		ACPI_INFO((AE_INFO, "RSDP %p %05X (v%.2d %6.6s)",
-			   ACPI_CAST_PTR (void, address),
-			   (ACPI_CAST_PTR(struct acpi_table_rsdp, header)->
-			    revision >
-			    0) ? ACPI_CAST_PTR(struct acpi_table_rsdp,
-					       header)->length : 20,
-			   ACPI_CAST_PTR(struct acpi_table_rsdp,
-					 header)->revision,
-			   local_header.oem_id));
-	} else {
-		/* Standard ACPI table with full common header */
-
-		acpi_tb_cleanup_table_header(&local_header, header);
-
-		ACPI_INFO((AE_INFO,
-			   "%4.4s %p %05X (v%.2d %6.6s %8.8s %08X %4.4s %08X)",
-			   local_header.signature, ACPI_CAST_PTR(void, address),
-			   local_header.length, local_header.revision,
-			   local_header.oem_id, local_header.oem_table_id,
-			   local_header.oem_revision,
-			   local_header.asl_compiler_id,
-			   local_header.asl_compiler_revision));
-
-	}
-}
-
-/*******************************************************************************
- *
- * FUNCTION:    acpi_tb_validate_checksum
- *
- * PARAMETERS:  table               - ACPI table to verify
- *              length              - Length of entire table
- *
- * RETURN:      Status
- *
- * DESCRIPTION: Verifies that the table checksums to zero. Optionally returns
- *              exception on bad checksum.
- *
- ******************************************************************************/
-
-acpi_status acpi_tb_verify_checksum(struct acpi_table_header *table, u32 length)
-{
-	u8 checksum;
-
-	/* Compute the checksum on the table */
-
-	checksum = acpi_tb_checksum(ACPI_CAST_PTR(u8, table), length);
-
-	/* Checksum ok? (should be zero) */
-
-	if (checksum) {
-		ACPI_BIOS_WARNING((AE_INFO,
-				   "Incorrect checksum in table [%4.4s] - 0x%2.2X, "
-				   "should be 0x%2.2X",
-				   table->signature, table->checksum,
-				   (u8)(table->checksum - checksum)));
-
-#if (ACPI_CHECKSUM_ABORT)
-
-		return (AE_BAD_CHECKSUM);
-#endif
-	}
-
-	return (AE_OK);
-}
-
-/*******************************************************************************
- *
- * FUNCTION:    acpi_tb_checksum
- *
- * PARAMETERS:  buffer          - Pointer to memory region to be checked
- *              length          - Length of this memory region
- *
- * RETURN:      Checksum (u8)
- *
- * DESCRIPTION: Calculates circular checksum of memory region.
- *
- ******************************************************************************/
-
-u8 acpi_tb_checksum(u8 *buffer, u32 length)
-{
-	u8 sum = 0;
-	u8 *end = buffer + length;
-
-	while (buffer < end) {
-		sum = (u8) (sum + *(buffer++));
-	}
-
-	return (sum);
-}
-
-/*******************************************************************************
- *
  * FUNCTION:    acpi_tb_check_dsdt_header
  *
  * PARAMETERS:  None
-- 
1.7.10


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

* [PATCH 06/16] ACPICA: Do not use extended sleep registers unless HW-reduced bit is set
  2013-06-08  0:57 [PATCH 00/16] ACPICA: 20130517 release Lv Zheng
                   ` (4 preceding siblings ...)
  2013-06-08  0:59 ` [PATCH 05/16] ACPICA: Split table print utilities to a new a separate file Lv Zheng
@ 2013-06-08  0:59 ` Lv Zheng
  2013-06-12 17:11   ` Len Brown
  2013-06-08  0:59 ` [PATCH 07/16] ACPICA: New: Portable acpidump utility (get system ACPI tables) Lv Zheng
                   ` (11 subsequent siblings)
  17 siblings, 1 reply; 77+ messages in thread
From: Lv Zheng @ 2013-06-08  0:59 UTC (permalink / raw)
  To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi

Previous implementation incorrectly used the ACPI 5.0 extended
sleep registers if they were simply populated. This caused
problems on some non-HW-reduced machines. As per the ACPI spec,
they should only be used if the HW-reduced bit is set.  Lv Zheng,
ACPICA BZ 1020.

Buglink: https://bugzilla.kernel.org/show_bug.cgi?id=54181
Buglink: https://bugs.acpica.org/show_bug.cgi?id=1020
Reported-by: Daniel Rowe <bart@fathom13.com>
Originated-by: Brint E. Kriebel <kernel@bekit.net>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
 drivers/acpi/acpica/hwxfsleep.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/acpi/acpica/hwxfsleep.c b/drivers/acpi/acpica/hwxfsleep.c
index 111849c..f2e669d 100644
--- a/drivers/acpi/acpica/hwxfsleep.c
+++ b/drivers/acpi/acpica/hwxfsleep.c
@@ -240,12 +240,14 @@ static acpi_status acpi_hw_sleep_dispatch(u8 sleep_state, u32 function_id)
 	    &acpi_sleep_dispatch[function_id];
 
 #if (!ACPI_REDUCED_HARDWARE)
-
 	/*
 	 * If the Hardware Reduced flag is set (from the FADT), we must
-	 * use the extended sleep registers
+	 * use the extended sleep registers (FADT). Note: As per the ACPI
+	 * specification, these extended registers are to be used for HW-reduced
+	 * platforms only. They are not general-purpose replacements for the
+	 * legacy PM register sleep support.
 	 */
-	if (acpi_gbl_reduced_hardware || acpi_gbl_FADT.sleep_control.address) {
+	if (acpi_gbl_reduced_hardware) {
 		status = sleep_functions->extended_function(sleep_state);
 	} else {
 		/* Legacy sleep */
-- 
1.7.10


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

* [PATCH 07/16] ACPICA: New: Portable acpidump utility (get system ACPI tables)
  2013-06-08  0:57 [PATCH 00/16] ACPICA: 20130517 release Lv Zheng
                   ` (5 preceding siblings ...)
  2013-06-08  0:59 ` [PATCH 06/16] ACPICA: Do not use extended sleep registers unless HW-reduced bit is set Lv Zheng
@ 2013-06-08  0:59 ` Lv Zheng
  2013-06-12 17:07   ` Len Brown
  2013-06-08  0:59 ` [PATCH 08/16] ACPICA: Update interface to AcpiUtValidAcpiName Lv Zheng
                   ` (10 subsequent siblings)
  17 siblings, 1 reply; 77+ messages in thread
From: Lv Zheng @ 2013-06-08  0:59 UTC (permalink / raw)
  To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi

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

This utility dumps the system ACPI tables in an ascii format
suitable for extraction via the acpixtract utility.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
 include/acpi/acpiosxf.h       |   18 ++++++++++++++++++
 include/acpi/actypes.h        |    8 ++++++++
 include/acpi/platform/acenv.h |    5 +++--
 3 files changed, 29 insertions(+), 2 deletions(-)

diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h
index 64b8c76..315dd62 100644
--- a/include/acpi/acpiosxf.h
+++ b/include/acpi/acpiosxf.h
@@ -262,6 +262,24 @@ u32 acpi_os_get_line(char *buffer);
 #endif
 
 /*
+ * Obtain ACPI table(s)
+ */
+acpi_status
+acpi_os_get_table_by_name(char *signature,
+			  u32 instance,
+			  struct acpi_table_header **table,
+			  acpi_physical_address * address);
+
+acpi_status
+acpi_os_get_table_by_index(u32 index,
+			   struct acpi_table_header **table,
+			   acpi_physical_address * address);
+
+acpi_status
+acpi_os_get_table_by_address(acpi_physical_address address,
+			     struct acpi_table_header **table);
+
+/*
  * Directory manipulation
  */
 void *acpi_os_open_directory(char *pathname,
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index a64adcc..fa50b1f 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -306,6 +306,14 @@ typedef u32 acpi_physical_address;
 #define ACPI_EXPORT_SYMBOL(symbol)
 #endif
 
+/*
+ * Compiler/Clibrary-dependent debug initialization. Used for ACPICA
+ * utilities only.
+ */
+#ifndef ACPI_DEBUG_INITIALIZE
+#define ACPI_DEBUG_INITIALIZE()
+#endif
+
 /******************************************************************************
  *
  * ACPI Specification constants (Do not change unless the specification changes)
diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h
index ef04b36..2c2a0a8 100644
--- a/include/acpi/platform/acenv.h
+++ b/include/acpi/platform/acenv.h
@@ -96,10 +96,11 @@
 #endif
 
 /*
- * acpi_bin/acpi_help/acpi_src configuration. All single threaded, with
- * no debug output.
+ * acpi_bin/acpi_dump/acpi_src/acpi_xtract configuration. All single
+ * threaded, with no debug output.
  */
 #if (defined ACPI_BIN_APP)   || \
+	(defined ACPI_DUMP_APP)  || \
 	(defined ACPI_SRC_APP)   || \
 	(defined ACPI_XTRACT_APP)
 #define ACPI_APPLICATION
-- 
1.7.10


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

* [PATCH 08/16] ACPICA: Update interface to AcpiUtValidAcpiName
  2013-06-08  0:57 [PATCH 00/16] ACPICA: 20130517 release Lv Zheng
                   ` (6 preceding siblings ...)
  2013-06-08  0:59 ` [PATCH 07/16] ACPICA: New: Portable acpidump utility (get system ACPI tables) Lv Zheng
@ 2013-06-08  0:59 ` Lv Zheng
  2013-06-12 17:15   ` Len Brown
  2013-06-08  0:59 ` [PATCH 09/16] ACPICA: ACPICA Termination: Delete global lock pending lock Lv Zheng
                   ` (9 subsequent siblings)
  17 siblings, 1 reply; 77+ messages in thread
From: Lv Zheng @ 2013-06-08  0:59 UTC (permalink / raw)
  To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi

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

Clean up the interface by making the input argument a char *
string instead of a UINT32 name. This is easier to use for all
callers and eliminates casting to *(UINT32*)

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
 drivers/acpi/acpica/acutils.h  |    2 +-
 drivers/acpi/acpica/tbinstal.c |    3 +--
 drivers/acpi/acpica/utstring.c |    8 ++++----
 3 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/acpi/acpica/acutils.h b/drivers/acpi/acpica/acutils.h
index d552036..3c76ede 100644
--- a/drivers/acpi/acpica/acutils.h
+++ b/drivers/acpi/acpica/acutils.h
@@ -620,7 +620,7 @@ void acpi_ut_print_string(char *string, u8 max_length);
 
 void ut_convert_backslashes(char *pathname);
 
-u8 acpi_ut_valid_acpi_name(u32 name);
+u8 acpi_ut_valid_acpi_name(char *name);
 
 u8 acpi_ut_valid_acpi_char(char character, u32 position);
 
diff --git a/drivers/acpi/acpica/tbinstal.c b/drivers/acpi/acpica/tbinstal.c
index a04e54d..42a13c0 100644
--- a/drivers/acpi/acpica/tbinstal.c
+++ b/drivers/acpi/acpica/tbinstal.c
@@ -141,8 +141,7 @@ acpi_tb_add_table(struct acpi_table_desc *table_desc, u32 *table_index)
 		ACPI_BIOS_ERROR((AE_INFO,
 				 "Table has invalid signature [%4.4s] (0x%8.8X), "
 				 "must be SSDT or OEMx",
-				 acpi_ut_valid_acpi_name(*(u32 *)table_desc->
-							 pointer->
+				 acpi_ut_valid_acpi_name(table_desc->pointer->
 							 signature) ?
 				 table_desc->pointer->signature : "????",
 				 *(u32 *)table_desc->pointer->signature));
diff --git a/drivers/acpi/acpica/utstring.c b/drivers/acpi/acpica/utstring.c
index 31a06a1..c53759b 100644
--- a/drivers/acpi/acpica/utstring.c
+++ b/drivers/acpi/acpica/utstring.c
@@ -462,7 +462,8 @@ u8 acpi_ut_valid_acpi_char(char character, u32 position)
  *
  * FUNCTION:    acpi_ut_valid_acpi_name
  *
- * PARAMETERS:  name            - The name to be examined
+ * PARAMETERS:  name            - The name to be examined. Does not have to
+ *                                be NULL terminated string.
  *
  * RETURN:      TRUE if the name is valid, FALSE otherwise
  *
@@ -473,15 +474,14 @@ u8 acpi_ut_valid_acpi_char(char character, u32 position)
  *
  ******************************************************************************/
 
-u8 acpi_ut_valid_acpi_name(u32 name)
+u8 acpi_ut_valid_acpi_name(char *name)
 {
 	u32 i;
 
 	ACPI_FUNCTION_ENTRY();
 
 	for (i = 0; i < ACPI_NAME_SIZE; i++) {
-		if (!acpi_ut_valid_acpi_char
-		    ((ACPI_CAST_PTR(char, &name))[i], i)) {
+		if (!acpi_ut_valid_acpi_char(name[i], i)) {
 			return (FALSE);
 		}
 	}
-- 
1.7.10


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

* [PATCH 09/16] ACPICA: ACPICA Termination: Delete global lock pending lock
  2013-06-08  0:57 [PATCH 00/16] ACPICA: 20130517 release Lv Zheng
                   ` (7 preceding siblings ...)
  2013-06-08  0:59 ` [PATCH 08/16] ACPICA: Update interface to AcpiUtValidAcpiName Lv Zheng
@ 2013-06-08  0:59 ` Lv Zheng
  2013-06-12 17:28   ` Len Brown
  2013-06-08  1:00 ` [PATCH 10/16] ACPICA: Fix possible memory leak in GPE init error path Lv Zheng
                   ` (8 subsequent siblings)
  17 siblings, 1 reply; 77+ messages in thread
From: Lv Zheng @ 2013-06-08  0:59 UTC (permalink / raw)
  To: Rafael J. Wysocki, Robert Moore, Len Brown
  Cc: Lv Zheng, linux-acpi, Tomasz Nowicki

From: Tomasz Nowicki <tomasz.nowicki@linaro.org>

Add deletion of this lock, used for the global lock.  ACPICA BZ
1012. Tomasz Nowicki <tomasz.nowicki@linaro.org>

Buglink: https://bugs.acpica.org/show_bug.cgi?id=1012
Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
 drivers/acpi/acpica/evglock.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/acpi/acpica/evglock.c b/drivers/acpi/acpica/evglock.c
index a621481..fdb0a76 100644
--- a/drivers/acpi/acpica/evglock.c
+++ b/drivers/acpi/acpica/evglock.c
@@ -128,6 +128,7 @@ acpi_status acpi_ev_remove_global_lock_handler(void)
 	status = acpi_remove_fixed_event_handler(ACPI_EVENT_GLOBAL,
 						 acpi_ev_global_lock_handler);
 
+	acpi_os_delete_lock(acpi_gbl_global_lock_pending_lock);
 	return_ACPI_STATUS(status);
 }
 
-- 
1.7.10


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

* [PATCH 10/16] ACPICA: Fix possible memory leak in GPE init error path
  2013-06-08  0:57 [PATCH 00/16] ACPICA: 20130517 release Lv Zheng
                   ` (8 preceding siblings ...)
  2013-06-08  0:59 ` [PATCH 09/16] ACPICA: ACPICA Termination: Delete global lock pending lock Lv Zheng
@ 2013-06-08  1:00 ` Lv Zheng
  2013-06-12 17:34   ` Len Brown
  2013-06-08  1:00 ` [PATCH 11/16] ACPICA: Clear events initialized flag upon event component termination Lv Zheng
                   ` (7 subsequent siblings)
  17 siblings, 1 reply; 77+ messages in thread
From: Lv Zheng @ 2013-06-08  1:00 UTC (permalink / raw)
  To: Rafael J. Wysocki, Robert Moore, Len Brown
  Cc: Lv Zheng, linux-acpi, Tomasz Nowicki

From: Tomasz Nowicki <tomasz.nowicki@linaro.org>

Some GPE blocks were not deleted.  ACPICA BZ 1018. Tomasz Nowicki
<tomasz.nowicki@linaro.org>

Buglink: https://bugs.acpica.org/show_bug.cgi?id=1018
Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
 drivers/acpi/acpica/evgpeblk.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/acpi/acpica/evgpeblk.c b/drivers/acpi/acpica/evgpeblk.c
index a2d688b..c1aa1ed 100644
--- a/drivers/acpi/acpica/evgpeblk.c
+++ b/drivers/acpi/acpica/evgpeblk.c
@@ -382,6 +382,8 @@ acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device,
 
 	status = acpi_ev_install_gpe_block(gpe_block, interrupt_number);
 	if (ACPI_FAILURE(status)) {
+		ACPI_FREE(gpe_block->register_info);
+		ACPI_FREE(gpe_block->event_info);
 		ACPI_FREE(gpe_block);
 		return_ACPI_STATUS(status);
 	}
-- 
1.7.10


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

* [PATCH 11/16] ACPICA: Clear events initialized flag upon event component termination
  2013-06-08  0:57 [PATCH 00/16] ACPICA: 20130517 release Lv Zheng
                   ` (9 preceding siblings ...)
  2013-06-08  1:00 ` [PATCH 10/16] ACPICA: Fix possible memory leak in GPE init error path Lv Zheng
@ 2013-06-08  1:00 ` Lv Zheng
  2013-06-12 17:47   ` Len Brown
  2013-06-08  1:00 ` [PATCH 12/16] ACPICA: Support Mac OS X in Makefile Lv Zheng
                   ` (6 subsequent siblings)
  17 siblings, 1 reply; 77+ messages in thread
From: Lv Zheng @ 2013-06-08  1:00 UTC (permalink / raw)
  To: Rafael J. Wysocki, Robert Moore, Len Brown
  Cc: Lv Zheng, linux-acpi, Tomasz Nowicki

From: Tomasz Nowicki <tomasz.nowicki@linaro.org>

Clear this flag to allow clean startup and even double termination.
ACPICA BZ 1013. Tomasz Nowicki <tomasz.nowicki@linaro.org>

Buglink: https://bugs.acpica.org/show_bug.cgi?id=1013
Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
 drivers/acpi/acpica/evmisc.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/acpi/acpica/evmisc.c b/drivers/acpi/acpica/evmisc.c
index db59fe3..1b111ef 100644
--- a/drivers/acpi/acpica/evmisc.c
+++ b/drivers/acpi/acpica/evmisc.c
@@ -276,6 +276,8 @@ void acpi_ev_terminate(void)
 			ACPI_ERROR((AE_INFO,
 				    "Could not remove Global Lock handler"));
 		}
+
+		acpi_gbl_events_initialized = FALSE;
 	}
 
 	/* Deallocate all handler objects installed within GPE info structs */
-- 
1.7.10


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

* [PATCH 12/16] ACPICA: Support Mac OS X in Makefile
  2013-06-08  0:57 [PATCH 00/16] ACPICA: 20130517 release Lv Zheng
                   ` (10 preceding siblings ...)
  2013-06-08  1:00 ` [PATCH 11/16] ACPICA: Clear events initialized flag upon event component termination Lv Zheng
@ 2013-06-08  1:00 ` Lv Zheng
  2013-06-12 17:49   ` Len Brown
  2013-06-08  1:01 ` [PATCH 13/16] ACPICA: Move _PRT repair into the standard complex repair module Lv Zheng
                   ` (5 subsequent siblings)
  17 siblings, 1 reply; 77+ messages in thread
From: Lv Zheng @ 2013-06-08  1:00 UTC (permalink / raw)
  To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi

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

* gcc and clang both works.
* make install works.
* support PREFIX and HOST.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
 include/acpi/platform/acenv.h |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h
index 2c2a0a8..974d3ef 100644
--- a/include/acpi/platform/acenv.h
+++ b/include/acpi/platform/acenv.h
@@ -148,6 +148,9 @@
 #if defined(_LINUX) || defined(__linux__)
 #include <acpi/platform/aclinux.h>
 
+#elif defined(_APPLE) || defined(__APPLE__)
+#include "acmacosx.h"
+
 #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
 #include "acfreebsd.h"
 
-- 
1.7.10


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

* [PATCH 13/16] ACPICA: Move _PRT repair into the standard complex repair module
  2013-06-08  0:57 [PATCH 00/16] ACPICA: 20130517 release Lv Zheng
                   ` (11 preceding siblings ...)
  2013-06-08  1:00 ` [PATCH 12/16] ACPICA: Support Mac OS X in Makefile Lv Zheng
@ 2013-06-08  1:01 ` Lv Zheng
  2013-06-12 17:52   ` Len Brown
  2013-06-08  1:01 ` [PATCH 14/16] ACPICA: Add several repairs for _CST predefined name Lv Zheng
                   ` (4 subsequent siblings)
  17 siblings, 1 reply; 77+ messages in thread
From: Lv Zheng @ 2013-06-08  1:01 UTC (permalink / raw)
  To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi

Moved this longstanding repair to the relatively new predefined
name repair module. ACPICA BZ 783. Lv Zheng.

Buglink: https://bugs.acpica.org/show_bug.cgi?id=783
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
 drivers/acpi/acpica/nspredef.c  |    7 ++-
 drivers/acpi/acpica/nsrepair2.c |  114 ++++++++++++++++++++++++++++++---------
 drivers/acpi/acpica/rscalc.c    |    5 +-
 drivers/acpi/acpica/rscreate.c  |   27 ----------
 4 files changed, 99 insertions(+), 54 deletions(-)

diff --git a/drivers/acpi/acpica/nspredef.c b/drivers/acpi/acpica/nspredef.c
index 600268d..8d59ac2 100644
--- a/drivers/acpi/acpica/nspredef.c
+++ b/drivers/acpi/acpica/nspredef.c
@@ -158,7 +158,12 @@ acpi_ns_check_return_value(struct acpi_namespace_node *node,
 		info->parent_package = *return_object_ptr;
 		status = acpi_ns_check_package(info, return_object_ptr);
 		if (ACPI_FAILURE(status)) {
-			goto exit;
+
+			/* We might be able to fix an operand type error (_PRT) */
+
+			if (status != AE_AML_OPERAND_TYPE) {
+				goto exit;
+			}
 		}
 	}
 
diff --git a/drivers/acpi/acpica/nsrepair2.c b/drivers/acpi/acpica/nsrepair2.c
index daac8da..aca9bdf 100644
--- a/drivers/acpi/acpica/nsrepair2.c
+++ b/drivers/acpi/acpica/nsrepair2.c
@@ -87,6 +87,10 @@ acpi_ns_repair_HID(struct acpi_evaluate_info *info,
 		   union acpi_operand_object **return_object_ptr);
 
 static acpi_status
+acpi_ns_repair_PRT(struct acpi_evaluate_info *info,
+		   union acpi_operand_object **return_object_ptr);
+
+static acpi_status
 acpi_ns_repair_PSS(struct acpi_evaluate_info *info,
 		   union acpi_operand_object **return_object_ptr);
 
@@ -121,6 +125,7 @@ acpi_ns_sort_list(union acpi_operand_object **elements,
  * _FDE: Convert Buffer of BYTEs to a Buffer of DWORDs
  * _GTM: Convert Buffer of BYTEs to a Buffer of DWORDs
  * _HID: Strings: uppercase all, remove any leading asterisk
+ * _PRT: Fix reversed source_name and source_index
  * _PSS: Sort the list descending by Power
  * _TSS: Sort the list descending by Power
  *
@@ -137,6 +142,7 @@ static const struct acpi_repair_info acpi_ns_repairable_names[] = {
 	{"_FDE", acpi_ns_repair_FDE},
 	{"_GTM", acpi_ns_repair_FDE},	/* _GTM has same repair as _FDE */
 	{"_HID", acpi_ns_repair_HID},
+	{"_PRT", acpi_ns_repair_PRT},
 	{"_PSS", acpi_ns_repair_PSS},
 	{"_TSS", acpi_ns_repair_TSS},
 	{{0, 0, 0, 0}, NULL}	/* Table terminator */
@@ -488,7 +494,7 @@ acpi_ns_repair_HID(struct acpi_evaluate_info *info,
 
 /******************************************************************************
  *
- * FUNCTION:    acpi_ns_repair_TSS
+ * FUNCTION:    acpi_ns_repair_PRT
  *
  * PARAMETERS:  info                - Method execution information block
  *              return_object_ptr   - Pointer to the object returned from the
@@ -496,38 +502,54 @@ acpi_ns_repair_HID(struct acpi_evaluate_info *info,
  *
  * RETURN:      Status. AE_OK if object is OK or was repaired successfully
  *
- * DESCRIPTION: Repair for the _TSS object. If necessary, sort the object list
- *              descending by the power dissipation values.
+ * DESCRIPTION: Repair for the _PRT object. If necessary, fix reversed
+ *              source_name and source_index field, a common BIOS bug.
  *
  *****************************************************************************/
 
 static acpi_status
-acpi_ns_repair_TSS(struct acpi_evaluate_info *info,
+acpi_ns_repair_PRT(struct acpi_evaluate_info *info,
 		   union acpi_operand_object **return_object_ptr)
 {
-	union acpi_operand_object *return_object = *return_object_ptr;
-	acpi_status status;
-	struct acpi_namespace_node *node;
+	union acpi_operand_object *package_object = *return_object_ptr;
+	union acpi_operand_object **top_object_list;
+	union acpi_operand_object **sub_object_list;
+	union acpi_operand_object *obj_desc;
+	u32 element_count;
+	u32 index;
 
-	/*
-	 * We can only sort the _TSS return package if there is no _PSS in the
-	 * same scope. This is because if _PSS is present, the ACPI specification
-	 * dictates that the _TSS Power Dissipation field is to be ignored, and
-	 * therefore some BIOSs leave garbage values in the _TSS Power field(s).
-	 * In this case, it is best to just return the _TSS package as-is.
-	 * (May, 2011)
-	 */
-	status = acpi_ns_get_node(info->node, "^_PSS",
-				  ACPI_NS_NO_UPSEARCH, &node);
-	if (ACPI_SUCCESS(status)) {
-		return (AE_OK);
-	}
+	/* Each element in the _PRT package is a subpackage */
 
-	status = acpi_ns_check_sorted_list(info, return_object, 5, 1,
-					   ACPI_SORT_DESCENDING,
-					   "PowerDissipation");
+	top_object_list = package_object->package.elements;
+	element_count = package_object->package.count;
 
-	return (status);
+	for (index = 0; index < element_count; index++) {
+		sub_object_list = (*top_object_list)->package.elements;
+
+		/*
+		 * If the BIOS has erroneously reversed the _PRT source_name (index 2)
+		 * and the source_index (index 3), fix it. _PRT is important enough to
+		 * workaround this BIOS error. This also provides compatibility with
+		 * other ACPI implementations.
+		 */
+		obj_desc = sub_object_list[3];
+		if (!obj_desc || (obj_desc->common.type != ACPI_TYPE_INTEGER)) {
+			sub_object_list[3] = sub_object_list[2];
+			sub_object_list[2] = obj_desc;
+			info->return_flags |= ACPI_OBJECT_REPAIRED;
+
+			ACPI_WARN_PREDEFINED((AE_INFO, info->full_pathname,
+					      info->node_flags,
+					      "PRT[%X]: Fixed reversed SourceName and SourceIndex",
+					      index));
+		}
+
+		/* Point to the next union acpi_operand_object in the top level package */
+
+		top_object_list++;
+	}
+
+	return (AE_OK);
 }
 
 /******************************************************************************
@@ -601,6 +623,50 @@ acpi_ns_repair_PSS(struct acpi_evaluate_info *info,
 
 /******************************************************************************
  *
+ * FUNCTION:    acpi_ns_repair_TSS
+ *
+ * PARAMETERS:  info                - Method execution information block
+ *              return_object_ptr   - Pointer to the object returned from the
+ *                                    evaluation of a method or object
+ *
+ * RETURN:      Status. AE_OK if object is OK or was repaired successfully
+ *
+ * DESCRIPTION: Repair for the _TSS object. If necessary, sort the object list
+ *              descending by the power dissipation values.
+ *
+ *****************************************************************************/
+
+static acpi_status
+acpi_ns_repair_TSS(struct acpi_evaluate_info *info,
+		   union acpi_operand_object **return_object_ptr)
+{
+	union acpi_operand_object *return_object = *return_object_ptr;
+	acpi_status status;
+	struct acpi_namespace_node *node;
+
+	/*
+	 * We can only sort the _TSS return package if there is no _PSS in the
+	 * same scope. This is because if _PSS is present, the ACPI specification
+	 * dictates that the _TSS Power Dissipation field is to be ignored, and
+	 * therefore some BIOSs leave garbage values in the _TSS Power field(s).
+	 * In this case, it is best to just return the _TSS package as-is.
+	 * (May, 2011)
+	 */
+	status = acpi_ns_get_node(info->node, "^_PSS",
+				  ACPI_NS_NO_UPSEARCH, &node);
+	if (ACPI_SUCCESS(status)) {
+		return (AE_OK);
+	}
+
+	status = acpi_ns_check_sorted_list(info, return_object, 5, 1,
+					   ACPI_SORT_DESCENDING,
+					   "PowerDissipation");
+
+	return (status);
+}
+
+/******************************************************************************
+ *
  * FUNCTION:    acpi_ns_check_sorted_list
  *
  * PARAMETERS:  info                - Method execution information block
diff --git a/drivers/acpi/acpica/rscalc.c b/drivers/acpi/acpica/rscalc.c
index 608ebb5..b62a0f4 100644
--- a/drivers/acpi/acpica/rscalc.c
+++ b/drivers/acpi/acpica/rscalc.c
@@ -652,8 +652,9 @@ acpi_rs_get_pci_routing_table_length(union acpi_operand_object *package_object,
 
 		name_found = FALSE;
 
-		for (table_index = 0; table_index < 4 && !name_found;
-		     table_index++) {
+		for (table_index = 0;
+		     table_index < package_element->package.count
+		     && !name_found; table_index++) {
 			if (*sub_object_list &&	/* Null object allowed */
 			    ((ACPI_TYPE_STRING ==
 			      (*sub_object_list)->common.type) ||
diff --git a/drivers/acpi/acpica/rscreate.c b/drivers/acpi/acpica/rscreate.c
index f8b55b4..65f3e1c 100644
--- a/drivers/acpi/acpica/rscreate.c
+++ b/drivers/acpi/acpica/rscreate.c
@@ -273,17 +273,6 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,
 		 */
 		user_prt->length = (sizeof(struct acpi_pci_routing_table) - 4);
 
-		/* Each element of the top-level package must also be a package */
-
-		if ((*top_object_list)->common.type != ACPI_TYPE_PACKAGE) {
-			ACPI_ERROR((AE_INFO,
-				    "(PRT[%u]) Need sub-package, found %s",
-				    index,
-				    acpi_ut_get_object_type_name
-				    (*top_object_list)));
-			return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
-		}
-
 		/* Each sub-package must be of length 4 */
 
 		if ((*top_object_list)->package.count != 4) {
@@ -327,22 +316,6 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,
 		user_prt->pin = (u32) obj_desc->integer.value;
 
 		/*
-		 * If the BIOS has erroneously reversed the _PRT source_name (index 2)
-		 * and the source_index (index 3), fix it. _PRT is important enough to
-		 * workaround this BIOS error. This also provides compatibility with
-		 * other ACPI implementations.
-		 */
-		obj_desc = sub_object_list[3];
-		if (!obj_desc || (obj_desc->common.type != ACPI_TYPE_INTEGER)) {
-			sub_object_list[3] = sub_object_list[2];
-			sub_object_list[2] = obj_desc;
-
-			ACPI_WARNING((AE_INFO,
-				      "(PRT[%X].Source) SourceName and SourceIndex are reversed, fixed",
-				      index));
-		}
-
-		/*
 		 * 3) Third subobject: Dereference the PRT.source_name
 		 * The name may be unresolved (slack mode), so allow a null object
 		 */
-- 
1.7.10


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

* [PATCH 14/16] ACPICA: Add several repairs for _CST predefined name
  2013-06-08  0:57 [PATCH 00/16] ACPICA: 20130517 release Lv Zheng
                   ` (12 preceding siblings ...)
  2013-06-08  1:01 ` [PATCH 13/16] ACPICA: Move _PRT repair into the standard complex repair module Lv Zheng
@ 2013-06-08  1:01 ` Lv Zheng
  2013-06-12 17:58   ` Len Brown
  2013-06-08  1:01 ` [PATCH 15/16] ACPICA: _CST repair: Handle null package entries Lv Zheng
                   ` (3 subsequent siblings)
  17 siblings, 1 reply; 77+ messages in thread
From: Lv Zheng @ 2013-06-08  1:01 UTC (permalink / raw)
  To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi

Sort list based on the C-state, remove invalid/zero entries.
ACPICA BZ 890. Lv Zheng.

Buglink: https://bugs.acpica.org/show_bug.cgi?id=890
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
 drivers/acpi/acpica/nspredef.c  |    5 +-
 drivers/acpi/acpica/nsrepair2.c |  170 ++++++++++++++++++++++++++++++++++++---
 2 files changed, 163 insertions(+), 12 deletions(-)

diff --git a/drivers/acpi/acpica/nspredef.c b/drivers/acpi/acpica/nspredef.c
index 8d59ac2..24b71a0 100644
--- a/drivers/acpi/acpica/nspredef.c
+++ b/drivers/acpi/acpica/nspredef.c
@@ -159,9 +159,10 @@ acpi_ns_check_return_value(struct acpi_namespace_node *node,
 		status = acpi_ns_check_package(info, return_object_ptr);
 		if (ACPI_FAILURE(status)) {
 
-			/* We might be able to fix an operand type error (_PRT) */
+			/* We might be able to fix some errors */
 
-			if (status != AE_AML_OPERAND_TYPE) {
+			if ((status != AE_AML_OPERAND_TYPE) &&
+			    (status != AE_AML_OPERAND_VALUE)) {
 				goto exit;
 			}
 		}
diff --git a/drivers/acpi/acpica/nsrepair2.c b/drivers/acpi/acpica/nsrepair2.c
index aca9bdf..029816e 100644
--- a/drivers/acpi/acpica/nsrepair2.c
+++ b/drivers/acpi/acpica/nsrepair2.c
@@ -79,6 +79,10 @@ acpi_ns_repair_CID(struct acpi_evaluate_info *info,
 		   union acpi_operand_object **return_object_ptr);
 
 static acpi_status
+acpi_ns_repair_CST(struct acpi_evaluate_info *info,
+		   union acpi_operand_object **return_object_ptr);
+
+static acpi_status
 acpi_ns_repair_FDE(struct acpi_evaluate_info *info,
 		   union acpi_operand_object **return_object_ptr);
 
@@ -101,19 +105,23 @@ acpi_ns_repair_TSS(struct acpi_evaluate_info *info,
 static acpi_status
 acpi_ns_check_sorted_list(struct acpi_evaluate_info *info,
 			  union acpi_operand_object *return_object,
+			  u32 start_index,
 			  u32 expected_count,
 			  u32 sort_index,
 			  u8 sort_direction, char *sort_key_name);
 
-static void
-acpi_ns_sort_list(union acpi_operand_object **elements,
-		  u32 count, u32 index, u8 sort_direction);
-
 /* Values for sort_direction above */
 
 #define ACPI_SORT_ASCENDING     0
 #define ACPI_SORT_DESCENDING    1
 
+static void
+acpi_ns_remove_element(union acpi_operand_object *obj_desc, u32 index);
+
+static void
+acpi_ns_sort_list(union acpi_operand_object **elements,
+		  u32 count, u32 index, u8 sort_direction);
+
 /*
  * This table contains the names of the predefined methods for which we can
  * perform more complex repairs.
@@ -122,6 +130,7 @@ acpi_ns_sort_list(union acpi_operand_object **elements,
  *
  * _ALR: Sort the list ascending by ambient_illuminance
  * _CID: Strings: uppercase all, remove any leading asterisk
+ * _CST: Sort the list ascending by C state type
  * _FDE: Convert Buffer of BYTEs to a Buffer of DWORDs
  * _GTM: Convert Buffer of BYTEs to a Buffer of DWORDs
  * _HID: Strings: uppercase all, remove any leading asterisk
@@ -139,6 +148,7 @@ acpi_ns_sort_list(union acpi_operand_object **elements,
 static const struct acpi_repair_info acpi_ns_repairable_names[] = {
 	{"_ALR", acpi_ns_repair_ALR},
 	{"_CID", acpi_ns_repair_CID},
+	{"_CST", acpi_ns_repair_CST},
 	{"_FDE", acpi_ns_repair_FDE},
 	{"_GTM", acpi_ns_repair_FDE},	/* _GTM has same repair as _FDE */
 	{"_HID", acpi_ns_repair_HID},
@@ -243,7 +253,7 @@ acpi_ns_repair_ALR(struct acpi_evaluate_info *info,
 	union acpi_operand_object *return_object = *return_object_ptr;
 	acpi_status status;
 
-	status = acpi_ns_check_sorted_list(info, return_object, 2, 1,
+	status = acpi_ns_check_sorted_list(info, return_object, 0, 2, 1,
 					   ACPI_SORT_ASCENDING,
 					   "AmbientIlluminance");
 
@@ -411,6 +421,92 @@ acpi_ns_repair_CID(struct acpi_evaluate_info *info,
 
 /******************************************************************************
  *
+ * FUNCTION:    acpi_ns_repair_CST
+ *
+ * PARAMETERS:  info                - Method execution information block
+ *              return_object_ptr   - Pointer to the object returned from the
+ *                                    evaluation of a method or object
+ *
+ * RETURN:      Status. AE_OK if object is OK or was repaired successfully
+ *
+ * DESCRIPTION: Repair for the _CST object:
+ *              1. Sort the list ascending by C state type
+ *              2. Ensure type cannot be zero
+ *              3. A sub-package count of zero means _CST is meaningless
+ *              4. Count must match the number of C state sub-packages
+ *
+ *****************************************************************************/
+
+static acpi_status
+acpi_ns_repair_CST(struct acpi_evaluate_info *info,
+		   union acpi_operand_object **return_object_ptr)
+{
+	union acpi_operand_object *return_object = *return_object_ptr;
+	union acpi_operand_object **outer_elements;
+	u32 outer_element_count;
+	union acpi_operand_object *obj_desc;
+	acpi_status status;
+	u8 removing;
+	u32 i;
+
+	ACPI_FUNCTION_NAME(ns_repair_CST);
+
+	/*
+	 * Entries (subpackages) in the _CST Package must be sorted by the
+	 * C-state type, in ascending order.
+	 */
+	status = acpi_ns_check_sorted_list(info, return_object, 1, 4, 1,
+					   ACPI_SORT_ASCENDING, "C-State Type");
+	if (ACPI_FAILURE(status)) {
+		return (status);
+	}
+
+	/*
+	 * We now know the list is correctly sorted by C-state type. Check if
+	 * the C-state type values are proportional.
+	 */
+	outer_element_count = return_object->package.count - 1;
+	i = 0;
+	while (i < outer_element_count) {
+		outer_elements = &return_object->package.elements[i + 1];
+		removing = FALSE;
+
+		if ((*outer_elements)->package.count == 0) {
+			ACPI_WARN_PREDEFINED((AE_INFO, info->full_pathname,
+					      info->node_flags,
+					      "SubPackage[%u] - removing entry due to zero count",
+					      i));
+			removing = TRUE;
+			goto remove_element;
+		}
+
+		obj_desc = (*outer_elements)->package.elements[1];	/* Index1 = Type */
+		if ((u32)obj_desc->integer.value == 0) {
+			ACPI_WARN_PREDEFINED((AE_INFO, info->full_pathname,
+					      info->node_flags,
+					      "SubPackage[%u] - removing entry due to invalid Type(0)",
+					      i));
+			removing = TRUE;
+		}
+
+	      remove_element:
+		if (removing) {
+			acpi_ns_remove_element(return_object, i + 1);
+			outer_element_count--;
+		} else {
+			i++;
+		}
+	}
+
+	/* Update top-level package count, Type "Integer" checked elsewhere */
+
+	obj_desc = return_object->package.elements[0];
+	obj_desc->integer.value = outer_element_count;
+	return (AE_OK);
+}
+
+/******************************************************************************
+ *
  * FUNCTION:    acpi_ns_repair_HID
  *
  * PARAMETERS:  info                - Method execution information block
@@ -588,7 +684,7 @@ acpi_ns_repair_PSS(struct acpi_evaluate_info *info,
 	 * incorrectly sorted, sort it. We sort by cpu_frequency, since this
 	 * should be proportional to the power.
 	 */
-	status = acpi_ns_check_sorted_list(info, return_object, 6, 0,
+	status = acpi_ns_check_sorted_list(info, return_object, 0, 6, 0,
 					   ACPI_SORT_DESCENDING,
 					   "CpuFrequency");
 	if (ACPI_FAILURE(status)) {
@@ -658,7 +754,7 @@ acpi_ns_repair_TSS(struct acpi_evaluate_info *info,
 		return (AE_OK);
 	}
 
-	status = acpi_ns_check_sorted_list(info, return_object, 5, 1,
+	status = acpi_ns_check_sorted_list(info, return_object, 0, 5, 1,
 					   ACPI_SORT_DESCENDING,
 					   "PowerDissipation");
 
@@ -671,6 +767,7 @@ acpi_ns_repair_TSS(struct acpi_evaluate_info *info,
  *
  * PARAMETERS:  info                - Method execution information block
  *              return_object       - Pointer to the top-level returned object
+ *              start_index         - Index of the first sub-package
  *              expected_count      - Minimum length of each sub-package
  *              sort_index          - Sub-package entry to sort on
  *              sort_direction      - Ascending or descending
@@ -687,6 +784,7 @@ acpi_ns_repair_TSS(struct acpi_evaluate_info *info,
 static acpi_status
 acpi_ns_check_sorted_list(struct acpi_evaluate_info *info,
 			  union acpi_operand_object *return_object,
+			  u32 start_index,
 			  u32 expected_count,
 			  u32 sort_index,
 			  u8 sort_direction, char *sort_key_name)
@@ -711,12 +809,14 @@ acpi_ns_check_sorted_list(struct acpi_evaluate_info *info,
 	 * Any NULL elements should have been removed by earlier call
 	 * to acpi_ns_remove_null_elements.
 	 */
-	outer_elements = return_object->package.elements;
 	outer_element_count = return_object->package.count;
-	if (!outer_element_count) {
+	if (!outer_element_count || start_index >= outer_element_count) {
 		return (AE_AML_PACKAGE_LIMIT);
 	}
 
+	outer_elements = &return_object->package.elements[start_index];
+	outer_element_count -= start_index;
+
 	previous_value = 0;
 	if (sort_direction == ACPI_SORT_DESCENDING) {
 		previous_value = ACPI_UINT32_MAX;
@@ -753,7 +853,8 @@ acpi_ns_check_sorted_list(struct acpi_evaluate_info *info,
 		     (obj_desc->integer.value < previous_value)) ||
 		    ((sort_direction == ACPI_SORT_DESCENDING) &&
 		     (obj_desc->integer.value > previous_value))) {
-			acpi_ns_sort_list(return_object->package.elements,
+			acpi_ns_sort_list(&return_object->package.
+					  elements[start_index],
 					  outer_element_count, sort_index,
 					  sort_direction);
 
@@ -820,3 +921,52 @@ acpi_ns_sort_list(union acpi_operand_object **elements,
 		}
 	}
 }
+
+/******************************************************************************
+ *
+ * FUNCTION:    acpi_ns_remove_element
+ *
+ * PARAMETERS:  obj_desc            - Package object element list
+ *              index               - Index of element to remove
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Remove the requested element of a package and delete it.
+ *
+ *****************************************************************************/
+
+static void
+acpi_ns_remove_element(union acpi_operand_object *obj_desc, u32 index)
+{
+	union acpi_operand_object **source;
+	union acpi_operand_object **dest;
+	u32 count;
+	u32 new_count;
+	u32 i;
+
+	ACPI_FUNCTION_NAME(ns_remove_element);
+
+	count = obj_desc->package.count;
+	new_count = count - 1;
+
+	source = obj_desc->package.elements;
+	dest = source;
+
+	/* Examine all elements of the package object, remove matched index */
+
+	for (i = 0; i < count; i++) {
+		if (i == index) {
+			acpi_ut_remove_reference(*source);	/* Remove one ref for being in pkg */
+			acpi_ut_remove_reference(*source);
+		} else {
+			*dest = *source;
+			dest++;
+		}
+		source++;
+	}
+
+	/* NULL terminate list and update the package count */
+
+	*dest = NULL;
+	obj_desc->package.count = new_count;
+}
-- 
1.7.10


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

* [PATCH 15/16] ACPICA: _CST repair: Handle null package entries
  2013-06-08  0:57 [PATCH 00/16] ACPICA: 20130517 release Lv Zheng
                   ` (13 preceding siblings ...)
  2013-06-08  1:01 ` [PATCH 14/16] ACPICA: Add several repairs for _CST predefined name Lv Zheng
@ 2013-06-08  1:01 ` Lv Zheng
  2013-06-12 18:00   ` Len Brown
  2013-06-08  1:01 ` [PATCH 16/16] ACPICA: Update version to 20130517 Lv Zheng
                   ` (2 subsequent siblings)
  17 siblings, 1 reply; 77+ messages in thread
From: Lv Zheng @ 2013-06-08  1:01 UTC (permalink / raw)
  To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi

Sort package only after null/bad elements have been removed.
Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
 drivers/acpi/acpica/nsrepair2.c |   24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/acpi/acpica/nsrepair2.c b/drivers/acpi/acpica/nsrepair2.c
index 029816e..c84603e 100644
--- a/drivers/acpi/acpica/nsrepair2.c
+++ b/drivers/acpi/acpica/nsrepair2.c
@@ -452,18 +452,7 @@ acpi_ns_repair_CST(struct acpi_evaluate_info *info,
 	ACPI_FUNCTION_NAME(ns_repair_CST);
 
 	/*
-	 * Entries (subpackages) in the _CST Package must be sorted by the
-	 * C-state type, in ascending order.
-	 */
-	status = acpi_ns_check_sorted_list(info, return_object, 1, 4, 1,
-					   ACPI_SORT_ASCENDING, "C-State Type");
-	if (ACPI_FAILURE(status)) {
-		return (status);
-	}
-
-	/*
-	 * We now know the list is correctly sorted by C-state type. Check if
-	 * the C-state type values are proportional.
+	 * Check if the C-state type values are proportional.
 	 */
 	outer_element_count = return_object->package.count - 1;
 	i = 0;
@@ -502,6 +491,17 @@ acpi_ns_repair_CST(struct acpi_evaluate_info *info,
 
 	obj_desc = return_object->package.elements[0];
 	obj_desc->integer.value = outer_element_count;
+
+	/*
+	 * Entries (subpackages) in the _CST Package must be sorted by the
+	 * C-state type, in ascending order.
+	 */
+	status = acpi_ns_check_sorted_list(info, return_object, 1, 4, 1,
+					   ACPI_SORT_ASCENDING, "C-State Type");
+	if (ACPI_FAILURE(status)) {
+		return (status);
+	}
+
 	return (AE_OK);
 }
 
-- 
1.7.10


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

* [PATCH 16/16] ACPICA: Update version to 20130517
  2013-06-08  0:57 [PATCH 00/16] ACPICA: 20130517 release Lv Zheng
                   ` (14 preceding siblings ...)
  2013-06-08  1:01 ` [PATCH 15/16] ACPICA: _CST repair: Handle null package entries Lv Zheng
@ 2013-06-08  1:01 ` Lv Zheng
  2013-06-12 18:01   ` Len Brown
  2013-06-11 22:32 ` [PATCH 00/16] ACPICA: 20130517 release Rafael J. Wysocki
  2013-06-12 18:04 ` Len Brown
  17 siblings, 1 reply; 77+ messages in thread
From: Lv Zheng @ 2013-06-08  1:01 UTC (permalink / raw)
  To: Rafael J. Wysocki, Robert Moore, Len Brown; +Cc: Lv Zheng, linux-acpi

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

Version 20130517.

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 5d9bf46..1b09300 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                 0x20130418
+#define ACPI_CA_VERSION                 0x20130517
 
 #include <acpi/acconfig.h>
 #include <acpi/actypes.h>
-- 
1.7.10


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

* Re: [PATCH 00/16] ACPICA: 20130517 release
  2013-06-08  0:57 [PATCH 00/16] ACPICA: 20130517 release Lv Zheng
                   ` (15 preceding siblings ...)
  2013-06-08  1:01 ` [PATCH 16/16] ACPICA: Update version to 20130517 Lv Zheng
@ 2013-06-11 22:32 ` Rafael J. Wysocki
  2013-06-12 18:04 ` Len Brown
  17 siblings, 0 replies; 77+ messages in thread
From: Rafael J. Wysocki @ 2013-06-11 22:32 UTC (permalink / raw)
  To: Lv Zheng; +Cc: Rafael J. Wysocki, Robert Moore, Len Brown, linux-acpi

On Saturday, June 08, 2013 08:57:36 AM Lv Zheng wrote:
> The 20130517 ACPICA kernel resident system updates is linuxized based on
> the pm/linux-next branch.
> The patch set has passed a build/boot test on the following machines:
> Dell Inspiron Mini 1010 (i386)
> HP Compaq 8200 Elite SFF PC (x86-64)
> With the following kernel configuration items enabled:
>   CONFIG_ACPI_AC
>   CONFIG_ACPI_BATTERY
>   CONFIG_ACPI_NUMA
>   CONFIG_ACPI_PROCESSOR
>   CONFIG_ACPI_THERMAL
>   CONFIG_ACPI_VIDEO
>   CONFIG_CPU_FREQ
>   CONFIG_I2C_SCMI
>   CONFIG_SENSORS_ACPI_POWER
>   CONFIG_PANASONIC_LAPTOP
>   CONFIG_XO15_EBOOK
> No new divergences are introduced in this release.
> Please review.
> 
> Bob Moore (7):
>   ACPICA: Split buffer dump routines into separate file
>   ACPICA: Split internal error msg routines to a separate file
>   ACPICA: Split table print utilities to a new a separate file
>   ACPICA: New: Portable acpidump utility (get system ACPI tables)
>   ACPICA: Update interface to AcpiUtValidAcpiName
>   ACPICA: Support Mac OS X in Makefile
>   ACPICA: Update version to 20130517
> 
> Chao Guan (1):
>   ACPICA: Standardize all switch() blocks
> 
> Lv Zheng (5):
>   ACPICA: Add option to disable loading of SSDTs from the RSDT/XSDT
>   ACPICA: Do not use extended sleep registers unless HW-reduced bit is
>     set
>   ACPICA: Move _PRT repair into the standard complex repair module
>   ACPICA: Add several repairs for _CST predefined name
>   ACPICA: _CST repair: Handle null package entries
> 
> Tomasz Nowicki (3):
>   ACPICA: ACPICA Termination: Delete global lock pending lock
>   ACPICA: Fix possible memory leak in GPE init error path
>   ACPICA: Clear events initialized flag upon event component
>     termination
> 
>  drivers/acpi/acpica/Makefile    |    3 +
>  drivers/acpi/acpica/acglobal.h  |    6 +
>  drivers/acpi/acpica/acutils.h   |   44 +++++-
>  drivers/acpi/acpica/dscontrol.c |    4 +-
>  drivers/acpi/acpica/dsfield.c   |    4 +
>  drivers/acpi/acpica/dsinit.c    |    1 +
>  drivers/acpi/acpica/dsmthdat.c  |    2 +-
>  drivers/acpi/acpica/dsobject.c  |    3 +-
>  drivers/acpi/acpica/dsopcode.c  |    1 +
>  drivers/acpi/acpica/dsutils.c   |    5 +-
>  drivers/acpi/acpica/dswexec.c   |    3 +-
>  drivers/acpi/acpica/dswload.c   |    7 +-
>  drivers/acpi/acpica/dswload2.c  |    4 +
>  drivers/acpi/acpica/evglock.c   |    1 +
>  drivers/acpi/acpica/evgpe.c     |    6 +-
>  drivers/acpi/acpica/evgpeblk.c  |    2 +
>  drivers/acpi/acpica/evgpeinit.c |    3 +
>  drivers/acpi/acpica/evhandler.c |    7 +
>  drivers/acpi/acpica/evmisc.c    |    3 +
>  drivers/acpi/acpica/evrgnini.c  |    2 +
>  drivers/acpi/acpica/evxfgpe.c   |    3 +
>  drivers/acpi/acpica/evxfregn.c  |    1 +
>  drivers/acpi/acpica/exconfig.c  |    1 +
>  drivers/acpi/acpica/exconvrt.c  |   13 +-
>  drivers/acpi/acpica/excreate.c  |    3 -
>  drivers/acpi/acpica/exdebug.c   |    2 +
>  drivers/acpi/acpica/exdump.c    |    2 +
>  drivers/acpi/acpica/exfield.c   |    4 +
>  drivers/acpi/acpica/exfldio.c   |    2 -
>  drivers/acpi/acpica/exmisc.c    |   12 +-
>  drivers/acpi/acpica/exoparg1.c  |   16 +--
>  drivers/acpi/acpica/exoparg2.c  |    1 -
>  drivers/acpi/acpica/exoparg3.c  |    1 -
>  drivers/acpi/acpica/exoparg6.c  |    5 -
>  drivers/acpi/acpica/exprep.c    |    7 +
>  drivers/acpi/acpica/exregion.c  |   27 +++-
>  drivers/acpi/acpica/exresnte.c  |    1 +
>  drivers/acpi/acpica/exresolv.c  |    6 +-
>  drivers/acpi/acpica/exresop.c   |    9 +-
>  drivers/acpi/acpica/exstore.c   |    4 +-
>  drivers/acpi/acpica/exstoren.c  |    4 -
>  drivers/acpi/acpica/hwacpi.c    |    2 +-
>  drivers/acpi/acpica/hwgpe.c     |    3 +
>  drivers/acpi/acpica/hwregs.c    |    4 +-
>  drivers/acpi/acpica/hwxface.c   |    3 +
>  drivers/acpi/acpica/hwxfsleep.c |   12 +-
>  drivers/acpi/acpica/nsaccess.c  |    1 +
>  drivers/acpi/acpica/nsconvert.c |    3 +
>  drivers/acpi/acpica/nsdump.c    |   10 ++
>  drivers/acpi/acpica/nsinit.c    |    9 ++
>  drivers/acpi/acpica/nspredef.c  |   14 +-
>  drivers/acpi/acpica/nsprepkg.c  |    5 -
>  drivers/acpi/acpica/nsrepair.c  |    1 +
>  drivers/acpi/acpica/nsrepair2.c |  283 +++++++++++++++++++++++++++++++++-----
>  drivers/acpi/acpica/nsutils.c   |    3 +
>  drivers/acpi/acpica/nsxfeval.c  |    1 +
>  drivers/acpi/acpica/psargs.c    |    4 +
>  drivers/acpi/acpica/psloop.c    |    2 +-
>  drivers/acpi/acpica/psobject.c  |    1 +
>  drivers/acpi/acpica/psparse.c   |    3 +-
>  drivers/acpi/acpica/pstree.c    |    2 +
>  drivers/acpi/acpica/rscalc.c    |    7 +-
>  drivers/acpi/acpica/rscreate.c  |   27 ----
>  drivers/acpi/acpica/rsdump.c    |   10 ++
>  drivers/acpi/acpica/rsmisc.c    |    3 +-
>  drivers/acpi/acpica/rsutils.c   |    5 +
>  drivers/acpi/acpica/rsxface.c   |    1 +
>  drivers/acpi/acpica/tbinstal.c  |    7 +-
>  drivers/acpi/acpica/tbprint.c   |  237 ++++++++++++++++++++++++++++++++
>  drivers/acpi/acpica/tbutils.c   |  191 +-------------------------
>  drivers/acpi/acpica/tbxfload.c  |   25 ++--
>  drivers/acpi/acpica/utbuffer.c  |  201 +++++++++++++++++++++++++++
>  drivers/acpi/acpica/utcopy.c    |   11 +-
>  drivers/acpi/acpica/utdebug.c   |  148 +-------------------
>  drivers/acpi/acpica/utdelete.c  |    3 +-
>  drivers/acpi/acpica/uterror.c   |  289 +++++++++++++++++++++++++++++++++++++++
>  drivers/acpi/acpica/uteval.c    |    7 +-
>  drivers/acpi/acpica/utexcep.c   |    1 +
>  drivers/acpi/acpica/utids.c     |    3 +
>  drivers/acpi/acpica/utmisc.c    |    2 +
>  drivers/acpi/acpica/utobject.c  |    5 +-
>  drivers/acpi/acpica/utstring.c  |   19 ++-
>  drivers/acpi/acpica/uttrack.c   |    8 ++
>  drivers/acpi/acpica/utxferror.c |  277 -------------------------------------
>  drivers/acpi/osl.c              |   11 ++
>  include/acpi/acpiosxf.h         |   18 +++
>  include/acpi/acpixf.h           |    3 +-
>  include/acpi/actypes.h          |    8 ++
>  include/acpi/platform/acenv.h   |    8 +-
>  89 files changed, 1353 insertions(+), 783 deletions(-)
>  create mode 100644 drivers/acpi/acpica/tbprint.c
>  create mode 100644 drivers/acpi/acpica/utbuffer.c
>  create mode 100644 drivers/acpi/acpica/uterror.c

I've queued up all patches from this series except for [12/16] (which I don't
think is necessary for the Linux kernel) for 3.11.

Thanks Lv!

Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

* Re: [PATCH 01/16] ACPICA: Split buffer dump routines into separate file
  2013-06-08  0:57 ` [PATCH 01/16] ACPICA: Split buffer dump routines into separate file Lv Zheng
@ 2013-06-12 15:51   ` Len Brown
  0 siblings, 0 replies; 77+ messages in thread
From: Len Brown @ 2013-06-12 15:51 UTC (permalink / raw)
  To: Lv Zheng; +Cc: Rafael J. Wysocki, Robert Moore, Len Brown, linux acpi

Acked-by: Len Brown <len.brown@intel.com>

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

* Re: [PATCH 02/16] ACPICA: Split internal error msg routines to a separate file
  2013-06-08  0:58 ` [PATCH 02/16] ACPICA: Split internal error msg routines to a " Lv Zheng
@ 2013-06-12 15:52   ` Len Brown
  0 siblings, 0 replies; 77+ messages in thread
From: Len Brown @ 2013-06-12 15:52 UTC (permalink / raw)
  To: Lv Zheng; +Cc: Rafael J. Wysocki, Robert Moore, Len Brown, linux acpi

Acked-by: Len Brown <len.brown@intel.com>

On Fri, Jun 7, 2013 at 8:58 PM, Lv Zheng <lv.zheng@intel.com> wrote:
> From: Bob Moore <robert.moore@intel.com>
>
> Improves configurability of ACPICA.
>
> Signed-off-by: Bob Moore <robert.moore@intel.com>
> Signed-off-by: Lv Zheng <lv.zheng@intel.com>
> ---
>  drivers/acpi/acpica/Makefile    |    1 +
>  drivers/acpi/acpica/acutils.h   |   42 ++++++
>  drivers/acpi/acpica/uterror.c   |  289 +++++++++++++++++++++++++++++++++++++++
>  drivers/acpi/acpica/uteval.c    |    2 +-
>  drivers/acpi/acpica/utxferror.c |  277 -------------------------------------
>  5 files changed, 333 insertions(+), 278 deletions(-)
>  create mode 100644 drivers/acpi/acpica/uterror.c
>
> diff --git a/drivers/acpi/acpica/Makefile b/drivers/acpi/acpica/Makefile
> index 474901e..987bf41 100644
> --- a/drivers/acpi/acpica/Makefile
> +++ b/drivers/acpi/acpica/Makefile
> @@ -152,6 +152,7 @@ acpi-y +=           \
>         utdebug.o       \
>         utdecode.o      \
>         utdelete.o      \
> +       uterror.o       \
>         uteval.o        \
>         utglobal.o      \
>         utids.o         \
> diff --git a/drivers/acpi/acpica/acutils.h b/drivers/acpi/acpica/acutils.h
> index 19e5cf7..d552036 100644
> --- a/drivers/acpi/acpica/acutils.h
> +++ b/drivers/acpi/acpica/acutils.h
> @@ -87,6 +87,48 @@ extern const char *acpi_gbl_fc_decode[];
>  extern const char *acpi_gbl_pt_decode[];
>  #endif
>
> +/*
> + * For the iASL compiler case, the output is redirected to stderr so that
> + * any of the various ACPI errors and warnings do not appear in the output
> + * files, for either the compiler or disassembler portions of the tool.
> + */
> +#ifdef ACPI_ASL_COMPILER
> +
> +#include <stdio.h>
> +extern FILE *acpi_gbl_output_file;
> +
> +#define ACPI_MSG_REDIRECT_BEGIN \
> +       FILE                            *output_file = acpi_gbl_output_file; \
> +       acpi_os_redirect_output (stderr);
> +
> +#define ACPI_MSG_REDIRECT_END \
> +       acpi_os_redirect_output (output_file);
> +
> +#else
> +/*
> + * non-iASL case - no redirection, nothing to do
> + */
> +#define ACPI_MSG_REDIRECT_BEGIN
> +#define ACPI_MSG_REDIRECT_END
> +#endif
> +
> +/*
> + * Common error message prefixes
> + */
> +#define ACPI_MSG_ERROR          "ACPI Error: "
> +#define ACPI_MSG_EXCEPTION      "ACPI Exception: "
> +#define ACPI_MSG_WARNING        "ACPI Warning: "
> +#define ACPI_MSG_INFO           "ACPI: "
> +
> +#define ACPI_MSG_BIOS_ERROR     "ACPI BIOS Error (bug): "
> +#define ACPI_MSG_BIOS_WARNING   "ACPI BIOS Warning (bug): "
> +
> +/*
> + * Common message suffix
> + */
> +#define ACPI_MSG_SUFFIX \
> +       acpi_os_printf (" (%8.8X/%s-%u)\n", ACPI_CA_VERSION, module_name, line_number)
> +
>  /* Types for Resource descriptor entries */
>
>  #define ACPI_INVALID_RESOURCE           0
> diff --git a/drivers/acpi/acpica/uterror.c b/drivers/acpi/acpica/uterror.c
> new file mode 100644
> index 0000000..154fdca
> --- /dev/null
> +++ b/drivers/acpi/acpica/uterror.c
> @@ -0,0 +1,289 @@
> +/*******************************************************************************
> + *
> + * Module Name: uterror - Various internal error/warning output functions
> + *
> + ******************************************************************************/
> +
> +/*
> + * Copyright (C) 2000 - 2013, 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.
> + */
> +
> +#include <acpi/acpi.h>
> +#include "accommon.h"
> +#include "acnamesp.h"
> +
> +#define _COMPONENT          ACPI_UTILITIES
> +ACPI_MODULE_NAME("uterror")
> +
> +/*
> + * This module contains internal error functions that may
> + * be configured out.
> + */
> +#if !defined (ACPI_NO_ERROR_MESSAGES)
> +/*******************************************************************************
> + *
> + * FUNCTION:    acpi_ut_predefined_warning
> + *
> + * PARAMETERS:  module_name     - Caller's module name (for error output)
> + *              line_number     - Caller's line number (for error output)
> + *              pathname        - Full pathname to the node
> + *              node_flags      - From Namespace node for the method/object
> + *              format          - Printf format string + additional args
> + *
> + * RETURN:      None
> + *
> + * DESCRIPTION: Warnings for the predefined validation module. Messages are
> + *              only emitted the first time a problem with a particular
> + *              method/object is detected. This prevents a flood of error
> + *              messages for methods that are repeatedly evaluated.
> + *
> + ******************************************************************************/
> +void ACPI_INTERNAL_VAR_XFACE
> +acpi_ut_predefined_warning(const char *module_name,
> +                          u32 line_number,
> +                          char *pathname,
> +                          u8 node_flags, const char *format, ...)
> +{
> +       va_list arg_list;
> +
> +       /*
> +        * Warning messages for this method/object will be disabled after the
> +        * first time a validation fails or an object is successfully repaired.
> +        */
> +       if (node_flags & ANOBJ_EVALUATED) {
> +               return;
> +       }
> +
> +       acpi_os_printf(ACPI_MSG_WARNING "%s: ", pathname);
> +
> +       va_start(arg_list, format);
> +       acpi_os_vprintf(format, arg_list);
> +       ACPI_MSG_SUFFIX;
> +       va_end(arg_list);
> +}
> +
> +/*******************************************************************************
> + *
> + * FUNCTION:    acpi_ut_predefined_info
> + *
> + * PARAMETERS:  module_name     - Caller's module name (for error output)
> + *              line_number     - Caller's line number (for error output)
> + *              pathname        - Full pathname to the node
> + *              node_flags      - From Namespace node for the method/object
> + *              format          - Printf format string + additional args
> + *
> + * RETURN:      None
> + *
> + * DESCRIPTION: Info messages for the predefined validation module. Messages
> + *              are only emitted the first time a problem with a particular
> + *              method/object is detected. This prevents a flood of
> + *              messages for methods that are repeatedly evaluated.
> + *
> + ******************************************************************************/
> +
> +void ACPI_INTERNAL_VAR_XFACE
> +acpi_ut_predefined_info(const char *module_name,
> +                       u32 line_number,
> +                       char *pathname, u8 node_flags, const char *format, ...)
> +{
> +       va_list arg_list;
> +
> +       /*
> +        * Warning messages for this method/object will be disabled after the
> +        * first time a validation fails or an object is successfully repaired.
> +        */
> +       if (node_flags & ANOBJ_EVALUATED) {
> +               return;
> +       }
> +
> +       acpi_os_printf(ACPI_MSG_INFO "%s: ", pathname);
> +
> +       va_start(arg_list, format);
> +       acpi_os_vprintf(format, arg_list);
> +       ACPI_MSG_SUFFIX;
> +       va_end(arg_list);
> +}
> +
> +/*******************************************************************************
> + *
> + * FUNCTION:    acpi_ut_predefined_bios_error
> + *
> + * PARAMETERS:  module_name     - Caller's module name (for error output)
> + *              line_number     - Caller's line number (for error output)
> + *              pathname        - Full pathname to the node
> + *              node_flags      - From Namespace node for the method/object
> + *              format          - Printf format string + additional args
> + *
> + * RETURN:      None
> + *
> + * DESCRIPTION: BIOS error message for predefined names. Messages
> + *              are only emitted the first time a problem with a particular
> + *              method/object is detected. This prevents a flood of
> + *              messages for methods that are repeatedly evaluated.
> + *
> + ******************************************************************************/
> +
> +void ACPI_INTERNAL_VAR_XFACE
> +acpi_ut_predefined_bios_error(const char *module_name,
> +                             u32 line_number,
> +                             char *pathname,
> +                             u8 node_flags, const char *format, ...)
> +{
> +       va_list arg_list;
> +
> +       /*
> +        * Warning messages for this method/object will be disabled after the
> +        * first time a validation fails or an object is successfully repaired.
> +        */
> +       if (node_flags & ANOBJ_EVALUATED) {
> +               return;
> +       }
> +
> +       acpi_os_printf(ACPI_MSG_BIOS_ERROR "%s: ", pathname);
> +
> +       va_start(arg_list, format);
> +       acpi_os_vprintf(format, arg_list);
> +       ACPI_MSG_SUFFIX;
> +       va_end(arg_list);
> +}
> +
> +/*******************************************************************************
> + *
> + * FUNCTION:    acpi_ut_namespace_error
> + *
> + * PARAMETERS:  module_name         - Caller's module name (for error output)
> + *              line_number         - Caller's line number (for error output)
> + *              internal_name       - Name or path of the namespace node
> + *              lookup_status       - Exception code from NS lookup
> + *
> + * RETURN:      None
> + *
> + * DESCRIPTION: Print error message with the full pathname for the NS node.
> + *
> + ******************************************************************************/
> +
> +void
> +acpi_ut_namespace_error(const char *module_name,
> +                       u32 line_number,
> +                       const char *internal_name, acpi_status lookup_status)
> +{
> +       acpi_status status;
> +       u32 bad_name;
> +       char *name = NULL;
> +
> +       ACPI_MSG_REDIRECT_BEGIN;
> +       acpi_os_printf(ACPI_MSG_ERROR);
> +
> +       if (lookup_status == AE_BAD_CHARACTER) {
> +
> +               /* There is a non-ascii character in the name */
> +
> +               ACPI_MOVE_32_TO_32(&bad_name,
> +                                  ACPI_CAST_PTR(u32, internal_name));
> +               acpi_os_printf("[0x%.8X] (NON-ASCII)", bad_name);
> +       } else {
> +               /* Convert path to external format */
> +
> +               status = acpi_ns_externalize_name(ACPI_UINT32_MAX,
> +                                                 internal_name, NULL, &name);
> +
> +               /* Print target name */
> +
> +               if (ACPI_SUCCESS(status)) {
> +                       acpi_os_printf("[%s]", name);
> +               } else {
> +                       acpi_os_printf("[COULD NOT EXTERNALIZE NAME]");
> +               }
> +
> +               if (name) {
> +                       ACPI_FREE(name);
> +               }
> +       }
> +
> +       acpi_os_printf(" Namespace lookup failure, %s",
> +                      acpi_format_exception(lookup_status));
> +
> +       ACPI_MSG_SUFFIX;
> +       ACPI_MSG_REDIRECT_END;
> +}
> +
> +/*******************************************************************************
> + *
> + * FUNCTION:    acpi_ut_method_error
> + *
> + * PARAMETERS:  module_name         - Caller's module name (for error output)
> + *              line_number         - Caller's line number (for error output)
> + *              message             - Error message to use on failure
> + *              prefix_node         - Prefix relative to the path
> + *              path                - Path to the node (optional)
> + *              method_status       - Execution status
> + *
> + * RETURN:      None
> + *
> + * DESCRIPTION: Print error message with the full pathname for the method.
> + *
> + ******************************************************************************/
> +
> +void
> +acpi_ut_method_error(const char *module_name,
> +                    u32 line_number,
> +                    const char *message,
> +                    struct acpi_namespace_node *prefix_node,
> +                    const char *path, acpi_status method_status)
> +{
> +       acpi_status status;
> +       struct acpi_namespace_node *node = prefix_node;
> +
> +       ACPI_MSG_REDIRECT_BEGIN;
> +       acpi_os_printf(ACPI_MSG_ERROR);
> +
> +       if (path) {
> +               status =
> +                   acpi_ns_get_node(prefix_node, path, ACPI_NS_NO_UPSEARCH,
> +                                    &node);
> +               if (ACPI_FAILURE(status)) {
> +                       acpi_os_printf("[Could not get node by pathname]");
> +               }
> +       }
> +
> +       acpi_ns_print_node_pathname(node, message);
> +       acpi_os_printf(", %s", acpi_format_exception(method_status));
> +
> +       ACPI_MSG_SUFFIX;
> +       ACPI_MSG_REDIRECT_END;
> +}
> +
> +#endif                         /* ACPI_NO_ERROR_MESSAGES */
> diff --git a/drivers/acpi/acpica/uteval.c b/drivers/acpi/acpica/uteval.c
> index 1673ddd..9d68029 100644
> --- a/drivers/acpi/acpica/uteval.c
> +++ b/drivers/acpi/acpica/uteval.c
> @@ -68,7 +68,7 @@ ACPI_MODULE_NAME("uteval")
>   ******************************************************************************/
>
>  acpi_status
> -acpi_ut_evaluate_object(struct acpi_namespace_node * prefix_node,
> +acpi_ut_evaluate_object(struct acpi_namespace_node *prefix_node,
>                         char *path,
>                         u32 expected_return_btypes,
>                         union acpi_operand_object **return_desc)
> diff --git a/drivers/acpi/acpica/utxferror.c b/drivers/acpi/acpica/utxferror.c
> index 61a2c17..e966a2e 100644
> --- a/drivers/acpi/acpica/utxferror.c
> +++ b/drivers/acpi/acpica/utxferror.c
> @@ -44,7 +44,6 @@
>  #include <linux/export.h>
>  #include <acpi/acpi.h>
>  #include "accommon.h"
> -#include "acnamesp.h"
>
>  #define _COMPONENT          ACPI_UTILITIES
>  ACPI_MODULE_NAME("utxferror")
> @@ -52,43 +51,7 @@ ACPI_MODULE_NAME("utxferror")
>  /*
>   * This module is used for the in-kernel ACPICA as well as the ACPICA
>   * tools/applications.
> - *
> - * For the iASL compiler case, the output is redirected to stderr so that
> - * any of the various ACPI errors and warnings do not appear in the output
> - * files, for either the compiler or disassembler portions of the tool.
> - */
> -#ifdef ACPI_ASL_COMPILER
> -#include <stdio.h>
> -extern FILE *acpi_gbl_output_file;
> -
> -#define ACPI_MSG_REDIRECT_BEGIN \
> -       FILE                            *output_file = acpi_gbl_output_file; \
> -       acpi_os_redirect_output (stderr);
> -
> -#define ACPI_MSG_REDIRECT_END \
> -       acpi_os_redirect_output (output_file);
> -
> -#else
> -/*
> - * non-iASL case - no redirection, nothing to do
> - */
> -#define ACPI_MSG_REDIRECT_BEGIN
> -#define ACPI_MSG_REDIRECT_END
> -#endif
> -/*
> - * Common message prefixes
>   */
> -#define ACPI_MSG_ERROR          "ACPI Error: "
> -#define ACPI_MSG_EXCEPTION      "ACPI Exception: "
> -#define ACPI_MSG_WARNING        "ACPI Warning: "
> -#define ACPI_MSG_INFO           "ACPI: "
> -#define ACPI_MSG_BIOS_ERROR     "ACPI BIOS Error (bug): "
> -#define ACPI_MSG_BIOS_WARNING   "ACPI BIOS Warning (bug): "
> -/*
> - * Common message suffix
> - */
> -#define ACPI_MSG_SUFFIX \
> -       acpi_os_printf (" (%8.8X/%s-%u)\n", ACPI_CA_VERSION, module_name, line_number)
>  /*******************************************************************************
>   *
>   * FUNCTION:    acpi_error
> @@ -285,243 +248,3 @@ acpi_bios_warning(const char *module_name,
>  }
>
>  ACPI_EXPORT_SYMBOL(acpi_bios_warning)
> -
> -/*
> - * The remainder of this module contains internal error functions that may
> - * be configured out.
> - */
> -#if !defined (ACPI_NO_ERROR_MESSAGES) && !defined (ACPI_BIN_APP)
> -/*******************************************************************************
> - *
> - * FUNCTION:    acpi_ut_predefined_warning
> - *
> - * PARAMETERS:  module_name     - Caller's module name (for error output)
> - *              line_number     - Caller's line number (for error output)
> - *              pathname        - Full pathname to the node
> - *              node_flags      - From Namespace node for the method/object
> - *              format          - Printf format string + additional args
> - *
> - * RETURN:      None
> - *
> - * DESCRIPTION: Warnings for the predefined validation module. Messages are
> - *              only emitted the first time a problem with a particular
> - *              method/object is detected. This prevents a flood of error
> - *              messages for methods that are repeatedly evaluated.
> - *
> - ******************************************************************************/
> -void ACPI_INTERNAL_VAR_XFACE
> -acpi_ut_predefined_warning(const char *module_name,
> -                          u32 line_number,
> -                          char *pathname,
> -                          u8 node_flags, const char *format, ...)
> -{
> -       va_list arg_list;
> -
> -       /*
> -        * Warning messages for this method/object will be disabled after the
> -        * first time a validation fails or an object is successfully repaired.
> -        */
> -       if (node_flags & ANOBJ_EVALUATED) {
> -               return;
> -       }
> -
> -       acpi_os_printf(ACPI_MSG_WARNING "%s: ", pathname);
> -
> -       va_start(arg_list, format);
> -       acpi_os_vprintf(format, arg_list);
> -       ACPI_MSG_SUFFIX;
> -       va_end(arg_list);
> -}
> -
> -/*******************************************************************************
> - *
> - * FUNCTION:    acpi_ut_predefined_info
> - *
> - * PARAMETERS:  module_name     - Caller's module name (for error output)
> - *              line_number     - Caller's line number (for error output)
> - *              pathname        - Full pathname to the node
> - *              node_flags      - From Namespace node for the method/object
> - *              format          - Printf format string + additional args
> - *
> - * RETURN:      None
> - *
> - * DESCRIPTION: Info messages for the predefined validation module. Messages
> - *              are only emitted the first time a problem with a particular
> - *              method/object is detected. This prevents a flood of
> - *              messages for methods that are repeatedly evaluated.
> - *
> - ******************************************************************************/
> -
> -void ACPI_INTERNAL_VAR_XFACE
> -acpi_ut_predefined_info(const char *module_name,
> -                       u32 line_number,
> -                       char *pathname, u8 node_flags, const char *format, ...)
> -{
> -       va_list arg_list;
> -
> -       /*
> -        * Warning messages for this method/object will be disabled after the
> -        * first time a validation fails or an object is successfully repaired.
> -        */
> -       if (node_flags & ANOBJ_EVALUATED) {
> -               return;
> -       }
> -
> -       acpi_os_printf(ACPI_MSG_INFO "%s: ", pathname);
> -
> -       va_start(arg_list, format);
> -       acpi_os_vprintf(format, arg_list);
> -       ACPI_MSG_SUFFIX;
> -       va_end(arg_list);
> -}
> -
> -/*******************************************************************************
> - *
> - * FUNCTION:    acpi_ut_predefined_bios_error
> - *
> - * PARAMETERS:  module_name     - Caller's module name (for error output)
> - *              line_number     - Caller's line number (for error output)
> - *              pathname        - Full pathname to the node
> - *              node_flags      - From Namespace node for the method/object
> - *              format          - Printf format string + additional args
> - *
> - * RETURN:      None
> - *
> - * DESCRIPTION: BIOS error message for predefined names. Messages
> - *              are only emitted the first time a problem with a particular
> - *              method/object is detected. This prevents a flood of
> - *              messages for methods that are repeatedly evaluated.
> - *
> - ******************************************************************************/
> -
> -void ACPI_INTERNAL_VAR_XFACE
> -acpi_ut_predefined_bios_error(const char *module_name,
> -                             u32 line_number,
> -                             char *pathname,
> -                             u8 node_flags, const char *format, ...)
> -{
> -       va_list arg_list;
> -
> -       /*
> -        * Warning messages for this method/object will be disabled after the
> -        * first time a validation fails or an object is successfully repaired.
> -        */
> -       if (node_flags & ANOBJ_EVALUATED) {
> -               return;
> -       }
> -
> -       acpi_os_printf(ACPI_MSG_BIOS_ERROR "%s: ", pathname);
> -
> -       va_start(arg_list, format);
> -       acpi_os_vprintf(format, arg_list);
> -       ACPI_MSG_SUFFIX;
> -       va_end(arg_list);
> -}
> -
> -/*******************************************************************************
> - *
> - * FUNCTION:    acpi_ut_namespace_error
> - *
> - * PARAMETERS:  module_name         - Caller's module name (for error output)
> - *              line_number         - Caller's line number (for error output)
> - *              internal_name       - Name or path of the namespace node
> - *              lookup_status       - Exception code from NS lookup
> - *
> - * RETURN:      None
> - *
> - * DESCRIPTION: Print error message with the full pathname for the NS node.
> - *
> - ******************************************************************************/
> -
> -void
> -acpi_ut_namespace_error(const char *module_name,
> -                       u32 line_number,
> -                       const char *internal_name, acpi_status lookup_status)
> -{
> -       acpi_status status;
> -       u32 bad_name;
> -       char *name = NULL;
> -
> -       ACPI_MSG_REDIRECT_BEGIN;
> -       acpi_os_printf(ACPI_MSG_ERROR);
> -
> -       if (lookup_status == AE_BAD_CHARACTER) {
> -
> -               /* There is a non-ascii character in the name */
> -
> -               ACPI_MOVE_32_TO_32(&bad_name,
> -                                  ACPI_CAST_PTR(u32, internal_name));
> -               acpi_os_printf("[0x%.8X] (NON-ASCII)", bad_name);
> -       } else {
> -               /* Convert path to external format */
> -
> -               status = acpi_ns_externalize_name(ACPI_UINT32_MAX,
> -                                                 internal_name, NULL, &name);
> -
> -               /* Print target name */
> -
> -               if (ACPI_SUCCESS(status)) {
> -                       acpi_os_printf("[%s]", name);
> -               } else {
> -                       acpi_os_printf("[COULD NOT EXTERNALIZE NAME]");
> -               }
> -
> -               if (name) {
> -                       ACPI_FREE(name);
> -               }
> -       }
> -
> -       acpi_os_printf(" Namespace lookup failure, %s",
> -                      acpi_format_exception(lookup_status));
> -
> -       ACPI_MSG_SUFFIX;
> -       ACPI_MSG_REDIRECT_END;
> -}
> -
> -/*******************************************************************************
> - *
> - * FUNCTION:    acpi_ut_method_error
> - *
> - * PARAMETERS:  module_name         - Caller's module name (for error output)
> - *              line_number         - Caller's line number (for error output)
> - *              message             - Error message to use on failure
> - *              prefix_node         - Prefix relative to the path
> - *              path                - Path to the node (optional)
> - *              method_status       - Execution status
> - *
> - * RETURN:      None
> - *
> - * DESCRIPTION: Print error message with the full pathname for the method.
> - *
> - ******************************************************************************/
> -
> -void
> -acpi_ut_method_error(const char *module_name,
> -                    u32 line_number,
> -                    const char *message,
> -                    struct acpi_namespace_node *prefix_node,
> -                    const char *path, acpi_status method_status)
> -{
> -       acpi_status status;
> -       struct acpi_namespace_node *node = prefix_node;
> -
> -       ACPI_MSG_REDIRECT_BEGIN;
> -       acpi_os_printf(ACPI_MSG_ERROR);
> -
> -       if (path) {
> -               status =
> -                   acpi_ns_get_node(prefix_node, path, ACPI_NS_NO_UPSEARCH,
> -                                    &node);
> -               if (ACPI_FAILURE(status)) {
> -                       acpi_os_printf("[Could not get node by pathname]");
> -               }
> -       }
> -
> -       acpi_ns_print_node_pathname(node, message);
> -       acpi_os_printf(", %s", acpi_format_exception(method_status));
> -
> -       ACPI_MSG_SUFFIX;
> -       ACPI_MSG_REDIRECT_END;
> -}
> -
> -#endif                         /* ACPI_NO_ERROR_MESSAGES */
> --
> 1.7.10
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Len Brown, Intel Open Source Technology Center

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

* Re: [PATCH 03/16] ACPICA: Standardize all switch() blocks
  2013-06-08  0:58 ` [PATCH 03/16] ACPICA: Standardize all switch() blocks Lv Zheng
@ 2013-06-12 15:58   ` Len Brown
  2013-06-18 18:46     ` Moore, Robert
  0 siblings, 1 reply; 77+ messages in thread
From: Len Brown @ 2013-06-12 15:58 UTC (permalink / raw)
  To: Lv Zheng
  Cc: Rafael J. Wysocki, Robert Moore, Len Brown, linux acpi, Chao Guan

> After many years, different formatting for switch() has crept in.
> This change makes every switch block identical. Chao Guan.
> ACPICA bugzilla 997.

So what is the new format?
Looks like a blank line after every "case", except no blank line if comment?

That would be a good thing to say in the commit message...

Also, for patches such as this, please note in the commit message
that it is white-space only (indeed, in this case looks like blank lines only)
and no functionality changes.

That would help optimize precious reviewer time,
and also make it clear to those doing a bisect who
read only the commit message and not the patch.

thanks,
Len Brown
Intel Open Source Technology Center

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

* Re: [PATCH 05/16] ACPICA: Split table print utilities to a new a separate file
  2013-06-08  0:59 ` [PATCH 05/16] ACPICA: Split table print utilities to a new a separate file Lv Zheng
@ 2013-06-12 17:03   ` Len Brown
  2013-06-18 18:46     ` Moore, Robert
  0 siblings, 1 reply; 77+ messages in thread
From: Len Brown @ 2013-06-12 17:03 UTC (permalink / raw)
  To: Lv Zheng; +Cc: Rafael J. Wysocki, Robert Moore, Len Brown, linux acpi

On Fri, Jun 7, 2013 at 8:59 PM, Lv Zheng <lv.zheng@intel.com> wrote:
> From: Bob Moore <robert.moore@intel.com>
>
> Improves configurability of ACPICA.


Just code movement, no logic changes or even any code changes, yes?
If so, please state that in the commit message.

thanks,
Len Brown, Intel Open Source Technology Center

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

* Re: [PATCH 07/16] ACPICA: New: Portable acpidump utility (get system ACPI tables)
  2013-06-08  0:59 ` [PATCH 07/16] ACPICA: New: Portable acpidump utility (get system ACPI tables) Lv Zheng
@ 2013-06-12 17:07   ` Len Brown
  2013-06-15 23:09     ` Rafael J. Wysocki
  2013-06-18 18:48     ` Moore, Robert
  0 siblings, 2 replies; 77+ messages in thread
From: Len Brown @ 2013-06-12 17:07 UTC (permalink / raw)
  To: Lv Zheng; +Cc: Rafael J. Wysocki, Robert Moore, Len Brown, linux acpi

> This utility dumps the system ACPI tables in an ascii format
> suitable for extraction via the acpixtract utility.

This commit message does not match the contents of the patch,
or explain how this patch is related (or not) to the acpidump utility
already in the kernel tree under
tools/power/acpi/acpidump/

Naked-by: Len Brown <len.brown@intel.com>

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

* Re: [PATCH 06/16] ACPICA: Do not use extended sleep registers unless HW-reduced bit is set
  2013-06-08  0:59 ` [PATCH 06/16] ACPICA: Do not use extended sleep registers unless HW-reduced bit is set Lv Zheng
@ 2013-06-12 17:11   ` Len Brown
  2013-06-15 23:08     ` Rafael J. Wysocki
  0 siblings, 1 reply; 77+ messages in thread
From: Len Brown @ 2013-06-12 17:11 UTC (permalink / raw)
  To: Lv Zheng; +Cc: Rafael J. Wysocki, Robert Moore, Len Brown, linux acpi

This commit message should state when this regression started in Linux,
so that people reading the messages know how far back to port the fix.

Likely this patch should also be marked for -stable

until then...

Nacked-by: Len Brown <len.brown@intel.com>

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

* Re: [PATCH 08/16] ACPICA: Update interface to AcpiUtValidAcpiName
  2013-06-08  0:59 ` [PATCH 08/16] ACPICA: Update interface to AcpiUtValidAcpiName Lv Zheng
@ 2013-06-12 17:15   ` Len Brown
  2013-06-15 23:12     ` Rafael J. Wysocki
  0 siblings, 1 reply; 77+ messages in thread
From: Len Brown @ 2013-06-12 17:15 UTC (permalink / raw)
  To: Lv Zheng; +Cc: Rafael J. Wysocki, Robert Moore, Len Brown, linux acpi

I'm okay w/ the content of this patch, but the Subject: was not converted
from ACPICA syntax to Linux syntax

AcpiUtValidAcpiName() should be acpi_ut_valid_acpi_char()

Nacked-by: Len Brown <len.brown@intel.com>

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

* Re: [PATCH 09/16] ACPICA: ACPICA Termination: Delete global lock pending lock
  2013-06-08  0:59 ` [PATCH 09/16] ACPICA: ACPICA Termination: Delete global lock pending lock Lv Zheng
@ 2013-06-12 17:28   ` Len Brown
  0 siblings, 0 replies; 77+ messages in thread
From: Len Brown @ 2013-06-12 17:28 UTC (permalink / raw)
  To: Lv Zheng
  Cc: Rafael J. Wysocki, Robert Moore, Len Brown, linux acpi, Tomasz Nowicki

Reviewed-by: Len Brown <len.brown@intel.com>

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

* Re: [PATCH 10/16] ACPICA: Fix possible memory leak in GPE init error path
  2013-06-08  1:00 ` [PATCH 10/16] ACPICA: Fix possible memory leak in GPE init error path Lv Zheng
@ 2013-06-12 17:34   ` Len Brown
  0 siblings, 0 replies; 77+ messages in thread
From: Len Brown @ 2013-06-12 17:34 UTC (permalink / raw)
  To: Lv Zheng
  Cc: Rafael J. Wysocki, Robert Moore, Len Brown, linux acpi, Tomasz Nowicki

Reviewed-by: Len Brown <len.brown@intel.com>

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

* Re: [PATCH 11/16] ACPICA: Clear events initialized flag upon event component termination
  2013-06-08  1:00 ` [PATCH 11/16] ACPICA: Clear events initialized flag upon event component termination Lv Zheng
@ 2013-06-12 17:47   ` Len Brown
  2013-06-18 18:50     ` Moore, Robert
  0 siblings, 1 reply; 77+ messages in thread
From: Len Brown @ 2013-06-12 17:47 UTC (permalink / raw)
  To: Lv Zheng
  Cc: Rafael J. Wysocki, Robert Moore, Len Brown, linux acpi, Tomasz Nowicki

On Fri, Jun 7, 2013 at 9:00 PM, Lv Zheng <lv.zheng@intel.com> wrote:
> From: Tomasz Nowicki <tomasz.nowicki@linaro.org>
>
> Clear this flag to allow clean startup and even double termination.
> ACPICA BZ 1013. Tomasz Nowicki <tomasz.nowicki@linaro.org>

The patch looks logically correct, but I'm wondering what use-case
made it necessary.  Do you have a system where you disable ACPI
and then disable ACPI again?

BTW. it looks like we don't check for this flag being FALSE
when we initialize, so I suppose if you had the case where
you enable, disable, and then re-enable ACPI mode, that
would already work -- though I don't know if anybody
has ever done that.

Reviewed-by: Len Brown <len.brown@intel.com>

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

* Re: [PATCH 12/16] ACPICA: Support Mac OS X in Makefile
  2013-06-08  1:00 ` [PATCH 12/16] ACPICA: Support Mac OS X in Makefile Lv Zheng
@ 2013-06-12 17:49   ` Len Brown
  0 siblings, 0 replies; 77+ messages in thread
From: Len Brown @ 2013-06-12 17:49 UTC (permalink / raw)
  To: Lv Zheng; +Cc: Rafael J. Wysocki, Robert Moore, Len Brown, linux acpi

commit message doesn't match the patch.

Nacked-by: Len Brown <len.brown@intel.com>

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

* Re: [PATCH 13/16] ACPICA: Move _PRT repair into the standard complex repair module
  2013-06-08  1:01 ` [PATCH 13/16] ACPICA: Move _PRT repair into the standard complex repair module Lv Zheng
@ 2013-06-12 17:52   ` Len Brown
  2013-06-15 23:17     ` Rafael J. Wysocki
  2013-06-18 18:51     ` Moore, Robert
  0 siblings, 2 replies; 77+ messages in thread
From: Len Brown @ 2013-06-12 17:52 UTC (permalink / raw)
  To: Lv Zheng; +Cc: Rafael J. Wysocki, Robert Moore, Len Brown, linux acpi

Please re-send this patch with a commit message that clarifies
whether any logical change in operation should result from this patch or not.

It looks like the answer is no, that this a clean-up of the implementation
of a AML workaround -- but I shouldn't have to read the code to figure that out,
and neither should anybody else.

Nacked-by: Len Brown <len.brown@intel.com>

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

* Re: [PATCH 14/16] ACPICA: Add several repairs for _CST predefined name
  2013-06-08  1:01 ` [PATCH 14/16] ACPICA: Add several repairs for _CST predefined name Lv Zheng
@ 2013-06-12 17:58   ` Len Brown
  2013-06-15 23:17     ` Rafael J. Wysocki
  2013-06-18 18:51     ` Moore, Robert
  0 siblings, 2 replies; 77+ messages in thread
From: Len Brown @ 2013-06-12 17:58 UTC (permalink / raw)
  To: Lv Zheng; +Cc: Rafael J. Wysocki, Robert Moore, Len Brown, linux acpi

On Fri, Jun 7, 2013 at 9:01 PM, Lv Zheng <lv.zheng@intel.com> wrote:
> Sort list based on the C-state, remove invalid/zero entries.
> ACPICA BZ 890. Lv Zheng.

The commit message should not just say what the code does,
it should more importantly answer WHY the change was made,
and why anybody should care about the patch.

I think the answer here is that we are adding _CST sanity checking --
presumably to deal with buggy AML?

What will we see happen after this patch that we did not see before it?

Nacked-by: Len Brown <len.brown@intel.com>

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

* Re: [PATCH 15/16] ACPICA: _CST repair: Handle null package entries
  2013-06-08  1:01 ` [PATCH 15/16] ACPICA: _CST repair: Handle null package entries Lv Zheng
@ 2013-06-12 18:00   ` Len Brown
  2013-06-15 23:18     ` Rafael J. Wysocki
                       ` (2 more replies)
  0 siblings, 3 replies; 77+ messages in thread
From: Len Brown @ 2013-06-12 18:00 UTC (permalink / raw)
  To: Lv Zheng; +Cc: Rafael J. Wysocki, Robert Moore, Len Brown, linux acpi

On Fri, Jun 7, 2013 at 9:01 PM, Lv Zheng <lv.zheng@intel.com> wrote:
> Sort package only after null/bad elements have been removed.
> Lv Zheng.


again, please explain WHY.

Every line of change to the kernel adds risk.
I see no justification in this commit message why any risk should be
added to the kernel.

Nacked-by: Len Brown <len.brown@intel.com>

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

* Re: [PATCH 16/16] ACPICA: Update version to 20130517
  2013-06-08  1:01 ` [PATCH 16/16] ACPICA: Update version to 20130517 Lv Zheng
@ 2013-06-12 18:01   ` Len Brown
  2013-06-15 23:19     ` Rafael J. Wysocki
  0 siblings, 1 reply; 77+ messages in thread
From: Len Brown @ 2013-06-12 18:01 UTC (permalink / raw)
  To: Lv Zheng; +Cc: Rafael J. Wysocki, Robert Moore, Len Brown, linux acpi

Just to get the Ack/Nak ratio on this series up:-)

Acked-by: Len Brown <len.brown@intel.com>

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

* Re: [PATCH 00/16] ACPICA: 20130517 release
  2013-06-08  0:57 [PATCH 00/16] ACPICA: 20130517 release Lv Zheng
                   ` (16 preceding siblings ...)
  2013-06-11 22:32 ` [PATCH 00/16] ACPICA: 20130517 release Rafael J. Wysocki
@ 2013-06-12 18:04 ` Len Brown
  2013-06-15 23:24   ` Rafael J. Wysocki
  17 siblings, 1 reply; 77+ messages in thread
From: Len Brown @ 2013-06-12 18:04 UTC (permalink / raw)
  To: Lv Zheng; +Cc: Rafael J. Wysocki, Robert Moore, Len Brown, linux acpi

I would like to see this series re-freshed before it goes up-stream.
Generally, the commit messages need to be improved before
they go into the permanent kernel history.

thanks,
Len Brown, Intel Open Source Technology Center

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

* Re: [PATCH 06/16] ACPICA: Do not use extended sleep registers unless HW-reduced bit is set
  2013-06-12 17:11   ` Len Brown
@ 2013-06-15 23:08     ` Rafael J. Wysocki
  0 siblings, 0 replies; 77+ messages in thread
From: Rafael J. Wysocki @ 2013-06-15 23:08 UTC (permalink / raw)
  To: Len Brown
  Cc: Lv Zheng, Rafael J. Wysocki, Robert Moore, Len Brown, linux acpi

On Wednesday, June 12, 2013 01:11:42 PM Len Brown wrote:
> This commit message should state when this regression started in Linux,
> so that people reading the messages know how far back to port the fix.

Yes, that would be nice.

That said, I was able to track it down to the 3.4 time frame ->

> Likely this patch should also be marked for -stable

-> so I marked it for "3.4+-stable" in the commit message.

Thanks,
Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

* Re: [PATCH 07/16] ACPICA: New: Portable acpidump utility (get system ACPI tables)
  2013-06-12 17:07   ` Len Brown
@ 2013-06-15 23:09     ` Rafael J. Wysocki
  2013-06-18 18:53       ` Moore, Robert
  2013-06-18 18:48     ` Moore, Robert
  1 sibling, 1 reply; 77+ messages in thread
From: Rafael J. Wysocki @ 2013-06-15 23:09 UTC (permalink / raw)
  To: Len Brown
  Cc: Lv Zheng, Rafael J. Wysocki, Robert Moore, Len Brown, linux acpi

On Wednesday, June 12, 2013 01:07:50 PM Len Brown wrote:
> > This utility dumps the system ACPI tables in an ascii format
> > suitable for extraction via the acpixtract utility.
> 
> This commit message does not match the contents of the patch,
> or explain how this patch is related (or not) to the acpidump utility
> already in the kernel tree under
> tools/power/acpi/acpidump/
> 
> Naked-by: Len Brown <len.brown@intel.com>

Well, I was on the verge of dropping this one before, so dropped now.

Thanks,
Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

* Re: [PATCH 08/16] ACPICA: Update interface to AcpiUtValidAcpiName
  2013-06-12 17:15   ` Len Brown
@ 2013-06-15 23:12     ` Rafael J. Wysocki
  0 siblings, 0 replies; 77+ messages in thread
From: Rafael J. Wysocki @ 2013-06-15 23:12 UTC (permalink / raw)
  To: Len Brown
  Cc: Lv Zheng, Rafael J. Wysocki, Robert Moore, Len Brown, linux acpi

On Wednesday, June 12, 2013 01:15:16 PM Len Brown wrote:
> I'm okay w/ the content of this patch, but the Subject: was not converted
> from ACPICA syntax to Linux syntax
> 
> AcpiUtValidAcpiName() should be acpi_ut_valid_acpi_char()

Surely acpi_ut_valid_acpi_name()?

I fixed that up when applying the patch.

Thanks,
Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

* Re: [PATCH 13/16] ACPICA: Move _PRT repair into the standard complex repair module
  2013-06-12 17:52   ` Len Brown
@ 2013-06-15 23:17     ` Rafael J. Wysocki
  2013-06-18 18:51     ` Moore, Robert
  1 sibling, 0 replies; 77+ messages in thread
From: Rafael J. Wysocki @ 2013-06-15 23:17 UTC (permalink / raw)
  To: Len Brown
  Cc: Lv Zheng, Rafael J. Wysocki, Robert Moore, Len Brown, linux acpi

On Wednesday, June 12, 2013 01:52:17 PM Len Brown wrote:
> Please re-send this patch with a commit message that clarifies
> whether any logical change in operation should result from this patch or not.
> 
> It looks like the answer is no, that this a clean-up of the implementation
> of a AML workaround -- but I shouldn't have to read the code to figure that out,
> and neither should anybody else.
> 
> Nacked-by: Len Brown <len.brown@intel.com>

Dropped for now, Lv please resend this one.

Thanks,
Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

* Re: [PATCH 14/16] ACPICA: Add several repairs for _CST predefined name
  2013-06-12 17:58   ` Len Brown
@ 2013-06-15 23:17     ` Rafael J. Wysocki
  2013-06-18 18:51     ` Moore, Robert
  1 sibling, 0 replies; 77+ messages in thread
From: Rafael J. Wysocki @ 2013-06-15 23:17 UTC (permalink / raw)
  To: Len Brown, Lv Zheng
  Cc: Rafael J. Wysocki, Robert Moore, Len Brown, linux acpi

On Wednesday, June 12, 2013 01:58:59 PM Len Brown wrote:
> On Fri, Jun 7, 2013 at 9:01 PM, Lv Zheng <lv.zheng@intel.com> wrote:
> > Sort list based on the C-state, remove invalid/zero entries.
> > ACPICA BZ 890. Lv Zheng.
> 
> The commit message should not just say what the code does,
> it should more importantly answer WHY the change was made,
> and why anybody should care about the patch.
> 
> I think the answer here is that we are adding _CST sanity checking --
> presumably to deal with buggy AML?
> 
> What will we see happen after this patch that we did not see before it?
> 
> Nacked-by: Len Brown <len.brown@intel.com>

Dropped for now, Lv please resend this one.

Thanks,
Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

* Re: [PATCH 15/16] ACPICA: _CST repair: Handle null package entries
  2013-06-12 18:00   ` Len Brown
@ 2013-06-15 23:18     ` Rafael J. Wysocki
  2013-06-17 16:41     ` Moore, Robert
  2013-06-18 18:52     ` Moore, Robert
  2 siblings, 0 replies; 77+ messages in thread
From: Rafael J. Wysocki @ 2013-06-15 23:18 UTC (permalink / raw)
  To: Len Brown, Lv Zheng
  Cc: Rafael J. Wysocki, Robert Moore, Len Brown, linux acpi

On Wednesday, June 12, 2013 02:00:14 PM Len Brown wrote:
> On Fri, Jun 7, 2013 at 9:01 PM, Lv Zheng <lv.zheng@intel.com> wrote:
> > Sort package only after null/bad elements have been removed.
> > Lv Zheng.
> 
> 
> again, please explain WHY.
> 
> Every line of change to the kernel adds risk.
> I see no justification in this commit message why any risk should be
> added to the kernel.
> 
> Nacked-by: Len Brown <len.brown@intel.com>

Dropped for now, Lv please resend this one.

Thanks,
Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

* Re: [PATCH 16/16] ACPICA: Update version to 20130517
  2013-06-12 18:01   ` Len Brown
@ 2013-06-15 23:19     ` Rafael J. Wysocki
  0 siblings, 0 replies; 77+ messages in thread
From: Rafael J. Wysocki @ 2013-06-15 23:19 UTC (permalink / raw)
  To: Len Brown, Lv Zheng
  Cc: Rafael J. Wysocki, Robert Moore, Len Brown, linux acpi

On Wednesday, June 12, 2013 02:01:16 PM Len Brown wrote:
> Just to get the Ack/Nak ratio on this series up:-)
> 
> Acked-by: Len Brown <len.brown@intel.com>

I'm dropping it, however, because some of the previous patches were dropped.

Lv, please resend it along with [13-15/16].

Thanks,
Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

* Re: [PATCH 00/16] ACPICA: 20130517 release
  2013-06-12 18:04 ` Len Brown
@ 2013-06-15 23:24   ` Rafael J. Wysocki
  2013-06-18  1:39     ` Zheng, Lv
  2013-06-18 18:55     ` Moore, Robert
  0 siblings, 2 replies; 77+ messages in thread
From: Rafael J. Wysocki @ 2013-06-15 23:24 UTC (permalink / raw)
  To: Lv Zheng
  Cc: Len Brown, Rafael J. Wysocki, Robert Moore, Len Brown, linux acpi

On Wednesday, June 12, 2013 02:04:46 PM Len Brown wrote:
> I would like to see this series re-freshed before it goes up-stream.
> Generally, the commit messages need to be improved before
> they go into the permanent kernel history.

Lv,

I've dropped [7/16] and [12/16] permanently (please do not resend them).

I'd like to see new versions of [13-15/16] with improved changelogs along
with [16/16].

The remaining patches from the series ([1-6/16], [8-11/16]) have been queued
up for 3.11 (possibly with some changelog fixups).

Thanks,
Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

* RE: [PATCH 15/16] ACPICA: _CST repair: Handle null package entries
  2013-06-12 18:00   ` Len Brown
  2013-06-15 23:18     ` Rafael J. Wysocki
@ 2013-06-17 16:41     ` Moore, Robert
  2013-06-17 20:31       ` Rafael J. Wysocki
  2013-06-18 18:52     ` Moore, Robert
  2 siblings, 1 reply; 77+ messages in thread
From: Moore, Robert @ 2013-06-17 16:41 UTC (permalink / raw)
  To: Len Brown, Zheng, Lv; +Cc: Wysocki, Rafael J, Brown, Len, linux acpi

This one is just adding additional checks on the _CST that are obvious errors in the AML. The eventual goal of the "repair" code in ACPICA is to never return a bad package from things like _CST. In other words, an AE_OK guarantees that the return value is usable. 

So, this is an additional implementation of this longer-range project.


> -----Original Message-----
> From: lenb417@gmail.com [mailto:lenb417@gmail.com] On Behalf Of Len Brown
> Sent: Wednesday, June 12, 2013 11:00 AM
> To: Zheng, Lv
> Cc: Wysocki, Rafael J; Moore, Robert; Brown, Len; linux acpi
> Subject: Re: [PATCH 15/16] ACPICA: _CST repair: Handle null package
> entries
> 
> On Fri, Jun 7, 2013 at 9:01 PM, Lv Zheng <lv.zheng@intel.com> wrote:
> > Sort package only after null/bad elements have been removed.
> > Lv Zheng.
> 
> 
> again, please explain WHY.
> 
> Every line of change to the kernel adds risk.
> I see no justification in this commit message why any risk should be added
> to the kernel.
> 
> Nacked-by: Len Brown <len.brown@intel.com>

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

* Re: [PATCH 15/16] ACPICA: _CST repair: Handle null package entries
  2013-06-17 16:41     ` Moore, Robert
@ 2013-06-17 20:31       ` Rafael J. Wysocki
  2013-06-18 21:51         ` Rafael J. Wysocki
  0 siblings, 1 reply; 77+ messages in thread
From: Rafael J. Wysocki @ 2013-06-17 20:31 UTC (permalink / raw)
  To: Moore, Robert, Zheng, Lv; +Cc: Len Brown, Brown, Len, linux acpi

On 6/17/2013 6:41 PM, Moore, Robert wrote:
> This one is just adding additional checks on the _CST that are obvious errors in the AML. The eventual goal of the "repair" code in ACPICA is to never return a bad package from things like _CST. In other words, an AE_OK guarantees that the return value is usable.
>
> So, this is an additional implementation of this longer-range project.
>

Thanks Bob!

Lv, care to add the above explanation from Bob to the changelog of the 
$subject patch?

Rafael


>> -----Original Message-----
>> From: lenb417@gmail.com [mailto:lenb417@gmail.com] On Behalf Of Len Brown
>> Sent: Wednesday, June 12, 2013 11:00 AM
>> To: Zheng, Lv
>> Cc: Wysocki, Rafael J; Moore, Robert; Brown, Len; linux acpi
>> Subject: Re: [PATCH 15/16] ACPICA: _CST repair: Handle null package
>> entries
>>
>> On Fri, Jun 7, 2013 at 9:01 PM, Lv Zheng <lv.zheng@intel.com> wrote:
>>> Sort package only after null/bad elements have been removed.
>>> Lv Zheng.
>>
>> again, please explain WHY.
>>
>> Every line of change to the kernel adds risk.
>> I see no justification in this commit message why any risk should be added
>> to the kernel.
>>
>> Nacked-by: Len Brown <len.brown@intel.com>

---------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
z siedziba w Gdansku
ul. Slowackiego 173
80-298 Gdansk

Sad Rejonowy Gdansk Polnoc w Gdansku, 
VII Wydzial Gospodarczy Krajowego Rejestru Sadowego, 
numer KRS 101882

NIP 957-07-52-316
Kapital zakladowy 200.000 zl

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


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

* RE: [PATCH 00/16] ACPICA: 20130517 release
  2013-06-15 23:24   ` Rafael J. Wysocki
@ 2013-06-18  1:39     ` Zheng, Lv
  2013-06-18  1:56       ` Zheng, Lv
  2013-06-18 10:35       ` Rafael J. Wysocki
  2013-06-18 18:55     ` Moore, Robert
  1 sibling, 2 replies; 77+ messages in thread
From: Zheng, Lv @ 2013-06-18  1:39 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Len Brown, Wysocki, Rafael J, Moore, Robert, Brown, Len, linux acpi

> > I would like to see this series re-freshed before it goes up-stream.
> > Generally, the commit messages need to be improved before they go into
> > the permanent kernel history.
> 
> Lv,
> 
> I've dropped [7/16] and [12/16] permanently (please do not resend them).

OK.

> I'd like to see new versions of [13-15/16] with improved changelogs along with
> [16/16].

I think the one need to do change log enhancement is the PATCH 04/16, others might be OK.
Patch 04 should be a back port patch which was already in Linux, the word "add" is not proper.

Thanks and best regards
-Lv

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

* RE: [PATCH 00/16] ACPICA: 20130517 release
  2013-06-18  1:39     ` Zheng, Lv
@ 2013-06-18  1:56       ` Zheng, Lv
  2013-06-18 10:35       ` Rafael J. Wysocki
  1 sibling, 0 replies; 77+ messages in thread
From: Zheng, Lv @ 2013-06-18  1:56 UTC (permalink / raw)
  To: Zheng, Lv, Rafael J. Wysocki
  Cc: Len Brown, Wysocki, Rafael J, Moore, Robert, Brown, Len, linux acpi

> > I'd like to see new versions of [13-15/16] with improved changelogs
> > along with [16/16].
> 
> I think the one need to do change log enhancement is the PATCH 04/16, others
> might be OK.
> Patch 04 should be a back port patch which was already in Linux, the word
> "add" is not proper.

Sorry that I didn't notice the comments, let me check Len's comments.

Thanks
-Lv

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

* Re: [PATCH 00/16] ACPICA: 20130517 release
  2013-06-18  1:39     ` Zheng, Lv
  2013-06-18  1:56       ` Zheng, Lv
@ 2013-06-18 10:35       ` Rafael J. Wysocki
  1 sibling, 0 replies; 77+ messages in thread
From: Rafael J. Wysocki @ 2013-06-18 10:35 UTC (permalink / raw)
  To: Zheng, Lv
  Cc: Rafael J. Wysocki, Len Brown, Moore, Robert, Brown, Len, linux acpi

On 6/18/2013 3:39 AM, Zheng, Lv wrote:
>>> I would like to see this series re-freshed before it goes up-stream.
>>> Generally, the commit messages need to be improved before they go into
>>> the permanent kernel history.
>> Lv,
>>
>> I've dropped [7/16] and [12/16] permanently (please do not resend them).
> OK.
>
>> I'd like to see new versions of [13-15/16] with improved changelogs along with
>> [16/16].
> I think the one need to do change log enhancement is the PATCH 04/16, others might be OK.
> Patch 04 should be a back port patch which was already in Linux, the word "add" is not proper.

Please see the Len's comments to patches [13-15/16] in the $subject 
series.  Those and [16/16] are the only patches I'm asking you to 
resubmit ([13-15/16] with improved changelogs as requested by Len).

Thanks,
Rafael

---------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
z siedziba w Gdansku
ul. Slowackiego 173
80-298 Gdansk

Sad Rejonowy Gdansk Polnoc w Gdansku, 
VII Wydzial Gospodarczy Krajowego Rejestru Sadowego, 
numer KRS 101882

NIP 957-07-52-316
Kapital zakladowy 200.000 zl

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

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

* RE: [PATCH 03/16] ACPICA: Standardize all switch() blocks
  2013-06-12 15:58   ` Len Brown
@ 2013-06-18 18:46     ` Moore, Robert
  0 siblings, 0 replies; 77+ messages in thread
From: Moore, Robert @ 2013-06-18 18:46 UTC (permalink / raw)
  To: Len Brown, Zheng, Lv
  Cc: Wysocki, Rafael J, Brown, Len, linux acpi, Guan, Chao

There were some really bad examples, where 2 or even 3 blank lines were inserted. These were the most severe cases. So we standardized on one blank line, unless there is a multi-line comment.


> -----Original Message-----
> From: lenb417@gmail.com [mailto:lenb417@gmail.com] On Behalf Of Len Brown
> Sent: Wednesday, June 12, 2013 8:59 AM
> To: Zheng, Lv
> Cc: Wysocki, Rafael J; Moore, Robert; Brown, Len; linux acpi; Guan, Chao
> Subject: Re: [PATCH 03/16] ACPICA: Standardize all switch() blocks
> 
> > After many years, different formatting for switch() has crept in.
> > This change makes every switch block identical. Chao Guan.
> > ACPICA bugzilla 997.
> 
> So what is the new format?
> Looks like a blank line after every "case", except no blank line if
> comment?
> 
> That would be a good thing to say in the commit message...
> 
> Also, for patches such as this, please note in the commit message that it
> is white-space only (indeed, in this case looks like blank lines only) and
> no functionality changes.
> 
> That would help optimize precious reviewer time, and also make it clear to
> those doing a bisect who read only the commit message and not the patch.
> 
> thanks,
> Len Brown
> Intel Open Source Technology Center

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

* RE: [PATCH 05/16] ACPICA: Split table print utilities to a new a separate file
  2013-06-12 17:03   ` Len Brown
@ 2013-06-18 18:46     ` Moore, Robert
  0 siblings, 0 replies; 77+ messages in thread
From: Moore, Robert @ 2013-06-18 18:46 UTC (permalink / raw)
  To: Len Brown, Zheng, Lv; +Cc: Wysocki, Rafael J, Brown, Len, linux acpi

Correct, should be "no functional changes".


> -----Original Message-----
> From: lenb417@gmail.com [mailto:lenb417@gmail.com] On Behalf Of Len Brown
> Sent: Wednesday, June 12, 2013 10:04 AM
> To: Zheng, Lv
> Cc: Wysocki, Rafael J; Moore, Robert; Brown, Len; linux acpi
> Subject: Re: [PATCH 05/16] ACPICA: Split table print utilities to a new a
> separate file
> 
> On Fri, Jun 7, 2013 at 8:59 PM, Lv Zheng <lv.zheng@intel.com> wrote:
> > From: Bob Moore <robert.moore@intel.com>
> >
> > Improves configurability of ACPICA.
> 
> 
> Just code movement, no logic changes or even any code changes, yes?
> If so, please state that in the commit message.
> 
> thanks,
> Len Brown, Intel Open Source Technology Center

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

* RE: [PATCH 07/16] ACPICA: New: Portable acpidump utility (get system ACPI tables)
  2013-06-12 17:07   ` Len Brown
  2013-06-15 23:09     ` Rafael J. Wysocki
@ 2013-06-18 18:48     ` Moore, Robert
  1 sibling, 0 replies; 77+ messages in thread
From: Moore, Robert @ 2013-06-18 18:48 UTC (permalink / raw)
  To: Len Brown, Zheng, Lv; +Cc: Wysocki, Rafael J, Brown, Len, linux acpi

This patch should contain the basic acpidump code, now portable.

For linux, it would replace the acpidump in the power tools.


> -----Original Message-----
> From: lenb417@gmail.com [mailto:lenb417@gmail.com] On Behalf Of Len Brown
> Sent: Wednesday, June 12, 2013 10:08 AM
> To: Zheng, Lv
> Cc: Wysocki, Rafael J; Moore, Robert; Brown, Len; linux acpi
> Subject: Re: [PATCH 07/16] ACPICA: New: Portable acpidump utility (get
> system ACPI tables)
> 
> > This utility dumps the system ACPI tables in an ascii format suitable
> > for extraction via the acpixtract utility.
> 
> This commit message does not match the contents of the patch, or explain
> how this patch is related (or not) to the acpidump utility already in the
> kernel tree under tools/power/acpi/acpidump/
> 
> Naked-by: Len Brown <len.brown@intel.com>

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

* RE: [PATCH 11/16] ACPICA: Clear events initialized flag upon event component termination
  2013-06-12 17:47   ` Len Brown
@ 2013-06-18 18:50     ` Moore, Robert
  0 siblings, 0 replies; 77+ messages in thread
From: Moore, Robert @ 2013-06-18 18:50 UTC (permalink / raw)
  To: Len Brown, Zheng, Lv
  Cc: Wysocki, Rafael J, Brown, Len, linux acpi, Tomasz Nowicki

We have in the past had ACPICA users that wished to terminate and later restart (Novell). In any case, we advertise this as a feature, so it should work.


> -----Original Message-----
> From: lenb417@gmail.com [mailto:lenb417@gmail.com] On Behalf Of Len Brown
> Sent: Wednesday, June 12, 2013 10:48 AM
> To: Zheng, Lv
> Cc: Wysocki, Rafael J; Moore, Robert; Brown, Len; linux acpi; Tomasz
> Nowicki
> Subject: Re: [PATCH 11/16] ACPICA: Clear events initialized flag upon
> event component termination
> 
> On Fri, Jun 7, 2013 at 9:00 PM, Lv Zheng <lv.zheng@intel.com> wrote:
> > From: Tomasz Nowicki <tomasz.nowicki@linaro.org>
> >
> > Clear this flag to allow clean startup and even double termination.
> > ACPICA BZ 1013. Tomasz Nowicki <tomasz.nowicki@linaro.org>
> 
> The patch looks logically correct, but I'm wondering what use-case made it
> necessary.  Do you have a system where you disable ACPI and then disable
> ACPI again?
> 
> BTW. it looks like we don't check for this flag being FALSE when we
> initialize, so I suppose if you had the case where you enable, disable,
> and then re-enable ACPI mode, that would already work -- though I don't
> know if anybody has ever done that.
> 
> Reviewed-by: Len Brown <len.brown@intel.com>

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

* RE: [PATCH 13/16] ACPICA: Move _PRT repair into the standard complex repair module
  2013-06-12 17:52   ` Len Brown
  2013-06-15 23:17     ` Rafael J. Wysocki
@ 2013-06-18 18:51     ` Moore, Robert
  2013-06-18 21:49       ` Rafael J. Wysocki
  1 sibling, 1 reply; 77+ messages in thread
From: Moore, Robert @ 2013-06-18 18:51 UTC (permalink / raw)
  To: Len Brown, Zheng, Lv; +Cc: Wysocki, Rafael J, Brown, Len, linux acpi

No functional change. This change simply moves the repair code from where it was originally implemented to the (more recent) repair module where it now belongs.

> -----Original Message-----
> From: lenb417@gmail.com [mailto:lenb417@gmail.com] On Behalf Of Len Brown
> Sent: Wednesday, June 12, 2013 10:52 AM
> To: Zheng, Lv
> Cc: Wysocki, Rafael J; Moore, Robert; Brown, Len; linux acpi
> Subject: Re: [PATCH 13/16] ACPICA: Move _PRT repair into the standard
> complex repair module
> 
> Please re-send this patch with a commit message that clarifies whether any
> logical change in operation should result from this patch or not.
> 
> It looks like the answer is no, that this a clean-up of the implementation
> of a AML workaround -- but I shouldn't have to read the code to figure
> that out, and neither should anybody else.
> 
> Nacked-by: Len Brown <len.brown@intel.com>

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

* RE: [PATCH 14/16] ACPICA: Add several repairs for _CST predefined name
  2013-06-12 17:58   ` Len Brown
  2013-06-15 23:17     ` Rafael J. Wysocki
@ 2013-06-18 18:51     ` Moore, Robert
  2013-06-18 21:48       ` Rafael J. Wysocki
  1 sibling, 1 reply; 77+ messages in thread
From: Moore, Robert @ 2013-06-18 18:51 UTC (permalink / raw)
  To: Len Brown, Zheng, Lv; +Cc: Wysocki, Rafael J, Brown, Len, linux acpi

Correct, additional _CST sanity checks and repairs.

> -----Original Message-----
> From: lenb417@gmail.com [mailto:lenb417@gmail.com] On Behalf Of Len Brown
> Sent: Wednesday, June 12, 2013 10:59 AM
> To: Zheng, Lv
> Cc: Wysocki, Rafael J; Moore, Robert; Brown, Len; linux acpi
> Subject: Re: [PATCH 14/16] ACPICA: Add several repairs for _CST predefined
> name
> 
> On Fri, Jun 7, 2013 at 9:01 PM, Lv Zheng <lv.zheng@intel.com> wrote:
> > Sort list based on the C-state, remove invalid/zero entries.
> > ACPICA BZ 890. Lv Zheng.
> 
> The commit message should not just say what the code does, it should more
> importantly answer WHY the change was made, and why anybody should care
> about the patch.
> 
> I think the answer here is that we are adding _CST sanity checking --
> presumably to deal with buggy AML?
> 
> What will we see happen after this patch that we did not see before it?
> 
> Nacked-by: Len Brown <len.brown@intel.com>

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

* RE: [PATCH 15/16] ACPICA: _CST repair: Handle null package entries
  2013-06-12 18:00   ` Len Brown
  2013-06-15 23:18     ` Rafael J. Wysocki
  2013-06-17 16:41     ` Moore, Robert
@ 2013-06-18 18:52     ` Moore, Robert
  2013-06-18 21:50       ` Rafael J. Wysocki
  2 siblings, 1 reply; 77+ messages in thread
From: Moore, Robert @ 2013-06-18 18:52 UTC (permalink / raw)
  To: Len Brown, Zheng, Lv; +Cc: Wysocki, Rafael J, Brown, Len, linux acpi

This change fixes a bug in the original _CST repair code.

> -----Original Message-----
> From: lenb417@gmail.com [mailto:lenb417@gmail.com] On Behalf Of Len Brown
> Sent: Wednesday, June 12, 2013 11:00 AM
> To: Zheng, Lv
> Cc: Wysocki, Rafael J; Moore, Robert; Brown, Len; linux acpi
> Subject: Re: [PATCH 15/16] ACPICA: _CST repair: Handle null package
> entries
> 
> On Fri, Jun 7, 2013 at 9:01 PM, Lv Zheng <lv.zheng@intel.com> wrote:
> > Sort package only after null/bad elements have been removed.
> > Lv Zheng.
> 
> 
> again, please explain WHY.
> 
> Every line of change to the kernel adds risk.
> I see no justification in this commit message why any risk should be added
> to the kernel.
> 
> Nacked-by: Len Brown <len.brown@intel.com>

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

* RE: [PATCH 07/16] ACPICA: New: Portable acpidump utility (get system ACPI tables)
  2013-06-15 23:09     ` Rafael J. Wysocki
@ 2013-06-18 18:53       ` Moore, Robert
  2013-06-18 21:06         ` Rafael J. Wysocki
  0 siblings, 1 reply; 77+ messages in thread
From: Moore, Robert @ 2013-06-18 18:53 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown
  Cc: Zheng, Lv, Wysocki, Rafael J, Brown, Len, linux acpi

Please don't drop this if it is indeed the acpidump utility. This utility is now a part of ACPICA and should replace the existing utility.


> -----Original Message-----
> From: Rafael J. Wysocki [mailto:rjw@sisk.pl]
> Sent: Saturday, June 15, 2013 4:10 PM
> To: Len Brown
> Cc: Zheng, Lv; Wysocki, Rafael J; Moore, Robert; Brown, Len; linux acpi
> Subject: Re: [PATCH 07/16] ACPICA: New: Portable acpidump utility (get
> system ACPI tables)
> 
> On Wednesday, June 12, 2013 01:07:50 PM Len Brown wrote:
> > > This utility dumps the system ACPI tables in an ascii format
> > > suitable for extraction via the acpixtract utility.
> >
> > This commit message does not match the contents of the patch, or
> > explain how this patch is related (or not) to the acpidump utility
> > already in the kernel tree under tools/power/acpi/acpidump/
> >
> > Naked-by: Len Brown <len.brown@intel.com>
> 
> Well, I was on the verge of dropping this one before, so dropped now.
> 
> Thanks,
> Rafael
> 
> 
> --
> I speak only for myself.
> Rafael J. Wysocki, Intel Open Source Technology Center.

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

* RE: [PATCH 00/16] ACPICA: 20130517 release
  2013-06-15 23:24   ` Rafael J. Wysocki
  2013-06-18  1:39     ` Zheng, Lv
@ 2013-06-18 18:55     ` Moore, Robert
  2013-06-18 21:04       ` Rafael J. Wysocki
  1 sibling, 1 reply; 77+ messages in thread
From: Moore, Robert @ 2013-06-18 18:55 UTC (permalink / raw)
  To: Rafael J. Wysocki, Zheng, Lv
  Cc: Len Brown, Wysocki, Rafael J, Brown, Len, linux acpi



> -----Original Message-----
> From: Rafael J. Wysocki [mailto:rjw@sisk.pl]
> Sent: Saturday, June 15, 2013 4:25 PM
> To: Zheng, Lv
> Cc: Len Brown; Wysocki, Rafael J; Moore, Robert; Brown, Len; linux acpi
> Subject: Re: [PATCH 00/16] ACPICA: 20130517 release
> 
> On Wednesday, June 12, 2013 02:04:46 PM Len Brown wrote:
> > I would like to see this series re-freshed before it goes up-stream.
> > Generally, the commit messages need to be improved before they go into
> > the permanent kernel history.
> 
> Lv,
> 
> I've dropped [7/16] 

Again, this is a new version of acpidump and should replace the existing utility.


and [12/16] permanently (please do not resend them).


This is the makefile change for apple, yes? Depends on how you want to handle such things. If you don't accept these kinds of changes, it introduces divergence from the ACPICA code.


> 
> I'd like to see new versions of [13-15/16] with improved changelogs along
> with [16/16].
> 
> The remaining patches from the series ([1-6/16], [8-11/16]) have been
> queued up for 3.11 (possibly with some changelog fixups).
> 
> Thanks,
> Rafael
> 
> 
> --
> I speak only for myself.
> Rafael J. Wysocki, Intel Open Source Technology Center.

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

* Re: [PATCH 00/16] ACPICA: 20130517 release
  2013-06-18 18:55     ` Moore, Robert
@ 2013-06-18 21:04       ` Rafael J. Wysocki
  2013-06-19  0:58         ` Moore, Robert
  0 siblings, 1 reply; 77+ messages in thread
From: Rafael J. Wysocki @ 2013-06-18 21:04 UTC (permalink / raw)
  To: Moore, Robert
  Cc: Zheng, Lv, Len Brown, Wysocki, Rafael J, Brown, Len, linux acpi

On Tuesday, June 18, 2013 06:55:33 PM Moore, Robert wrote:
> 
> > -----Original Message-----
> > From: Rafael J. Wysocki [mailto:rjw@sisk.pl]
> > Sent: Saturday, June 15, 2013 4:25 PM
> > To: Zheng, Lv
> > Cc: Len Brown; Wysocki, Rafael J; Moore, Robert; Brown, Len; linux acpi
> > Subject: Re: [PATCH 00/16] ACPICA: 20130517 release
> > 
> > On Wednesday, June 12, 2013 02:04:46 PM Len Brown wrote:
> > > I would like to see this series re-freshed before it goes up-stream.
> > > Generally, the commit messages need to be improved before they go into
> > > the permanent kernel history.
> > 
> > Lv,
> > 
> > I've dropped [7/16] 
> 
> Again, this is a new version of acpidump and should replace the existing utility.

OK, and how does the patch actually work?  That is, what is a user supposed to
do to build the generic acpidump with the patch applied?

> and [12/16] permanently (please do not resend them).
> 
> 
> This is the makefile change for apple, yes? Depends on how you want to handle
> such things. If you don't accept these kinds of changes, it introduces
> divergence from the ACPICA code.

Yes, it does, but on the other hand that change is not necessary in the kernel
source.

This is a policy issue and we don't seem to have a clear policy here: whether
or not divergences related to things that don't have to be in the kernel need
to be "fixed".  I don't think that they do and Len seems to agree with me.

Thanks,
Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

* Re: [PATCH 07/16] ACPICA: New: Portable acpidump utility (get system ACPI tables)
  2013-06-18 18:53       ` Moore, Robert
@ 2013-06-18 21:06         ` Rafael J. Wysocki
  2013-06-18 21:21           ` Moore, Robert
  0 siblings, 1 reply; 77+ messages in thread
From: Rafael J. Wysocki @ 2013-06-18 21:06 UTC (permalink / raw)
  To: Moore, Robert
  Cc: Len Brown, Zheng, Lv, Wysocki, Rafael J, Brown, Len, linux acpi

On Tuesday, June 18, 2013 06:53:42 PM Moore, Robert wrote:
> Please don't drop this if it is indeed the acpidump utility.

Well, that's unclear to me to be honest. :-)

> This utility is now a part of ACPICA and should replace the existing utility.

OK, but we need to tell the users how to build it.

Thanks,
Rafael


> > -----Original Message-----
> > From: Rafael J. Wysocki [mailto:rjw@sisk.pl]
> > Sent: Saturday, June 15, 2013 4:10 PM
> > To: Len Brown
> > Cc: Zheng, Lv; Wysocki, Rafael J; Moore, Robert; Brown, Len; linux acpi
> > Subject: Re: [PATCH 07/16] ACPICA: New: Portable acpidump utility (get
> > system ACPI tables)
> > 
> > On Wednesday, June 12, 2013 01:07:50 PM Len Brown wrote:
> > > > This utility dumps the system ACPI tables in an ascii format
> > > > suitable for extraction via the acpixtract utility.
> > >
> > > This commit message does not match the contents of the patch, or
> > > explain how this patch is related (or not) to the acpidump utility
> > > already in the kernel tree under tools/power/acpi/acpidump/
> > >
> > > Naked-by: Len Brown <len.brown@intel.com>
> > 
> > Well, I was on the verge of dropping this one before, so dropped now.
> > 
> > Thanks,
> > Rafael
> > 
> > 
> > --
> > I speak only for myself.
> > Rafael J. Wysocki, Intel Open Source Technology Center.
> 
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

* RE: [PATCH 07/16] ACPICA: New: Portable acpidump utility (get system ACPI tables)
  2013-06-18 21:06         ` Rafael J. Wysocki
@ 2013-06-18 21:21           ` Moore, Robert
  2013-06-18 21:40             ` Rafael J. Wysocki
  0 siblings, 1 reply; 77+ messages in thread
From: Moore, Robert @ 2013-06-18 21:21 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Len Brown, Zheng, Lv, Wysocki, Rafael J, Brown, Len, linux acpi

It would be a similar generation to the iASL compiler or the acpixtract utility.


> -----Original Message-----
> From: Rafael J. Wysocki [mailto:rjw@sisk.pl]
> Sent: Tuesday, June 18, 2013 2:06 PM
> To: Moore, Robert
> Cc: Len Brown; Zheng, Lv; Wysocki, Rafael J; Brown, Len; linux acpi
> Subject: Re: [PATCH 07/16] ACPICA: New: Portable acpidump utility (get
> system ACPI tables)
> 
> On Tuesday, June 18, 2013 06:53:42 PM Moore, Robert wrote:
> > Please don't drop this if it is indeed the acpidump utility.
> 
> Well, that's unclear to me to be honest. :-)
> 
> > This utility is now a part of ACPICA and should replace the existing
> utility.
> 
> OK, but we need to tell the users how to build it.
> 
> Thanks,
> Rafael
> 
> 
> > > -----Original Message-----
> > > From: Rafael J. Wysocki [mailto:rjw@sisk.pl]
> > > Sent: Saturday, June 15, 2013 4:10 PM
> > > To: Len Brown
> > > Cc: Zheng, Lv; Wysocki, Rafael J; Moore, Robert; Brown, Len; linux
> > > acpi
> > > Subject: Re: [PATCH 07/16] ACPICA: New: Portable acpidump utility
> > > (get system ACPI tables)
> > >
> > > On Wednesday, June 12, 2013 01:07:50 PM Len Brown wrote:
> > > > > This utility dumps the system ACPI tables in an ascii format
> > > > > suitable for extraction via the acpixtract utility.
> > > >
> > > > This commit message does not match the contents of the patch, or
> > > > explain how this patch is related (or not) to the acpidump utility
> > > > already in the kernel tree under tools/power/acpi/acpidump/
> > > >
> > > > Naked-by: Len Brown <len.brown@intel.com>
> > >
> > > Well, I was on the verge of dropping this one before, so dropped now.
> > >
> > > Thanks,
> > > Rafael
> > >
> > >
> > > --
> > > I speak only for myself.
> > > Rafael J. Wysocki, Intel Open Source Technology Center.
> >
> --
> I speak only for myself.
> Rafael J. Wysocki, Intel Open Source Technology Center.

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

* Re: [PATCH 07/16] ACPICA: New: Portable acpidump utility (get system ACPI tables)
  2013-06-18 21:21           ` Moore, Robert
@ 2013-06-18 21:40             ` Rafael J. Wysocki
  2013-06-19  0:48               ` Moore, Robert
  0 siblings, 1 reply; 77+ messages in thread
From: Rafael J. Wysocki @ 2013-06-18 21:40 UTC (permalink / raw)
  To: Moore, Robert
  Cc: Len Brown, Zheng, Lv, Wysocki, Rafael J, Brown, Len, linux acpi

On Tuesday, June 18, 2013 09:21:22 PM Moore, Robert wrote:
> It would be a similar generation to the iASL compiler or the acpixtract utility.

Well, so why don't we write in the changelog: "This change allows the user to
build the portable acpidump utility by executing the following command: ..."
and so on?

Rafael


> > -----Original Message-----
> > From: Rafael J. Wysocki [mailto:rjw@sisk.pl]
> > Sent: Tuesday, June 18, 2013 2:06 PM
> > To: Moore, Robert
> > Cc: Len Brown; Zheng, Lv; Wysocki, Rafael J; Brown, Len; linux acpi
> > Subject: Re: [PATCH 07/16] ACPICA: New: Portable acpidump utility (get
> > system ACPI tables)
> > 
> > On Tuesday, June 18, 2013 06:53:42 PM Moore, Robert wrote:
> > > Please don't drop this if it is indeed the acpidump utility.
> > 
> > Well, that's unclear to me to be honest. :-)
> > 
> > > This utility is now a part of ACPICA and should replace the existing
> > utility.
> > 
> > OK, but we need to tell the users how to build it.
> > 
> > Thanks,
> > Rafael
> > 
> > 
> > > > -----Original Message-----
> > > > From: Rafael J. Wysocki [mailto:rjw@sisk.pl]
> > > > Sent: Saturday, June 15, 2013 4:10 PM
> > > > To: Len Brown
> > > > Cc: Zheng, Lv; Wysocki, Rafael J; Moore, Robert; Brown, Len; linux
> > > > acpi
> > > > Subject: Re: [PATCH 07/16] ACPICA: New: Portable acpidump utility
> > > > (get system ACPI tables)
> > > >
> > > > On Wednesday, June 12, 2013 01:07:50 PM Len Brown wrote:
> > > > > > This utility dumps the system ACPI tables in an ascii format
> > > > > > suitable for extraction via the acpixtract utility.
> > > > >
> > > > > This commit message does not match the contents of the patch, or
> > > > > explain how this patch is related (or not) to the acpidump utility
> > > > > already in the kernel tree under tools/power/acpi/acpidump/
> > > > >
> > > > > Naked-by: Len Brown <len.brown@intel.com>
> > > >
> > > > Well, I was on the verge of dropping this one before, so dropped now.
> > > >
> > > > Thanks,
> > > > Rafael
> > > >
> > > >
> > > > --
> > > > I speak only for myself.
> > > > Rafael J. Wysocki, Intel Open Source Technology Center.
> > >
> > --
> > I speak only for myself.
> > Rafael J. Wysocki, Intel Open Source Technology Center.
> 
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

* Re: [PATCH 14/16] ACPICA: Add several repairs for _CST predefined name
  2013-06-18 18:51     ` Moore, Robert
@ 2013-06-18 21:48       ` Rafael J. Wysocki
  2013-06-19  0:52         ` Moore, Robert
  0 siblings, 1 reply; 77+ messages in thread
From: Rafael J. Wysocki @ 2013-06-18 21:48 UTC (permalink / raw)
  To: Moore, Robert
  Cc: Len Brown, Zheng, Lv, Wysocki, Rafael J, Brown, Len, linux acpi

On Tuesday, June 18, 2013 06:51:45 PM Moore, Robert wrote:
> Correct, additional _CST sanity checks and repairs.

OK, and what AML breakage does it help against, in particular?

Rafael


> > -----Original Message-----
> > From: lenb417@gmail.com [mailto:lenb417@gmail.com] On Behalf Of Len Brown
> > Sent: Wednesday, June 12, 2013 10:59 AM
> > To: Zheng, Lv
> > Cc: Wysocki, Rafael J; Moore, Robert; Brown, Len; linux acpi
> > Subject: Re: [PATCH 14/16] ACPICA: Add several repairs for _CST predefined
> > name
> > 
> > On Fri, Jun 7, 2013 at 9:01 PM, Lv Zheng <lv.zheng@intel.com> wrote:
> > > Sort list based on the C-state, remove invalid/zero entries.
> > > ACPICA BZ 890. Lv Zheng.
> > 
> > The commit message should not just say what the code does, it should more
> > importantly answer WHY the change was made, and why anybody should care
> > about the patch.
> > 
> > I think the answer here is that we are adding _CST sanity checking --
> > presumably to deal with buggy AML?
> > 
> > What will we see happen after this patch that we did not see before it?
> > 
> > Nacked-by: Len Brown <len.brown@intel.com>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

* Re: [PATCH 13/16] ACPICA: Move _PRT repair into the standard complex repair module
  2013-06-18 18:51     ` Moore, Robert
@ 2013-06-18 21:49       ` Rafael J. Wysocki
  2013-06-19 23:57         ` Rafael J. Wysocki
  0 siblings, 1 reply; 77+ messages in thread
From: Rafael J. Wysocki @ 2013-06-18 21:49 UTC (permalink / raw)
  To: Moore, Robert
  Cc: Len Brown, Zheng, Lv, Wysocki, Rafael J, Brown, Len, linux acpi

On Tuesday, June 18, 2013 06:51:10 PM Moore, Robert wrote:
> No functional change. This change simply moves the repair code from where it
> was originally implemented to the (more recent) repair module where it now belongs.

OK, I'll apply this one with a fixed-up changelog.

Thanks,
Rafael


> > -----Original Message-----
> > From: lenb417@gmail.com [mailto:lenb417@gmail.com] On Behalf Of Len Brown
> > Sent: Wednesday, June 12, 2013 10:52 AM
> > To: Zheng, Lv
> > Cc: Wysocki, Rafael J; Moore, Robert; Brown, Len; linux acpi
> > Subject: Re: [PATCH 13/16] ACPICA: Move _PRT repair into the standard
> > complex repair module
> > 
> > Please re-send this patch with a commit message that clarifies whether any
> > logical change in operation should result from this patch or not.
> > 
> > It looks like the answer is no, that this a clean-up of the implementation
> > of a AML workaround -- but I shouldn't have to read the code to figure
> > that out, and neither should anybody else.
> > 
> > Nacked-by: Len Brown <len.brown@intel.com>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

* Re: [PATCH 15/16] ACPICA: _CST repair: Handle null package entries
  2013-06-18 18:52     ` Moore, Robert
@ 2013-06-18 21:50       ` Rafael J. Wysocki
  2013-06-19  0:50         ` Moore, Robert
  0 siblings, 1 reply; 77+ messages in thread
From: Rafael J. Wysocki @ 2013-06-18 21:50 UTC (permalink / raw)
  To: Moore, Robert
  Cc: Len Brown, Zheng, Lv, Wysocki, Rafael J, Brown, Len, linux acpi

On Tuesday, June 18, 2013 06:52:12 PM Moore, Robert wrote:
> This change fixes a bug in the original _CST repair code.

Well, in that case the changelog should explain what the bug is/was.

Thanks,
Rafael


> > -----Original Message-----
> > From: lenb417@gmail.com [mailto:lenb417@gmail.com] On Behalf Of Len Brown
> > Sent: Wednesday, June 12, 2013 11:00 AM
> > To: Zheng, Lv
> > Cc: Wysocki, Rafael J; Moore, Robert; Brown, Len; linux acpi
> > Subject: Re: [PATCH 15/16] ACPICA: _CST repair: Handle null package
> > entries
> > 
> > On Fri, Jun 7, 2013 at 9:01 PM, Lv Zheng <lv.zheng@intel.com> wrote:
> > > Sort package only after null/bad elements have been removed.
> > > Lv Zheng.
> > 
> > 
> > again, please explain WHY.
> > 
> > Every line of change to the kernel adds risk.
> > I see no justification in this commit message why any risk should be added
> > to the kernel.
> > 
> > Nacked-by: Len Brown <len.brown@intel.com>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

* Re: [PATCH 15/16] ACPICA: _CST repair: Handle null package entries
  2013-06-17 20:31       ` Rafael J. Wysocki
@ 2013-06-18 21:51         ` Rafael J. Wysocki
  0 siblings, 0 replies; 77+ messages in thread
From: Rafael J. Wysocki @ 2013-06-18 21:51 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Moore, Robert, Zheng, Lv, Len Brown, Brown, Len, linux acpi

On Monday, June 17, 2013 10:31:44 PM Rafael J. Wysocki wrote:
> On 6/17/2013 6:41 PM, Moore, Robert wrote:
> > This one is just adding additional checks on the _CST that are obvious errors in the AML. The eventual goal of the "repair" code in ACPICA is to never return a bad package from things like _CST. In other words, an AE_OK guarantees that the return value is usable.
> >
> > So, this is an additional implementation of this longer-range project.
> >
> 
> Thanks Bob!
> 
> Lv, care to add the above explanation from Bob to the changelog of the 
> $subject patch?

Well, I can add it too, I suppose.

Thanks,
Rafael


> >> -----Original Message-----
> >> From: lenb417@gmail.com [mailto:lenb417@gmail.com] On Behalf Of Len Brown
> >> Sent: Wednesday, June 12, 2013 11:00 AM
> >> To: Zheng, Lv
> >> Cc: Wysocki, Rafael J; Moore, Robert; Brown, Len; linux acpi
> >> Subject: Re: [PATCH 15/16] ACPICA: _CST repair: Handle null package
> >> entries
> >>
> >> On Fri, Jun 7, 2013 at 9:01 PM, Lv Zheng <lv.zheng@intel.com> wrote:
> >>> Sort package only after null/bad elements have been removed.
> >>> Lv Zheng.
> >>
> >> again, please explain WHY.
> >>
> >> Every line of change to the kernel adds risk.
> >> I see no justification in this commit message why any risk should be added
> >> to the kernel.
> >>
> >> Nacked-by: Len Brown <len.brown@intel.com>
> 
> ---------------------------------------------------------------------
> Intel Technology Poland sp. z o.o.
> z siedziba w Gdansku
> ul. Slowackiego 173
> 80-298 Gdansk
> 
> Sad Rejonowy Gdansk Polnoc w Gdansku, 
> VII Wydzial Gospodarczy Krajowego Rejestru Sadowego, 
> numer KRS 101882
> 
> NIP 957-07-52-316
> Kapital zakladowy 200.000 zl
> 
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

* RE: [PATCH 07/16] ACPICA: New: Portable acpidump utility (get system ACPI tables)
  2013-06-18 21:40             ` Rafael J. Wysocki
@ 2013-06-19  0:48               ` Moore, Robert
  2013-06-19 23:10                 ` Rafael J. Wysocki
  0 siblings, 1 reply; 77+ messages in thread
From: Moore, Robert @ 2013-06-19  0:48 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Len Brown, Zheng, Lv, Wysocki, Rafael J, Brown, Len, linux acpi

Sorry, I don't think the Linux version has been completed in version 20130517 -- so perhaps you should ignore this patch after all, unless you want to simply establish the infrastructure for the final Linux version. The Linux-specific code is completed and will be part of the June release.

However, we can still discuss the future of the changelog, etc. We seem to have an overall problem where the ACPICA commit log is "generic", but I'm seeing here a request to make the actual Linux patches more specific to Linux.

As far as acpica and acpidump is concerned, I put specific generation instructions in the reference manual...

Of course, the details for any individual operating system may be different (especially file locations), so I have to make the acpica changelog somewhat generic.


Here is the actual acpica changelog text concerning acpidump, for version 20130517:

2) iASL Compiler/Disassembler and Tools:

New utility: Implemented an easily portable version of the acpidump 
utility to extract ACPI tables from the system (or a file) in an ASCII hex 
dump format. The top-level code implements the various command line 
options, file I/O, and table dump routines. To port to a new host, only 
three functions need to be implemented to get tables -- since this 
functionality is OS-dependent. See the tools/acpidump/apmain.c module and 
the ACPICA reference for porting instructions. ACPICA BZ 859. Notes:
1) The Windows version obtains the ACPI tables from the Registry.
2) The Linux version is under development.
3) Other hosts - If an OS-dependent module is submitted, it will be 
distributed with ACPICA.






> -----Original Message-----
> From: Rafael J. Wysocki [mailto:rjw@sisk.pl]
> Sent: Tuesday, June 18, 2013 2:41 PM
> To: Moore, Robert
> Cc: Len Brown; Zheng, Lv; Wysocki, Rafael J; Brown, Len; linux acpi
> Subject: Re: [PATCH 07/16] ACPICA: New: Portable acpidump utility (get
> system ACPI tables)
> 
> On Tuesday, June 18, 2013 09:21:22 PM Moore, Robert wrote:
> > It would be a similar generation to the iASL compiler or the acpixtract
> utility.
> 
> Well, so why don't we write in the changelog: "This change allows the user
> to build the portable acpidump utility by executing the following command:
> ..."
> and so on?
> 
> Rafael
> 
> 
> > > -----Original Message-----
> > > From: Rafael J. Wysocki [mailto:rjw@sisk.pl]
> > > Sent: Tuesday, June 18, 2013 2:06 PM
> > > To: Moore, Robert
> > > Cc: Len Brown; Zheng, Lv; Wysocki, Rafael J; Brown, Len; linux acpi
> > > Subject: Re: [PATCH 07/16] ACPICA: New: Portable acpidump utility
> > > (get system ACPI tables)
> > >
> > > On Tuesday, June 18, 2013 06:53:42 PM Moore, Robert wrote:
> > > > Please don't drop this if it is indeed the acpidump utility.
> > >
> > > Well, that's unclear to me to be honest. :-)
> > >
> > > > This utility is now a part of ACPICA and should replace the
> > > > existing
> > > utility.
> > >
> > > OK, but we need to tell the users how to build it.
> > >
> > > Thanks,
> > > Rafael
> > >
> > >
> > > > > -----Original Message-----
> > > > > From: Rafael J. Wysocki [mailto:rjw@sisk.pl]
> > > > > Sent: Saturday, June 15, 2013 4:10 PM
> > > > > To: Len Brown
> > > > > Cc: Zheng, Lv; Wysocki, Rafael J; Moore, Robert; Brown, Len;
> > > > > linux acpi
> > > > > Subject: Re: [PATCH 07/16] ACPICA: New: Portable acpidump
> > > > > utility (get system ACPI tables)
> > > > >
> > > > > On Wednesday, June 12, 2013 01:07:50 PM Len Brown wrote:
> > > > > > > This utility dumps the system ACPI tables in an ascii format
> > > > > > > suitable for extraction via the acpixtract utility.
> > > > > >
> > > > > > This commit message does not match the contents of the patch,
> > > > > > or explain how this patch is related (or not) to the acpidump
> > > > > > utility already in the kernel tree under
> > > > > > tools/power/acpi/acpidump/
> > > > > >
> > > > > > Naked-by: Len Brown <len.brown@intel.com>
> > > > >
> > > > > Well, I was on the verge of dropping this one before, so dropped
> now.
> > > > >
> > > > > Thanks,
> > > > > Rafael
> > > > >
> > > > >
> > > > > --
> > > > > I speak only for myself.
> > > > > Rafael J. Wysocki, Intel Open Source Technology Center.
> > > >
> > > --
> > > I speak only for myself.
> > > Rafael J. Wysocki, Intel Open Source Technology Center.
> >
> --
> I speak only for myself.
> Rafael J. Wysocki, Intel Open Source Technology Center.

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

* RE: [PATCH 15/16] ACPICA: _CST repair: Handle null package entries
  2013-06-18 21:50       ` Rafael J. Wysocki
@ 2013-06-19  0:50         ` Moore, Robert
  2013-06-19 23:56           ` Rafael J. Wysocki
  0 siblings, 1 reply; 77+ messages in thread
From: Moore, Robert @ 2013-06-19  0:50 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Len Brown, Zheng, Lv, Wysocki, Rafael J, Brown, Len, linux acpi

> > > Sort package only after null/bad elements have been removed.
This is the bug.

Lv, this should probably be something like:

> > > Fixes a problem where the _CST sort was performed too early. This change sorts the package only after null/bad elements have been removed.



> -----Original Message-----
> From: Rafael J. Wysocki [mailto:rjw@sisk.pl]
> Sent: Tuesday, June 18, 2013 2:50 PM
> To: Moore, Robert
> Cc: Len Brown; Zheng, Lv; Wysocki, Rafael J; Brown, Len; linux acpi
> Subject: Re: [PATCH 15/16] ACPICA: _CST repair: Handle null package
> entries
> 
> On Tuesday, June 18, 2013 06:52:12 PM Moore, Robert wrote:
> > This change fixes a bug in the original _CST repair code.
> 
> Well, in that case the changelog should explain what the bug is/was.
> 
> Thanks,
> Rafael
> 
> 
> > > -----Original Message-----
> > > From: lenb417@gmail.com [mailto:lenb417@gmail.com] On Behalf Of Len
> > > Brown
> > > Sent: Wednesday, June 12, 2013 11:00 AM
> > > To: Zheng, Lv
> > > Cc: Wysocki, Rafael J; Moore, Robert; Brown, Len; linux acpi
> > > Subject: Re: [PATCH 15/16] ACPICA: _CST repair: Handle null package
> > > entries
> > >
> > > On Fri, Jun 7, 2013 at 9:01 PM, Lv Zheng <lv.zheng@intel.com> wrote:
> > > > Sort package only after null/bad elements have been removed.
> > > > Lv Zheng.
> > >
> > >
> > > again, please explain WHY.
> > >
> > > Every line of change to the kernel adds risk.
> > > I see no justification in this commit message why any risk should be
> > > added to the kernel.
> > >
> > > Nacked-by: Len Brown <len.brown@intel.com>
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-acpi"
> > in the body of a message to majordomo@vger.kernel.org More majordomo
> > info at  http://vger.kernel.org/majordomo-info.html
> --
> I speak only for myself.
> Rafael J. Wysocki, Intel Open Source Technology Center.

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

* RE: [PATCH 14/16] ACPICA: Add several repairs for _CST predefined name
  2013-06-18 21:48       ` Rafael J. Wysocki
@ 2013-06-19  0:52         ` Moore, Robert
  2013-06-19 23:57           ` Rafael J. Wysocki
  0 siblings, 1 reply; 77+ messages in thread
From: Moore, Robert @ 2013-06-19  0:52 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Len Brown, Zheng, Lv, Wysocki, Rafael J, Brown, Len, linux acpi

Fixes these possible problems. I think we've actually seen at least one of these, not sure where/when:

 * DESCRIPTION: Repair for the _CST object:
 *              1. Sort the list ascending by C state type
 *              2. Ensure type cannot be zero
 *              3. A sub-package count of zero means _CST is meaningless
 *              4. Count must match the number of C state sub-packages




> -----Original Message-----
> From: Rafael J. Wysocki [mailto:rjw@sisk.pl]
> Sent: Tuesday, June 18, 2013 2:49 PM
> To: Moore, Robert
> Cc: Len Brown; Zheng, Lv; Wysocki, Rafael J; Brown, Len; linux acpi
> Subject: Re: [PATCH 14/16] ACPICA: Add several repairs for _CST predefined
> name
> 
> On Tuesday, June 18, 2013 06:51:45 PM Moore, Robert wrote:
> > Correct, additional _CST sanity checks and repairs.
> 
> OK, and what AML breakage does it help against, in particular?
> 
> Rafael
> 
> 
> > > -----Original Message-----
> > > From: lenb417@gmail.com [mailto:lenb417@gmail.com] On Behalf Of Len
> > > Brown
> > > Sent: Wednesday, June 12, 2013 10:59 AM
> > > To: Zheng, Lv
> > > Cc: Wysocki, Rafael J; Moore, Robert; Brown, Len; linux acpi
> > > Subject: Re: [PATCH 14/16] ACPICA: Add several repairs for _CST
> > > predefined name
> > >
> > > On Fri, Jun 7, 2013 at 9:01 PM, Lv Zheng <lv.zheng@intel.com> wrote:
> > > > Sort list based on the C-state, remove invalid/zero entries.
> > > > ACPICA BZ 890. Lv Zheng.
> > >
> > > The commit message should not just say what the code does, it should
> > > more importantly answer WHY the change was made, and why anybody
> > > should care about the patch.
> > >
> > > I think the answer here is that we are adding _CST sanity checking
> > > -- presumably to deal with buggy AML?
> > >
> > > What will we see happen after this patch that we did not see before
> it?
> > >
> > > Nacked-by: Len Brown <len.brown@intel.com>
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-acpi"
> > in the body of a message to majordomo@vger.kernel.org More majordomo
> > info at  http://vger.kernel.org/majordomo-info.html
> --
> I speak only for myself.
> Rafael J. Wysocki, Intel Open Source Technology Center.

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

* RE: [PATCH 00/16] ACPICA: 20130517 release
  2013-06-18 21:04       ` Rafael J. Wysocki
@ 2013-06-19  0:58         ` Moore, Robert
  0 siblings, 0 replies; 77+ messages in thread
From: Moore, Robert @ 2013-06-19  0:58 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Zheng, Lv, Len Brown, Wysocki, Rafael J, Brown, Len, linux acpi



> -----Original Message-----
> From: Rafael J. Wysocki [mailto:rjw@sisk.pl]
> Sent: Tuesday, June 18, 2013 2:04 PM
> To: Moore, Robert
> Cc: Zheng, Lv; Len Brown; Wysocki, Rafael J; Brown, Len; linux acpi
> Subject: Re: [PATCH 00/16] ACPICA: 20130517 release
> 
> On Tuesday, June 18, 2013 06:55:33 PM Moore, Robert wrote:
> >
> > > -----Original Message-----
> > > From: Rafael J. Wysocki [mailto:rjw@sisk.pl]
> > > Sent: Saturday, June 15, 2013 4:25 PM
> > > To: Zheng, Lv
> > > Cc: Len Brown; Wysocki, Rafael J; Moore, Robert; Brown, Len; linux
> > > acpi
> > > Subject: Re: [PATCH 00/16] ACPICA: 20130517 release
> > >
> > > On Wednesday, June 12, 2013 02:04:46 PM Len Brown wrote:
> > > > I would like to see this series re-freshed before it goes up-stream.
> > > > Generally, the commit messages need to be improved before they go
> > > > into the permanent kernel history.
> > >
> > > Lv,
> > >
> > > I've dropped [7/16]
> >
> > Again, this is a new version of acpidump and should replace the existing
> utility.
> 
> OK, and how does the patch actually work?  That is, what is a user
> supposed to do to build the generic acpidump with the patch applied?
> 
> > and [12/16] permanently (please do not resend them).
> >
> >
> > This is the makefile change for apple, yes? Depends on how you want to
> > handle such things. If you don't accept these kinds of changes, it
> > introduces divergence from the ACPICA code.
> 
> Yes, it does, but on the other hand that change is not necessary in the
> kernel source.
> 
> This is a policy issue and we don't seem to have a clear policy here:
> whether or not divergences related to things that don't have to be in the
> kernel need to be "fixed".  I don't think that they do and Len seems to
> agree with me.
> 


Of course, no matter how it is justified, it is still a divergence from ACPICA and has all of the associated problems with continual manual integration and the possible introduction of bugs.

Fortunately, this issue appears only in a few areas due to the design of ACPICA - but makefiles and a few other files do in fact have some OS-specific (and even compiler-specific) conditionals.

Bob





> Thanks,
> Rafael
> 
> 
> --
> I speak only for myself.
> Rafael J. Wysocki, Intel Open Source Technology Center.

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

* Re: [PATCH 07/16] ACPICA: New: Portable acpidump utility (get system ACPI tables)
  2013-06-19  0:48               ` Moore, Robert
@ 2013-06-19 23:10                 ` Rafael J. Wysocki
  2013-06-20  4:57                   ` Moore, Robert
  0 siblings, 1 reply; 77+ messages in thread
From: Rafael J. Wysocki @ 2013-06-19 23:10 UTC (permalink / raw)
  To: Moore, Robert
  Cc: Len Brown, Zheng, Lv, Wysocki, Rafael J, Brown, Len, linux acpi

On Wednesday, June 19, 2013 12:48:56 AM Moore, Robert wrote:
> Sorry, I don't think the Linux version has been completed in version 20130517
> -- so perhaps you should ignore this patch after all, unless you want to simply
> establish the infrastructure for the final Linux version. The Linux-specific
> code is completed and will be part of the June release.

Great, I'll take the patch at that time, then.

> However, we can still discuss the future of the changelog, etc. We seem to
> have an overall problem where the ACPICA commit log is "generic", but I'm
> seeing here a request to make the actual Linux patches more specific to
> Linux.
> 
> As far as acpica and acpidump is concerned, I put specific generation
> instructions in the reference manual...
> 
> Of course, the details for any individual operating system may be different
> (especially file locations), so I have to make the acpica changelog somewhat
> generic.
> 
> 
> Here is the actual acpica changelog text concerning acpidump, for version 20130517:
> 
> 2) iASL Compiler/Disassembler and Tools:
> 
> New utility: Implemented an easily portable version of the acpidump 
> utility to extract ACPI tables from the system (or a file) in an ASCII hex 
> dump format. The top-level code implements the various command line 
> options, file I/O, and table dump routines. To port to a new host, only 
> three functions need to be implemented to get tables -- since this 
> functionality is OS-dependent. See the tools/acpidump/apmain.c module and 
> the ACPICA reference for porting instructions. ACPICA BZ 859. Notes:
> 1) The Windows version obtains the ACPI tables from the Registry.
> 2) The Linux version is under development.
> 3) Other hosts - If an OS-dependent module is submitted, it will be 
> distributed with ACPICA.

Well, this is much better than what Lv sent, actually.

We could use it for Linux too, I think, only without the "Notes" part.

My general opinion is that we can simply use the same changelogs as the
ACPICA upstream does, possibly amended with a more detailed explanation of
the motivation behind the patch.

In this case, however, the changelog wasn't even similar to the original one.

Thanks,
Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

* Re: [PATCH 15/16] ACPICA: _CST repair: Handle null package entries
  2013-06-19  0:50         ` Moore, Robert
@ 2013-06-19 23:56           ` Rafael J. Wysocki
  0 siblings, 0 replies; 77+ messages in thread
From: Rafael J. Wysocki @ 2013-06-19 23:56 UTC (permalink / raw)
  To: Moore, Robert
  Cc: Len Brown, Zheng, Lv, Wysocki, Rafael J, Brown, Len, linux acpi

On Wednesday, June 19, 2013 12:50:56 AM Moore, Robert wrote:
> > > > Sort package only after null/bad elements have been removed.
> This is the bug.
> 
> Lv, this should probably be something like:
> 
> > > > Fixes a problem where the _CST sort was performed too early.
> > > > This change sorts the package only after null/bad elements have
> > > > been removed.

I've added this info to the changelog and queued up the patch for 3.11.

Thanks Bob!

Rafael


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

* Re: [PATCH 14/16] ACPICA: Add several repairs for _CST predefined name
  2013-06-19  0:52         ` Moore, Robert
@ 2013-06-19 23:57           ` Rafael J. Wysocki
  0 siblings, 0 replies; 77+ messages in thread
From: Rafael J. Wysocki @ 2013-06-19 23:57 UTC (permalink / raw)
  To: Moore, Robert
  Cc: Len Brown, Zheng, Lv, Wysocki, Rafael J, Brown, Len, linux acpi

On Wednesday, June 19, 2013 12:52:23 AM Moore, Robert wrote:
> Fixes these possible problems. I think we've actually seen at least one of these, not sure where/when:
> 
>  * DESCRIPTION: Repair for the _CST object:
>  *              1. Sort the list ascending by C state type
>  *              2. Ensure type cannot be zero
>  *              3. A sub-package count of zero means _CST is meaningless
>  *              4. Count must match the number of C state sub-packages

Queued up for 3.11 with the above information added to the changelog.

Thanks Bob!

Rafael


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

* Re: [PATCH 13/16] ACPICA: Move _PRT repair into the standard complex repair module
  2013-06-18 21:49       ` Rafael J. Wysocki
@ 2013-06-19 23:57         ` Rafael J. Wysocki
  2013-06-20  0:41           ` Zheng, Lv
  0 siblings, 1 reply; 77+ messages in thread
From: Rafael J. Wysocki @ 2013-06-19 23:57 UTC (permalink / raw)
  To: Moore, Robert
  Cc: Len Brown, Zheng, Lv, Wysocki, Rafael J, Brown, Len, linux acpi

On Tuesday, June 18, 2013 11:49:21 PM Rafael J. Wysocki wrote:
> On Tuesday, June 18, 2013 06:51:10 PM Moore, Robert wrote:
> > No functional change. This change simply moves the repair code from where it
> > was originally implemented to the (more recent) repair module where it now belongs.
> 
> OK, I'll apply this one with a fixed-up changelog.

Applied now.

Thanks,
Rafael


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

* RE: [PATCH 13/16] ACPICA: Move _PRT repair into the standard complex repair module
  2013-06-19 23:57         ` Rafael J. Wysocki
@ 2013-06-20  0:41           ` Zheng, Lv
  2013-06-20  5:01             ` Moore, Robert
  0 siblings, 1 reply; 77+ messages in thread
From: Zheng, Lv @ 2013-06-20  0:41 UTC (permalink / raw)
  To: Rafael J. Wysocki, Moore, Robert
  Cc: Len Brown, Wysocki, Rafael J, Brown, Len, linux acpi

> > > No functional change. This change simply moves the repair code from
> > > where it was originally implemented to the (more recent) repair module
> where it now belongs.
> >
> > OK, I'll apply this one with a fixed-up changelog.
> 
> Applied now.

Hi, Bob and Rafael,

I'm out of the dialogue. I was working on other things.

Thanks for doing so on PATCH 13-15 for me.
I found them in the bleeding-edge branch of linux-pm repo.

Many of the commit log issues are issues happened along with the release automation.
I just played a monkey role in the release process with some committed tests performed.
I agree it's a kind of policy issues. I will improve the release process continuously.

Best regards
-Lv

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

* RE: [PATCH 07/16] ACPICA: New: Portable acpidump utility (get system ACPI tables)
  2013-06-19 23:10                 ` Rafael J. Wysocki
@ 2013-06-20  4:57                   ` Moore, Robert
  2013-06-20 19:42                     ` Rafael J. Wysocki
  0 siblings, 1 reply; 77+ messages in thread
From: Moore, Robert @ 2013-06-20  4:57 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Len Brown, Zheng, Lv, Wysocki, Rafael J, Brown, Len, linux acpi



> -----Original Message-----
> From: Rafael J. Wysocki [mailto:rjw@sisk.pl]
> Sent: Wednesday, June 19, 2013 4:11 PM
> To: Moore, Robert
> Cc: Len Brown; Zheng, Lv; Wysocki, Rafael J; Brown, Len; linux acpi
> Subject: Re: [PATCH 07/16] ACPICA: New: Portable acpidump utility (get
> system ACPI tables)
> 
> On Wednesday, June 19, 2013 12:48:56 AM Moore, Robert wrote:
> > Sorry, I don't think the Linux version has been completed in version
> > 20130517
> > -- so perhaps you should ignore this patch after all, unless you want
> > to simply establish the infrastructure for the final Linux version.
> > The Linux-specific code is completed and will be part of the June
> release.
> 
> Great, I'll take the patch at that time, then.
> 
> > However, we can still discuss the future of the changelog, etc. We
> > seem to have an overall problem where the ACPICA commit log is
> > "generic", but I'm seeing here a request to make the actual Linux
> > patches more specific to Linux.
> >
> > As far as acpica and acpidump is concerned, I put specific generation
> > instructions in the reference manual...
> >
> > Of course, the details for any individual operating system may be
> > different (especially file locations), so I have to make the acpica
> > changelog somewhat generic.
> >
> >
> > Here is the actual acpica changelog text concerning acpidump, for
> version 20130517:
> >
> > 2) iASL Compiler/Disassembler and Tools:
> >
> > New utility: Implemented an easily portable version of the acpidump
> > utility to extract ACPI tables from the system (or a file) in an ASCII
> > hex dump format. The top-level code implements the various command
> > line options, file I/O, and table dump routines. To port to a new
> > host, only three functions need to be implemented to get tables --
> > since this functionality is OS-dependent. See the
> > tools/acpidump/apmain.c module and the ACPICA reference for porting
> instructions. ACPICA BZ 859. Notes:
> > 1) The Windows version obtains the ACPI tables from the Registry.
> > 2) The Linux version is under development.
> > 3) Other hosts - If an OS-dependent module is submitted, it will be
> > distributed with ACPICA.
> 
> Well, this is much better than what Lv sent, actually.
> 
> We could use it for Linux too, I think, only without the "Notes" part.
> 
> My general opinion is that we can simply use the same changelogs as the
> ACPICA upstream does, possibly amended with a more detailed explanation of
> the motivation behind the patch.
> 
> In this case, however, the changelog wasn't even similar to the original
> one.
> 

This is the text from the release notes which end up in the "changes.txt" file. I usually expand upon the major changes in a format that is longer than the actual commit log.




> Thanks,
> Rafael
> 
> 
> --
> I speak only for myself.
> Rafael J. Wysocki, Intel Open Source Technology Center.

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

* RE: [PATCH 13/16] ACPICA: Move _PRT repair into the standard complex repair module
  2013-06-20  0:41           ` Zheng, Lv
@ 2013-06-20  5:01             ` Moore, Robert
  0 siblings, 0 replies; 77+ messages in thread
From: Moore, Robert @ 2013-06-20  5:01 UTC (permalink / raw)
  To: Zheng, Lv, Rafael J. Wysocki
  Cc: Len Brown, Wysocki, Rafael J, Brown, Len, linux acpi

Yes, we have an issue where the linux patch message sometimes needs "linux-specific" information. For the raw ACPICA commits, we do not have any os-specific details or references, for obvious reasons.

Not sure how to handle this. Lv can probably take a first pass at it, then I can review, before first release and general review.


> -----Original Message-----
> From: Zheng, Lv
> Sent: Wednesday, June 19, 2013 5:42 PM
> To: Rafael J. Wysocki; Moore, Robert
> Cc: Len Brown; Wysocki, Rafael J; Brown, Len; linux acpi
> Subject: RE: [PATCH 13/16] ACPICA: Move _PRT repair into the standard
> complex repair module
> 
> > > > No functional change. This change simply moves the repair code
> > > > from where it was originally implemented to the (more recent)
> > > > repair module
> > where it now belongs.
> > >
> > > OK, I'll apply this one with a fixed-up changelog.
> >
> > Applied now.
> 
> Hi, Bob and Rafael,
> 
> I'm out of the dialogue. I was working on other things.
> 
> Thanks for doing so on PATCH 13-15 for me.
> I found them in the bleeding-edge branch of linux-pm repo.
> 
> Many of the commit log issues are issues happened along with the release
> automation.
> I just played a monkey role in the release process with some committed
> tests performed.
> I agree it's a kind of policy issues. I will improve the release process
> continuously.
> 
> Best regards
> -Lv

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

* Re: [PATCH 07/16] ACPICA: New: Portable acpidump utility (get system ACPI tables)
  2013-06-20  4:57                   ` Moore, Robert
@ 2013-06-20 19:42                     ` Rafael J. Wysocki
  2013-06-20 19:43                       ` Moore, Robert
  0 siblings, 1 reply; 77+ messages in thread
From: Rafael J. Wysocki @ 2013-06-20 19:42 UTC (permalink / raw)
  To: Moore, Robert
  Cc: Len Brown, Zheng, Lv, Wysocki, Rafael J, Brown, Len, linux acpi

On Thursday, June 20, 2013 04:57:04 AM Moore, Robert wrote:
> 
> > -----Original Message-----
> > From: Rafael J. Wysocki [mailto:rjw@sisk.pl]
> > Sent: Wednesday, June 19, 2013 4:11 PM
> > To: Moore, Robert
> > Cc: Len Brown; Zheng, Lv; Wysocki, Rafael J; Brown, Len; linux acpi
> > Subject: Re: [PATCH 07/16] ACPICA: New: Portable acpidump utility (get
> > system ACPI tables)
> > 
> > On Wednesday, June 19, 2013 12:48:56 AM Moore, Robert wrote:
> > > Sorry, I don't think the Linux version has been completed in version
> > > 20130517
> > > -- so perhaps you should ignore this patch after all, unless you want
> > > to simply establish the infrastructure for the final Linux version.
> > > The Linux-specific code is completed and will be part of the June
> > release.
> > 
> > Great, I'll take the patch at that time, then.
> > 
> > > However, we can still discuss the future of the changelog, etc. We
> > > seem to have an overall problem where the ACPICA commit log is
> > > "generic", but I'm seeing here a request to make the actual Linux
> > > patches more specific to Linux.
> > >
> > > As far as acpica and acpidump is concerned, I put specific generation
> > > instructions in the reference manual...
> > >
> > > Of course, the details for any individual operating system may be
> > > different (especially file locations), so I have to make the acpica
> > > changelog somewhat generic.
> > >
> > >
> > > Here is the actual acpica changelog text concerning acpidump, for
> > version 20130517:
> > >
> > > 2) iASL Compiler/Disassembler and Tools:
> > >
> > > New utility: Implemented an easily portable version of the acpidump
> > > utility to extract ACPI tables from the system (or a file) in an ASCII
> > > hex dump format. The top-level code implements the various command
> > > line options, file I/O, and table dump routines. To port to a new
> > > host, only three functions need to be implemented to get tables --
> > > since this functionality is OS-dependent. See the
> > > tools/acpidump/apmain.c module and the ACPICA reference for porting
> > instructions. ACPICA BZ 859. Notes:
> > > 1) The Windows version obtains the ACPI tables from the Registry.
> > > 2) The Linux version is under development.
> > > 3) Other hosts - If an OS-dependent module is submitted, it will be
> > > distributed with ACPICA.
> > 
> > Well, this is much better than what Lv sent, actually.
> > 
> > We could use it for Linux too, I think, only without the "Notes" part.
> > 
> > My general opinion is that we can simply use the same changelogs as the
> > ACPICA upstream does, possibly amended with a more detailed explanation of
> > the motivation behind the patch.
> > 
> > In this case, however, the changelog wasn't even similar to the original
> > one.
> > 
> 
> This is the text from the release notes which end up in the "changes.txt" file.

I see.  We don't get that information with the kernel patches, though.

> I usually expand upon the major changes in a format that is longer than the
> actual commit log.

So perhaps Lv (or whoever generates the Linux patches for the given release)
can simply add the information you put into "changes.txt" to the Linux patches
changelogs?

Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

* RE: [PATCH 07/16] ACPICA: New: Portable acpidump utility (get system ACPI tables)
  2013-06-20 19:42                     ` Rafael J. Wysocki
@ 2013-06-20 19:43                       ` Moore, Robert
  0 siblings, 0 replies; 77+ messages in thread
From: Moore, Robert @ 2013-06-20 19:43 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Len Brown, Zheng, Lv, Wysocki, Rafael J, Brown, Len, linux acpi



> -----Original Message-----
> From: Rafael J. Wysocki [mailto:rjw@sisk.pl]
> Sent: Thursday, June 20, 2013 12:42 PM
> To: Moore, Robert
> Cc: Len Brown; Zheng, Lv; Wysocki, Rafael J; Brown, Len; linux acpi
> Subject: Re: [PATCH 07/16] ACPICA: New: Portable acpidump utility (get
> system ACPI tables)
> 
> On Thursday, June 20, 2013 04:57:04 AM Moore, Robert wrote:
> >
> > > -----Original Message-----
> > > From: Rafael J. Wysocki [mailto:rjw@sisk.pl]
> > > Sent: Wednesday, June 19, 2013 4:11 PM
> > > To: Moore, Robert
> > > Cc: Len Brown; Zheng, Lv; Wysocki, Rafael J; Brown, Len; linux acpi
> > > Subject: Re: [PATCH 07/16] ACPICA: New: Portable acpidump utility
> > > (get system ACPI tables)
> > >
> > > On Wednesday, June 19, 2013 12:48:56 AM Moore, Robert wrote:
> > > > Sorry, I don't think the Linux version has been completed in
> > > > version
> > > > 20130517
> > > > -- so perhaps you should ignore this patch after all, unless you
> > > > want to simply establish the infrastructure for the final Linux
> version.
> > > > The Linux-specific code is completed and will be part of the June
> > > release.
> > >
> > > Great, I'll take the patch at that time, then.
> > >
> > > > However, we can still discuss the future of the changelog, etc. We
> > > > seem to have an overall problem where the ACPICA commit log is
> > > > "generic", but I'm seeing here a request to make the actual Linux
> > > > patches more specific to Linux.
> > > >
> > > > As far as acpica and acpidump is concerned, I put specific
> > > > generation instructions in the reference manual...
> > > >
> > > > Of course, the details for any individual operating system may be
> > > > different (especially file locations), so I have to make the
> > > > acpica changelog somewhat generic.
> > > >
> > > >
> > > > Here is the actual acpica changelog text concerning acpidump, for
> > > version 20130517:
> > > >
> > > > 2) iASL Compiler/Disassembler and Tools:
> > > >
> > > > New utility: Implemented an easily portable version of the
> > > > acpidump utility to extract ACPI tables from the system (or a
> > > > file) in an ASCII hex dump format. The top-level code implements
> > > > the various command line options, file I/O, and table dump
> > > > routines. To port to a new host, only three functions need to be
> > > > implemented to get tables -- since this functionality is
> > > > OS-dependent. See the tools/acpidump/apmain.c module and the
> > > > ACPICA reference for porting
> > > instructions. ACPICA BZ 859. Notes:
> > > > 1) The Windows version obtains the ACPI tables from the Registry.
> > > > 2) The Linux version is under development.
> > > > 3) Other hosts - If an OS-dependent module is submitted, it will
> > > > be distributed with ACPICA.
> > >
> > > Well, this is much better than what Lv sent, actually.
> > >
> > > We could use it for Linux too, I think, only without the "Notes" part.
> > >
> > > My general opinion is that we can simply use the same changelogs as
> > > the ACPICA upstream does, possibly amended with a more detailed
> > > explanation of the motivation behind the patch.
> > >
> > > In this case, however, the changelog wasn't even similar to the
> > > original one.
> > >
> >
> > This is the text from the release notes which end up in the
> "changes.txt" file.
> 
> I see.  We don't get that information with the kernel patches, though.
> 
> > I usually expand upon the major changes in a format that is longer
> > than the actual commit log.
> 
> So perhaps Lv (or whoever generates the Linux patches for the given
> release) can simply add the information you put into "changes.txt" to the
> Linux patches changelogs?
> 


Many times that would help. However, I describe only the major changes in the release notes; I don't mention things like cleanups or any other changes which don't affect functionality. Also, I don't mention really minor bug fixes.




> Rafael
> 
> 
> --
> I speak only for myself.
> Rafael J. Wysocki, Intel Open Source Technology Center.

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

end of thread, other threads:[~2013-06-20 19:43 UTC | newest]

Thread overview: 77+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-08  0:57 [PATCH 00/16] ACPICA: 20130517 release Lv Zheng
2013-06-08  0:57 ` [PATCH 01/16] ACPICA: Split buffer dump routines into separate file Lv Zheng
2013-06-12 15:51   ` Len Brown
2013-06-08  0:58 ` [PATCH 02/16] ACPICA: Split internal error msg routines to a " Lv Zheng
2013-06-12 15:52   ` Len Brown
2013-06-08  0:58 ` [PATCH 03/16] ACPICA: Standardize all switch() blocks Lv Zheng
2013-06-12 15:58   ` Len Brown
2013-06-18 18:46     ` Moore, Robert
2013-06-08  0:58 ` [PATCH 04/16] ACPICA: Add option to disable loading of SSDTs from the RSDT/XSDT Lv Zheng
2013-06-08  0:59 ` [PATCH 05/16] ACPICA: Split table print utilities to a new a separate file Lv Zheng
2013-06-12 17:03   ` Len Brown
2013-06-18 18:46     ` Moore, Robert
2013-06-08  0:59 ` [PATCH 06/16] ACPICA: Do not use extended sleep registers unless HW-reduced bit is set Lv Zheng
2013-06-12 17:11   ` Len Brown
2013-06-15 23:08     ` Rafael J. Wysocki
2013-06-08  0:59 ` [PATCH 07/16] ACPICA: New: Portable acpidump utility (get system ACPI tables) Lv Zheng
2013-06-12 17:07   ` Len Brown
2013-06-15 23:09     ` Rafael J. Wysocki
2013-06-18 18:53       ` Moore, Robert
2013-06-18 21:06         ` Rafael J. Wysocki
2013-06-18 21:21           ` Moore, Robert
2013-06-18 21:40             ` Rafael J. Wysocki
2013-06-19  0:48               ` Moore, Robert
2013-06-19 23:10                 ` Rafael J. Wysocki
2013-06-20  4:57                   ` Moore, Robert
2013-06-20 19:42                     ` Rafael J. Wysocki
2013-06-20 19:43                       ` Moore, Robert
2013-06-18 18:48     ` Moore, Robert
2013-06-08  0:59 ` [PATCH 08/16] ACPICA: Update interface to AcpiUtValidAcpiName Lv Zheng
2013-06-12 17:15   ` Len Brown
2013-06-15 23:12     ` Rafael J. Wysocki
2013-06-08  0:59 ` [PATCH 09/16] ACPICA: ACPICA Termination: Delete global lock pending lock Lv Zheng
2013-06-12 17:28   ` Len Brown
2013-06-08  1:00 ` [PATCH 10/16] ACPICA: Fix possible memory leak in GPE init error path Lv Zheng
2013-06-12 17:34   ` Len Brown
2013-06-08  1:00 ` [PATCH 11/16] ACPICA: Clear events initialized flag upon event component termination Lv Zheng
2013-06-12 17:47   ` Len Brown
2013-06-18 18:50     ` Moore, Robert
2013-06-08  1:00 ` [PATCH 12/16] ACPICA: Support Mac OS X in Makefile Lv Zheng
2013-06-12 17:49   ` Len Brown
2013-06-08  1:01 ` [PATCH 13/16] ACPICA: Move _PRT repair into the standard complex repair module Lv Zheng
2013-06-12 17:52   ` Len Brown
2013-06-15 23:17     ` Rafael J. Wysocki
2013-06-18 18:51     ` Moore, Robert
2013-06-18 21:49       ` Rafael J. Wysocki
2013-06-19 23:57         ` Rafael J. Wysocki
2013-06-20  0:41           ` Zheng, Lv
2013-06-20  5:01             ` Moore, Robert
2013-06-08  1:01 ` [PATCH 14/16] ACPICA: Add several repairs for _CST predefined name Lv Zheng
2013-06-12 17:58   ` Len Brown
2013-06-15 23:17     ` Rafael J. Wysocki
2013-06-18 18:51     ` Moore, Robert
2013-06-18 21:48       ` Rafael J. Wysocki
2013-06-19  0:52         ` Moore, Robert
2013-06-19 23:57           ` Rafael J. Wysocki
2013-06-08  1:01 ` [PATCH 15/16] ACPICA: _CST repair: Handle null package entries Lv Zheng
2013-06-12 18:00   ` Len Brown
2013-06-15 23:18     ` Rafael J. Wysocki
2013-06-17 16:41     ` Moore, Robert
2013-06-17 20:31       ` Rafael J. Wysocki
2013-06-18 21:51         ` Rafael J. Wysocki
2013-06-18 18:52     ` Moore, Robert
2013-06-18 21:50       ` Rafael J. Wysocki
2013-06-19  0:50         ` Moore, Robert
2013-06-19 23:56           ` Rafael J. Wysocki
2013-06-08  1:01 ` [PATCH 16/16] ACPICA: Update version to 20130517 Lv Zheng
2013-06-12 18:01   ` Len Brown
2013-06-15 23:19     ` Rafael J. Wysocki
2013-06-11 22:32 ` [PATCH 00/16] ACPICA: 20130517 release Rafael J. Wysocki
2013-06-12 18:04 ` Len Brown
2013-06-15 23:24   ` Rafael J. Wysocki
2013-06-18  1:39     ` Zheng, Lv
2013-06-18  1:56       ` Zheng, Lv
2013-06-18 10:35       ` Rafael J. Wysocki
2013-06-18 18:55     ` Moore, Robert
2013-06-18 21:04       ` Rafael J. Wysocki
2013-06-19  0:58         ` Moore, Robert

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.