Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1247321 > unrolled thread

[PATCH 00/13] ACPICA: 20150930 Release

Started byLv Zheng <lv.zheng@intel.com>
First post2015-10-15 04:10 +0200
Last post2015-10-15 04:20 +0200
Articles 13 — 5 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 00/13] ACPICA: 20150930 Release Lv Zheng <lv.zheng@intel.com> - 2015-10-15 04:10 +0200
    [PATCH 05/13] ACPICA: Update NFIT table to rename a flags field Lv Zheng <lv.zheng@intel.com> - 2015-10-15 04:10 +0200
    [PATCH 07/13] ACPICA: iASL: General cleanup of the file suffix #defines Lv Zheng <lv.zheng@intel.com> - 2015-10-15 04:10 +0200
    [PATCH 01/13] ACPICA: Remove unnecessary conditional compilation. Lv Zheng <lv.zheng@intel.com> - 2015-10-15 04:10 +0200
      Re: [PATCH 01/13] ACPICA: Remove unnecessary conditional compilation. kbuild test robot <lkp@intel.com> - 2015-10-15 18:00 +0200
        RE: [PATCH 01/13] ACPICA: Remove unnecessary conditional  compilation. "Moore, Robert" <robert.moore@intel.com> - 2015-10-15 20:40 +0200
          RE: [PATCH 01/13] ACPICA: Remove unnecessary conditional  compilation. "Zheng, Lv" <lv.zheng@intel.com> - 2015-10-16 03:10 +0200
            Re: [PATCH 01/13] ACPICA: Remove unnecessary conditional compilation. "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2015-10-16 15:20 +0200
    [PATCH 11/13] ACPI: Enable build of AML interpreter debugger Lv Zheng <lv.zheng@intel.com> - 2015-10-15 04:10 +0200
    [PATCH 03/13] ACPICA: Update exception code for "file not found" error Lv Zheng <lv.zheng@intel.com> - 2015-10-15 04:10 +0200
    [PATCH 04/13] ACPICA: Debugger: Update mutexes used for multithreaded debugger Lv Zheng <lv.zheng@intel.com> - 2015-10-15 04:20 +0200
    [PATCH 06/13] ACPICA: Improve typechecking, both compile-time and runtime Lv Zheng <lv.zheng@intel.com> - 2015-10-15 04:20 +0200
    [PATCH 09/13] ACPICA: Debugger: Fix "quit/exit" command by cleaning up user commands termination logic Lv Zheng <lv.zheng@intel.com> - 2015-10-15 04:20 +0200

#1247321 — [PATCH 00/13] ACPICA: 20150930 Release

FromLv Zheng <lv.zheng@intel.com>
Date2015-10-15 04:10 +0200
Subject[PATCH 00/13] ACPICA: 20150930 Release
Message-ID<qjG9r-AK-3@gated-at.bofh.it>
The 20150930 ACPICA kernel-resident subsystem updates are linuxized based
on the linux-pm/linux-next branch.

The patchset has passed the following build/boot tests.
Build tests are performed as follows:
1. i386 + allyes
2. i386 + allno
3. i386 + default + ACPI_DEBUGGER=y
4. i386 + default + ACPI_DEBUGGER=n + ACPI_DEBUG=y
5. i386 + default + ACPI_DEBUG=n + ACPI=y
6. i386 + default + ACPI=n
7. x86_64 + allyes
8. x86_64 + allno
9. x86_64 + default + ACPI_DEBUGGER=y
10.x86_64 + default + ACPI_DEBUGGER=n + ACPI_DEBUG=y
11.x86_64 + default + ACPI_DEBUG=n + ACPI=y
12.x86_64 + default + ACPI=n
Boot tests are performed as follows:
1. i386 + default + ACPI_DEBUGGER=y
2. x86_64 + default + ACPI_DEBUGGER=y
Where:
1. i386: machine named as "Dell Inspiron Mini 1010"
2. x86_64: machine named as "HP Compaq 8200 Elite SFF PC"
3. default: kernel configuration with following items enabled:
   All hardware drivers related to the machines of i386/x86_64
   All "drivers/acpi" configurations
   All "drivers/platform" drivers
   All other drivers that link the APIs provided by ACPICA subsystem

The divergences checking result:
Before applying (20150818 Release):
  517 lines
After applying (20150930 Release):
  517 lines

Note there are still 2 ACPICA debugger patches not released during this
release cycle, so the debugger IO driver is not released in this cycle. In
this series the ACPICA debugger core is compile time enabled as all ACPICA
debugger files can be built with ACPI_DEBUGGER=y, but not runtime enabled
as there is no invocations calling ACPICA debugger APIs and its required
OSls are just stubs.

Bob Moore (8):
  ACPICA: Remove unnecessary conditional compilation.
  ACPICA: iASL: Add symbolic operator support for Index() operator.
  ACPICA: Update exception code for "file not found" error
  ACPICA: Debugger: Update mutexes used for multithreaded debugger
  ACPICA: Update NFIT table to rename a flags field
  ACPICA: Improve typechecking, both compile-time and runtime
  ACPICA: iASL: General cleanup of the file suffix #defines
  ACPICA: Update version to 20150930

Lv Zheng (5):
  ACPICA: Linuxize: Export debugger files to Linux
  ACPICA: Debugger: Fix "quit/exit" command by cleaning up user
    commands termination logic
  ACPICA: Debugger: Fix "terminate" command by cleaning up subsystem
    shutdown logic
  ACPI: Enable build of AML interpreter debugger
  ACPICA: Debugger: Fix dead lock issue ocurred in single stepping mode

 drivers/acpi/Kconfig                      |    9 +
 drivers/acpi/acpica/Makefile              |   16 +
 drivers/acpi/acpica/acapps.h              |    2 +-
 drivers/acpi/acpica/acdebug.h             |    6 +
 drivers/acpi/acpica/acglobal.h            |    6 +-
 drivers/acpi/acpica/acinterp.h            |    2 -
 drivers/acpi/acpica/aclocal.h             |   14 +-
 drivers/acpi/acpica/acnamesp.h            |    4 -
 drivers/acpi/acpica/acopcode.h            |    4 +-
 drivers/acpi/acpica/acparser.h            |    4 -
 drivers/acpi/acpica/acutils.h             |    2 -
 drivers/acpi/acpica/amlcode.h             |   11 +-
 drivers/acpi/acpica/dbcmds.c              | 1187 +++++++++++++++++++++++++++
 drivers/acpi/acpica/dbconvert.c           |  484 +++++++++++
 drivers/acpi/acpica/dbdisply.c            | 1108 +++++++++++++++++++++++++
 drivers/acpi/acpica/dbexec.c              |  763 +++++++++++++++++
 drivers/acpi/acpica/dbfileio.c            |  256 ++++++
 drivers/acpi/acpica/dbhistry.c            |  239 ++++++
 drivers/acpi/acpica/dbinput.c             | 1267 +++++++++++++++++++++++++++++
 drivers/acpi/acpica/dbmethod.c            |  369 +++++++++
 drivers/acpi/acpica/dbnames.c             |  947 +++++++++++++++++++++
 drivers/acpi/acpica/dbobject.c            |  533 ++++++++++++
 drivers/acpi/acpica/dbstats.c             |  546 +++++++++++++
 drivers/acpi/acpica/dbtest.c              | 1057 ++++++++++++++++++++++++
 drivers/acpi/acpica/dbutils.c             |  457 +++++++++++
 drivers/acpi/acpica/dbxface.c             |  487 +++++++++++
 drivers/acpi/acpica/evxface.c             |    2 +-
 drivers/acpi/acpica/exconvrt.c            |    1 +
 drivers/acpi/acpica/exresolv.c            |    1 -
 drivers/acpi/acpica/exresop.c             |    2 +
 drivers/acpi/acpica/exstore.c             |  120 ++-
 drivers/acpi/acpica/exstoren.c            |    5 +-
 drivers/acpi/acpica/nsdump.c              |    6 -
 drivers/acpi/acpica/nspredef.c            |    2 +-
 drivers/acpi/acpica/pstree.c              |    2 -
 drivers/acpi/acpica/psutils.c             |    2 -
 drivers/acpi/acpica/rsdump.c              |    3 -
 drivers/acpi/acpica/rsutils.c             |    2 -
 drivers/acpi/acpica/rsxface.c             |    4 +-
 drivers/acpi/acpica/utdecode.c            |   21 +-
 drivers/acpi/acpica/utfileio.c            |    6 +
 drivers/acpi/acpica/utinit.c              |   15 +-
 drivers/acpi/acpica/utmutex.c             |   21 +
 drivers/acpi/acpica/utxface.c             |   19 +-
 drivers/acpi/nfit.c                       |    6 +-
 drivers/acpi/nfit.h                       |    2 +-
 drivers/acpi/osl.c                        |   11 +-
 include/acpi/acexcep.h                    |    7 +-
 include/acpi/acpixf.h                     |   12 +-
 include/acpi/actbl1.h                     |    2 +-
 include/acpi/platform/acenv.h             |    8 +-
 include/acpi/platform/aclinux.h           |    7 +-
 include/acpi/platform/aclinuxex.h         |    5 +
 tools/power/acpi/tools/acpidump/apfiles.c |    2 +-
 54 files changed, 9941 insertions(+), 135 deletions(-)
 create mode 100644 drivers/acpi/acpica/dbcmds.c
 create mode 100644 drivers/acpi/acpica/dbconvert.c
 create mode 100644 drivers/acpi/acpica/dbdisply.c
 create mode 100644 drivers/acpi/acpica/dbexec.c
 create mode 100644 drivers/acpi/acpica/dbfileio.c
 create mode 100644 drivers/acpi/acpica/dbhistry.c
 create mode 100644 drivers/acpi/acpica/dbinput.c
 create mode 100644 drivers/acpi/acpica/dbmethod.c
 create mode 100644 drivers/acpi/acpica/dbnames.c
 create mode 100644 drivers/acpi/acpica/dbobject.c
 create mode 100644 drivers/acpi/acpica/dbstats.c
 create mode 100644 drivers/acpi/acpica/dbtest.c
 create mode 100644 drivers/acpi/acpica/dbutils.c
 create mode 100644 drivers/acpi/acpica/dbxface.c

-- 
1.7.10

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1247324 — [PATCH 05/13] ACPICA: Update NFIT table to rename a flags field

FromLv Zheng <lv.zheng@intel.com>
Date2015-10-15 04:10 +0200
Subject[PATCH 05/13] ACPICA: Update NFIT table to rename a flags field
Message-ID<qjG9r-AK-5@gated-at.bofh.it>
In reply to#1247321
From: Bob Moore <robert.moore@intel.com>

ACPICA commit 534deab97fb416a13bfede15c538e2c9eac9384a

Updated one of the memory subtable flags to clarify.

Link: https://github.com/acpica/acpica/commit/534deab9
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
 drivers/acpi/nfit.c   |    6 +++---
 drivers/acpi/nfit.h   |    2 +-
 include/acpi/actbl1.h |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/acpi/nfit.c b/drivers/acpi/nfit.c
index c1b8d03..bc18aa2 100644
--- a/drivers/acpi/nfit.c
+++ b/drivers/acpi/nfit.c
@@ -706,7 +706,7 @@ static ssize_t flags_show(struct device *dev,
 		flags & ACPI_NFIT_MEM_SAVE_FAILED ? "save_fail " : "",
 		flags & ACPI_NFIT_MEM_RESTORE_FAILED ? "restore_fail " : "",
 		flags & ACPI_NFIT_MEM_FLUSH_FAILED ? "flush_fail " : "",
-		flags & ACPI_NFIT_MEM_ARMED ? "not_armed " : "",
+		flags & ACPI_NFIT_MEM_NOT_ARMED ? "not_armed " : "",
 		flags & ACPI_NFIT_MEM_HEALTH_OBSERVED ? "smart_event " : "");
 }
 static DEVICE_ATTR_RO(flags);
@@ -815,7 +815,7 @@ static int acpi_nfit_register_dimms(struct acpi_nfit_desc *acpi_desc)
 			flags |= NDD_ALIASING;
 
 		mem_flags = __to_nfit_memdev(nfit_mem)->flags;
-		if (mem_flags & ACPI_NFIT_MEM_ARMED)
+		if (mem_flags & ACPI_NFIT_MEM_NOT_ARMED)
 			flags |= NDD_UNARMED;
 
 		rc = acpi_nfit_add_dimm(acpi_desc, nfit_mem, device_handle);
@@ -839,7 +839,7 @@ static int acpi_nfit_register_dimms(struct acpi_nfit_desc *acpi_desc)
 		  mem_flags & ACPI_NFIT_MEM_SAVE_FAILED ? " save_fail" : "",
 		  mem_flags & ACPI_NFIT_MEM_RESTORE_FAILED ? " restore_fail":"",
 		  mem_flags & ACPI_NFIT_MEM_FLUSH_FAILED ? " flush_fail" : "",
-		  mem_flags & ACPI_NFIT_MEM_ARMED ? " not_armed" : "");
+		  mem_flags & ACPI_NFIT_MEM_NOT_ARMED ? " not_armed" : "");
 
 	}
 
