ACPICA: OSL: Clean up acpi_os_printf()/acpi_os_vprintf() stubs
authorLv Zheng <lv.zheng@intel.com>
Tue, 8 Jul 2014 02:06:45 +0000 (10:06 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 8 Jul 2014 12:22:25 +0000 (14:22 +0200)
commit83b80bace4bdfc61abd16ca6ad0a51734a0f57f0
treed358faaa07e08a90d88d84238ecd5594fcc125b3
parente8c038a3c6227892e6c0982804b6f9d03fa4b3c5
ACPICA: OSL: Clean up acpi_os_printf()/acpi_os_vprintf() stubs

This patch is mainly for acpidump where there are redundant
acpi_os_printf()/acpi_os_vprintf() stubs implemented. This patch cleans up such
specific implementation by linking acpidump to osunixxf.c/oswinxf.c.

To make acpi_os_printf() exported by osunixxf.c/oswinxf.c to behave as the
old acpidump specific ones, applications need to:
 1. Initialize acpi_gbl_db_output_flags to ACPI_DB_CONSOLE_OUTPUT.
    This is automatically done by ACPI_INIT_GLOBAL(), applications need to
    link utglobal.o to utilize this mechanism.
 2. Initialize acpi_gbl_output_file to stdout.
    For GCC, assigning stdout to acpi_gbl_output_file using ACPI_INIT_GLOBAL()
    is not possible as stdout is not a constant in GCC environment. As an
    alternative solution, stdout assignment is put into acpi_os_initialize().
    Thus acpi_os_initialize() need to be invoked very early by the
    applications to initialize the default output of acpi_os_printf().

This patch also releases osunixxf.c to the Linux kernel. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/acpica/acglobal.h
drivers/acpi/acpica/acutils.h
drivers/acpi/acpica/utinit.c
tools/power/acpi/Makefile
tools/power/acpi/os_specific/service_layers/osunixxf.c [new file with mode: 0644]
tools/power/acpi/tools/acpidump/apdump.c
tools/power/acpi/tools/acpidump/apmain.c
This page took 0.027429 seconds and 5 git commands to generate.