summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Zammit <damien@zamaudio.com>2020-04-25 09:40:04 +1000
committerDamien Zammit <damien@zamaudio.com>2020-04-25 09:40:04 +1000
commit15ebb5a3e4ea5fd4d7f320c2c7399e38160feb15 (patch)
tree174427fac825fc0df71047b29821c30c95f3628b
parent98ead185df8d8d8acbefbaad58d1cf3feb7ef535 (diff)
acpica: Try to fix logging
-rw-r--r--acpica/acpi_init.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/acpica/acpi_init.c b/acpica/acpi_init.c
index 04475a9f..b25832bd 100644
--- a/acpica/acpi_init.c
+++ b/acpica/acpi_init.c
@@ -7,6 +7,7 @@
#include <i386/pio.h>
#define MACH_INCLUDE
#include <linux/delay.h> // udelay
+#include <linux/kernel.h> // printk
#define ACPI_MAX_TABLES 128
@@ -126,7 +127,7 @@ acpi_os_vprintf(const char *fmt, va_list args)
static char buffer[512];
vsnprintf(buffer, 512, fmt, args);
- printf(buffer);
+ printk(buffer);
}
acpi_cpu_flags
@@ -151,7 +152,7 @@ acpi_os_delete_lock(acpi_spinlock handle)
acpi_status
acpi_os_create_semaphore(u32 max_units, u32 initial_units, acpi_semaphore * handle)
{
- printf("cant create semaphore\n");
+ acpi_os_printf("cant create semaphore\n");
return AE_NO_MEMORY;
}
@@ -165,7 +166,7 @@ acpi_status
acpi_os_execute(acpi_execute_type type,
acpi_osd_exec_callback function, void *context)
{
- printf("XXX acpi_os_execute: not implemented\n");
+ acpi_os_printf("XXX acpi_os_execute: not implemented\n");
return (AE_OK);
}
@@ -213,7 +214,7 @@ acpi_os_read_port(acpi_io_address port, u32 * value, u32 width)
} else if (width <= 32) {
*(u32 *) value = inl(port);
} else {
- printf("ACPI: read port invalid width\n");
+ acpi_os_printf("ACPI: read port invalid width\n");
}
return AE_OK;
@@ -234,7 +235,7 @@ acpi_os_signal(u32 function, void *info)
{
switch (function) {
case ACPI_SIGNAL_FATAL:
- printf("ACPI: Fatal opcode executed\n");
+ acpi_os_printf("ACPI: Fatal opcode executed\n");
break;
case ACPI_SIGNAL_BREAKPOINT:
break;
@@ -370,7 +371,7 @@ acpi_os_write_memory(acpi_physical_address phys_addr, u64 value, u32 width)
*((volatile u64 *)virt_addr) = value;
break;
default:
- printf("ACPI: Bad write memory width\n");
+ acpi_os_printf("ACPI: Bad write memory width\n");
err = AE_BAD_ADDRESS;
break;
}
@@ -390,7 +391,7 @@ acpi_os_write_port(acpi_io_address port, u32 value, u32 width)
} else if (width <= 32) {
outl(port, value);
} else {
- printf("ACPI: Bad write port width\n");
+ acpi_os_printf("ACPI: Bad write port width\n");
}
return AE_OK;
@@ -414,7 +415,7 @@ acpi_status
acpi_os_read_pci_configuration(struct acpi_pci_id * pci_id, u32 reg,
u64 *value, u32 width)
{
- printf("ACPI: Tried to read pci config\n");
+ acpi_os_printf("ACPI: Tried to read pci config\n");
return AE_ERROR;
}
@@ -422,19 +423,19 @@ acpi_status
acpi_os_write_pci_configuration(struct acpi_pci_id * pci_id, u32 reg,
u64 value, u32 width)
{
- printf("ACPI: Tried to write pci config\n");
+ acpi_os_printf("ACPI: Tried to write pci config\n");
return AE_ERROR;
}
/*
* Missing symbols to implement:
*
- * isdigit
- * isprint
- * isspace
- * isxdigit
- * tolower
- * toupper
+ * x isdigit
+ * x isprint
+ * x isspace
+ * x isxdigit
+ * x tolower
+ * x toupper
* x acpi_ds_dump_method_stack
* x acpi_os_acquire_lock
* x acpi_os_create_cache