diff --git a/drivers/acpi/nfit.h b/drivers/acpi/nfit.h
index 7e74015..329a1eb 100644
--- a/drivers/acpi/nfit.h
+++ b/drivers/acpi/nfit.h
@@ -24,7 +24,7 @@
 #define UUID_NFIT_DIMM "4309ac30-0d11-11e4-9191-0800200c9a66"
 #define ACPI_NFIT_MEM_FAILED_MASK (ACPI_NFIT_MEM_SAVE_FAILED \
 		| ACPI_NFIT_MEM_RESTORE_FAILED | ACPI_NFIT_MEM_FLUSH_FAILED \
-		| ACPI_NFIT_MEM_ARMED)
+		| ACPI_NFIT_MEM_NOT_ARMED)
 
 enum nfit_uuids {
 	NFIT_SPA_VOLATILE,
diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h
index fcd5709..1bb979e 100644
--- a/include/acpi/actbl1.h
+++ b/include/acpi/actbl1.h
@@ -1012,7 +1012,7 @@ struct acpi_nfit_memory_map {
 #define ACPI_NFIT_MEM_SAVE_FAILED       (1)	/* 00: Last SAVE to Memory Device failed */
 #define ACPI_NFIT_MEM_RESTORE_FAILED    (1<<1)	/* 01: Last RESTORE from Memory Device failed */
 #define ACPI_NFIT_MEM_FLUSH_FAILED      (1<<2)	/* 02: Platform flush failed */
-#define ACPI_NFIT_MEM_ARMED             (1<<3)	/* 03: Memory Device observed to be not armed */
+#define ACPI_NFIT_MEM_NOT_ARMED         (1<<3)	/* 03: Memory Device is not armed */
 #define ACPI_NFIT_MEM_HEALTH_OBSERVED   (1<<4)	/* 04: Memory Device observed SMART/health events */
 #define ACPI_NFIT_MEM_HEALTH_ENABLED    (1<<5)	/* 05: SMART/health events enabled */
 
-- 
1.7.10

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1247328 — [PATCH 07/13] ACPICA: iASL: General cleanup of the file suffix #defines

FromLv Zheng <lv.zheng@intel.com>
Date2015-10-15 04:10 +0200
Subject[PATCH 07/13] ACPICA: iASL: General cleanup of the file suffix #defines
Message-ID<qjG9s-AK-25@gated-at.bofh.it>
In reply to#1247321
From: Bob Moore <robert.moore@intel.com>

ACPICA commit bed456ed2976bdaafdef406b982fdf6c539befc0

Removed some extraneous defines, reordered others.

Link: https://github.com/acpica/acpica/commit/bed456ed
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
 drivers/acpi/acpica/acapps.h              |    2 +-
 tools/power/acpi/tools/acpidump/apfiles.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/acpica/acapps.h b/drivers/acpi/acpica/acapps.h
index e9f0833..e4cc48f 100644
--- a/drivers/acpi/acpica/acapps.h
+++ b/drivers/acpi/acpica/acapps.h
@@ -88,7 +88,7 @@
 	acpi_os_printf (" %-18s%s\n", name, description);
 
 #define FILE_SUFFIX_DISASSEMBLY     "dsl"
-#define ACPI_TABLE_FILE_SUFFIX      ".dat"
+#define FILE_SUFFIX_BINARY_TABLE    ".dat"	/* Needs the dot */
 
 /*
  * getopt
diff --git a/tools/power/acpi/tools/acpidump/apfiles.c b/tools/power/acpi/tools/acpidump/apfiles.c
index a37f970..a1c62de 100644
--- a/tools/power/acpi/tools/acpidump/apfiles.c
+++ b/tools/power/acpi/tools/acpidump/apfiles.c
@@ -150,7 +150,7 @@ int ap_write_to_binary_file(struct acpi_table_header *table, u32 instance)
 		strcat(filename, instance_str);
 	}
 
-	strcat(filename, ACPI_TABLE_FILE_SUFFIX);
+	strcat(filename, FILE_SUFFIX_BINARY_TABLE);
 
 	if (gbl_verbose_mode) {
 		acpi_log_error
-- 
1.7.10

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1247329 — [PATCH 01/13] ACPICA: Remove unnecessary conditional compilation.

FromLv Zheng <lv.zheng@intel.com>
Date2015-10-15 04:10 +0200
Subject[PATCH 01/13] ACPICA: Remove unnecessary conditional compilation.
Message-ID<qjG9s-AK-23@gated-at.bofh.it>
In reply to#1247321
From: Bob Moore <robert.moore@intel.com>

ACPICA commit eea1f0e561893b6d6417913b2d224082fe3a0a5e

Remove use of ACPI_DEBUGGER and ACPI_DISASSEMBLER where these
defines are used around entire modules.

Note: This type of code also causes problems with IDEs.

Link: https://github.com/acpica/acpica/commit/eea1f0e5
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
 drivers/acpi/acpica/acdebug.h |    6 ++++++
 drivers/acpi/acpica/rsdump.c  |    3 ---
 include/acpi/platform/acenv.h |    2 +-
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/acpi/acpica/acdebug.h b/drivers/acpi/acpica/acdebug.h
index eb2e926..c928ba4 100644
--- a/drivers/acpi/acpica/acdebug.h
+++ b/drivers/acpi/acpica/acdebug.h
@@ -44,6 +44,12 @@
 #ifndef __ACDEBUG_H__
 #define __ACDEBUG_H__
 
+/* The debugger is used in conjunction with the disassembler most of time */
+
+#ifdef ACPI_DISASSEMBLER
+#include "acdisasm.h"
+#endif
+
 #define ACPI_DEBUG_BUFFER_SIZE  0x4000	/* 16K buffer for return objects */
 
 struct acpi_db_command_info {
diff --git a/drivers/acpi/acpica/rsdump.c b/drivers/acpi/acpica/rsdump.c
index c428bb3..2a09288 100644
--- a/drivers/acpi/acpica/rsdump.c
+++ b/drivers/acpi/acpica/rsdump.c
@@ -51,7 +51,6 @@ ACPI_MODULE_NAME("rsdump")
 /*
  * All functions in this module are used by the AML Debugger only
  */
-#if defined(ACPI_DEBUGGER)
 /* Local prototypes */
 static void acpi_rs_out_string(char *title, char *value);
 
@@ -565,5 +564,3 @@ static void acpi_rs_dump_word_list(u16 length, u16 *data)
 		acpi_os_printf("%25s%2.2X : %4.4X\n", "Word", i, data[i]);
 	}
 }
-
-#endif
diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h
index ec00e2b..15ef08c 100644
--- a/include/acpi/platform/acenv.h
+++ b/include/acpi/platform/acenv.h
@@ -142,7 +142,7 @@
 
 #ifdef ACPI_LIBRARY
 #define ACPI_USE_LOCAL_CACHE
-#define ACPI_FUTURE_USAGE
+#define ACPI_FULL_DEBUG
 #endif
 
 /* Common for all ACPICA applications */
-- 
1.7.10

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1247934 — Re: [PATCH 01/13] ACPICA: Remove unnecessary conditional compilation.

Fromkbuild test robot <lkp@intel.com>
Date2015-10-15 18:00 +0200
SubjectRe: [PATCH 01/13] ACPICA: Remove unnecessary conditional compilation.
Message-ID<qjT6G-2yx-15@gated-at.bofh.it>
In reply to#1247329

[Multipart message — attachments visible in raw view] — view raw

Hi Bob,

[auto build test ERROR on pm/linux-next -- if it's inappropriate base, please suggest rules for selecting the more suitable base]

url:    https://github.com/0day-ci/linux/commits/Lv-Zheng/ACPICA-20150930-Release/20151015-101636
config: x86_64-lkp (attached as .config)
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/acpi/acpica/rsdump.c: In function 'acpi_rs_dump_resource_list':
>> drivers/acpi/acpica/rsdump.c:136:7: error: 'acpi_gbl_dump_serial_bus_dispatch' undeclared (first use in this function)
          acpi_gbl_dump_serial_bus_dispatch
          ^
   drivers/acpi/acpica/rsdump.c:136:7: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/acpi/acpica/rsdump.c:141:7: error: 'acpi_gbl_dump_resource_dispatch' undeclared (first use in this function)
          acpi_gbl_dump_resource_dispatch
          ^
   drivers/acpi/acpica/rsdump.c: In function 'acpi_rs_dump_irq_list':
>> drivers/acpi/acpica/rsdump.c:186:40: error: 'acpi_rs_dump_prt' undeclared (first use in this function)
      acpi_rs_dump_descriptor(prt_element, acpi_rs_dump_prt);
                                           ^
   drivers/acpi/acpica/rsdump.c: In function 'acpi_rs_dump_address_common':
>> drivers/acpi/acpica/rsdump.c:445:37: error: 'acpi_rs_dump_memory_flags' undeclared (first use in this function)
      acpi_rs_dump_descriptor(resource, acpi_rs_dump_memory_flags);
                                        ^
>> drivers/acpi/acpica/rsdump.c:450:37: error: 'acpi_rs_dump_io_flags' undeclared (first use in this function)
      acpi_rs_dump_descriptor(resource, acpi_rs_dump_io_flags);
                                        ^
>> drivers/acpi/acpica/rsdump.c:467:36: error: 'acpi_rs_dump_general_flags' undeclared (first use in this function)
     acpi_rs_dump_descriptor(resource, acpi_rs_dump_general_flags);
                                       ^

vim +/acpi_gbl_dump_serial_bus_dispatch +136 drivers/acpi/acpica/rsdump.c

39239fed Bob Moore 2015-04-13  130  		}
39239fed Bob Moore 2015-04-13  131  
39239fed Bob Moore 2015-04-13  132  		/* Dump the resource descriptor */
39239fed Bob Moore 2015-04-13  133  
39239fed Bob Moore 2015-04-13  134  		if (type == ACPI_RESOURCE_TYPE_SERIAL_BUS) {
39239fed Bob Moore 2015-04-13  135  			acpi_rs_dump_descriptor(&resource_list->data,
39239fed Bob Moore 2015-04-13 @136  						acpi_gbl_dump_serial_bus_dispatch
39239fed Bob Moore 2015-04-13  137  						[resource_list->data.
39239fed Bob Moore 2015-04-13  138  						 common_serial_bus.type]);
39239fed Bob Moore 2015-04-13  139  		} else {
39239fed Bob Moore 2015-04-13  140  			acpi_rs_dump_descriptor(&resource_list->data,
39239fed Bob Moore 2015-04-13 @141  						acpi_gbl_dump_resource_dispatch
39239fed Bob Moore 2015-04-13  142  						[type]);
39239fed Bob Moore 2015-04-13  143  		}
39239fed Bob Moore 2015-04-13  144  
39239fed Bob Moore 2015-04-13  145  		/* Point to the next resource structure */
39239fed Bob Moore 2015-04-13  146  
39239fed Bob Moore 2015-04-13  147  		resource_list = ACPI_NEXT_RESOURCE(resource_list);
39239fed Bob Moore 2015-04-13  148  
39239fed Bob Moore 2015-04-13  149  		/* Exit when END_TAG descriptor is reached */
39239fed Bob Moore 2015-04-13  150  
39239fed Bob Moore 2015-04-13  151  	} while (type != ACPI_RESOURCE_TYPE_END_TAG);
39239fed Bob Moore 2015-04-13  152  }
39239fed Bob Moore 2015-04-13  153  
39239fed Bob Moore 2015-04-13  154  /*******************************************************************************
39239fed Bob Moore 2015-04-13  155   *
39239fed Bob Moore 2015-04-13  156   * FUNCTION:    acpi_rs_dump_irq_list
39239fed Bob Moore 2015-04-13  157   *
39239fed Bob Moore 2015-04-13  158   * PARAMETERS:  route_table     - Pointer to the routing table to dump.
39239fed Bob Moore 2015-04-13  159   *
39239fed Bob Moore 2015-04-13  160   * RETURN:      None
39239fed Bob Moore 2015-04-13  161   *
39239fed Bob Moore 2015-04-13  162   * DESCRIPTION: Print IRQ routing table
39239fed Bob Moore 2015-04-13  163   *
39239fed Bob Moore 2015-04-13  164   ******************************************************************************/
39239fed Bob Moore 2015-04-13  165  
39239fed Bob Moore 2015-04-13  166  void acpi_rs_dump_irq_list(u8 *route_table)
39239fed Bob Moore 2015-04-13  167  {
39239fed Bob Moore 2015-04-13  168  	struct acpi_pci_routing_table *prt_element;
39239fed Bob Moore 2015-04-13  169  	u8 count;
39239fed Bob Moore 2015-04-13  170  
39239fed Bob Moore 2015-04-13  171  	ACPI_FUNCTION_ENTRY();
39239fed Bob Moore 2015-04-13  172  
39239fed Bob Moore 2015-04-13  173  	/* Check if debug output enabled */
39239fed Bob Moore 2015-04-13  174  
39239fed Bob Moore 2015-04-13  175  	if (!ACPI_IS_DEBUG_ENABLED(ACPI_LV_RESOURCES, _COMPONENT)) {
39239fed Bob Moore 2015-04-13  176  		return;
39239fed Bob Moore 2015-04-13  177  	}
39239fed Bob Moore 2015-04-13  178  
39239fed Bob Moore 2015-04-13  179  	prt_element = ACPI_CAST_PTR(struct acpi_pci_routing_table, route_table);
39239fed Bob Moore 2015-04-13  180  
39239fed Bob Moore 2015-04-13  181  	/* Dump all table elements, Exit on zero length element */
39239fed Bob Moore 2015-04-13  182  
39239fed Bob Moore 2015-04-13  183  	for (count = 0; prt_element->length; count++) {
39239fed Bob Moore 2015-04-13  184  		acpi_os_printf("\n[%02X] PCI IRQ Routing Table Package\n",
39239fed Bob Moore 2015-04-13  185  			       count);
39239fed Bob Moore 2015-04-13 @186  		acpi_rs_dump_descriptor(prt_element, acpi_rs_dump_prt);
39239fed Bob Moore 2015-04-13  187  
39239fed Bob Moore 2015-04-13  188  		prt_element = ACPI_ADD_PTR(struct acpi_pci_routing_table,
39239fed Bob Moore 2015-04-13  189  					   prt_element, prt_element->length);

:::::: The code at line 136 was first introduced by commit
:::::: 39239fedbfb5493d5804d6cefb806fd208a006c5 ACPICA: Update Resource descriptor dump module.

:::::: TO: Bob Moore <robert.moore@intel.com>
:::::: CC: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[toc] | [prev] | [next] | [standalone]


#1248067 — RE: [PATCH 01/13] ACPICA: Remove unnecessary conditional compilation.

From"Moore, Robert" <robert.moore@intel.com>
Date2015-10-15 20:40 +0200
SubjectRE: [PATCH 01/13] ACPICA: Remove unnecessary conditional compilation.
Message-ID<qjVBw-6l0-7@gated-at.bofh.it>
In reply to#1247934
This appears as though it is related to this conditional:

#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
/*
 * rsinfo
 */
extern ACPI_RSDUMP_INFO         *AcpiGbl_DumpResourceDispatch[];
extern ACPI_RSDUMP_INFO         *AcpiGbl_DumpSerialBusDispatch[];


So, I'm going to let Lv take a look at this.
Bob



> -----Original Message-----
> From: lkp
> Sent: Thursday, October 15, 2015 8:51 AM
> To: Zheng, Lv
> Cc: kbuild-all@01.org; Wysocki, Rafael J; Brown, Len; Zheng, Lv; Lv Zheng;
> linux-kernel@vger.kernel.org; linux-acpi@vger.kernel.org; Moore, Robert
> Subject: Re: [PATCH 01/13] ACPICA: Remove unnecessary conditional
> compilation.
> 
> Hi Bob,
> 
> [auto build test ERROR on pm/linux-next -- if it's inappropriate base,
> please suggest rules for selecting the more suitable base]
> 
> url:    https://github.com/0day-ci/linux/commits/Lv-Zheng/ACPICA-20150930-
> Release/20151015-101636
> config: x86_64-lkp (attached as .config)
> reproduce:
>         # save the attached .config to linux build tree
>         make ARCH=x86_64
> 
> All errors (new ones prefixed by >>):
> 
>    drivers/acpi/acpica/rsdump.c: In function 'acpi_rs_dump_resource_list':
> >> drivers/acpi/acpica/rsdump.c:136:7: error:
> >> 'acpi_gbl_dump_serial_bus_dispatch' undeclared (first use in this
> >> function)
>           acpi_gbl_dump_serial_bus_dispatch
>           ^
>    drivers/acpi/acpica/rsdump.c:136:7: note: each undeclared identifier is
> reported only once for each function it appears in
> >> drivers/acpi/acpica/rsdump.c:141:7: error:
> >> 'acpi_gbl_dump_resource_dispatch' undeclared (first use in this
> >> function)
>           acpi_gbl_dump_resource_dispatch
>           ^
>    drivers/acpi/acpica/rsdump.c: In function 'acpi_rs_dump_irq_list':
> >> drivers/acpi/acpica/rsdump.c:186:40: error: 'acpi_rs_dump_prt'
> >> undeclared (first use in this function)
>       acpi_rs_dump_descriptor(prt_element, acpi_rs_dump_prt);
>                                            ^
>    drivers/acpi/acpica/rsdump.c: In function
> 'acpi_rs_dump_address_common':
> >> drivers/acpi/acpica/rsdump.c:445:37: error:
> >> 'acpi_rs_dump_memory_flags' undeclared (first use in this function)
>       acpi_rs_dump_descriptor(resource, acpi_rs_dump_memory_flags);
>                                         ^
> >> drivers/acpi/acpica/rsdump.c:450:37: error: 'acpi_rs_dump_io_flags'
> >> undeclared (first use in this function)
>       acpi_rs_dump_descriptor(resource, acpi_rs_dump_io_flags);
>                                         ^
> >> drivers/acpi/acpica/rsdump.c:467:36: error:
> >> 'acpi_rs_dump_general_flags' undeclared (first use in this function)
>      acpi_rs_dump_descriptor(resource, acpi_rs_dump_general_flags);
>                                        ^
> 
> vim +/acpi_gbl_dump_serial_bus_dispatch +136 drivers/acpi/acpica/rsdump.c
> 
> 39239fed Bob Moore 2015-04-13  130  		}
> 39239fed Bob Moore 2015-04-13  131
> 39239fed Bob Moore 2015-04-13  132  		/* Dump the resource
> descriptor */
> 39239fed Bob Moore 2015-04-13  133
> 39239fed Bob Moore 2015-04-13  134  		if (type ==
> ACPI_RESOURCE_TYPE_SERIAL_BUS) {
> 39239fed Bob Moore 2015-04-13  135
> 	acpi_rs_dump_descriptor(&resource_list->data,
> 39239fed Bob Moore 2015-04-13 @136
> 	acpi_gbl_dump_serial_bus_dispatch
> 39239fed Bob Moore 2015-04-13  137
> 	[resource_list->data.
> 39239fed Bob Moore 2015-04-13  138
> common_serial_bus.type]);
> 39239fed Bob Moore 2015-04-13  139  		} else {
> 39239fed Bob Moore 2015-04-13  140
> 	acpi_rs_dump_descriptor(&resource_list->data,
> 39239fed Bob Moore 2015-04-13 @141
> 	acpi_gbl_dump_resource_dispatch
> 39239fed Bob Moore 2015-04-13  142
> 	[type]);
> 39239fed Bob Moore 2015-04-13  143  		}
> 39239fed Bob Moore 2015-04-13  144
> 39239fed Bob Moore 2015-04-13  145  		/* Point to the next
> resource structure */
> 39239fed Bob Moore 2015-04-13  146
> 39239fed Bob Moore 2015-04-13  147  		resource_list =
> ACPI_NEXT_RESOURCE(resource_list);
> 39239fed Bob Moore 2015-04-13  148
> 39239fed Bob Moore 2015-04-13  149  		/* Exit when END_TAG
> descriptor is reached */
> 39239fed Bob Moore 2015-04-13  150
> 39239fed Bob Moore 2015-04-13  151  	} while (type !=
> ACPI_RESOURCE_TYPE_END_TAG);
> 39239fed Bob Moore 2015-04-13  152  }
> 39239fed Bob Moore 2015-04-13  153
> 39239fed Bob Moore 2015-04-13  154
> /*************************************************************************
> ******
> 39239fed Bob Moore 2015-04-13  155   *
> 39239fed Bob Moore 2015-04-13  156   * FUNCTION:    acpi_rs_dump_irq_list
> 39239fed Bob Moore 2015-04-13  157   *
> 39239fed Bob Moore 2015-04-13  158   * PARAMETERS:  route_table     -
> Pointer to the routing table to dump.
> 39239fed Bob Moore 2015-04-13  159   *
> 39239fed Bob Moore 2015-04-13  160   * RETURN:      None
> 39239fed Bob Moore 2015-04-13  161   *
> 39239fed Bob Moore 2015-04-13  162   * DESCRIPTION: Print IRQ routing
> table
> 39239fed Bob Moore 2015-04-13  163   *
> 39239fed Bob Moore 2015-04-13  164
> **************************************************************************
> ****/
> 39239fed Bob Moore 2015-04-13  165
> 39239fed Bob Moore 2015-04-13  166  void acpi_rs_dump_irq_list(u8
> *route_table) 39239fed Bob Moore 2015-04-13  167  {
> 39239fed Bob Moore 2015-04-13  168  	struct acpi_pci_routing_table
> *prt_element;
> 39239fed Bob Moore 2015-04-13  169  	u8 count;
> 39239fed Bob Moore 2015-04-13  170
> 39239fed Bob Moore 2015-04-13  171  	ACPI_FUNCTION_ENTRY();
> 39239fed Bob Moore 2015-04-13  172
> 39239fed Bob Moore 2015-04-13  173  	/* Check if debug output enabled
> */
> 39239fed Bob Moore 2015-04-13  174
> 39239fed Bob Moore 2015-04-13  175  	if
> (!ACPI_IS_DEBUG_ENABLED(ACPI_LV_RESOURCES, _COMPONENT)) {
> 39239fed Bob Moore 2015-04-13  176  		return;
> 39239fed Bob Moore 2015-04-13  177  	}
> 39239fed Bob Moore 2015-04-13  178
> 39239fed Bob Moore 2015-04-13  179  	prt_element =
> ACPI_CAST_PTR(struct acpi_pci_routing_table, route_table);
> 39239fed Bob Moore 2015-04-13  180
> 39239fed Bob Moore 2015-04-13  181  	/* Dump all table elements, Exit
> on zero length element */
> 39239fed Bob Moore 2015-04-13  182
> 39239fed Bob Moore 2015-04-13  183  	for (count = 0; prt_element-
> >length; count++) {
> 39239fed Bob Moore 2015-04-13  184  		acpi_os_printf("\n[%02X]
> PCI IRQ Routing Table Package\n",
> 39239fed Bob Moore 2015-04-13  185  			       count);
> 39239fed Bob Moore 2015-04-13 @186
> 	acpi_rs_dump_descriptor(prt_element, acpi_rs_dump_prt);
> 39239fed Bob Moore 2015-04-13  187
> 39239fed Bob Moore 2015-04-13  188  		prt_element =
> ACPI_ADD_PTR(struct acpi_pci_routing_table,
> 39239fed Bob Moore 2015-04-13  189
> prt_element, prt_element->length);
> 
> :::::: The code at line 136 was first introduced by commit
> :::::: 39239fedbfb5493d5804d6cefb806fd208a006c5 ACPICA: Update Resource
> descriptor dump module.
> 
> :::::: TO: Bob Moore <robert.moore@intel.com>
> :::::: CC: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> ---
> 0-DAY kernel test infrastructure                Open Source Technology
> Center
> https://lists.01.org/pipermail/kbuild-all                   Intel
> Corporation
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1248287 — RE: [PATCH 01/13] ACPICA: Remove unnecessary conditional compilation.

From"Zheng, Lv" <lv.zheng@intel.com>
Date2015-10-16 03:10 +0200
SubjectRE: [PATCH 01/13] ACPICA: Remove unnecessary conditional compilation.
Message-ID<qk1GW-7np-13@gated-at.bofh.it>
In reply to#1248067
OK. I'll check it.
There is no issue detected in my local test.
I'll re-send the series after fixing the build issue.
So Rafael please ignore this series for now.

Thanks and best regards
-Lv

> From: Moore, Robert
> Sent: Friday, October 16, 2015 2:33 AM
> 
> This appears as though it is related to this conditional:
> 
> #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
> /*
>  * rsinfo
>  */
> extern ACPI_RSDUMP_INFO         *AcpiGbl_DumpResourceDispatch[];
> extern ACPI_RSDUMP_INFO         *AcpiGbl_DumpSerialBusDispatch[];
> 
> 
> So, I'm going to let Lv take a look at this.
> Bob
> 
> 
> 
> > -----Original Message-----
> > From: lkp
> > Sent: Thursday, October 15, 2015 8:51 AM
> > To: Zheng, Lv
> > Cc: kbuild-all@01.org; Wysocki, Rafael J; Brown, Len; Zheng, Lv; Lv Zheng;
> > linux-kernel@vger.kernel.org; linux-acpi@vger.kernel.org; Moore, Robert
> > Subject: Re: [PATCH 01/13] ACPICA: Remove unnecessary conditional
> > compilation.
> >
> > Hi Bob,
> >
> > [auto build test ERROR on pm/linux-next -- if it's inappropriate base,
> > please suggest rules for selecting the more suitable base]
> >
> > url:    https://github.com/0day-ci/linux/commits/Lv-Zheng/ACPICA-20150930-
> > Release/20151015-101636
> > config: x86_64-lkp (attached as .config)
> > reproduce:
> >         # save the attached .config to linux build tree
> >         make ARCH=x86_64
> >
> > All errors (new ones prefixed by >>):
> >
> >    drivers/acpi/acpica/rsdump.c: In function 'acpi_rs_dump_resource_list':
> > >> drivers/acpi/acpica/rsdump.c:136:7: error:
> > >> 'acpi_gbl_dump_serial_bus_dispatch' undeclared (first use in this
> > >> function)
> >           acpi_gbl_dump_serial_bus_dispatch
> >           ^
> >    drivers/acpi/acpica/rsdump.c:136:7: note: each undeclared identifier is
> > reported only once for each function it appears in
> > >> drivers/acpi/acpica/rsdump.c:141:7: error:
> > >> 'acpi_gbl_dump_resource_dispatch' undeclared (first use in this
> > >> function)
> >           acpi_gbl_dump_resource_dispatch
> >           ^
> >    drivers/acpi/acpica/rsdump.c: In function 'acpi_rs_dump_irq_list':
> > >> drivers/acpi/acpica/rsdump.c:186:40: error: 'acpi_rs_dump_prt'
> > >> undeclared (first use in this function)
> >       acpi_rs_dump_descriptor(prt_element, acpi_rs_dump_prt);
> >                                            ^
> >    drivers/acpi/acpica/rsdump.c: In function
> > 'acpi_rs_dump_address_common':
> > >> drivers/acpi/acpica/rsdump.c:445:37: error:
> > >> 'acpi_rs_dump_memory_flags' undeclared (first use in this function)
> >       acpi_rs_dump_descriptor(resource, acpi_rs_dump_memory_flags);
> >                                         ^
> > >> drivers/acpi/acpica/rsdump.c:450:37: error: 'acpi_rs_dump_io_flags'
> > >> undeclared (first use in this function)
> >       acpi_rs_dump_descriptor(resource, acpi_rs_dump_io_flags);
> >                                         ^
> > >> drivers/acpi/acpica/rsdump.c:467:36: error:
> > >> 'acpi_rs_dump_general_flags' undeclared (first use in this function)
> >      acpi_rs_dump_descriptor(resource, acpi_rs_dump_general_flags);
> >                                        ^
> >
> > vim +/acpi_gbl_dump_serial_bus_dispatch +136 drivers/acpi/acpica/rsdump.c
> >
> > 39239fed Bob Moore 2015-04-13  130  		}
> > 39239fed Bob Moore 2015-04-13  131
> > 39239fed Bob Moore 2015-04-13  132  		/* Dump the resource
> > descriptor */
> > 39239fed Bob Moore 2015-04-13  133
> > 39239fed Bob Moore 2015-04-13  134  		if (type ==
> > ACPI_RESOURCE_TYPE_SERIAL_BUS) {
> > 39239fed Bob Moore 2015-04-13  135
> > 	acpi_rs_dump_descriptor(&resource_list->data,
> > 39239fed Bob Moore 2015-04-13 @136
> > 	acpi_gbl_dump_serial_bus_dispatch
> > 39239fed Bob Moore 2015-04-13  137
> > 	[resource_list->data.
> > 39239fed Bob Moore 2015-04-13  138
> > common_serial_bus.type]);
> > 39239fed Bob Moore 2015-04-13  139  		} else {
> > 39239fed Bob Moore 2015-04-13  140
> > 	acpi_rs_dump_descriptor(&resource_list->data,
> > 39239fed Bob Moore 2015-04-13 @141
> > 	acpi_gbl_dump_resource_dispatch
> > 39239fed Bob Moore 2015-04-13  142
> > 	[type]);
> > 39239fed Bob Moore 2015-04-13  143  		}
> > 39239fed Bob Moore 2015-04-13  144
> > 39239fed Bob Moore 2015-04-13  145  		/* Point to the next
> > resource structure */
> > 39239fed Bob Moore 2015-04-13  146
> > 39239fed Bob Moore 2015-04-13  147  		resource_list =
> > ACPI_NEXT_RESOURCE(resource_list);
> > 39239fed Bob Moore 2015-04-13  148
> > 39239fed Bob Moore 2015-04-13  149  		/* Exit when END_TAG
> > descriptor is reached */
> > 39239fed Bob Moore 2015-04-13  150
> > 39239fed Bob Moore 2015-04-13  151  	} while (type !=
> > ACPI_RESOURCE_TYPE_END_TAG);
> > 39239fed Bob Moore 2015-04-13  152  }
> > 39239fed Bob Moore 2015-04-13  153
> > 39239fed Bob Moore 2015-04-13  154
> > /*************************************************************************
> > ******
> > 39239fed Bob Moore 2015-04-13  155   *
> > 39239fed Bob Moore 2015-04-13  156   * FUNCTION:    acpi_rs_dump_irq_list
> > 39239fed Bob Moore 2015-04-13  157   *
> > 39239fed Bob Moore 2015-04-13  158   * PARAMETERS:  route_table     -
> > Pointer to the routing table to dump.
> > 39239fed Bob Moore 2015-04-13  159   *
> > 39239fed Bob Moore 2015-04-13  160   * RETURN:      None
> > 39239fed Bob Moore 2015-04-13  161   *
> > 39239fed Bob Moore 2015-04-13  162   * DESCRIPTION: Print IRQ routing
> > table
> > 39239fed Bob Moore 2015-04-13  163   *
> > 39239fed Bob Moore 2015-04-13  164
> > **************************************************************************
> > ****/
> > 39239fed Bob Moore 2015-04-13  165
> > 39239fed Bob Moore 2015-04-13  166  void acpi_rs_dump_irq_list(u8
> > *route_table) 39239fed Bob Moore 2015-04-13  167  {
> > 39239fed Bob Moore 2015-04-13  168  	struct acpi_pci_routing_table
> > *prt_element;
> > 39239fed Bob Moore 2015-04-13  169  	u8 count;
> > 39239fed Bob Moore 2015-04-13  170
> > 39239fed Bob Moore 2015-04-13  171  	ACPI_FUNCTION_ENTRY();
> > 39239fed Bob Moore 2015-04-13  172
> > 39239fed Bob Moore 2015-04-13  173  	/* Check if debug output enabled
> > */
> > 39239fed Bob Moore 2015-04-13  174
> > 39239fed Bob Moore 2015-04-13  175  	if
> > (!ACPI_IS_DEBUG_ENABLED(ACPI_LV_RESOURCES, _COMPONENT)) {
> > 39239fed Bob Moore 2015-04-13  176  		return;
> > 39239fed Bob Moore 2015-04-13  177  	}
> > 39239fed Bob Moore 2015-04-13  178
> > 39239fed Bob Moore 2015-04-13  179  	prt_element =
> > ACPI_CAST_PTR(struct acpi_pci_routing_table, route_table);
> > 39239fed Bob Moore 2015-04-13  180
> > 39239fed Bob Moore 2015-04-13  181  	/* Dump all table elements, Exit
> > on zero length element */
> > 39239fed Bob Moore 2015-04-13  182
> > 39239fed Bob Moore 2015-04-13  183  	for (count = 0; prt_element-
> > >length; count++) {
> > 39239fed Bob Moore 2015-04-13  184  		acpi_os_printf("\n[%02X]
> > PCI IRQ Routing Table Package\n",
> > 39239fed Bob Moore 2015-04-13  185  			       count);
> > 39239fed Bob Moore 2015-04-13 @186
> > 	acpi_rs_dump_descriptor(prt_element, acpi_rs_dump_prt);
> > 39239fed Bob Moore 2015-04-13  187
> > 39239fed Bob Moore 2015-04-13  188  		prt_element =
> > ACPI_ADD_PTR(struct acpi_pci_routing_table,
> > 39239fed Bob Moore 2015-04-13  189
> > prt_element, prt_element->length);
> >
> > :::::: The code at line 136 was first introduced by commit
> > :::::: 39239fedbfb5493d5804d6cefb806fd208a006c5 ACPICA: Update Resource
> > descriptor dump module.
> >
> > :::::: TO: Bob Moore <robert.moore@intel.com>
> > :::::: CC: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> >
> > ---
> > 0-DAY kernel test infrastructure                Open Source Technology
> > Center
> > https://lists.01.org/pipermail/kbuild-all                   Intel
> > Corporation
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1248746 — Re: [PATCH 01/13] ACPICA: Remove unnecessary conditional compilation.

From"Rafael J. Wysocki" <rjw@rjwysocki.net>
Date2015-10-16 15:20 +0200
SubjectRe: [PATCH 01/13] ACPICA: Remove unnecessary conditional compilation.
Message-ID<qkd5o-7oE-9@gated-at.bofh.it>
In reply to#1248287
On Friday, October 16, 2015 12:59:53 AM Zheng, Lv wrote:
> OK. I'll check it.
> There is no issue detected in my local test.
> I'll re-send the series after fixing the build issue.
> So Rafael please ignore this series for now.

OK

Thanks,
Rafael

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1247330 — [PATCH 11/13] ACPI: Enable build of AML interpreter debugger

FromLv Zheng <lv.zheng@intel.com>
Date2015-10-15 04:10 +0200
Subject[PATCH 11/13] ACPI: Enable build of AML interpreter debugger
Message-ID<qjG9s-AK-27@gated-at.bofh.it>
In reply to#1247321
This patch enables ACPICA debugger files using a configurable
CONFIG_ACPI_DEBUGGER configuration item. Those debugger related code that
was originally masked as ACPI_FUTURE_USAGE now gets unmasked.

Necessary OSL stubs are also added in this patch:
1. acpi_os_readable(): This should be arch specific in Linux, while this
    patch doesn't introduce real implementation and a complex mechanism to
    allow architecture specific acpi_os_readable() to be implemented to
    validate the address. It may be done by future commits.
2. acpi_os_get_line(): This is used to obtain debugger command input. This
    patch only introduces a simple KDB concept example in it and the
    example should be co-working with the code implemented in
    acpi_os_printf(). Since this KDB example won't be compiled unless
    ENABLE_DEBUGGER is defined and it seems Linux has already stopped to
    use ENABLE_DEBUGGER, thus do not expect it can work properly.

This patch also cleans up all other ACPI_FUTURE_USAGE surroundings
accordingly.
1. Since linkage error can be automatically detected, declaration in the
   headers needn't be surrounded by ACPI_FUTURE_USAGE.
   So only the following separate exported fuction bodies are masked by
   this macro (other exported fucntions may have already been masked at
   entire module level via drivers/acpi/acpica/Makefile):
     acpi_install_exception_handler()
     acpi_subsystem_status()
     acpi_get_system_info()
     acpi_get_statistics()
     acpi_install_initialization_handler()
2. Since strip can automatically zap the no-user functions, functions that
   are not marked with ACPI_EXPORT_SYMBOL() needn't get surrounded by
   ACPI_FUTURE_USAGE.
   So the following function which is not used by Linux kernel now won't
   get surrounded by this macro:
     acpi_ps_get_name()

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
 drivers/acpi/Kconfig              |    9 +++++++++
 drivers/acpi/acpica/Makefile      |   16 ++++++++++++++++
 drivers/acpi/acpica/acinterp.h    |    2 --
 drivers/acpi/acpica/acnamesp.h    |    4 ----
 drivers/acpi/acpica/acparser.h    |    4 ----
 drivers/acpi/acpica/acutils.h     |    2 --
 drivers/acpi/acpica/evxface.c     |    2 +-
 drivers/acpi/acpica/nsdump.c      |    6 ------
 drivers/acpi/acpica/pstree.c      |    2 --
 drivers/acpi/acpica/psutils.c     |    2 --
 drivers/acpi/acpica/rsutils.c     |    2 --
 drivers/acpi/acpica/rsxface.c     |    4 ++--
 drivers/acpi/acpica/utxface.c     |    2 +-
 drivers/acpi/osl.c                |   11 +++--------
 include/acpi/acpixf.h             |   10 ----------
 include/acpi/platform/aclinux.h   |    7 +++++--
 include/acpi/platform/aclinuxex.h |    5 +++++
 17 files changed, 42 insertions(+), 48 deletions(-)

diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index 5d1015c..706c2e9 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -57,6 +57,15 @@ config ACPI_SYSTEM_POWER_STATES_SUPPORT
 config ACPI_CCA_REQUIRED
 	bool
 
+config ACPI_DEBUGGER
+	bool "In-kernel debugger (EXPERIMENTAL)"
+	select ACPI_DEBUG
+	help
+	  Enable in-kernel debugging facilities: statistics, internal
+	  object dump, single step control method execution.
+	  This is still under development, currently enabling this only
+	  results in the compilation of the ACPICA debugger files.
+
 config ACPI_SLEEP
 	bool
 	depends on SUSPEND || HIBERNATION
diff --git a/drivers/acpi/acpica/Makefile b/drivers/acpi/acpica/Makefile
index fedcc16..a57f019 100644
--- a/drivers/acpi/acpica/Makefile
+++ b/drivers/acpi/acpica/Makefile
@@ -178,7 +178,23 @@ acpi-y +=		\
 	utxferror.o	\
 	utxfmutex.o
 
+acpi-$(CONFIG_ACPI_DEBUGGER) +=	\
+	dbcmds.o		\
+	dbconvert.o		\
+	dbdisply.o		\
+	dbexec.o		\
+	dbhistry.o		\
+	dbinput.o		\
+	dbmethod.o		\
+	dbnames.o		\
+	dbobject.o		\
+	dbstats.o		\
+	dbutils.o		\
+	dbxface.o
+
 acpi-$(ACPI_FUTURE_USAGE) +=	\
+	dbfileio.o		\
+	dbtest.o		\
 	utcache.o		\
 	utfileio.o		\
 	utprint.o		\
diff --git a/drivers/acpi/acpica/acinterp.h b/drivers/acpi/acpica/acinterp.h
index e820ed8..e9e936e 100644
--- a/drivers/acpi/acpica/acinterp.h
+++ b/drivers/acpi/acpica/acinterp.h
@@ -397,12 +397,10 @@ void
 acpi_ex_dump_operands(union acpi_operand_object **operands,
 		      const char *opcode_name, u32 num_opcodes);
 
-#ifdef	ACPI_FUTURE_USAGE
 void
 acpi_ex_dump_object_descriptor(union acpi_operand_object *object, u32 flags);
 
 void acpi_ex_dump_namespace_node(struct acpi_namespace_node *node, u32 flags);
-#endif				/* ACPI_FUTURE_USAGE */
 
 /*
  * exnames - AML namestring support
diff --git a/drivers/acpi/acpica/acnamesp.h b/drivers/acpi/acpica/acnamesp.h
index ea0d907..5d261c9 100644
--- a/drivers/acpi/acpica/acnamesp.h
+++ b/drivers/acpi/acpica/acnamesp.h
@@ -193,9 +193,7 @@ acpi_ns_convert_to_resource(union acpi_operand_object *original_object,
 /*
  * nsdump - Namespace dump/print utilities
  */
-#ifdef	ACPI_FUTURE_USAGE
 void acpi_ns_dump_tables(acpi_handle search_base, u32 max_depth);
-#endif				/* ACPI_FUTURE_USAGE */
 
 void acpi_ns_dump_entry(acpi_handle handle, u32 debug_level);
 
@@ -208,7 +206,6 @@ acpi_status
 acpi_ns_dump_one_object(acpi_handle obj_handle,
 			u32 level, void *context, void **return_value);
 
-#ifdef	ACPI_FUTURE_USAGE
 void
 acpi_ns_dump_objects(acpi_object_type type,
 		     u8 display_type,
@@ -220,7 +217,6 @@ acpi_ns_dump_object_paths(acpi_object_type type,
 			  u8 display_type,
 			  u32 max_depth,
 			  acpi_owner_id owner_id, acpi_handle start_handle);
-#endif				/* ACPI_FUTURE_USAGE */
 
 /*
  * nseval - Namespace evaluation functions
diff --git a/drivers/acpi/acpica/acparser.h b/drivers/acpi/acpica/acparser.h
index 6021ccf..8fc8c7c 100644
--- a/drivers/acpi/acpica/acparser.h
+++ b/drivers/acpi/acpica/acparser.h
@@ -194,10 +194,8 @@ union acpi_parse_object *acpi_ps_find(union acpi_parse_object *scope,
 
 union acpi_parse_object *acpi_ps_get_arg(union acpi_parse_object *op, u32 argn);
 
-#ifdef	ACPI_FUTURE_USAGE
 union acpi_parse_object *acpi_ps_get_depth_next(union acpi_parse_object *origin,
 						union acpi_parse_object *op);
-#endif				/* ACPI_FUTURE_USAGE */
 
 /*
  * pswalk - parse tree walk routines
@@ -235,9 +233,7 @@ void acpi_ps_free_op(union acpi_parse_object *op);
 
 u8 acpi_ps_is_leading_char(u32 c);
 
-#ifdef	ACPI_FUTURE_USAGE
 u32 acpi_ps_get_name(union acpi_parse_object *op);
-#endif				/* ACPI_FUTURE_USAGE */
 
 void acpi_ps_set_name(union acpi_parse_object *op, u32 name);
 
diff --git a/drivers/acpi/acpica/acutils.h b/drivers/acpi/acpica/acutils.h
index fb2aa50..8b8fef6 100644
--- a/drivers/acpi/acpica/acutils.h
+++ b/drivers/acpi/acpica/acutils.h
@@ -635,9 +635,7 @@ void
 acpi_ut_free_and_track(void *address,
 		       u32 component, const char *module, u32 line);
 
-#ifdef	ACPI_FUTURE_USAGE
 void acpi_ut_dump_allocation_info(void);
-#endif				/* ACPI_FUTURE_USAGE */
 
 void acpi_ut_dump_allocations(u32 component, const char *module);
 
diff --git a/drivers/acpi/acpica/evxface.c b/drivers/acpi/acpica/evxface.c
index 81f2d9e..07d22bf 100644
--- a/drivers/acpi/acpica/evxface.c
+++ b/drivers/acpi/acpica/evxface.c
@@ -405,7 +405,7 @@ cleanup:
 }
 
 ACPI_EXPORT_SYMBOL(acpi_install_exception_handler)
-#endif				/*  ACPI_FUTURE_USAGE  */
+#endif
 
 #if (!ACPI_REDUCED_HARDWARE)
 /*******************************************************************************
diff --git a/drivers/acpi/acpica/nsdump.c b/drivers/acpi/acpica/nsdump.c
index 0f1daba..37aa5c4 100644
--- a/drivers/acpi/acpica/nsdump.c
+++ b/drivers/acpi/acpica/nsdump.c
@@ -60,7 +60,6 @@ acpi_ns_dump_one_device(acpi_handle obj_handle,
 
 #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
 
-#ifdef	ACPI_FUTURE_USAGE
 static acpi_status
 acpi_ns_dump_one_object_path(acpi_handle obj_handle,
 			     u32 level, void *context, void **return_value);
@@ -68,7 +67,6 @@ acpi_ns_dump_one_object_path(acpi_handle obj_handle,
 static acpi_status
 acpi_ns_get_max_depth(acpi_handle obj_handle,
 		      u32 level, void *context, void **return_value);
-#endif				/* ACPI_FUTURE_USAGE */
 
 /*******************************************************************************
  *
@@ -625,7 +623,6 @@ cleanup:
 	return (AE_OK);
 }
 
-#ifdef ACPI_FUTURE_USAGE
 /*******************************************************************************
  *
  * FUNCTION:    acpi_ns_dump_objects
@@ -680,9 +677,7 @@ acpi_ns_dump_objects(acpi_object_type type,
 
 	(void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
 }
-#endif				/* ACPI_FUTURE_USAGE */
 
-#ifdef	ACPI_FUTURE_USAGE
 /*******************************************************************************
  *
  * FUNCTION:    acpi_ns_dump_one_object_path, acpi_ns_get_max_depth
@@ -810,7 +805,6 @@ acpi_ns_dump_object_paths(acpi_object_type type,
 
 	(void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
 }
-#endif				/* ACPI_FUTURE_USAGE */
 
 /*******************************************************************************
  *
diff --git a/drivers/acpi/acpica/pstree.c b/drivers/acpi/acpica/pstree.c
index 89984f3..cf2f2fa 100644
--- a/drivers/acpi/acpica/pstree.c
+++ b/drivers/acpi/acpica/pstree.c
@@ -183,7 +183,6 @@ acpi_ps_append_arg(union acpi_parse_object *op, union acpi_parse_object *arg)
 	}
 }
 
-#ifdef ACPI_FUTURE_USAGE
 /*******************************************************************************
  *
  * FUNCTION:    acpi_ps_get_depth_next
@@ -317,4 +316,3 @@ union acpi_parse_object *acpi_ps_get_child(union acpi_parse_object *op)
 	return (child);
 }
 #endif
-#endif				/*  ACPI_FUTURE_USAGE  */
diff --git a/drivers/acpi/acpica/psutils.c b/drivers/acpi/acpica/psutils.c
index 183cc1e..71d2877 100644
--- a/drivers/acpi/acpica/psutils.c
+++ b/drivers/acpi/acpica/psutils.c
@@ -205,7 +205,6 @@ u8 acpi_ps_is_leading_char(u32 c)
 /*
  * Get op's name (4-byte name segment) or 0 if unnamed
  */
-#ifdef ACPI_FUTURE_USAGE
 u32 acpi_ps_get_name(union acpi_parse_object * op)
 {
 
@@ -219,7 +218,6 @@ u32 acpi_ps_get_name(union acpi_parse_object * op)
 
 	return (op->named.name);
 }
-#endif				/*  ACPI_FUTURE_USAGE  */
 
 /*
  * Set op's name
diff --git a/drivers/acpi/acpica/rsutils.c b/drivers/acpi/acpica/rsutils.c
index 52b024d..9486992 100644
--- a/drivers/acpi/acpica/rsutils.c
+++ b/drivers/acpi/acpica/rsutils.c
@@ -564,7 +564,6 @@ acpi_rs_get_crs_method_data(struct acpi_namespace_node *node,
  *
  ******************************************************************************/
 
-#ifdef ACPI_FUTURE_USAGE
 acpi_status
 acpi_rs_get_prs_method_data(struct acpi_namespace_node *node,
 			    struct acpi_buffer *ret_buffer)
@@ -596,7 +595,6 @@ acpi_rs_get_prs_method_data(struct acpi_namespace_node *node,
 	acpi_ut_remove_reference(obj_desc);
 	return_ACPI_STATUS(status);
 }
-#endif				/*  ACPI_FUTURE_USAGE  */
 
 /*******************************************************************************
  *
diff --git a/drivers/acpi/acpica/rsxface.c b/drivers/acpi/acpica/rsxface.c
index de51f83..1e8cd57 100644
--- a/drivers/acpi/acpica/rsxface.c
+++ b/drivers/acpi/acpica/rsxface.c
@@ -220,7 +220,7 @@ acpi_get_current_resources(acpi_handle device_handle,
 }
 
 ACPI_EXPORT_SYMBOL(acpi_get_current_resources)
-#ifdef ACPI_FUTURE_USAGE
+
 /*******************************************************************************
  *
  * FUNCTION:    acpi_get_possible_resources
@@ -262,7 +262,7 @@ acpi_get_possible_resources(acpi_handle device_handle,
 }
 
 ACPI_EXPORT_SYMBOL(acpi_get_possible_resources)
-#endif				/*  ACPI_FUTURE_USAGE  */
+
 /*******************************************************************************
  *
  * FUNCTION:    acpi_set_current_resources
diff --git a/drivers/acpi/acpica/utxface.c b/drivers/acpi/acpica/utxface.c
index a6b0eb0..f9c8f9c 100644
--- a/drivers/acpi/acpica/utxface.c
+++ b/drivers/acpi/acpica/utxface.c
@@ -253,7 +253,7 @@ acpi_install_initialization_handler(acpi_init_handler handler, u32 function)
 }
 
 ACPI_EXPORT_SYMBOL(acpi_install_initialization_handler)
-#endif				/*  ACPI_FUTURE_USAGE  */
+#endif
 
 /*****************************************************************************
  *
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 739a4a6..3272915 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -66,8 +66,6 @@ struct acpi_os_dpc {
 /* stuff for debugger support */
 int acpi_in_debugger;
 EXPORT_SYMBOL(acpi_in_debugger);
-
-extern char line_buf[80];
 #endif				/*ENABLE_DEBUGGER */
 
 static int (*__acpi_os_prepare_sleep)(u8 sleep_state, u32 pm1a_ctrl,
@@ -1345,15 +1343,13 @@ acpi_status acpi_os_signal_semaphore(acpi_handle handle, u32 units)
 	return AE_OK;
 }
 
-#ifdef ACPI_FUTURE_USAGE
-u32 acpi_os_get_line(char *buffer)
+acpi_status acpi_os_get_line(char *buffer, u32 buffer_length, u32 *bytes_read)
 {
-
 #ifdef ENABLE_DEBUGGER
 	if (acpi_in_debugger) {
 		u32 chars;
 
-		kdb_read(buffer, sizeof(line_buf));
+		kdb_read(buffer, buffer_length);
 
 		/* remove the CR kdb includes */
 		chars = strlen(buffer) - 1;
@@ -1361,9 +1357,8 @@ u32 acpi_os_get_line(char *buffer)
 	}
 #endif
 
-	return 0;
+	return AE_OK;
 }
-#endif				/*  ACPI_FUTURE_USAGE  */
 
 acpi_status acpi_os_signal(u32 function, void *info)
 {
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index c33eeab..89a4018 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -393,15 +393,11 @@ ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_terminate(void))
  */
 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable(void))
 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable(void))
