Skip to content

ACPI / debugger: Add kernel flushing support

Lv Zheng linux-acpi linux-api lkml 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest3 patches 6 repliesIn review
  2. v33 patches 0 repliesSuperseded
  3. v22 patches 2 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v13 patches1 replySuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3ACPI / debugger: Add kernel flushing supportdrivers/acpi/acpi_dbg.c include/linux/acpi.h include/uapi/linux/acpi-ioctls.h+103 -42 replies
2/3tools/power/acpi/acpidbg: Use new flushing mechanismtools/power/acpi/tools/acpidbg/acpidbg.c+7 -442 replies
3/3tools/power/acpi/acpidbg: Add multi-commands support in batch modetools/power/acpi/tools/acpidbg/acpidbg.c+64 -132 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 0/3] ACPI / debugger: Add kernel flushing support

The AML debugger can be used to dump the runtime value of a named object, which is useful for remote debugging issues. The batch mode of the AML debugger allows the debugger functionalities to be integrated into the scripts.

Currently, when the batch mode is used, the userspace tool needs to flush the output (logs/prompts) remained in the kernel output buffer in order not to mess up the result of the executed batch mode command, this is implemented in an inefficient way in the userspace by polling the IO and reading everything out.
However, the input needn't be flushed as the command input should have already been flushed by the signals and won't be passed to acpi_os_get_line() due to an error return value.

This patch introduces a kernel space flushing support, so that userspace can invoke ioctl() to request the driver to drop old outputs.

Lv Zheng (3):
ACPI / debugger: Add kernel flushing support tools/power/acpi/acpidbg: Use new flushing mechanism tools/power/acpi/acpidbg: Add multi-commands support in batch mode

 drivers/acpi/acpi_dbg.c                  |   85 +++++++++++++++++++++--
 include/linux/acpi.h                     |    1 +
 include/uapi/linux/acpi-ioctls.h         |   21 ++++++
 tools/power/acpi/tools/acpidbg/acpidbg.c |  110 +++++++++++++++++-------------
 4 files changed, 165 insertions(+), 52 deletions(-)
 create mode 100644 include/uapi/linux/acpi-ioctls.h
Signature · 1 line
1.7.10