• Lv Zheng's avatar
    ACPICA: OSL: Clean up acpi_os_printf()/acpi_os_vprintf() stubs · 83b80bac
    Lv Zheng authored
    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: default avatarLv Zheng <lv.zheng@intel.com>
    Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    83b80bac
utinit.c 8.41 KB