-#ifdef ACPI_FUTURE_USAGE
 ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_subsystem_status(void))
-#endif
 
-#ifdef ACPI_FUTURE_USAGE
 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
 			    acpi_get_system_info(struct acpi_buffer
 						 *ret_buffer))
-#endif
 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
 			     acpi_get_statistics(struct acpi_statistics *stats))
 ACPI_EXTERNAL_RETURN_PTR(const char
@@ -625,11 +621,9 @@ ACPI_EXTERNAL_RETURN_STATUS(acpi_status
 							       space_id,
 							       acpi_adr_space_handler
 							       handler))
-#ifdef ACPI_FUTURE_USAGE
 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
 			     acpi_install_exception_handler
 			     (acpi_exception_handler handler))
-#endif
 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
 			     acpi_install_interface_handler
 			     (acpi_interface_handler handler))
@@ -750,12 +744,10 @@ ACPI_EXTERNAL_RETURN_STATUS(acpi_status
 			     acpi_get_current_resources(acpi_handle device,
 							struct acpi_buffer
 							*ret_buffer))
-#ifdef ACPI_FUTURE_USAGE
 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
 			     acpi_get_possible_resources(acpi_handle device,
 							 struct acpi_buffer
 							 *ret_buffer))
-#endif
 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
 			     acpi_get_event_resources(acpi_handle device_handle,
 						      struct acpi_buffer
@@ -844,7 +836,6 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
 /*
  * ACPI Timer interfaces
  */
-#ifdef ACPI_FUTURE_USAGE
 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
 				acpi_get_timer_resolution(u32 *resolution))
 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_get_timer(u32 *ticks))
