diff options
author | Bob Moore <robert.moore@intel.com> | 2006-10-03 00:00:00 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-04-01 01:26:39 -0500 |
commit | 8313524a0d466f451a62709aaedf988d8257b21c (patch) | |
tree | d612fc796ae07d8a39542c95eec0f5169c9f64eb /drivers/acpi/events/evgpeblk.c | |
parent | ea936b78f46cbe089a4ac363e1682dee7d427096 (diff) |
ACPI: ACPICA 20060310
Tagged all external interfaces to the subsystem with the
new ACPI_EXPORT_SYMBOL macro. This macro can be defined
as necessary to assist kernel integration. For Linux,
the macro resolves to the EXPORT_SYMBOL macro. The default
definition is NULL.
Added the ACPI_THREAD_ID type for the return value from
acpi_os_get_thread_id(). This allows the host to define this
as necessary to simplify kernel integration. The default
definition is ACPI_NATIVE_UINT.
Valery Podrezov fixed two interpreter problems related
to error processing, the deletion of objects, and placing
invalid pointers onto the internal operator result stack.
http://bugzilla.kernel.org/show_bug.cgi?id=6028
http://bugzilla.kernel.org/show_bug.cgi?id=6151
Increased the reference count threshold where a warning is
emitted for large reference counts in order to eliminate
unnecessary warnings on systems with large namespaces
(especially 64-bit.) Increased the value from 0x400
to 0x800.
Due to universal disagreement as to the meaning of the
'c' in the calloc() function, the ACPI_MEM_CALLOCATE
macro has been renamed to ACPI_ALLOCATE_ZEROED so that the
purpose of the interface is 'clear'. ACPI_MEM_ALLOCATE and
ACPI_MEM_FREE are renamed to ACPI_ALLOCATE and ACPI_FREE.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/events/evgpeblk.c')
-rw-r--r-- | drivers/acpi/events/evgpeblk.c | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/drivers/acpi/events/evgpeblk.c b/drivers/acpi/events/evgpeblk.c index 87e77a138fff..e8e72986f0d6 100644 --- a/drivers/acpi/events/evgpeblk.c +++ b/drivers/acpi/events/evgpeblk.c | |||
@@ -207,7 +207,7 @@ acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info, | |||
207 | 207 | ||
208 | if ((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) == | 208 | if ((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) == |
209 | ACPI_GPE_DISPATCH_HANDLER) { | 209 | ACPI_GPE_DISPATCH_HANDLER) { |
210 | ACPI_MEM_FREE(gpe_event_info->dispatch.handler); | 210 | ACPI_FREE(gpe_event_info->dispatch.handler); |
211 | gpe_event_info->dispatch.handler = NULL; | 211 | gpe_event_info->dispatch.handler = NULL; |
212 | gpe_event_info->flags &= | 212 | gpe_event_info->flags &= |
213 | ~ACPI_GPE_DISPATCH_MASK; | 213 | ~ACPI_GPE_DISPATCH_MASK; |
@@ -504,7 +504,7 @@ static struct acpi_gpe_xrupt_info *acpi_ev_get_gpe_xrupt_block(u32 | |||
504 | 504 | ||
505 | /* Not found, must allocate a new xrupt descriptor */ | 505 | /* Not found, must allocate a new xrupt descriptor */ |
506 | 506 | ||
507 | gpe_xrupt = ACPI_MEM_CALLOCATE(sizeof(struct acpi_gpe_xrupt_info)); | 507 | gpe_xrupt = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_gpe_xrupt_info)); |
508 | if (!gpe_xrupt) { | 508 | if (!gpe_xrupt) { |
509 | return_PTR(NULL); | 509 | return_PTR(NULL); |
510 | } | 510 | } |
@@ -595,7 +595,7 @@ acpi_ev_delete_gpe_xrupt(struct acpi_gpe_xrupt_info *gpe_xrupt) | |||
595 | 595 | ||
596 | /* Free the block */ | 596 | /* Free the block */ |
597 | 597 | ||
598 | ACPI_MEM_FREE(gpe_xrupt); | 598 | ACPI_FREE(gpe_xrupt); |
599 | return_ACPI_STATUS(AE_OK); | 599 | return_ACPI_STATUS(AE_OK); |
600 | } | 600 | } |
601 | 601 | ||
@@ -712,9 +712,9 @@ acpi_status acpi_ev_delete_gpe_block(struct acpi_gpe_block_info *gpe_block) | |||
712 | 712 | ||
713 | /* Free the gpe_block */ | 713 | /* Free the gpe_block */ |
714 | 714 | ||
715 | ACPI_MEM_FREE(gpe_block->register_info); | 715 | ACPI_FREE(gpe_block->register_info); |
716 | ACPI_MEM_FREE(gpe_block->event_info); | 716 | ACPI_FREE(gpe_block->event_info); |
717 | ACPI_MEM_FREE(gpe_block); | 717 | ACPI_FREE(gpe_block); |
718 | 718 | ||
719 | unlock_and_exit: | 719 | unlock_and_exit: |
720 | status = acpi_ut_release_mutex(ACPI_MTX_EVENTS); | 720 | status = acpi_ut_release_mutex(ACPI_MTX_EVENTS); |
@@ -748,10 +748,10 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block) | |||
748 | 748 | ||
749 | /* Allocate the GPE register information block */ | 749 | /* Allocate the GPE register information block */ |
750 | 750 | ||
751 | gpe_register_info = ACPI_MEM_CALLOCATE((acpi_size) gpe_block-> | 751 | gpe_register_info = ACPI_ALLOCATE_ZEROED((acpi_size) gpe_block-> |
752 | register_count * | 752 | register_count * |
753 | sizeof(struct | 753 | sizeof(struct |
754 | acpi_gpe_register_info)); | 754 | acpi_gpe_register_info)); |
755 | if (!gpe_register_info) { | 755 | if (!gpe_register_info) { |
756 | ACPI_ERROR((AE_INFO, | 756 | ACPI_ERROR((AE_INFO, |
757 | "Could not allocate the gpe_register_info table")); | 757 | "Could not allocate the gpe_register_info table")); |
@@ -762,10 +762,11 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block) | |||
762 | * Allocate the GPE event_info block. There are eight distinct GPEs | 762 | * Allocate the GPE event_info block. There are eight distinct GPEs |
763 | * per register. Initialization to zeros is sufficient. | 763 | * per register. Initialization to zeros is sufficient. |
764 | */ | 764 | */ |
765 | gpe_event_info = ACPI_MEM_CALLOCATE(((acpi_size) gpe_block-> | 765 | gpe_event_info = ACPI_ALLOCATE_ZEROED(((acpi_size) gpe_block-> |
766 | register_count * | 766 | register_count * |
767 | ACPI_GPE_REGISTER_WIDTH) * | 767 | ACPI_GPE_REGISTER_WIDTH) * |
768 | sizeof(struct acpi_gpe_event_info)); | 768 | sizeof(struct |
769 | acpi_gpe_event_info)); | ||
769 | if (!gpe_event_info) { | 770 | if (!gpe_event_info) { |
770 | ACPI_ERROR((AE_INFO, | 771 | ACPI_ERROR((AE_INFO, |
771 | "Could not allocate the gpe_event_info table")); | 772 | "Could not allocate the gpe_event_info table")); |
@@ -848,10 +849,10 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block) | |||
848 | 849 | ||
849 | error_exit: | 850 | error_exit: |
850 | if (gpe_register_info) { | 851 | if (gpe_register_info) { |
851 | ACPI_MEM_FREE(gpe_register_info); | 852 | ACPI_FREE(gpe_register_info); |
852 | } | 853 | } |
853 | if (gpe_event_info) { | 854 | if (gpe_event_info) { |
854 | ACPI_MEM_FREE(gpe_event_info); | 855 | ACPI_FREE(gpe_event_info); |
855 | } | 856 | } |
856 | 857 | ||
857 | return_ACPI_STATUS(status); | 858 | return_ACPI_STATUS(status); |
@@ -895,7 +896,7 @@ acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device, | |||
895 | 896 | ||
896 | /* Allocate a new GPE block */ | 897 | /* Allocate a new GPE block */ |
897 | 898 | ||
898 | gpe_block = ACPI_MEM_CALLOCATE(sizeof(struct acpi_gpe_block_info)); | 899 | gpe_block = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_gpe_block_info)); |
899 | if (!gpe_block) { | 900 | if (!gpe_block) { |
900 | return_ACPI_STATUS(AE_NO_MEMORY); | 901 | return_ACPI_STATUS(AE_NO_MEMORY); |
901 | } | 902 | } |
@@ -915,7 +916,7 @@ acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device, | |||
915 | */ | 916 | */ |
916 | status = acpi_ev_create_gpe_info_blocks(gpe_block); | 917 | status = acpi_ev_create_gpe_info_blocks(gpe_block); |
917 | if (ACPI_FAILURE(status)) { | 918 | if (ACPI_FAILURE(status)) { |
918 | ACPI_MEM_FREE(gpe_block); | 919 | ACPI_FREE(gpe_block); |
919 | return_ACPI_STATUS(status); | 920 | return_ACPI_STATUS(status); |
920 | } | 921 | } |
921 | 922 | ||
@@ -923,7 +924,7 @@ acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device, | |||
923 | 924 | ||
924 | status = acpi_ev_install_gpe_block(gpe_block, interrupt_number); | 925 | status = acpi_ev_install_gpe_block(gpe_block, interrupt_number); |
925 | if (ACPI_FAILURE(status)) { | 926 | if (ACPI_FAILURE(status)) { |
926 | ACPI_MEM_FREE(gpe_block); | 927 | ACPI_FREE(gpe_block); |
927 | return_ACPI_STATUS(status); | 928 | return_ACPI_STATUS(status); |
928 | } | 929 | } |
929 | 930 | ||