linux/drivers/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
..
acpica ACPICA: Debugger: Convert some mechanisms to OSPM specific 2015-12-15 00:17:43 +01:00
apei Merge branch 'x86/urgent' into core/efi, to pick up a pending EFI fix 2015-10-14 16:05:18 +02:00
pmic
Kconfig Merge branches 'acpica', 'acpi-video' and 'device-properties' 2015-12-04 14:01:17 +01:00
Makefile ACPI: Introduce CPU performance controls using CPPC 2015-10-12 22:49:55 +02:00
ac.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
acpi_apd.c ACPI: Remove clk.h include 2015-07-20 10:52:45 -07:00
acpi_cmos_rtc.c
acpi_extlog.c
acpi_ipmi.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
acpi_lpat.c
acpi_lpss.c PM / PCI / ACPI: Kick devices that might have been reset by firmware 2015-10-14 02:17:34 +02:00
acpi_memhotplug.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
acpi_pad.c ACPI / PAD: power_saving_thread() is not freezable 2015-10-26 04:42:54 +01:00
acpi_platform.c device property: ACPI: Make use of the new DMA Attribute APIs 2015-11-07 01:29:22 +01:00
acpi_pnp.c ACPI / scan: constify first argument of struct acpi_scan_handler::match 2015-09-15 02:56:29 +02:00
acpi_processor.c ACPI: Add weak routines for ACPI CPU Hotplug 2015-10-12 23:08:03 +02:00
acpi_video.c ACPI / video: only register backlight for LCD device 2015-11-02 01:37:30 +01:00
battery.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
battery.h
bgrt.c
blacklist.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
bus.c ACPI: Eliminate CONFIG_.*{, _MODULE} #ifdef in favor of IS_ENABLED() 2015-09-15 03:05:45 +02:00
button.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
cm_sbs.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
container.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
cppc_acpi.c Merge branches 'pm-cpufreq' and 'acpi-cppc' 2015-11-20 01:22:10 +01:00
custom_method.c
debugfs.c ACPI: fix acpi_debugfs_init prototype 2015-08-07 02:55:18 +02:00
device_pm.c PM / PCI / ACPI: Kick devices that might have been reset by firmware 2015-10-14 02:17:34 +02:00
device_sysfs.c ACPI / property: Expose data-only subnodes via sysfs 2015-09-15 01:47:34 +02:00
dock.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
ec.c ACPI-EC: Drop unnecessary check made before calling acpi_ec_delete_query() 2015-11-16 23:29:44 +01:00
ec_sys.c ACPI / EC: Fix broken 64bit big-endian users of 'global_lock' 2015-10-04 11:36:07 +01:00
event.c
fan.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
glue.c Merge branch 'acpi-pci' 2015-11-07 01:30:10 +01:00
gsi.c acpi/gsi: Cleanup acpi_register_gsi 2015-10-13 19:01:25 +02:00
hed.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
int340x_thermal.c ACPI: Eliminate CONFIG_.*{, _MODULE} #ifdef in favor of IS_ENABLED() 2015-09-15 03:05:45 +02:00
internal.h driver core update for 4.4-rc1 2015-11-04 21:50:37 -08:00
ioapic.c
nfit.c nfit: Adjust for different _FIT and NFIT headers 2015-11-30 14:51:46 -08:00
nfit.h nfit: Adjust for different _FIT and NFIT headers 2015-11-30 14:51:46 -08:00
numa.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
nvs.c
osl.c asm-generic cleanups 2015-11-06 14:22:15 -08:00
pci_irq.c ACPI, PCI, irq: Do not share PCI IRQ with ISA IRQ 2015-09-26 01:53:07 +02:00
pci_link.c ACPI / PCI: Remove duplicated penalty on SCI IRQ 2015-09-26 01:53:07 +02:00
pci_root.c x86/PCI/ACPI: Fix regression caused by commit 4d6b4e69a2 2015-12-02 02:30:15 +01:00
pci_slot.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
power.c Merge branch 'acpi-pm' 2015-09-01 03:38:43 +02:00
proc.c ACPI: change acpi_sleep_proc_init() to return void 2015-09-15 03:03:15 +02:00
processor_core.c
processor_driver.c CPPC: Probe for CPPC tables for each ACPI Processor object 2015-10-12 23:08:04 +02:00
processor_idle.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
processor_pdc.c
processor_perflib.c Merge branch 'pm-cpufreq' 2015-09-01 15:52:35 +02:00
processor_thermal.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
processor_throttling.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
property.c ACPI / property: Fix subnode lookup scope for data-only subnodes 2015-10-22 00:54:03 +02:00
reboot.c
resource.c ACPI/PCI: Enhance ACPI core to support sparse IO space 2015-10-16 22:18:51 +02:00
sbs.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
sbshc.c Revert "ACPI / SBS: Add 5 us delay to fix SBS hangs on MacBook" 2015-11-16 23:26:45 +01:00
sbshc.h
scan.c Merge branch 'acpi-pci' 2015-11-07 01:30:10 +01:00
sleep.c Merge branch 'pm-sleep' 2015-11-02 00:52:19 +01:00
sleep.h
sysfs.c ACPI / sysfs: correctly check failing memory allocation 2015-10-26 04:57:27 +01:00
tables.c ACPI / tables: test the correct variable 2015-10-15 01:31:24 +02:00
thermal.c linux/thermal.h: rename KELVIN_TO_CELSIUS to DECI_KELVIN_TO_CELSIUS 2015-10-10 11:32:30 +08:00
utils.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
video_detect.c ACPI / video: Add a quirk to force acpi-video backlight on Dell XPS L421X 2015-11-02 01:36:31 +01:00
wakeup.c