@@ -853,7 +844,6 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
 				acpi_get_timer_duration(u32 start_ticks,
 							u32 end_ticks,
 							u32 *time_elapsed))
-#endif				/* ACPI_FUTURE_USAGE */
 
 /*
  * Error/Warning output
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h
index 74ba46c..323e5da 100644
--- a/include/acpi/platform/aclinux.h
+++ b/include/acpi/platform/aclinux.h
@@ -63,12 +63,16 @@
 
 #define ACPI_USE_SYSTEM_INTTYPES
 
-/* Compile for reduced hardware mode only with this kernel config */
+/* Kernel specific ACPICA configuration */
 
 #ifdef CONFIG_ACPI_REDUCED_HARDWARE_ONLY
 #define ACPI_REDUCED_HARDWARE 1
 #endif
 
+#ifdef CONFIG_ACPI_DEBUGGER
+#define ACPI_DEBUGGER
+#endif
+
 #include <linux/string.h>
 #include <linux/kernel.h>
 #include <linux/ctype.h>
@@ -151,7 +155,6 @@
  * OSL interfaces used by utilities
  */
 #define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_redirect_output
-#define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_line
 #define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_table_by_name
 #define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_table_by_index
 #define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_table_by_address
diff --git a/include/acpi/platform/aclinuxex.h b/include/acpi/platform/aclinuxex.h
index acedc3f..fd6d70f 100644
--- a/include/acpi/platform/aclinuxex.h
+++ b/include/acpi/platform/aclinuxex.h
@@ -124,6 +124,11 @@ static inline acpi_thread_id acpi_os_get_thread_id(void)
 		lock ? AE_OK : AE_NO_MEMORY; \
 	})
 
