From: Sascha Wildner Date: Sat, 28 Jun 2014 13:31:31 +0000 (+0200) Subject: kernel/acpi: Solve ACPI_DEBUG_{CACHE,LOCKS,MEMMAP} building better. X-Git-Tag: v4.1.0~542 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/510bcfa42f5b3cb934688b3150a1f61dcf5e4b1b kernel/acpi: Solve ACPI_DEBUG_{CACHE,LOCKS,MEMMAP} building better. ACPICA 20140627 added a mechanism for having a platform dependent header that is included _after_ ACPICA headers are included. So we can now solve compilation with ACPI_DEBUG_{CACHE,LOCKS,MEMMAP} by adding a new acdragonflyex.h header for the prototypes of the debug flavors of AcpiOsReleaseObject(), AcpiOsAcquireLock(), AcpiOsMapMemory() and AcpiOsUnmapMemory() instead of having to put them into the vendor code (like I did in 3b92a84dc0def, which this commit reverts). --- diff --git a/sys/contrib/dev/acpica/source/include/acpiosxf.h b/sys/contrib/dev/acpica/source/include/acpiosxf.h index a006759451..3888b488e9 100644 --- a/sys/contrib/dev/acpica/source/include/acpiosxf.h +++ b/sys/contrib/dev/acpica/source/include/acpiosxf.h @@ -150,14 +150,6 @@ AcpiOsAcquireLock ( ACPI_SPINLOCK Handle); #endif -#ifdef ACPI_DEBUG_LOCKS -ACPI_CPU_FLAGS -_AcpiOsAcquireLock ( - ACPI_SPINLOCK Handle, - const char *func, - int line); -#endif - #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsReleaseLock void AcpiOsReleaseLock ( @@ -268,21 +260,6 @@ AcpiOsUnmapMemory ( ACPI_SIZE Size); #endif -#ifdef ACPI_DEBUG_MEMMAP -void * -_AcpiOsMapMemory ( - ACPI_PHYSICAL_ADDRESS Where, - ACPI_SIZE Length, - const char *caller, - int line); -void -_AcpiOsUnmapMemory ( - void *LogicalAddress, - ACPI_SIZE Length, - const char *caller, - int line); -#endif - #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetPhysicalAddress ACPI_STATUS AcpiOsGetPhysicalAddress ( @@ -328,14 +305,6 @@ AcpiOsReleaseObject ( void *Object); #endif -#ifdef ACPI_DEBUG_CACHE -ACPI_STATUS -_AcpiOsReleaseObject ( - ACPI_CACHE_T *Cache, - void *Object, - const char *func, - int line); -#endif /* * Interrupt handlers diff --git a/sys/contrib/dev/acpica/source/include/platform/acenvex.h b/sys/contrib/dev/acpica/source/include/platform/acdragonflyex.h similarity index 73% copy from sys/contrib/dev/acpica/source/include/platform/acenvex.h copy to sys/contrib/dev/acpica/source/include/platform/acdragonflyex.h index a1de87ffee..be66bc7f04 100644 --- a/sys/contrib/dev/acpica/source/include/platform/acenvex.h +++ b/sys/contrib/dev/acpica/source/include/platform/acdragonflyex.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * Name: acenvex.h - Extra host and compiler configuration + * Name: acdragonflyex.h - Extra OS specific defines, etc. for DragonFly * *****************************************************************************/ @@ -41,23 +41,44 @@ * POSSIBILITY OF SUCH DAMAGES. */ -#ifndef __ACENVEX_H__ -#define __ACENVEX_H__ +#ifndef __ACDRAGONFLYEX_H__ +#define __ACDRAGONFLYEX_H__ -/*! [Begin] no source code translation */ +#ifdef _KERNEL -/****************************************************************************** - * - * Extra host configuration files. All ACPICA headers are included before - * including these files. - * - *****************************************************************************/ +#ifdef ACPI_DEBUG_CACHE +ACPI_STATUS +_AcpiOsReleaseObject ( + ACPI_CACHE_T *Cache, + void *Object, + const char *func, + int line); +#endif + +#ifdef ACPI_DEBUG_LOCKS +ACPI_CPU_FLAGS +_AcpiOsAcquireLock ( + ACPI_SPINLOCK Spin, + const char *func, + int line); +#endif -#if defined(_LINUX) || defined(__linux__) -#include "aclinuxex.h" +#ifdef ACPI_DEBUG_MEMMAP +void * +_AcpiOsMapMemory ( + ACPI_PHYSICAL_ADDRESS Where, + ACPI_SIZE Length, + const char *caller, + int line); +void +_AcpiOsUnmapMemory ( + void *LogicalAddress, + ACPI_SIZE Length, + const char *caller, + int line); #endif -/*! [End] no source code translation !*/ +#endif /* _KERNEL */ -#endif /* __ACENVEX_H__ */ +#endif /* __ACDRAGONFLYEX_H__ */ diff --git a/sys/contrib/dev/acpica/source/include/platform/acenvex.h b/sys/contrib/dev/acpica/source/include/platform/acenvex.h index a1de87ffee..f3ab5c03a4 100644 --- a/sys/contrib/dev/acpica/source/include/platform/acenvex.h +++ b/sys/contrib/dev/acpica/source/include/platform/acenvex.h @@ -56,6 +56,9 @@ #if defined(_LINUX) || defined(__linux__) #include "aclinuxex.h" +#elif defined(__DragonFly__) +#include "acdragonflyex.h" + #endif /*! [End] no source code translation !*/