diff options
author | Lv Zheng <lv.zheng@intel.com> | 2013-10-28 21:29:27 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-10-30 07:24:21 -0400 |
commit | b3c86c30efd83ebfa7010c5890e2ebf2678e49f8 (patch) | |
tree | f354d1d0a7a01d40345b155e3d271ca9275adb09 /drivers/acpi/acpica/acmacros.h | |
parent | 73424473d0801f7079258897901ba1edc660dbd3 (diff) |
ACPICA: Cleanup memory allocation macros and configurability.
In the common case, the ACPI_ALLOCATE and related macros now resolve
directly to their respective acpi_os* OSL interfaces. Two options:
1) The ACPI_ALLOCATE_ZEROED macro defaults to a simple local implementation
by default, unless overridden by the USE_NATIVE_ALLOCATE_ZEROED define.
2) For ACPI execution simulation environment (AcpiExec) which is not
shipped with the Linux kernel, the macros can optionally be resolved to
the local interfaces that track each allocation (used to immediately
detect memory leaks).
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/acmacros.h')
-rw-r--r-- | drivers/acpi/acpica/acmacros.h | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/drivers/acpi/acpica/acmacros.h b/drivers/acpi/acpica/acmacros.h index 530a2f8c1252..2a86c65d873b 100644 --- a/drivers/acpi/acpica/acmacros.h +++ b/drivers/acpi/acpica/acmacros.h | |||
@@ -410,37 +410,6 @@ | |||
410 | #endif | 410 | #endif |
411 | 411 | ||
412 | /* | 412 | /* |
413 | * Memory allocation tracking (DEBUG ONLY) | ||
414 | */ | ||
415 | #define ACPI_MEM_PARAMETERS _COMPONENT, _acpi_module_name, __LINE__ | ||
416 | |||
417 | #ifndef ACPI_DBG_TRACK_ALLOCATIONS | ||
418 | |||
419 | /* Memory allocation */ | ||
420 | |||
421 | #ifndef ACPI_ALLOCATE | ||
422 | #define ACPI_ALLOCATE(a) acpi_ut_allocate((acpi_size) (a), ACPI_MEM_PARAMETERS) | ||
423 | #endif | ||
424 | #ifndef ACPI_ALLOCATE_ZEROED | ||
425 | #define ACPI_ALLOCATE_ZEROED(a) acpi_ut_allocate_zeroed((acpi_size) (a), ACPI_MEM_PARAMETERS) | ||
426 | #endif | ||
427 | #ifndef ACPI_FREE | ||
428 | #define ACPI_FREE(a) acpi_os_free(a) | ||
429 | #endif | ||
430 | #define ACPI_MEM_TRACKING(a) | ||
431 | |||
432 | #else | ||
433 | |||
434 | /* Memory allocation */ | ||
435 | |||
436 | #define ACPI_ALLOCATE(a) acpi_ut_allocate_and_track((acpi_size) (a), ACPI_MEM_PARAMETERS) | ||
437 | #define ACPI_ALLOCATE_ZEROED(a) acpi_ut_allocate_zeroed_and_track((acpi_size) (a), ACPI_MEM_PARAMETERS) | ||
438 | #define ACPI_FREE(a) acpi_ut_free_and_track(a, ACPI_MEM_PARAMETERS) | ||
439 | #define ACPI_MEM_TRACKING(a) a | ||
440 | |||
441 | #endif /* ACPI_DBG_TRACK_ALLOCATIONS */ | ||
442 | |||
443 | /* | ||
444 | * Macros used for ACPICA utilities only | 413 | * Macros used for ACPICA utilities only |
445 | */ | 414 | */ |
446 | 415 | ||