+static inline u8 acpi_os_readable(void *pointer, acpi_size length)
+{
+	return TRUE;
+}
+
 /*
  * OSL interfaces added by Linux
  */
-- 
1.7.10

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1247333 — [PATCH 03/13] ACPICA: Update exception code for "file not found" error

FromLv Zheng <lv.zheng@intel.com>
Date2015-10-15 04:10 +0200
Subject[PATCH 03/13] ACPICA: Update exception code for "file not found" error
Message-ID<qjG9s-AK-33@gated-at.bofh.it>
In reply to#1247321
From: Bob Moore <robert.moore@intel.com>

ACPICA commit ac1564c26d239348ef13455f61d5616f3961ff43

Used by the ACPICA applications.

This patch is a bit broken due to non-portable <errno.h> inclusion as on
some platforms, there is no such a header file for their lib-c exports.
Fortunately, Linux doesn't compile utfileio.c for either the kernel
space ACPICA core (drivers/acpi/acpica) or the userspace ACPICA tools
(tools/power/acpi) for now, so it's safe to leave this patch as it is.

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

diff --git a/drivers/acpi/acpica/utfileio.c b/drivers/acpi/acpica/utfileio.c
index 75a94f5..d435b7b 100644
--- a/drivers/acpi/acpica/utfileio.c
+++ b/drivers/acpi/acpica/utfileio.c
@@ -45,6 +45,7 @@
 #include "accommon.h"
 #include "actables.h"
 #include "acapps.h"
