aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi
diff options
context:
space:
mode:
Diffstat (limited to 'include/acpi')
-rw-r--r--include/acpi/actypes.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index e76356574374..19b26bb69a70 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -329,6 +329,15 @@ typedef u32 acpi_physical_address;
329 * 329 *
330 ******************************************************************************/ 330 ******************************************************************************/
331 331
332#ifdef ACPI_NO_MEM_ALLOCATIONS
333
334#define ACPI_ALLOCATE(a) NULL
335#define ACPI_ALLOCATE_ZEROED(a) NULL
336#define ACPI_FREE(a)
337#define ACPI_MEM_TRACKING(a)
338
339#else /* ACPI_NO_MEM_ALLOCATIONS */
340
332#ifdef ACPI_DBG_TRACK_ALLOCATIONS 341#ifdef ACPI_DBG_TRACK_ALLOCATIONS
333/* 342/*
334 * Memory allocation tracking (used by acpi_exec to detect memory leaks) 343 * Memory allocation tracking (used by acpi_exec to detect memory leaks)
@@ -350,6 +359,8 @@ typedef u32 acpi_physical_address;
350 359
351#endif /* ACPI_DBG_TRACK_ALLOCATIONS */ 360#endif /* ACPI_DBG_TRACK_ALLOCATIONS */
352 361
362#endif /* ACPI_NO_MEM_ALLOCATIONS */
363
353/****************************************************************************** 364/******************************************************************************
354 * 365 *
355 * ACPI Specification constants (Do not change unless the specification changes) 366 * ACPI Specification constants (Do not change unless the specification changes)
@@ -928,9 +939,19 @@ struct acpi_object_list {
928 * Miscellaneous common Data Structures used by the interfaces 939 * Miscellaneous common Data Structures used by the interfaces
929 */ 940 */
930#define ACPI_NO_BUFFER 0 941#define ACPI_NO_BUFFER 0
942
943#ifdef ACPI_NO_MEM_ALLOCATIONS
944
945#define ACPI_ALLOCATE_BUFFER (acpi_size) (0)
946#define ACPI_ALLOCATE_LOCAL_BUFFER (acpi_size) (0)
947
948#else /* ACPI_NO_MEM_ALLOCATIONS */
949
931#define ACPI_ALLOCATE_BUFFER (acpi_size) (-1) /* Let ACPICA allocate buffer */ 950#define ACPI_ALLOCATE_BUFFER (acpi_size) (-1) /* Let ACPICA allocate buffer */
932#define ACPI_ALLOCATE_LOCAL_BUFFER (acpi_size) (-2) /* For internal use only (enables tracking) */ 951#define ACPI_ALLOCATE_LOCAL_BUFFER (acpi_size) (-2) /* For internal use only (enables tracking) */
933 952
953#endif /* ACPI_NO_MEM_ALLOCATIONS */
954
934struct acpi_buffer { 955struct acpi_buffer {
935 acpi_size length; /* Length in bytes of the buffer */ 956 acpi_size length; /* Length in bytes of the buffer */
936 void *pointer; /* pointer to buffer */ 957 void *pointer; /* pointer to buffer */