linux/drivers/acpi
Lv Zheng f988f24ee7 ACPICA: Debugger: Add thread ID support so that single step mode can only apply to the debugger thread
When the debugger is running in the kernel mode, acpi_db_single_step() may
also be invoked by the kernel runtime code path but the single stepping
command prompt may be erronously logged as the kernel logs and runtime code
path cannot proceed.

This patch fixes this issue by adding acpi_gbl_db_thread_id for the debugger
thread and preventing acpi_db_single_step() to be invoked from other threads.

It is not suitable to add acpi_thread_id parameter for acpi_os_execute() as
the function may be implemented as work queue on some hosts. So it is
better to let the hosts invoke acpi_set_debugger_thread_id(). Currently
acpiexec is not configured as DEBUGGER_MULTI_THREADED, but we can do this.
When we do this, it is better to invoke acpi_set_debugger_thread_id() in
acpi_os_execute() when the execution type is OSL_DEBUGGER_MAIN_THREAD. The
support should look like:
  create_thread(&tid);
  if (type == OSL_DEBUGGER_MAIN_THREAD)
      acpi_set_debugger_thread_id(tid);
  resume_thread(tid);
Similarly, semop() may be used for pthread implementation. But this patch
simply skips debugger thread ID check for application instead of
introducing such complications as there is no need to skip
acpi_db_single_step() for an application debugger - acpiexec.

Note that the debugger thread ID can also be used by acpi_os_printf() to
filter out debugger output. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-10-22 02:05:05 +02:00
..
acpica ACPICA: Debugger: Add thread ID support so that single step mode can only apply to the debugger thread 2015-10-22 02:05:05 +02:00
apei ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
pmic ACPI/PMIC: Fix typo in MODULE_DESCRIPTION in intel_pmic_crc.c 2015-03-26 21:34:51 +01: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 / LPAT: Common table processing functions 2015-01-29 21:02:10 +08:00
acpi_lpss.c Power management and ACPI material for v4.3-rc1 2015-09-01 19:45:46 -07:00
acpi_memhotplug.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
acpi_pad.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
acpi_platform.c ACPI / scan: Parse _CCA and setup device coherency 2015-06-15 14:40:48 +02:00
acpi_pnp.c ipmi: Convert the IPMI SI ACPI handling to a platform device 2015-09-03 15:00:28 -05:00
acpi_processor.c ACPI / processor: remove leftover __refdata annotations 2015-07-21 01:01:46 +02:00
acpi_video.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02: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
custom_method.c
debugfs.c ACPI: fix acpi_debugfs_init prototype 2015-08-07 02:55:18 +02:00
device_pm.c Merge branch 'acpi-pm' 2015-09-01 03:38:43 +02:00
device_sysfs.c ACPI / scan: Move sysfs-related device code to a separate file 2015-07-17 22:53:43 +02:00
dock.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
ec_sys.c
ec.c ACPI / EC: Fix a memory leak issue in acpi_ec_query() 2015-09-26 01:44:59 +02:00
event.c netlink: make nlmsg_end() and genlmsg_end() void 2015-01-18 01:03:45 -05:00
fan.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
glue.c ACPI / scan: Parse _CCA and setup device coherency 2015-06-15 14:40:48 +02:00
gsi.c ACPI: move arm64 GSI IRQ model to generic GSI IRQ layer 2015-03-26 15:13:09 +00: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 Merge branch 'acpi-pm' 2015-09-01 03:38:43 +02:00
ioapic.c x86/irq, ACPI: Implement ACPI driver to support IOAPIC hotplug 2015-02-05 15:09:26 +01:00
Kconfig libnvdimm for 4.3: 2015-09-08 14:35:59 -07:00
Makefile Merge branches 'acpi-scan', 'acpi-processor' and 'acpi-assorted' 2015-09-01 03:38:22 +02:00
nfit.c ACPICA: Update NFIT table to rename a flags field 2015-10-22 02:01:12 +02:00
nfit.h ACPICA: Update NFIT table to rename a flags field 2015-10-22 02:01:12 +02:00
numa.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
nvs.c
osl.c Merge branches 'acpi-pci', 'acpi-soc', 'acpi-ec' and 'acpi-osl' 2015-09-01 03:41:19 +02: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 ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02: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
processor_core.c ACPI / processor: Introduce invalid_phys_cpuid() 2015-05-13 23:28:16 +02:00
processor_driver.c Merge branches 'acpi-scan', 'acpi-processor' and 'acpi-assorted' 2015-09-01 03:38:22 +02:00
processor_idle.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
processor_pdc.c ACPI / processor: Introduce invalid_logical_cpuid() 2015-05-13 23:28:14 +02:00
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 device property: attach 'else if' to the proper 'if' 2015-08-26 01:46:39 +02:00
reboot.c
resource.c Merge branches 'acpi-scan', 'acpi-processor' and 'acpi-assorted' 2015-09-01 03:38:22 +02:00
sbs.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
sbshc.c ACPI / SBS: Add 5 us delay to fix SBS hangs on MacBook 2015-04-30 23:18:11 +02:00
sbshc.h
scan.c Merge branch 'acpi-scan' into acpi-pm 2015-07-29 23:57:51 +02:00
sleep.c ACPI / PM: Enable all wakeup GPEs in suspend-to-idle 2015-03-30 01:52:02 +02:00
sleep.h ACPI / sleep: Drop acpi_suspend() which is not used 2015-03-18 12:53:21 +01:00
sysfs.c ACPI / sysfs: Add support to allow leading "\" missing in trace_method_name. 2015-08-07 02:42:22 +02:00
tables.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
thermal.c Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux 2015-09-11 16:13:47 -07:00
utils.c ACPI: Remove FSF mailing addresses 2015-07-08 02:27:32 +02:00
video_detect.c ACPI / video: Fix circular lock dependency issue in the video-detect code 2015-08-14 11:20:20 +02:00
wakeup.c