+#include "errno.h"
 
 #ifdef ACPI_ASL_COMPILER
 #include "aslcompiler.h"
@@ -301,6 +302,11 @@ acpi_ut_read_table_from_file(char *filename, struct acpi_table_header ** table)
 	file = fopen(filename, "rb");
 	if (!file) {
 		perror("Could not open input file");
+
+		if (errno == ENOENT) {
+			return (AE_NOT_EXIST);
+		}
+
 		return (status);
 	}
 
-- 
1.7.10

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1247334 — [PATCH 04/13] ACPICA: Debugger: Update mutexes used for multithreaded debugger

FromLv Zheng <lv.zheng@intel.com>
Date2015-10-15 04:20 +0200
Subject[PATCH 04/13] ACPICA: Debugger: Update mutexes used for multithreaded debugger
Message-ID<qjGj8-PB-3@gated-at.bofh.it>
In reply to#1247321
From: Bob Moore <robert.moore@intel.com>

ACPICA commit 6b2701f619040e803313363f516b200e362a9100

Make these mutex objects independent of the deadlock detection mechanism.
This mechanism caused failures with the multithread debugger.

This patch doesn't affect Linux kernel as debugger is currently not fully
functioning in the Linux kernel. And the further debugger cleanups will
take care of handling debugger command signalling correctly instead of
using such kind of mutexes. So it is safe to leave this patch as it is.

Link: https://github.com/acpica/acpica/commit/6b2701f6
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
 drivers/acpi/acpica/acglobal.h |    3 +++
 drivers/acpi/acpica/aclocal.h  |    4 +---
 drivers/acpi/acpica/utdecode.c |    2 --
 drivers/acpi/acpica/utmutex.c  |   21 +++++++++++++++++++++
 include/acpi/platform/acenv.h  |    6 +++---
 5 files changed, 28 insertions(+), 8 deletions(-)

diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h
index 09f37b5..593de41 100644
--- a/drivers/acpi/acpica/acglobal.h
+++ b/drivers/acpi/acpica/acglobal.h
@@ -357,6 +357,9 @@ ACPI_GLOBAL(u16, acpi_gbl_node_type_count_misc);
 ACPI_GLOBAL(u32, acpi_gbl_num_nodes);
 ACPI_GLOBAL(u32, acpi_gbl_num_objects);
 
+ACPI_GLOBAL(acpi_mutex, acpi_gbl_db_command_ready);
+ACPI_GLOBAL(acpi_mutex, acpi_gbl_db_command_complete);
+
 #endif				/* ACPI_DEBUGGER */
 
 /*****************************************************************************
diff --git a/drivers/acpi/acpica/aclocal.h b/drivers/acpi/acpica/aclocal.h
index 8a66fef..918f70d 100644
--- a/drivers/acpi/acpica/aclocal.h
+++ b/drivers/acpi/acpica/aclocal.h
@@ -83,10 +83,8 @@ union acpi_parse_object;
 #define ACPI_MTX_EVENTS                 3	/* Data for ACPI events */
 #define ACPI_MTX_CACHES                 4	/* Internal caches, general purposes */
 #define ACPI_MTX_MEMORY                 5	/* Debug memory tracking lists */
-#define ACPI_MTX_DEBUG_CMD_COMPLETE     6	/* AML debugger */
-#define ACPI_MTX_DEBUG_CMD_READY        7	/* AML debugger */
 
-#define ACPI_MAX_MUTEX                  7
+#define ACPI_MAX_MUTEX                  5
 #define ACPI_NUM_MUTEX                  ACPI_MAX_MUTEX+1
 
 /* Lock structure for reader/writer interfaces */
diff --git a/drivers/acpi/acpica/utdecode.c b/drivers/acpi/acpica/utdecode.c
index 988e23b..d452a78 100644
--- a/drivers/acpi/acpica/utdecode.c
+++ b/drivers/acpi/acpica/utdecode.c
@@ -407,8 +407,6 @@ static char *acpi_gbl_mutex_names[ACPI_NUM_MUTEX] = {
 	"ACPI_MTX_Events",
 	"ACPI_MTX_Caches",
 	"ACPI_MTX_Memory",
-	"ACPI_MTX_CommandComplete",
-	"ACPI_MTX_CommandReady"
 };
 
 char *acpi_ut_get_mutex_name(u32 mutex_id)
diff --git a/drivers/acpi/acpica/utmutex.c b/drivers/acpi/acpica/utmutex.c
index 37b8b58..ce406e3 100644
--- a/drivers/acpi/acpica/utmutex.c
+++ b/drivers/acpi/acpica/utmutex.c
@@ -108,6 +108,21 @@ acpi_status acpi_ut_mutex_initialize(void)
 	/* Create the reader/writer lock for namespace access */
 
 	status = acpi_ut_create_rw_lock(&acpi_gbl_namespace_rw_lock);
+	if (ACPI_FAILURE(status)) {
+		return_ACPI_STATUS(status);
+	}
+#ifdef ACPI_DEBUGGER
+
+	/* Debugger Support */
+
+	status = acpi_os_create_mutex(&acpi_gbl_db_command_ready);
+	if (ACPI_FAILURE(status)) {
+		return_ACPI_STATUS(status);
+	}
+
+	status = acpi_os_create_mutex(&acpi_gbl_db_command_complete);
+#endif
+
 	return_ACPI_STATUS(status);
 }
 
@@ -147,6 +162,12 @@ void acpi_ut_mutex_terminate(void)
 	/* Delete the reader/writer lock */
 
 	acpi_ut_delete_rw_lock(&acpi_gbl_namespace_rw_lock);
+
+#ifdef ACPI_DEBUGGER
+	acpi_os_delete_mutex(acpi_gbl_db_command_ready);
+	acpi_os_delete_mutex(acpi_gbl_db_command_complete);
+#endif
+
 	return_VOID;
 }
 
diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h
index 15ef08c..056f245 100644
--- a/include/acpi/platform/acenv.h
+++ b/include/acpi/platform/acenv.h
@@ -304,11 +304,11 @@
  * multi-threaded if ACPI_APPLICATION is not set.
  */
 #ifndef DEBUGGER_THREADING
-#ifdef ACPI_APPLICATION
-#define DEBUGGER_THREADING          DEBUGGER_SINGLE_THREADED
+#if !defined (ACPI_APPLICATION) || defined (ACPI_EXEC_APP)
+#define DEBUGGER_THREADING          DEBUGGER_MULTI_THREADED
 
 #else
-#define DEBUGGER_THREADING          DEBUGGER_MULTI_THREADED
+#define DEBUGGER_THREADING          DEBUGGER_SINGLE_THREADED
 #endif
 #endif				/* !DEBUGGER_THREADING */
 
-- 
1.7.10

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1247335 — [PATCH 06/13] ACPICA: Improve typechecking, both compile-time and runtime

FromLv Zheng <lv.zheng@intel.com>
Date2015-10-15 04:20 +0200
Subject[PATCH 06/13] ACPICA: Improve typechecking, both compile-time and runtime
Message-ID<qjGj8-PB-1@gated-at.bofh.it>
In reply to#1247321
From: Bob Moore <robert.moore@intel.com>

ACPICA commit 8d0f96e2a11a4ceabb2cae4b41e0ce1f4d3786b9

Adds much stricter typechecking in the iASL compiler, and
also adds some additional checking in the interpreter.

Link: https://github.com/acpica/acpica/commit/8d0f96e2
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
 drivers/acpi/acpica/aclocal.h  |    8 ++-
 drivers/acpi/acpica/acopcode.h |    4 +-
 drivers/acpi/acpica/amlcode.h  |   11 ++--
 drivers/acpi/acpica/exconvrt.c |    1 +
 drivers/acpi/acpica/exresolv.c |    1 -
 drivers/acpi/acpica/exresop.c  |    2 +
 drivers/acpi/acpica/exstore.c  |  120 ++++++++++++++++++++++++++++++----------
 drivers/acpi/acpica/exstoren.c |    5 +-
 drivers/acpi/acpica/nspredef.c |    2 +-
 drivers/acpi/acpica/utdecode.c |   19 ++++++-
 include/acpi/acexcep.h         |    7 ++-
 11 files changed, 134 insertions(+), 46 deletions(-)

diff --git a/drivers/acpi/acpica/aclocal.h b/drivers/acpi/acpica/aclocal.h
index 918f70d..4e41b43 100644
--- a/drivers/acpi/acpica/aclocal.h
+++ b/drivers/acpi/acpica/aclocal.h
@@ -285,13 +285,17 @@ acpi_status(*acpi_internal_method) (struct acpi_walk_state * walk_state);
 #define ACPI_BTYPE_BUFFER_FIELD         0x00002000
 #define ACPI_BTYPE_DDB_HANDLE           0x00004000
 #define ACPI_BTYPE_DEBUG_OBJECT         0x00008000
-#define ACPI_BTYPE_REFERENCE            0x00010000
+#define ACPI_BTYPE_REFERENCE_OBJECT     0x00010000	/* From Index(), ref_of(), etc (type6_opcodes) */
 #define ACPI_BTYPE_RESOURCE             0x00020000
+#define ACPI_BTYPE_NAMED_REFERENCE      0x00040000	/* Generic unresolved Name or Namepath */
 
 #define ACPI_BTYPE_COMPUTE_DATA         (ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING | ACPI_BTYPE_BUFFER)
 
 #define ACPI_BTYPE_DATA                 (ACPI_BTYPE_COMPUTE_DATA  | ACPI_BTYPE_PACKAGE)
-#define ACPI_BTYPE_DATA_REFERENCE       (ACPI_BTYPE_DATA | ACPI_BTYPE_REFERENCE | ACPI_BTYPE_DDB_HANDLE)
+
+	/* Used by Copy, de_ref_of, Store, Printf, Fprintf */
+
+#define ACPI_BTYPE_DATA_REFERENCE       (ACPI_BTYPE_DATA | ACPI_BTYPE_REFERENCE_OBJECT | ACPI_BTYPE_DDB_HANDLE)
 #define ACPI_BTYPE_DEVICE_OBJECTS       (ACPI_BTYPE_DEVICE | ACPI_BTYPE_THERMAL | ACPI_BTYPE_PROCESSOR)
 #define ACPI_BTYPE_OBJECTS_AND_REFS     0x0001FFFF	/* ARG or LOCAL */
 #define ACPI_BTYPE_ALL_OBJECTS          0x0000FFFF
diff --git a/drivers/acpi/acpica/acopcode.h b/drivers/acpi/acpica/acopcode.h
index fd85ad0..f9acf92 100644
--- a/drivers/acpi/acpica/acopcode.h
+++ b/drivers/acpi/acpica/acopcode.h
@@ -211,7 +211,7 @@
 #define ARGI_ARG4                       ARG_NONE
 #define ARGI_ARG5                       ARG_NONE
 #define ARGI_ARG6                       ARG_NONE
