Commit 8aef273e authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

ACPI: OSL: Clean up printing messages

Replace the ACPI_DEBUG_PRINT() instance in osl.c unrelated to the
ACPICA debug with acpi_handle_debug(), add a pr_fmt() definition
to osl.c and replace direct printk() usage in that file with the
suitable pr_*() calls.

While at it, add a physical address value to the message in
acpi_os_map_iomem() and reword a couple of messages to avoid
using function names in them.
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 505ca2f7
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
* Author: Matthew Wilcox <willy@linux.intel.com> * Author: Matthew Wilcox <willy@linux.intel.com>
*/ */
#define pr_fmt(fmt) "ACPI: OSL: " fmt
#include <linux/module.h> #include <linux/module.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/slab.h> #include <linux/slab.h>
...@@ -37,6 +39,7 @@ ...@@ -37,6 +39,7 @@
#include "acpica/acnamesp.h" #include "acpica/acnamesp.h"
#include "internal.h" #include "internal.h"
/* Definitions for ACPI_DEBUG_PRINT() */
#define _COMPONENT ACPI_OS_SERVICES #define _COMPONENT ACPI_OS_SERVICES
ACPI_MODULE_NAME("osl"); ACPI_MODULE_NAME("osl");
...@@ -327,7 +330,7 @@ void __iomem __ref ...@@ -327,7 +330,7 @@ void __iomem __ref
acpi_size pg_sz; acpi_size pg_sz;
if (phys > ULONG_MAX) { if (phys > ULONG_MAX) {
printk(KERN_ERR PREFIX "Cannot map memory that high\n"); pr_err("Cannot map memory that high: 0x%llx\n", phys);
return NULL; return NULL;
} }
...@@ -528,13 +531,12 @@ acpi_os_predefined_override(const struct acpi_predefined_names *init_val, ...@@ -528,13 +531,12 @@ acpi_os_predefined_override(const struct acpi_predefined_names *init_val,
*new_val = NULL; *new_val = NULL;
if (!memcmp(init_val->name, "_OS_", 4) && strlen(acpi_os_name)) { if (!memcmp(init_val->name, "_OS_", 4) && strlen(acpi_os_name)) {
printk(KERN_INFO PREFIX "Overriding _OS definition to '%s'\n", pr_info("Overriding _OS definition to '%s'\n", acpi_os_name);
acpi_os_name);
*new_val = acpi_os_name; *new_val = acpi_os_name;
} }
if (!memcmp(init_val->name, "_REV", 4) && acpi_rev_override) { if (!memcmp(init_val->name, "_REV", 4) && acpi_rev_override) {
printk(KERN_INFO PREFIX "Overriding _REV return value to 5\n"); pr_info("Overriding _REV return value to 5\n");
*new_val = (char *)5; *new_val = (char *)5;
} }
...@@ -575,15 +577,14 @@ acpi_os_install_interrupt_handler(u32 gsi, acpi_osd_handler handler, ...@@ -575,15 +577,14 @@ acpi_os_install_interrupt_handler(u32 gsi, acpi_osd_handler handler,
return AE_ALREADY_ACQUIRED; return AE_ALREADY_ACQUIRED;
if (acpi_gsi_to_irq(gsi, &irq) < 0) { if (acpi_gsi_to_irq(gsi, &irq) < 0) {
printk(KERN_ERR PREFIX "SCI (ACPI GSI %d) not registered\n", pr_err("SCI (ACPI GSI %d) not registered\n", gsi);
gsi);
return AE_OK; return AE_OK;
} }
acpi_irq_handler = handler; acpi_irq_handler = handler;
acpi_irq_context = context; acpi_irq_context = context;
if (request_irq(irq, acpi_irq, IRQF_SHARED, "acpi", acpi_irq)) { if (request_irq(irq, acpi_irq, IRQF_SHARED, "acpi", acpi_irq)) {
printk(KERN_ERR PREFIX "SCI (IRQ%d) allocation failed\n", irq); pr_err("SCI (IRQ%d) allocation failed\n", irq);
acpi_irq_handler = NULL; acpi_irq_handler = NULL;
return AE_NOT_ACQUIRED; return AE_NOT_ACQUIRED;
} }
...@@ -1071,7 +1072,7 @@ acpi_status acpi_os_execute(acpi_execute_type type, ...@@ -1071,7 +1072,7 @@ acpi_status acpi_os_execute(acpi_execute_type type,
if (type == OSL_DEBUGGER_MAIN_THREAD) { if (type == OSL_DEBUGGER_MAIN_THREAD) {
ret = acpi_debugger_create_thread(function, context); ret = acpi_debugger_create_thread(function, context);
if (ret) { if (ret) {
pr_err("Call to kthread_create() failed.\n"); pr_err("Kernel thread creation failed\n");
status = AE_ERROR; status = AE_ERROR;
} }
goto out_thread; goto out_thread;
...@@ -1121,8 +1122,7 @@ acpi_status acpi_os_execute(acpi_execute_type type, ...@@ -1121,8 +1122,7 @@ acpi_status acpi_os_execute(acpi_execute_type type,
*/ */
ret = queue_work_on(0, queue, &dpc->work); ret = queue_work_on(0, queue, &dpc->work);
if (!ret) { if (!ret) {
printk(KERN_ERR PREFIX pr_err("Unable to queue work\n");
"Call to queue_work() failed.\n");
status = AE_ERROR; status = AE_ERROR;
} }
err_workqueue: err_workqueue:
...@@ -1165,9 +1165,9 @@ acpi_status acpi_hotplug_schedule(struct acpi_device *adev, u32 src) ...@@ -1165,9 +1165,9 @@ acpi_status acpi_hotplug_schedule(struct acpi_device *adev, u32 src)
{ {
struct acpi_hp_work *hpw; struct acpi_hp_work *hpw;
ACPI_DEBUG_PRINT((ACPI_DB_EXEC, acpi_handle_debug(adev->handle,
"Scheduling hotplug event (%p, %u) for deferred execution.\n", "Scheduling hotplug event %u for deferred handling\n",
adev, src)); src);
hpw = kmalloc(sizeof(*hpw), GFP_KERNEL); hpw = kmalloc(sizeof(*hpw), GFP_KERNEL);
if (!hpw) if (!hpw)
...@@ -1355,7 +1355,7 @@ acpi_status acpi_os_signal(u32 function, void *info) ...@@ -1355,7 +1355,7 @@ acpi_status acpi_os_signal(u32 function, void *info)
{ {
switch (function) { switch (function) {
case ACPI_SIGNAL_FATAL: case ACPI_SIGNAL_FATAL:
printk(KERN_ERR PREFIX "Fatal opcode executed\n"); pr_err("Fatal opcode executed\n");
break; break;
case ACPI_SIGNAL_BREAKPOINT: case ACPI_SIGNAL_BREAKPOINT:
/* /*
...@@ -1407,7 +1407,7 @@ __setup("acpi_os_name=", acpi_os_name_setup); ...@@ -1407,7 +1407,7 @@ __setup("acpi_os_name=", acpi_os_name_setup);
static int __init acpi_no_auto_serialize_setup(char *str) static int __init acpi_no_auto_serialize_setup(char *str)
{ {
acpi_gbl_auto_serialize_methods = FALSE; acpi_gbl_auto_serialize_methods = FALSE;
pr_info("ACPI: auto-serialization disabled\n"); pr_info("Auto-serialization disabled\n");
return 1; return 1;
} }
...@@ -1712,7 +1712,7 @@ acpi_status acpi_os_release_object(acpi_cache_t * cache, void *object) ...@@ -1712,7 +1712,7 @@ acpi_status acpi_os_release_object(acpi_cache_t * cache, void *object)
static int __init acpi_no_static_ssdt_setup(char *s) static int __init acpi_no_static_ssdt_setup(char *s)
{ {
acpi_gbl_disable_ssdt_table_install = TRUE; acpi_gbl_disable_ssdt_table_install = TRUE;
pr_info("ACPI: static SSDT installation disabled\n"); pr_info("Static SSDT installation disabled\n");
return 0; return 0;
} }
...@@ -1721,8 +1721,7 @@ early_param("acpi_no_static_ssdt", acpi_no_static_ssdt_setup); ...@@ -1721,8 +1721,7 @@ early_param("acpi_no_static_ssdt", acpi_no_static_ssdt_setup);
static int __init acpi_disable_return_repair(char *s) static int __init acpi_disable_return_repair(char *s)
{ {
printk(KERN_NOTICE PREFIX pr_notice("Predefined validation mechanism disabled\n");
"ACPI: Predefined validation mechanism disabled\n");
acpi_gbl_disable_auto_repair = TRUE; acpi_gbl_disable_auto_repair = TRUE;
return 1; return 1;
...@@ -1748,7 +1747,7 @@ acpi_status __init acpi_os_initialize(void) ...@@ -1748,7 +1747,7 @@ acpi_status __init acpi_os_initialize(void)
void *rv; void *rv;
rv = acpi_os_map_generic_address(&acpi_gbl_FADT.reset_register); rv = acpi_os_map_generic_address(&acpi_gbl_FADT.reset_register);
pr_debug(PREFIX "%s: map reset_reg %s\n", __func__, pr_debug("%s: Reset register mapping %s\n", __func__,
rv ? "successful" : "failed"); rv ? "successful" : "failed");
} }
acpi_os_initialized = true; acpi_os_initialized = true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment