ACPI: acpi_os_allocate() fixes

Replace acpi_in_resume with a more general hack
to check irqs_disabled() on any kmalloc() from ACPI.
While setting (system_state != SYSTEM_RUNNING) on resume
seemed more general, Andrew Morton preferred this approach.

http://bugzilla.kernel.org/show_bug.cgi?id=3469

Make acpi_os_allocate() into an inline function to
allow /proc/slab_allocators to work.

Delete some memset() that could fault on allocation failure.

Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
Len Brown
2006-07-10 01:35:51 -04:00
parent b3cf257623
commit e21c1ca3f9
6 changed files with 31 additions and 40 deletions

View File

@@ -724,9 +724,15 @@
/* Memory allocation */
#ifndef ACPI_ALLOCATE
#define ACPI_ALLOCATE(a) acpi_ut_allocate((acpi_size)(a),_COMPONENT,_acpi_module_name,__LINE__)
#endif
#ifndef ACPI_ALLOCATE_ZEROED
#define ACPI_ALLOCATE_ZEROED(a) acpi_ut_allocate_zeroed((acpi_size)(a), _COMPONENT,_acpi_module_name,__LINE__)
#define ACPI_FREE(a) kfree(a)
#endif
#ifndef ACPI_FREE
#define ACPI_FREE(a) acpio_os_free(a)
#endif
#define ACPI_MEM_TRACKING(a)
#else