-#define ARGI_BANK_FIELD_OP              ARGI_INVALID_OPCODE
+#define ARGI_BANK_FIELD_OP              ARGI_LIST1 (ARGI_INTEGER)
 #define ARGI_BIT_AND_OP                 ARGI_LIST3 (ARGI_INTEGER,    ARGI_INTEGER,       ARGI_TARGETREF)
 #define ARGI_BIT_NAND_OP                ARGI_LIST3 (ARGI_INTEGER,    ARGI_INTEGER,       ARGI_TARGETREF)
 #define ARGI_BIT_NOR_OP                 ARGI_LIST3 (ARGI_INTEGER,    ARGI_INTEGER,       ARGI_TARGETREF)
@@ -307,7 +307,7 @@
 #define ARGI_SLEEP_OP                   ARGI_LIST1 (ARGI_INTEGER)
 #define ARGI_STALL_OP                   ARGI_LIST1 (ARGI_INTEGER)
 #define ARGI_STATICSTRING_OP            ARGI_INVALID_OPCODE
-#define ARGI_STORE_OP                   ARGI_LIST2 (ARGI_DATAREFOBJ, ARGI_TARGETREF)
+#define ARGI_STORE_OP                   ARGI_LIST2 (ARGI_DATAREFOBJ, ARGI_STORE_TARGET)
 #define ARGI_STRING_OP                  ARGI_INVALID_OPCODE
 #define ARGI_SUBTRACT_OP                ARGI_LIST3 (ARGI_INTEGER,    ARGI_INTEGER,       ARGI_TARGETREF)
 #define ARGI_THERMAL_ZONE_OP            ARGI_INVALID_OPCODE
diff --git a/drivers/acpi/acpica/amlcode.h b/drivers/acpi/acpica/amlcode.h
index be9fd00..883f20c 100644
--- a/drivers/acpi/acpica/amlcode.h
+++ b/drivers/acpi/acpica/amlcode.h
@@ -277,14 +277,15 @@
 #define ARGI_TARGETREF              0x0F	/* Target, subject to implicit conversion */
 #define ARGI_FIXED_TARGET           0x10	/* Target, no implicit conversion */
 #define ARGI_SIMPLE_TARGET          0x11	/* Name, Local, Arg -- no implicit conversion */
+#define ARGI_STORE_TARGET           0x12	/* Target for store is TARGETREF + package objects */
 
 /* Multiple/complex types */
 
-#define ARGI_DATAOBJECT             0x12	/* Buffer, String, package or reference to a node - Used only by size_of operator */
-#define ARGI_COMPLEXOBJ             0x13	/* Buffer, String, or package (Used by INDEX op only) */
-#define ARGI_REF_OR_STRING          0x14	/* Reference or String (Used by DEREFOF op only) */
-#define ARGI_REGION_OR_BUFFER       0x15	/* Used by LOAD op only */
-#define ARGI_DATAREFOBJ             0x16
+#define ARGI_DATAOBJECT             0x13	/* Buffer, String, package or reference to a node - Used only by size_of operator */
+#define ARGI_COMPLEXOBJ             0x14	/* Buffer, String, or package (Used by INDEX op only) */
+#define ARGI_REF_OR_STRING          0x15	/* Reference or String (Used by DEREFOF op only) */
+#define ARGI_REGION_OR_BUFFER       0x16	/* Used by LOAD op only */
+#define ARGI_DATAREFOBJ             0x17
 
 /* Note: types above can expand to 0x1F maximum */
 
