From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754366AbcGZLBe (ORCPT ); Tue, 26 Jul 2016 07:01:34 -0400 Received: from mga01.intel.com ([192.55.52.88]:56641 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750806AbcGZLBb (ORCPT ); Tue, 26 Jul 2016 07:01:31 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,424,1464678000"; d="scan'208";a="1024085507" From: Lv Zheng To: "Rafael J. Wysocki" , "Rafael J. Wysocki" , Len Brown Cc: Lv Zheng , Lv Zheng , , linux-acpi@vger.kernel.org Subject: [PATCH v4 0/3] ACPI / debugger: Add kernel flushing support Date: Tue, 26 Jul 2016 19:01:23 +0800 Message-Id: X-Mailer: git-send-email 1.7.10 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 -- 1.7.10