From 766814e481fd3945150eb4469f633206d4a51e09 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Fri, 19 Dec 2014 00:21:49 +0100 Subject: [PATCH] kernel/acpica: Separate kernel and userland code in headers better. Clean up a bit, use standard types, etc. --- .../source/include/platform/acdragonfly.h | 22 +++++++++++++------ sys/platform/pc32/include/acpica_machdep.h | 5 ----- sys/platform/pc64/include/acpica_machdep.h | 5 ----- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/sys/contrib/dev/acpica/source/include/platform/acdragonfly.h b/sys/contrib/dev/acpica/source/include/platform/acdragonfly.h index cc3903b49a..08c48a5adc 100644 --- a/sys/contrib/dev/acpica/source/include/platform/acdragonfly.h +++ b/sys/contrib/dev/acpica/source/include/platform/acdragonfly.h @@ -119,9 +119,18 @@ #include /* DragonFly uses GCC */ #include -#include -#define ACPI_UINTPTR_T uintptr_t +#ifdef __LP64__ +#define ACPI_MACHINE_WIDTH 64 +#else +#define ACPI_MACHINE_WIDTH 32 +#define ACPI_USE_NATIVE_DIVIDE +#endif + +#define ACPI_UINTPTR_T uintptr_t +#define COMPILER_DEPENDENT_INT64 int64_t +#define COMPILER_DEPENDENT_UINT64 uint64_t + #define ACPI_USE_DO_WHILE_0 #define ACPI_USE_SYSTEM_CLIBRARY @@ -130,16 +139,15 @@ #include "opt_acpi.h" #include #include +#include #include +#ifdef ACPI_DEBUG +#define ACPI_DEBUG_OUTPUT /* enable debug output */ #ifdef DEBUGGER_THREADING #undef DEBUGGER_THREADING #endif /* DEBUGGER_THREADING */ - -#define DEBUGGER_THREADING 0 /* integrated with DDB */ - -#ifdef ACPI_DEBUG -#define ACPI_DEBUG_OUTPUT /* enable debug output */ +#define DEBUGGER_THREADING DEBUGGER_SINGLE_THREADED /* integrated with DDB */ #if 0 /* XXX */ #include "opt_ddb.h" #ifdef DDB diff --git a/sys/platform/pc32/include/acpica_machdep.h b/sys/platform/pc32/include/acpica_machdep.h index e5953dc2da..8753b6cff3 100644 --- a/sys/platform/pc32/include/acpica_machdep.h +++ b/sys/platform/pc32/include/acpica_machdep.h @@ -69,9 +69,4 @@ extern int acpi_release_global_lock(uint32_t *lock); #endif /* _KERNEL */ -#define ACPI_MACHINE_WIDTH 32 -#define COMPILER_DEPENDENT_INT64 long long -#define COMPILER_DEPENDENT_UINT64 unsigned long long -#define ACPI_USE_NATIVE_DIVIDE - #endif /* _MACHINE_ACPICA_MACHDEP_H__ */ diff --git a/sys/platform/pc64/include/acpica_machdep.h b/sys/platform/pc64/include/acpica_machdep.h index 3ade026867..47883e20f8 100644 --- a/sys/platform/pc64/include/acpica_machdep.h +++ b/sys/platform/pc64/include/acpica_machdep.h @@ -24,7 +24,6 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/amd64/include/acpica_machdep.h,v 1.6 2004/10/11 05:39:15 njl Exp $ - * $DragonFly: src/sys/platform/pc64/include/acpica_machdep.h,v 1.1 2007/08/21 19:45:45 corecode Exp $ */ /****************************************************************************** @@ -70,8 +69,4 @@ extern int acpi_release_global_lock(uint32_t *lock); #endif /* _KERNEL */ -#define ACPI_MACHINE_WIDTH 64 -#define COMPILER_DEPENDENT_INT64 long -#define COMPILER_DEPENDENT_UINT64 unsigned long - #endif /* _MACHINE_ACPICA_MACHDEP_H__ */ -- 2.41.0