diff --git a/drivers/acpi/acpica/exconvrt.c b/drivers/acpi/acpica/exconvrt.c
index 075d654..1e4c5b6 100644
--- a/drivers/acpi/acpica/exconvrt.c
+++ b/drivers/acpi/acpica/exconvrt.c
@@ -618,6 +618,7 @@ acpi_ex_convert_to_target_type(acpi_object_type destination_type,
 		break;
 
 	case ARGI_TARGETREF:
+	case ARGI_STORE_TARGET:
 
 		switch (destination_type) {
 		case ACPI_TYPE_INTEGER:
diff --git a/drivers/acpi/acpica/exresolv.c b/drivers/acpi/acpica/exresolv.c
index 7b10912..a1afe1a 100644
--- a/drivers/acpi/acpica/exresolv.c
+++ b/drivers/acpi/acpica/exresolv.c
@@ -209,7 +209,6 @@ acpi_ex_resolve_object_to_value(union acpi_operand_object **stack_ptr,
 					 * (i.e., dereference the package index)
 					 * Delete the ref object, increment the returned object
 					 */
-					acpi_ut_remove_reference(stack_desc);
 					acpi_ut_add_reference(obj_desc);
 					*stack_ptr = obj_desc;
 				} else {
diff --git a/drivers/acpi/acpica/exresop.c b/drivers/acpi/acpica/exresop.c
index d2964af..424442d 100644
--- a/drivers/acpi/acpica/exresop.c
+++ b/drivers/acpi/acpica/exresop.c
@@ -307,6 +307,8 @@ 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  */
+		case ARGI_STORE_TARGET:
+
 			/*
 			 * Need an operand of type ACPI_TYPE_LOCAL_REFERENCE
 			 * A Namespace Node is OK as-is
diff --git a/drivers/acpi/acpica/exstore.c b/drivers/acpi/acpica/exstore.c
index a7eee24..c076e91 100644
--- a/drivers/acpi/acpica/exstore.c
+++ b/drivers/acpi/acpica/exstore.c
@@ -137,7 +137,7 @@ acpi_ex_store(union acpi_operand_object *source_desc,
 		/* Destination is not a Reference object */
 
 		ACPI_ERROR((AE_INFO,
-			    "Target is not a Reference or Constant object - %s [%p]",
+			    "Target is not a Reference or Constant object - [%s] %p",
 			    acpi_ut_get_object_type_name(dest_desc),
 			    dest_desc));
 
@@ -189,7 +189,7 @@ acpi_ex_store(union acpi_operand_object *source_desc,
 		 * displayed and otherwise has no effect -- see ACPI Specification
 		 */
 		ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
-				  "**** Write to Debug Object: Object %p %s ****:\n\n",
+				  "**** Write to Debug Object: Object %p [%s] ****:\n\n",
 				  source_desc,
 				  acpi_ut_get_object_type_name(source_desc)));
 
@@ -341,7 +341,7 @@ acpi_ex_store_object_to_index(union acpi_operand_object *source_desc,
 			/* All other types are invalid */
 
 			ACPI_ERROR((AE_INFO,
-				    "Source must be Integer/Buffer/String type, not %s",
+				    "Source must be type [Integer/Buffer/String], found [%s]",
 				    acpi_ut_get_object_type_name(source_desc)));
 			return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
 		}
@@ -352,8 +352,9 @@ acpi_ex_store_object_to_index(union acpi_operand_object *source_desc,
 		break;
 
 	default:
-		ACPI_ERROR((AE_INFO, "Target is not a Package or BufferField"));
-		status = AE_AML_OPERAND_TYPE;
+		ACPI_ERROR((AE_INFO,
+			    "Target is not of type [Package/BufferField]"));
+		status = AE_AML_TARGET_TYPE;
 		break;
 	}
 
@@ -373,20 +374,20 @@ acpi_ex_store_object_to_index(union acpi_operand_object *source_desc,
  *
  * DESCRIPTION: Store the object to the named object.
  *
- *              The Assignment of an object to a named object is handled here
- *              The value passed in will replace the current value (if any)
- *              with the input value.
+ * The assignment of an object to a named object is handled here.
+ * The value passed in will replace the current value (if any)
+ * with the input value.
  *
- *              When storing into an object the data is converted to the
- *              target object type then stored in the object. This means
- *              that the target object type (for an initialized target) will
- *              not be changed by a store operation. A copy_object can change
- *              the target type, however.
+ * When storing into an object the data is converted to the
+ * target object type then stored in the object. This means
+ * that the target object type (for an initialized target) will
+ * not be changed by a store operation. A copy_object can change
+ * the target type, however.
  *
- *              The implicit_conversion flag is set to NO/FALSE only when
- *              storing to an arg_x -- as per the rules of the ACPI spec.
+ * The implicit_conversion flag is set to NO/FALSE only when
+ * storing to an arg_x -- as per the rules of the ACPI spec.
  *
- *              Assumes parameters are already validated.
+ * Assumes parameters are already validated.
  *
  ******************************************************************************/
 
@@ -408,11 +409,75 @@ acpi_ex_store_object_to_node(union acpi_operand_object *source_desc,
 	target_type = acpi_ns_get_type(node);
 	target_desc = acpi_ns_get_attached_object(node);
 
-	ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Storing %p (%s) to node %p (%s)\n",
+	ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Storing %p [%s] to node %p [%s]\n",
 			  source_desc,
 			  acpi_ut_get_object_type_name(source_desc), node,
 			  acpi_ut_get_type_name(target_type)));
 
+	/* Only limited target types possible for everything except copy_object */
+
+	if (walk_state->opcode != AML_COPY_OP) {
+		/*
+		 * Only copy_object allows all object types to be overwritten. For
+		 * target_ref(s), there are restrictions on the object types that
+		 * are allowed.
+		 *
+		 * Allowable operations/typing for Store:
+		 *
+		 * 1) Simple Store
+		 *      Integer     --> Integer (Named/Local/Arg)
+		 *      String      --> String  (Named/Local/Arg)
+		 *      Buffer      --> Buffer  (Named/Local/Arg)
+		 *      Package     --> Package (Named/Local/Arg)
+		 *
+		 * 2) Store with implicit conversion
+		 *      Integer     --> String or Buffer  (Named)
+		 *      String      --> Integer or Buffer (Named)
+		 *      Buffer      --> Integer or String (Named)
+		 */
+		switch (target_type) {
+		case ACPI_TYPE_PACKAGE:
+			/*
+			 * Here, can only store a package to an existing package.
+			 * Storing a package to a Local/Arg is OK, and handled
+			 * elsewhere.
+			 */
+			if (walk_state->opcode == AML_STORE_OP) {
+				if (source_desc->common.type !=
+				    ACPI_TYPE_PACKAGE) {
+					ACPI_ERROR((AE_INFO,
+						    "Cannot assign type [%s] to [Package] "
+						    "(source must be type Pkg)",
+						    acpi_ut_get_object_type_name
+						    (source_desc)));
+
+					return_ACPI_STATUS(AE_AML_TARGET_TYPE);
+				}
+				break;
+			}
+
+			/* Fallthrough */
+
+		case ACPI_TYPE_DEVICE:
+		case ACPI_TYPE_EVENT:
+		case ACPI_TYPE_MUTEX:
+		case ACPI_TYPE_REGION:
+		case ACPI_TYPE_POWER:
+		case ACPI_TYPE_PROCESSOR:
+		case ACPI_TYPE_THERMAL:
+
+			ACPI_ERROR((AE_INFO,
+				    "Target must be [Buffer/Integer/String/Reference], found [%s] (%4.4s)",
+				    acpi_ut_get_type_name(node->type),
+				    node->name.ascii));
+
+			return_ACPI_STATUS(AE_AML_TARGET_TYPE);
+
+		default:
+			break;
+		}
+	}
+
 	/*
 	 * Resolve the source object to an actual value
 	 * (If it is a reference object)
@@ -425,13 +490,13 @@ acpi_ex_store_object_to_node(union acpi_operand_object *source_desc,
 	/* Do the actual store operation */
 
 	switch (target_type) {
-	case ACPI_TYPE_INTEGER:
-	case ACPI_TYPE_STRING:
-	case ACPI_TYPE_BUFFER:
 		/*
 		 * The simple data types all support implicit source operand
 		 * conversion before the store.
 		 */
+	case ACPI_TYPE_INTEGER:
+	case ACPI_TYPE_STRING:
+	case ACPI_TYPE_BUFFER:
 
 		if ((walk_state->opcode == AML_COPY_OP) || !implicit_conversion) {
 			/*
@@ -467,7 +532,7 @@ acpi_ex_store_object_to_node(union acpi_operand_object *source_desc,
 						       new_desc->common.type);
 
 			ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
-					  "Store %s into %s via Convert/Attach\n",
+					  "Store type [%s] into [%s] via Convert/Attach\n",
 					  acpi_ut_get_object_type_name
 					  (source_desc),
 					  acpi_ut_get_object_type_name
@@ -491,15 +556,12 @@ acpi_ex_store_object_to_node(union acpi_operand_object *source_desc,
 
 	default:
 		/*
-		 * No conversions for all other types. Directly store a copy of
-		 * the source object. This is the ACPI spec-defined behavior for
-		 * the copy_object operator.
+		 * copy_object operator: No conversions for all other types.
+		 * Instead, directly store a copy of the source object.
 		 *
-		 * NOTE: For the Store operator, this is a departure from the
-		 * ACPI spec, which states "If conversion is impossible, abort
-		 * the running control method". Instead, this code implements
-		 * "If conversion is impossible, treat the Store operation as
-		 * a CopyObject".
+		 * This is the ACPI spec-defined behavior for the copy_object
+		 * operator. (Note, for this default case, all normal
+		 * Store/Target operations exited above with an error).
 		 */
 		status = acpi_ex_store_direct_to_node(source_desc, node,
 						      walk_state);
diff --git a/drivers/acpi/acpica/exstoren.c b/drivers/acpi/acpica/exstoren.c
index 3101607..d1841de 100644
--- a/drivers/acpi/acpica/exstoren.c
+++ b/drivers/acpi/acpica/exstoren.c
@@ -122,9 +122,10 @@ acpi_ex_resolve_object(union acpi_operand_object **source_desc_ptr,
 			/* Conversion successful but still not a valid type */
 
 			ACPI_ERROR((AE_INFO,
-				    "Cannot assign type %s to %s (must be type Int/Str/Buf)",
+				    "Cannot assign type [%s] to [%s] (must be type Int/Str/Buf)",
 				    acpi_ut_get_object_type_name(source_desc),
 				    acpi_ut_get_type_name(target_type)));
+
 			status = AE_AML_OPERAND_TYPE;
 		}
 		break;
@@ -275,7 +276,7 @@ acpi_ex_store_object_to_object(union acpi_operand_object *source_desc,
 		/*
 		 * All other types come here.
 		 */
-		ACPI_WARNING((AE_INFO, "Store into type %s not implemented",
+		ACPI_WARNING((AE_INFO, "Store into type [%s] not implemented",
 			      acpi_ut_get_object_type_name(dest_desc)));
 
 		status = AE_NOT_IMPLEMENTED;
diff --git a/drivers/acpi/acpica/nspredef.c b/drivers/acpi/acpica/nspredef.c
index 0eb5431..0c20980 100644
--- a/drivers/acpi/acpica/nspredef.c
+++ b/drivers/acpi/acpica/nspredef.c
@@ -226,7 +226,7 @@ acpi_ns_check_object_type(struct acpi_evaluate_info *info,
 {
 	union acpi_operand_object *return_object = *return_object_ptr;
 	acpi_status status = AE_OK;
-	char type_buffer[48];	/* Room for 5 types */
+	char type_buffer[96];	/* Room for 10 types */
 
 	/* A Namespace node should not get here, but make sure */
 
diff --git a/drivers/acpi/acpica/utdecode.c b/drivers/acpi/acpica/utdecode.c
index d452a78..ecaaaff 100644
--- a/drivers/acpi/acpica/utdecode.c
+++ b/drivers/acpi/acpica/utdecode.c
@@ -232,12 +232,27 @@ char *acpi_ut_get_type_name(acpi_object_type type)
 
 char *acpi_ut_get_object_type_name(union acpi_operand_object *obj_desc)
 {
+	ACPI_FUNCTION_TRACE(ut_get_object_type_name);
 
 	if (!obj_desc) {
-		return ("[NULL Object Descriptor]");
+		ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Null Object Descriptor\n"));
+		return_PTR("[NULL Object Descriptor]");
 	}
 
-	return (acpi_ut_get_type_name(obj_desc->common.type));
+	/* These descriptor types share a common area */
+
+	if ((ACPI_GET_DESCRIPTOR_TYPE(obj_desc) != ACPI_DESC_TYPE_OPERAND) &&
+	    (ACPI_GET_DESCRIPTOR_TYPE(obj_desc) != ACPI_DESC_TYPE_NAMED)) {
+		ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
+				  "Invalid object descriptor type: 0x%2.2X [%s] (%p)\n",
+				  ACPI_GET_DESCRIPTOR_TYPE(obj_desc),
+				  acpi_ut_get_descriptor_name(obj_desc),
+				  obj_desc));
+
+		return_PTR("Invalid object");
+	}
+
+	return_PTR(acpi_ut_get_type_name(obj_desc->common.type));
 }
 
 /*******************************************************************************
diff --git a/include/acpi/acexcep.h b/include/acpi/acexcep.h
index 9f20eb4a..204f581 100644
--- a/include/acpi/acexcep.h
+++ b/include/acpi/acexcep.h
@@ -193,8 +193,9 @@ struct acpi_exception_info {
 #define AE_AML_ILLEGAL_ADDRESS          EXCEP_AML (0x0020)
 #define AE_AML_INFINITE_LOOP            EXCEP_AML (0x0021)
 #define AE_AML_UNINITIALIZED_NODE       EXCEP_AML (0x0022)
+#define AE_AML_TARGET_TYPE              EXCEP_AML (0x0023)
 
-#define AE_CODE_AML_MAX                 0x0022
+#define AE_CODE_AML_MAX                 0x0023
 
 /*
  * Internal exceptions used for control
@@ -358,7 +359,9 @@ static const struct acpi_exception_info acpi_gbl_exception_names_aml[] = {
 	EXCEP_TXT("AE_AML_INFINITE_LOOP",
 		  "An apparent infinite AML While loop, method was aborted"),
 	EXCEP_TXT("AE_AML_UNINITIALIZED_NODE",
-		  "A namespace node is uninitialized or unresolved")
+		  "A namespace node is uninitialized or unresolved"),
+	EXCEP_TXT("AE_AML_TARGET_TYPE",
+		  "A target operand of an incorrect type was encountered")
 };
 
 static const struct acpi_exception_info acpi_gbl_exception_names_ctrl[] = {
-- 
1.7.10

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1247341 — [PATCH 09/13] ACPICA: Debugger: Fix "quit/exit" command by cleaning up user commands termination logic

FromLv Zheng <lv.zheng@intel.com>
Date2015-10-15 04:20 +0200
Subject[PATCH 09/13] ACPICA: Debugger: Fix "quit/exit" command by cleaning up user commands termination logic
Message-ID<qjGj8-PB-15@gated-at.bofh.it>
In reply to#1247321
ACPICA commit 0dd68e16274cd38224aa4781eddc57dc2cbaa108

The quit/exit commands shouldn't invoke acpi_terminate_debugger() and
acpi_terminate() right in the user command loop, because when the debugger
exits, the kernel ACPI subsystem shouldn't be terminated (acpi_terminate())
and the debugger should only be terminated by its users
(acpi_terminate_debugger()) rather than being terminated itself. Leaving such
invocations causes kernel panic when the debugger is shipped in the Linux
kernel.

This patch fixes this issue. Lv Zheng.

Link: https://github.com/acpica/acpica/commit/0dd68e16
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
 drivers/acpi/acpica/acglobal.h |    3 ++-
 drivers/acpi/acpica/dbinput.c  |   16 ++++------------
 drivers/acpi/acpica/dbxface.c  |   20 ++++++++++++++++++++
 drivers/acpi/acpica/utinit.c   |    2 --
 drivers/acpi/acpica/utxface.c  |    4 ----
 5 files changed, 26 insertions(+), 19 deletions(-)

diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h
index 593de41..d82249c 100644
--- a/drivers/acpi/acpica/acglobal.h
+++ b/drivers/acpi/acpica/acglobal.h
@@ -324,7 +324,6 @@ ACPI_GLOBAL(struct acpi_external_file *, acpi_gbl_external_file_list);
 
 #ifdef ACPI_DEBUGGER
 
-ACPI_INIT_GLOBAL(u8, acpi_gbl_db_terminate_threads, FALSE);
 ACPI_INIT_GLOBAL(u8, acpi_gbl_abort_method, FALSE);
 ACPI_INIT_GLOBAL(u8, acpi_gbl_method_executing, FALSE);
 
@@ -336,6 +335,8 @@ ACPI_GLOBAL(char *, acpi_gbl_db_filename);
 ACPI_GLOBAL(u32, acpi_gbl_db_debug_level);
 ACPI_GLOBAL(u32, acpi_gbl_db_console_debug_level);
 ACPI_GLOBAL(struct acpi_namespace_node *, acpi_gbl_db_scope_node);
+ACPI_GLOBAL(u8, acpi_gbl_db_terminate_loop);
+ACPI_GLOBAL(u8, acpi_gbl_db_threads_terminated);
 
 ACPI_GLOBAL(char *, acpi_gbl_db_args[ACPI_DEBUGGER_MAX_ARGS]);
 ACPI_GLOBAL(acpi_object_type, acpi_gbl_db_arg_types[ACPI_DEBUGGER_MAX_ARGS]);
diff --git a/drivers/acpi/acpica/dbinput.c b/drivers/acpi/acpica/dbinput.c
index 7f1b6ec..f8cddd6 100644
--- a/drivers/acpi/acpica/dbinput.c
+++ b/drivers/acpi/acpica/dbinput.c
@@ -694,7 +694,7 @@ acpi_db_command_dispatch(char *input_buffer,
 
 	/* If acpi_terminate has been called, terminate this thread */
 
-	if (acpi_gbl_db_terminate_threads) {
+	if (acpi_gbl_db_terminate_loop) {
 		return (AE_CTRL_TERMINATE);
 	}
 
@@ -1116,7 +1116,7 @@ acpi_db_command_dispatch(char *input_buffer,
 #ifdef ACPI_APPLICATION
 		acpi_db_close_debug_file();
 #endif
-		acpi_gbl_db_terminate_threads = TRUE;
+		acpi_gbl_db_terminate_loop = TRUE;
 		return (AE_CTRL_TERMINATE);
 
 	case CMD_NOT_FOUND:
@@ -1166,6 +1166,7 @@ void ACPI_SYSTEM_XFACE acpi_db_execute_thread(void *context)
 
 		acpi_os_release_mutex(acpi_gbl_db_command_complete);
 	}
+	acpi_gbl_db_threads_terminated = TRUE;
 }
 
 /*******************************************************************************
@@ -1212,7 +1213,7 @@ acpi_status acpi_db_user_commands(char prompt, union acpi_parse_object *op)
 
 	/* TBD: [Restructure] Need a separate command line buffer for step mode */
 
-	while (!acpi_gbl_db_terminate_threads) {
+	while (!acpi_gbl_db_terminate_loop) {
 
 		/* Force output to console until a command is entered */
 
@@ -1261,14 +1262,5 @@ acpi_status acpi_db_user_commands(char prompt, union acpi_parse_object *op)
 		}
 	}
 
-	/* Shut down the debugger */
-
-	acpi_terminate_debugger();
-
-	/*
-	 * Only this thread (the original thread) should actually terminate the
-	 * subsystem, because all the semaphores are deleted during termination
-	 */
-	status = acpi_terminate();
 	return (status);
 }
diff --git a/drivers/acpi/acpica/dbxface.c b/drivers/acpi/acpica/dbxface.c
index 26023bd..bef5f4e 100644
--- a/drivers/acpi/acpica/dbxface.c
+++ b/drivers/acpi/acpica/dbxface.c
@@ -401,6 +401,10 @@ acpi_status acpi_initialize_debugger(void)
 	acpi_gbl_db_scope_buf[1] = 0;
 	acpi_gbl_db_scope_node = acpi_gbl_root_node;
 
+	/* Initialize user commands loop */
+
+	acpi_gbl_db_terminate_loop = FALSE;
+
 	/*
 	 * If configured for multi-thread support, the debug executor runs in
 	 * a separate thread so that the front end can be in another address
@@ -426,11 +430,13 @@ acpi_status acpi_initialize_debugger(void)
 
 		/* Create the debug execution thread to execute commands */
 
+		acpi_gbl_db_threads_terminated = FALSE;
 		status = acpi_os_execute(OSL_DEBUGGER_THREAD,
 					 acpi_db_execute_thread, NULL);
 		if (ACPI_FAILURE(status)) {
 			ACPI_EXCEPTION((AE_INFO, status,
 					"Could not start debugger thread"));
+			acpi_gbl_db_threads_terminated = TRUE;
 			return_ACPI_STATUS(status);
 		}
 	}
@@ -454,6 +460,20 @@ ACPI_EXPORT_SYMBOL(acpi_initialize_debugger)
 void acpi_terminate_debugger(void)
 {
 
+	/* Terminate the AML Debugger */
+
+	acpi_gbl_db_terminate_loop = TRUE;
+
+	if (acpi_gbl_debugger_configuration & DEBUGGER_MULTI_THREADED) {
+		acpi_os_release_mutex(acpi_gbl_db_command_ready);
+
+		/* Wait the AML Debugger threads */
+
+		while (!acpi_gbl_db_threads_terminated) {
+			acpi_os_sleep(100);
+		}
+	}
+
 	if (acpi_gbl_db_buffer) {
 		acpi_os_free(acpi_gbl_db_buffer);
 		acpi_gbl_db_buffer = NULL;
diff --git a/drivers/acpi/acpica/utinit.c b/drivers/acpi/acpica/utinit.c
index 28ab3a1..d8699df 100644
--- a/drivers/acpi/acpica/utinit.c
+++ b/drivers/acpi/acpica/utinit.c
@@ -241,8 +241,6 @@ acpi_status acpi_ut_init_globals(void)
 	acpi_gbl_disable_mem_tracking = FALSE;
 #endif
 
-	ACPI_DEBUGGER_EXEC(acpi_gbl_db_terminate_threads = FALSE);
-
 	return_ACPI_STATUS(AE_OK);
 }
 
diff --git a/drivers/acpi/acpica/utxface.c b/drivers/acpi/acpica/utxface.c
index 4f33281..f183daf 100644
--- a/drivers/acpi/acpica/utxface.c
+++ b/drivers/acpi/acpica/utxface.c
@@ -80,10 +80,6 @@ acpi_status __init acpi_terminate(void)
 	acpi_gbl_startup_flags = 0;
 	ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Shutting down ACPI Subsystem\n"));
 
-	/* Terminate the AML Debugger if present */
-
-	ACPI_DEBUGGER_EXEC(acpi_gbl_db_terminate_threads = TRUE);
-
 	/* Shutdown and free all resources */
 
 	acpi_ut_subsystem_shutdown();
-- 
1.7.10

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web