linux/include/acpi
Lv Zheng f8d3148962 ACPICA: Debugger: Convert some mechanisms to OSPM specific
The following mechanisms are OSPM specific:
1. Redirect output destination to console: no file redirection will be
   needed by an in-kernel debugger, there is even no file can be accessed
   when the debugger is running in the kernel mode.
2. Output command prompts: programs other than acpiexec can have different
   prompt characters and the prompt characters may be implemented as a
   special character sequence to form a char device IO protocol.
3. Command ready/complete handshake: OSPM debugger may wait more conditions
   to implement OSPM specific semantics (for example, FIFO full/empty
   conditions for O_NONBLOCK or IO open/close conditions).
Leaving such OSPM specific stuffs in the ACPICA debugger core blocks
Linux debugger IO driver implementation.

Several new OSL APIs are provided by this patch:
1. acpi_os_initialize_command_signals: initialize command handshake mechanism
   or any other OSPM specific stuffs.
2. acpi_os_terminate_command_signals: reversal of
   acpi_os_initialize_command_signals.
3. acpi_os_wait_command_ready: putting debugger task into wait state when a
   command is not ready. OSPMs can terminate command loop by returning
   AE_CTRL_TERMINATE from this API. Normally, wait_event() or
   wait_for_multiple_object() may be used to implement this API.
4. acpi_os_notify_command_complete: putting user task into running state when a
   command has been completed. OSPMs can terminate command loop by
   returning AE_CTRL_TERMINATE from this API. Normally, wake_up() or
   set_event() may be used to implement this API.
This patch also converts current command signaling implementation into a
generic debugger layer (osgendbg.c) to be used by the existing OSPMs or
acpiexec, in return, Linux can have chance to implement its own command
handshake mechanism. This patch also implements acpiexec batch mode in a
multi-threading mode comaptible style as a demo (this can be confirmed by
configuring acpiexec into DEBUGGER_MULTI_THREADED mode where the batch mode
is still working). Lv Zheng.

Note that the OSPM specific command handshake mechanism is required by
Linux kernel because:
1. Linux kernel trends to use wait queue to synchronize two threads, using
   mutexes to achieve that will cause false "dead lock" warnings.
2. The command handshake mechanism implemented by ACPICA is implemented in
   this way because of a design issue in debugger IO streaming. Debugger IO
   outputs are simply cached using a giant buffer, this should be tuned by
   Linux in the future.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-12-15 00:17:43 +01:00
..
platform ACPICA: Debugger: Convert some mechanisms to OSPM specific 2015-12-15 00:17:43 +01:00
acbuffer.h ACPICA: Disassembler: Remove duplicate code in _PLD processing. 2015-08-25 23:11:30 +02:00
acconfig.h ACPICA: Make the max-number-of-loops runtime configurable 2015-08-25 23:11:32 +02:00
acexcep.h ACPICA: Improve typechecking, both compile-time and runtime 2015-10-22 02:01:12 +02:00
acnames.h ACPICA: Utilities: Add _CLS processing 2015-07-01 23:17:53 +02:00
acoutput.h ACPICA: Executer: Add option to bypass opcode tracing 2015-07-23 23:09:07 +02:00
acpi_bus.h Merge branch 'acpi-pci' 2015-11-07 01:30:10 +01:00
acpi_drivers.h ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
acpi_io.h ACPI: fix acpi_os_ioremap for arm64 2015-03-25 11:49:30 +00:00
acpi_lpat.h ACPI / LPAT: Common table processing functions 2015-01-29 21:02:10 +08:00
acpi_numa.h ACPI / numa: Make __acpi_map_pxm_to_node(), acpi_get_pxm() static 2014-02-03 10:39:38 -07:00
acpi.h ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
acpiosxf.h ACPICA: Debugger: Convert some mechanisms to OSPM specific 2015-12-15 00:17:43 +01:00
acpixf.h ACPICA: Debugger: Convert some mechanisms to OSPM specific 2015-12-15 00:17:43 +01:00
acrestyp.h ACPICA: Update Copyright headers to 2015 2015-02-05 15:31:43 +01:00
actbl1.h ACPICA: Update NFIT table to rename a flags field 2015-10-22 02:01:12 +02:00
actbl2.h ACPICA: iASL: Add support for TCPA Server Table 2015-07-23 23:09:08 +02:00
actbl3.h ACPICA: Update definitions for the TCPA and TPM2 ACPI tables 2015-07-01 23:17:56 +02:00
actbl.h ACPICA: Namespace: Add support of OSDT table 2015-07-01 23:17:54 +02:00
actypes.h ACPICA: Debugger: Add option to display namespace summary/counts 2015-08-25 23:11:32 +02:00
acuuid.h ACPICA: Fix for ill-formed GUID strings for NFIT tables. 2015-05-25 23:42:34 +02:00
apei.h acpi, apei, ghes: Factor out ioremap virtual memory for IRQ and NMI context. 2014-07-22 15:05:06 -07:00
button.h ACPI: Eliminate CONFIG_.*{, _MODULE} #ifdef in favor of IS_ENABLED() 2015-09-15 03:05:45 +02:00
cppc_acpi.h ACPI: Introduce CPU performance controls using CPPC 2015-10-12 22:49:55 +02:00
ghes.h ACPICA: Restore error table definitions to reduce code differences between Linux and ACPICA upstream. 2014-06-16 22:33:50 +02:00
hed.h ACPI Hardware Error Device (PNP0C33) support 2010-05-19 22:40:24 -04:00
pdc_intel.h ACPI: Enable bit 11 in _PDC to advertise hw coord 2009-02-07 00:41:14 -05:00
processor.h CPPC: Probe for CPPC tables for each ACPI Processor object 2015-10-12 23:08:04 +02:00
reboot.h Add the ability to reset the machine using the RESET_REG in ACPI's FADT table. 2008-07-16 23:27:08 +02:00
video.h ACPI: Eliminate CONFIG_.*{, _MODULE} #ifdef in favor of IS_ENABLED() 2015-09-15 03:05:45 +02:00