diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-26 17:28:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-26 17:28:55 -0400 |
commit | 476525004ac7e2f990b6956efcd44d0780c2ab4c (patch) | |
tree | 158cd2bbfb232b4f4327b6c20a4e14c6b095a438 /drivers/acpi | |
parent | bd22dc17e49973d3d4925970260e9e37f7580a9f (diff) | |
parent | ec033d0a02901551346b9f43f8ff9bad51378891 (diff) |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux
Pull ACPI & power management update from Len Brown:
"Re-write of the turbostat tool.
lower overhead was necessary for measuring very large system when
they are very idle.
IVB support in intel_idle
It's what I run on my IVB, others should be able to also:-)
ACPICA core update
We have found some bugs due to divergence between Linux and the
upstream ACPICA base. Most of these patches are to reduce that
divergence to reduce the risk of future bugs.
Some cpuidle updates, mostly for non-Intel
More will be coming, as they depend on this part.
Some thermal management changes needed by non-ACPI systems.
Some _OST (OS Status Indication) updates for hot ACPI hot-plug."
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: (51 commits)
Thermal: Documentation update
Thermal: Add Hysteresis attributes
Thermal: Make Thermal trip points writeable
ACPI/AC: prevent OOPS on some boxes due to missing check power_supply_register() return value check
tools/power: turbostat: fix large c1% issue
tools/power: turbostat v2 - re-write for efficiency
ACPICA: Update to version 20120711
ACPICA: AcpiSrc: Fix some translation issues for Linux conversion
ACPICA: Update header files copyrights to 2012
ACPICA: Add new ACPI table load/unload external interfaces
ACPICA: Split file: tbxface.c -> tbxfload.c
ACPICA: Add PCC address space to space ID decode function
ACPICA: Fix some comment fields
ACPICA: Table manager: deploy new firmware error/warning interfaces
ACPICA: Add new interfaces for BIOS(firmware) errors and warnings
ACPICA: Split exception code utilities to a new file, utexcep.c
ACPI: acpi_pad: tune round_robin_time
ACPICA: Update to version 20120620
ACPICA: Add support for implicit notify on multiple devices
ACPICA: Update comments; no functional change
...
Diffstat (limited to 'drivers/acpi')
135 files changed, 2113 insertions, 1627 deletions
diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c index ff9f6bd48301..ac7034129f3f 100644 --- a/drivers/acpi/ac.c +++ b/drivers/acpi/ac.c | |||
@@ -294,7 +294,9 @@ static int acpi_ac_add(struct acpi_device *device) | |||
294 | ac->charger.properties = ac_props; | 294 | ac->charger.properties = ac_props; |
295 | ac->charger.num_properties = ARRAY_SIZE(ac_props); | 295 | ac->charger.num_properties = ARRAY_SIZE(ac_props); |
296 | ac->charger.get_property = get_ac_property; | 296 | ac->charger.get_property = get_ac_property; |
297 | power_supply_register(&ac->device->dev, &ac->charger); | 297 | result = power_supply_register(&ac->device->dev, &ac->charger); |
298 | if (result) | ||
299 | goto end; | ||
298 | 300 | ||
299 | printk(KERN_INFO PREFIX "%s [%s] (%s)\n", | 301 | printk(KERN_INFO PREFIX "%s [%s] (%s)\n", |
300 | acpi_device_name(device), acpi_device_bid(device), | 302 | acpi_device_name(device), acpi_device_bid(device), |
diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c index d98571385656..24c807f96636 100644 --- a/drivers/acpi/acpi_memhotplug.c +++ b/drivers/acpi/acpi_memhotplug.c | |||
@@ -341,7 +341,7 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data) | |||
341 | { | 341 | { |
342 | struct acpi_memory_device *mem_device; | 342 | struct acpi_memory_device *mem_device; |
343 | struct acpi_device *device; | 343 | struct acpi_device *device; |
344 | 344 | u32 ost_code = ACPI_OST_SC_NON_SPECIFIC_FAILURE; /* default */ | |
345 | 345 | ||
346 | switch (event) { | 346 | switch (event) { |
347 | case ACPI_NOTIFY_BUS_CHECK: | 347 | case ACPI_NOTIFY_BUS_CHECK: |
@@ -354,15 +354,20 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data) | |||
354 | "\nReceived DEVICE CHECK notification for device\n")); | 354 | "\nReceived DEVICE CHECK notification for device\n")); |
355 | if (acpi_memory_get_device(handle, &mem_device)) { | 355 | if (acpi_memory_get_device(handle, &mem_device)) { |
356 | printk(KERN_ERR PREFIX "Cannot find driver data\n"); | 356 | printk(KERN_ERR PREFIX "Cannot find driver data\n"); |
357 | return; | 357 | break; |
358 | } | 358 | } |
359 | 359 | ||
360 | if (!acpi_memory_check_device(mem_device)) { | 360 | if (acpi_memory_check_device(mem_device)) |
361 | if (acpi_memory_enable_device(mem_device)) | 361 | break; |
362 | printk(KERN_ERR PREFIX | 362 | |
363 | "Cannot enable memory device\n"); | 363 | if (acpi_memory_enable_device(mem_device)) { |
364 | printk(KERN_ERR PREFIX "Cannot enable memory device\n"); | ||
365 | break; | ||
364 | } | 366 | } |
367 | |||
368 | ost_code = ACPI_OST_SC_SUCCESS; | ||
365 | break; | 369 | break; |
370 | |||
366 | case ACPI_NOTIFY_EJECT_REQUEST: | 371 | case ACPI_NOTIFY_EJECT_REQUEST: |
367 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 372 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
368 | "\nReceived EJECT REQUEST notification for device\n")); | 373 | "\nReceived EJECT REQUEST notification for device\n")); |
@@ -383,19 +388,35 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data) | |||
383 | * TBD: Can also be disabled by Callback registration | 388 | * TBD: Can also be disabled by Callback registration |
384 | * with generic sysfs driver | 389 | * with generic sysfs driver |
385 | */ | 390 | */ |
386 | if (acpi_memory_disable_device(mem_device)) | 391 | if (acpi_memory_disable_device(mem_device)) { |
387 | printk(KERN_ERR PREFIX | 392 | printk(KERN_ERR PREFIX "Disable memory device\n"); |
388 | "Disable memory device\n"); | 393 | /* |
394 | * If _EJ0 was called but failed, _OST is not | ||
395 | * necessary. | ||
396 | */ | ||
397 | if (mem_device->state == MEMORY_INVALID_STATE) | ||
398 | return; | ||
399 | |||
400 | break; | ||
401 | } | ||
402 | |||
389 | /* | 403 | /* |
390 | * TBD: Invoke acpi_bus_remove to cleanup data structures | 404 | * TBD: Invoke acpi_bus_remove to cleanup data structures |
391 | */ | 405 | */ |
392 | break; | 406 | |
407 | /* _EJ0 succeeded; _OST is not necessary */ | ||
408 | return; | ||
409 | |||
393 | default: | 410 | default: |
394 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 411 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
395 | "Unsupported event [0x%x]\n", event)); | 412 | "Unsupported event [0x%x]\n", event)); |
396 | break; | 413 | |
414 | /* non-hotplug event; possibly handled by other handler */ | ||
415 | return; | ||
397 | } | 416 | } |
398 | 417 | ||
418 | /* Inform firmware that the hotplug operation has completed */ | ||
419 | (void) acpi_evaluate_hotplug_ost(handle, event, ost_code, NULL); | ||
399 | return; | 420 | return; |
400 | } | 421 | } |
401 | 422 | ||
diff --git a/drivers/acpi/acpi_pad.c b/drivers/acpi/acpi_pad.c index 1502c50273b5..af4aad6ee2eb 100644 --- a/drivers/acpi/acpi_pad.c +++ b/drivers/acpi/acpi_pad.c | |||
@@ -145,7 +145,7 @@ static void exit_round_robin(unsigned int tsk_index) | |||
145 | } | 145 | } |
146 | 146 | ||
147 | static unsigned int idle_pct = 5; /* percentage */ | 147 | static unsigned int idle_pct = 5; /* percentage */ |
148 | static unsigned int round_robin_time = 10; /* second */ | 148 | static unsigned int round_robin_time = 1; /* second */ |
149 | static int power_saving_thread(void *data) | 149 | static int power_saving_thread(void *data) |
150 | { | 150 | { |
151 | struct sched_param param = {.sched_priority = 1}; | 151 | struct sched_param param = {.sched_priority = 1}; |
@@ -235,7 +235,7 @@ static int create_power_saving_task(void) | |||
235 | 235 | ||
236 | ps_tsks[ps_tsk_num] = kthread_run(power_saving_thread, | 236 | ps_tsks[ps_tsk_num] = kthread_run(power_saving_thread, |
237 | (void *)(unsigned long)ps_tsk_num, | 237 | (void *)(unsigned long)ps_tsk_num, |
238 | "power_saving/%d", ps_tsk_num); | 238 | "acpi_pad/%d", ps_tsk_num); |
239 | rc = IS_ERR(ps_tsks[ps_tsk_num]) ? PTR_ERR(ps_tsks[ps_tsk_num]) : 0; | 239 | rc = IS_ERR(ps_tsks[ps_tsk_num]) ? PTR_ERR(ps_tsks[ps_tsk_num]) : 0; |
240 | if (!rc) | 240 | if (!rc) |
241 | ps_tsk_num++; | 241 | ps_tsk_num++; |
diff --git a/drivers/acpi/acpica/Makefile b/drivers/acpi/acpica/Makefile index 793b8cc8e256..0a1b3435f920 100644 --- a/drivers/acpi/acpica/Makefile +++ b/drivers/acpi/acpica/Makefile | |||
@@ -134,12 +134,14 @@ acpi-y += \ | |||
134 | tbinstal.o \ | 134 | tbinstal.o \ |
135 | tbutils.o \ | 135 | tbutils.o \ |
136 | tbxface.o \ | 136 | tbxface.o \ |
137 | tbxfload.o \ | ||
137 | tbxfroot.o | 138 | tbxfroot.o |
138 | 139 | ||
139 | acpi-y += \ | 140 | acpi-y += \ |
140 | utaddress.o \ | 141 | utaddress.o \ |
141 | utalloc.o \ | 142 | utalloc.o \ |
142 | utcopy.o \ | 143 | utcopy.o \ |
144 | utexcep.o \ | ||
143 | utdebug.o \ | 145 | utdebug.o \ |
144 | utdecode.o \ | 146 | utdecode.o \ |
145 | utdelete.o \ | 147 | utdelete.o \ |
diff --git a/drivers/acpi/acpica/acevents.h b/drivers/acpi/acpica/acevents.h index d700f63e4701..c0a43b38c6a3 100644 --- a/drivers/acpi/acpica/acevents.h +++ b/drivers/acpi/acpica/acevents.h | |||
@@ -237,7 +237,7 @@ u32 acpi_ev_install_sci_handler(void); | |||
237 | 237 | ||
238 | acpi_status acpi_ev_remove_sci_handler(void); | 238 | acpi_status acpi_ev_remove_sci_handler(void); |
239 | 239 | ||
240 | u32 acpi_ev_initialize_sCI(u32 program_sCI); | 240 | u32 acpi_ev_initialize_SCI(u32 program_SCI); |
241 | 241 | ||
242 | ACPI_HW_DEPENDENT_RETURN_VOID(void acpi_ev_terminate(void)) | 242 | ACPI_HW_DEPENDENT_RETURN_VOID(void acpi_ev_terminate(void)) |
243 | #endif /* __ACEVENTS_H__ */ | 243 | #endif /* __ACEVENTS_H__ */ |
diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h index 4f7d3f57d05c..ce79100fb5eb 100644 --- a/drivers/acpi/acpica/acglobal.h +++ b/drivers/acpi/acpica/acglobal.h | |||
@@ -278,8 +278,7 @@ ACPI_EXTERN acpi_cache_t *acpi_gbl_operand_cache; | |||
278 | 278 | ||
279 | /* Global handlers */ | 279 | /* Global handlers */ |
280 | 280 | ||
281 | ACPI_EXTERN struct acpi_object_notify_handler acpi_gbl_device_notify; | 281 | ACPI_EXTERN struct acpi_global_notify_handler acpi_gbl_global_notify[2]; |
282 | ACPI_EXTERN struct acpi_object_notify_handler acpi_gbl_system_notify; | ||
283 | ACPI_EXTERN acpi_exception_handler acpi_gbl_exception_handler; | 282 | ACPI_EXTERN acpi_exception_handler acpi_gbl_exception_handler; |
284 | ACPI_EXTERN acpi_init_handler acpi_gbl_init_handler; | 283 | ACPI_EXTERN acpi_init_handler acpi_gbl_init_handler; |
285 | ACPI_EXTERN acpi_tbl_handler acpi_gbl_table_handler; | 284 | ACPI_EXTERN acpi_tbl_handler acpi_gbl_table_handler; |
@@ -327,14 +326,6 @@ extern const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS]; | |||
327 | 326 | ||
328 | #endif | 327 | #endif |
329 | 328 | ||
330 | /* Exception codes */ | ||
331 | |||
332 | extern char const *acpi_gbl_exception_names_env[]; | ||
333 | extern char const *acpi_gbl_exception_names_pgm[]; | ||
334 | extern char const *acpi_gbl_exception_names_tbl[]; | ||
335 | extern char const *acpi_gbl_exception_names_aml[]; | ||
336 | extern char const *acpi_gbl_exception_names_ctrl[]; | ||
337 | |||
338 | /***************************************************************************** | 329 | /***************************************************************************** |
339 | * | 330 | * |
340 | * Namespace globals | 331 | * Namespace globals |
@@ -463,4 +454,12 @@ ACPI_EXTERN u32 acpi_gbl_size_of_acpi_objects; | |||
463 | 454 | ||
464 | #endif /* ACPI_DEBUGGER */ | 455 | #endif /* ACPI_DEBUGGER */ |
465 | 456 | ||
457 | /***************************************************************************** | ||
458 | * | ||
459 | * Info/help support | ||
460 | * | ||
461 | ****************************************************************************/ | ||
462 | |||
463 | extern const struct ah_predefined_name asl_predefined_info[]; | ||
464 | |||
466 | #endif /* __ACGLOBAL_H__ */ | 465 | #endif /* __ACGLOBAL_H__ */ |
diff --git a/drivers/acpi/acpica/aclocal.h b/drivers/acpi/acpica/aclocal.h index e3922ca20e7f..cc80fe10e8ea 100644 --- a/drivers/acpi/acpica/aclocal.h +++ b/drivers/acpi/acpica/aclocal.h | |||
@@ -299,7 +299,7 @@ acpi_status(*ACPI_INTERNAL_METHOD) (struct acpi_walk_state * walk_state); | |||
299 | * Information structure for ACPI predefined names. | 299 | * Information structure for ACPI predefined names. |
300 | * Each entry in the table contains the following items: | 300 | * Each entry in the table contains the following items: |
301 | * | 301 | * |
302 | * Name - The ACPI reserved name | 302 | * name - The ACPI reserved name |
303 | * param_count - Number of arguments to the method | 303 | * param_count - Number of arguments to the method |
304 | * expected_return_btypes - Allowed type(s) for the return value | 304 | * expected_return_btypes - Allowed type(s) for the return value |
305 | */ | 305 | */ |
@@ -404,6 +404,13 @@ struct acpi_gpe_handler_info { | |||
404 | u8 originally_enabled; /* True if GPE was originally enabled */ | 404 | u8 originally_enabled; /* True if GPE was originally enabled */ |
405 | }; | 405 | }; |
406 | 406 | ||
407 | /* Notify info for implicit notify, multiple device objects */ | ||
408 | |||
409 | struct acpi_gpe_notify_info { | ||
410 | struct acpi_namespace_node *device_node; /* Device to be notified */ | ||
411 | struct acpi_gpe_notify_info *next; | ||
412 | }; | ||
413 | |||
407 | struct acpi_gpe_notify_object { | 414 | struct acpi_gpe_notify_object { |
408 | struct acpi_namespace_node *node; | 415 | struct acpi_namespace_node *node; |
409 | struct acpi_gpe_notify_object *next; | 416 | struct acpi_gpe_notify_object *next; |
@@ -412,7 +419,7 @@ struct acpi_gpe_notify_object { | |||
412 | union acpi_gpe_dispatch_info { | 419 | union acpi_gpe_dispatch_info { |
413 | struct acpi_namespace_node *method_node; /* Method node for this GPE level */ | 420 | struct acpi_namespace_node *method_node; /* Method node for this GPE level */ |
414 | struct acpi_gpe_handler_info *handler; /* Installed GPE handler */ | 421 | struct acpi_gpe_handler_info *handler; /* Installed GPE handler */ |
415 | struct acpi_gpe_notify_object device; /* List of _PRW devices for implicit notify */ | 422 | struct acpi_gpe_notify_info *notify_list; /* List of _PRW devices for implicit notifies */ |
416 | }; | 423 | }; |
417 | 424 | ||
418 | /* | 425 | /* |
@@ -420,7 +427,7 @@ union acpi_gpe_dispatch_info { | |||
420 | * NOTE: Important to keep this struct as small as possible. | 427 | * NOTE: Important to keep this struct as small as possible. |
421 | */ | 428 | */ |
422 | struct acpi_gpe_event_info { | 429 | struct acpi_gpe_event_info { |
423 | union acpi_gpe_dispatch_info dispatch; /* Either Method or Handler */ | 430 | union acpi_gpe_dispatch_info dispatch; /* Either Method, Handler, or notify_list */ |
424 | struct acpi_gpe_register_info *register_info; /* Backpointer to register info */ | 431 | struct acpi_gpe_register_info *register_info; /* Backpointer to register info */ |
425 | u8 flags; /* Misc info about this GPE */ | 432 | u8 flags; /* Misc info about this GPE */ |
426 | u8 gpe_number; /* This GPE */ | 433 | u8 gpe_number; /* This GPE */ |
@@ -600,13 +607,22 @@ acpi_status(*acpi_parse_downwards) (struct acpi_walk_state * walk_state, | |||
600 | 607 | ||
601 | typedef acpi_status(*acpi_parse_upwards) (struct acpi_walk_state * walk_state); | 608 | typedef acpi_status(*acpi_parse_upwards) (struct acpi_walk_state * walk_state); |
602 | 609 | ||
610 | /* Global handlers for AML Notifies */ | ||
611 | |||
612 | struct acpi_global_notify_handler { | ||
613 | acpi_notify_handler handler; | ||
614 | void *context; | ||
615 | }; | ||
616 | |||
603 | /* | 617 | /* |
604 | * Notify info - used to pass info to the deferred notify | 618 | * Notify info - used to pass info to the deferred notify |
605 | * handler/dispatcher. | 619 | * handler/dispatcher. |
606 | */ | 620 | */ |
607 | struct acpi_notify_info { | 621 | struct acpi_notify_info { |
608 | ACPI_STATE_COMMON struct acpi_namespace_node *node; | 622 | ACPI_STATE_COMMON u8 handler_list_id; |
609 | union acpi_operand_object *handler_obj; | 623 | struct acpi_namespace_node *node; |
624 | union acpi_operand_object *handler_list_head; | ||
625 | struct acpi_global_notify_handler *global; | ||
610 | }; | 626 | }; |
611 | 627 | ||
612 | /* Generic state is union of structs above */ | 628 | /* Generic state is union of structs above */ |
@@ -718,7 +734,7 @@ struct acpi_parse_obj_named { | |||
718 | u32 name; /* 4-byte name or zero if no name */ | 734 | u32 name; /* 4-byte name or zero if no name */ |
719 | }; | 735 | }; |
720 | 736 | ||
721 | /* This version is used by the i_aSL compiler only */ | 737 | /* This version is used by the iASL compiler only */ |
722 | 738 | ||
723 | #define ACPI_MAX_PARSEOP_NAME 20 | 739 | #define ACPI_MAX_PARSEOP_NAME 20 |
724 | 740 | ||
@@ -787,6 +803,7 @@ struct acpi_parse_state { | |||
787 | #define ACPI_PARSEOP_IGNORE 0x01 | 803 | #define ACPI_PARSEOP_IGNORE 0x01 |
788 | #define ACPI_PARSEOP_PARAMLIST 0x02 | 804 | #define ACPI_PARSEOP_PARAMLIST 0x02 |
789 | #define ACPI_PARSEOP_EMPTY_TERMLIST 0x04 | 805 | #define ACPI_PARSEOP_EMPTY_TERMLIST 0x04 |
806 | #define ACPI_PARSEOP_PREDEF_CHECKED 0x08 | ||
790 | #define ACPI_PARSEOP_SPECIAL 0x10 | 807 | #define ACPI_PARSEOP_SPECIAL 0x10 |
791 | 808 | ||
792 | /***************************************************************************** | 809 | /***************************************************************************** |
@@ -1075,4 +1092,18 @@ struct acpi_debug_mem_block { | |||
1075 | #define ACPI_MEM_LIST_MAX 1 | 1092 | #define ACPI_MEM_LIST_MAX 1 |
1076 | #define ACPI_NUM_MEM_LISTS 2 | 1093 | #define ACPI_NUM_MEM_LISTS 2 |
1077 | 1094 | ||
1095 | /***************************************************************************** | ||
1096 | * | ||
1097 | * Info/help support | ||
1098 | * | ||
1099 | ****************************************************************************/ | ||
1100 | |||
1101 | struct ah_predefined_name { | ||
1102 | char *name; | ||
1103 | char *description; | ||
1104 | #ifndef ACPI_ASL_COMPILER | ||
1105 | char *action; | ||
1106 | #endif | ||
1107 | }; | ||
1108 | |||
1078 | #endif /* __ACLOCAL_H__ */ | 1109 | #endif /* __ACLOCAL_H__ */ |
diff --git a/drivers/acpi/acpica/acmacros.h b/drivers/acpi/acpica/acmacros.h index f119f473f71a..832b6198652e 100644 --- a/drivers/acpi/acpica/acmacros.h +++ b/drivers/acpi/acpica/acmacros.h | |||
@@ -62,7 +62,7 @@ | |||
62 | * printf() format helpers | 62 | * printf() format helpers |
63 | */ | 63 | */ |
64 | 64 | ||
65 | /* Split 64-bit integer into two 32-bit values. Use with %8.8_x%8.8_x */ | 65 | /* Split 64-bit integer into two 32-bit values. Use with %8.8X%8.8X */ |
66 | 66 | ||
67 | #define ACPI_FORMAT_UINT64(i) ACPI_HIDWORD(i), ACPI_LODWORD(i) | 67 | #define ACPI_FORMAT_UINT64(i) ACPI_HIDWORD(i), ACPI_LODWORD(i) |
68 | 68 | ||
@@ -283,8 +283,8 @@ | |||
283 | #define ACPI_INSERT_BITS(target, mask, source) target = ((target & (~(mask))) | (source & mask)) | 283 | #define ACPI_INSERT_BITS(target, mask, source) target = ((target & (~(mask))) | (source & mask)) |
284 | 284 | ||
285 | /* | 285 | /* |
286 | * A struct acpi_namespace_node can appear in some contexts | 286 | * An object of type struct acpi_namespace_node can appear in some contexts |
287 | * where a pointer to a union acpi_operand_object can also | 287 | * where a pointer to an object of type union acpi_operand_object can also |
288 | * appear. This macro is used to distinguish them. | 288 | * appear. This macro is used to distinguish them. |
289 | * | 289 | * |
290 | * The "Descriptor" field is the first field in both structures. | 290 | * The "Descriptor" field is the first field in both structures. |
diff --git a/drivers/acpi/acpica/acobject.h b/drivers/acpi/acpica/acobject.h index c065078ca83b..364a1303fb8f 100644 --- a/drivers/acpi/acpica/acobject.h +++ b/drivers/acpi/acpica/acobject.h | |||
@@ -113,8 +113,8 @@ struct acpi_object_integer { | |||
113 | }; | 113 | }; |
114 | 114 | ||
115 | /* | 115 | /* |
116 | * Note: The String and Buffer object must be identical through the Pointer | 116 | * Note: The String and Buffer object must be identical through the |
117 | * and length elements. There is code that depends on this. | 117 | * pointer and length elements. There is code that depends on this. |
118 | * | 118 | * |
119 | * Fields common to both Strings and Buffers | 119 | * Fields common to both Strings and Buffers |
120 | */ | 120 | */ |
@@ -206,8 +206,7 @@ struct acpi_object_method { | |||
206 | * Common fields for objects that support ASL notifications | 206 | * Common fields for objects that support ASL notifications |
207 | */ | 207 | */ |
208 | #define ACPI_COMMON_NOTIFY_INFO \ | 208 | #define ACPI_COMMON_NOTIFY_INFO \ |
209 | union acpi_operand_object *system_notify; /* Handler for system notifies */\ | 209 | union acpi_operand_object *notify_list[2]; /* Handlers for system/device notifies */\ |
210 | union acpi_operand_object *device_notify; /* Handler for driver notifies */\ | ||
211 | union acpi_operand_object *handler; /* Handler for Address space */ | 210 | union acpi_operand_object *handler; /* Handler for Address space */ |
212 | 211 | ||
213 | struct acpi_object_notify_common { /* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */ | 212 | struct acpi_object_notify_common { /* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */ |
@@ -296,10 +295,10 @@ struct acpi_object_buffer_field { | |||
296 | 295 | ||
297 | struct acpi_object_notify_handler { | 296 | struct acpi_object_notify_handler { |
298 | ACPI_OBJECT_COMMON_HEADER struct acpi_namespace_node *node; /* Parent device */ | 297 | ACPI_OBJECT_COMMON_HEADER struct acpi_namespace_node *node; /* Parent device */ |
299 | u32 handler_type; | 298 | u32 handler_type; /* Type: Device/System/Both */ |
300 | acpi_notify_handler handler; | 299 | acpi_notify_handler handler; /* Handler address */ |
301 | void *context; | 300 | void *context; |
302 | struct acpi_object_notify_handler *next; | 301 | union acpi_operand_object *next[2]; /* Device and System handler lists */ |
303 | }; | 302 | }; |
304 | 303 | ||
305 | struct acpi_object_addr_handler { | 304 | struct acpi_object_addr_handler { |
@@ -382,7 +381,7 @@ struct acpi_object_cache_list { | |||
382 | 381 | ||
383 | /****************************************************************************** | 382 | /****************************************************************************** |
384 | * | 383 | * |
385 | * union acpi_operand_object Descriptor - a giant union of all of the above | 384 | * union acpi_operand_object descriptor - a giant union of all of the above |
386 | * | 385 | * |
387 | *****************************************************************************/ | 386 | *****************************************************************************/ |
388 | 387 | ||
diff --git a/drivers/acpi/acpica/acpredef.h b/drivers/acpi/acpica/acpredef.h index bbb34c9be4e8..3080c017f5ba 100644 --- a/drivers/acpi/acpica/acpredef.h +++ b/drivers/acpi/acpica/acpredef.h | |||
@@ -140,7 +140,7 @@ enum acpi_return_package_types { | |||
140 | * | 140 | * |
141 | * The main entries in the table each contain the following items: | 141 | * The main entries in the table each contain the following items: |
142 | * | 142 | * |
143 | * Name - The ACPI reserved name | 143 | * name - The ACPI reserved name |
144 | * param_count - Number of arguments to the method | 144 | * param_count - Number of arguments to the method |
145 | * expected_btypes - Allowed type(s) for the return value. | 145 | * expected_btypes - Allowed type(s) for the return value. |
146 | * 0 means that no return value is expected. | 146 | * 0 means that no return value is expected. |
@@ -511,14 +511,14 @@ static const union acpi_predefined_info predefined_names[] = | |||
511 | {{"_TMP", 0, ACPI_RTYPE_INTEGER}}, | 511 | {{"_TMP", 0, ACPI_RTYPE_INTEGER}}, |
512 | {{"_TPC", 0, ACPI_RTYPE_INTEGER}}, | 512 | {{"_TPC", 0, ACPI_RTYPE_INTEGER}}, |
513 | {{"_TPT", 1, 0}}, | 513 | {{"_TPT", 1, 0}}, |
514 | {{"_TRT", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Pkgs) each 2_ref/6_int */ | 514 | {{"_TRT", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Pkgs) each 2 Ref/6 Int */ |
515 | {{{ACPI_PTYPE2, ACPI_RTYPE_REFERENCE, 2, ACPI_RTYPE_INTEGER}, 6, 0}}, | 515 | {{{ACPI_PTYPE2, ACPI_RTYPE_REFERENCE, 2, ACPI_RTYPE_INTEGER}, 6, 0}}, |
516 | 516 | ||
517 | {{"_TSD", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Pkgs) each 5_int with count */ | 517 | {{"_TSD", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Pkgs) each 5 Int with count */ |
518 | {{{ACPI_PTYPE2_COUNT,ACPI_RTYPE_INTEGER, 5,0}, 0,0}}, | 518 | {{{ACPI_PTYPE2_COUNT,ACPI_RTYPE_INTEGER, 5,0}, 0,0}}, |
519 | 519 | ||
520 | {{"_TSP", 0, ACPI_RTYPE_INTEGER}}, | 520 | {{"_TSP", 0, ACPI_RTYPE_INTEGER}}, |
521 | {{"_TSS", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Pkgs) each 5_int */ | 521 | {{"_TSS", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Pkgs) each 5 Int */ |
522 | {{{ACPI_PTYPE2, ACPI_RTYPE_INTEGER, 5,0}, 0,0}}, | 522 | {{{ACPI_PTYPE2, ACPI_RTYPE_INTEGER, 5,0}, 0,0}}, |
523 | 523 | ||
524 | {{"_TST", 0, ACPI_RTYPE_INTEGER}}, | 524 | {{"_TST", 0, ACPI_RTYPE_INTEGER}}, |
diff --git a/drivers/acpi/acpica/acstruct.h b/drivers/acpi/acpica/acstruct.h index 0404df605bc1..f196e2c9a71f 100644 --- a/drivers/acpi/acpica/acstruct.h +++ b/drivers/acpi/acpica/acstruct.h | |||
@@ -68,7 +68,7 @@ | |||
68 | #define ACPI_WALK_METHOD 0x01 | 68 | #define ACPI_WALK_METHOD 0x01 |
69 | #define ACPI_WALK_METHOD_RESTART 0x02 | 69 | #define ACPI_WALK_METHOD_RESTART 0x02 |
70 | 70 | ||
71 | /* Flags for i_aSL compiler only */ | 71 | /* Flags for iASL compiler only */ |
72 | 72 | ||
73 | #define ACPI_WALK_CONST_REQUIRED 0x10 | 73 | #define ACPI_WALK_CONST_REQUIRED 0x10 |
74 | #define ACPI_WALK_CONST_OPTIONAL 0x20 | 74 | #define ACPI_WALK_CONST_OPTIONAL 0x20 |
diff --git a/drivers/acpi/acpica/acutils.h b/drivers/acpi/acpica/acutils.h index 925ccf22101b..5035327ebccc 100644 --- a/drivers/acpi/acpica/acutils.h +++ b/drivers/acpi/acpica/acutils.h | |||
@@ -460,6 +460,8 @@ acpi_ut_short_divide(u64 in_dividend, | |||
460 | /* | 460 | /* |
461 | * utmisc | 461 | * utmisc |
462 | */ | 462 | */ |
463 | void ut_convert_backslashes(char *pathname); | ||
464 | |||
463 | const char *acpi_ut_validate_exception(acpi_status status); | 465 | const char *acpi_ut_validate_exception(acpi_status status); |
464 | 466 | ||
465 | u8 acpi_ut_is_pci_root_bridge(char *id); | 467 | u8 acpi_ut_is_pci_root_bridge(char *id); |
diff --git a/drivers/acpi/acpica/amlcode.h b/drivers/acpi/acpica/amlcode.h index 905280fec0fa..c26f8ff6c3b9 100644 --- a/drivers/acpi/acpica/amlcode.h +++ b/drivers/acpi/acpica/amlcode.h | |||
@@ -182,7 +182,7 @@ | |||
182 | 182 | ||
183 | /* | 183 | /* |
184 | * Combination opcodes (actually two one-byte opcodes) | 184 | * Combination opcodes (actually two one-byte opcodes) |
185 | * Used by the disassembler and i_aSL compiler | 185 | * Used by the disassembler and iASL compiler |
186 | */ | 186 | */ |
187 | #define AML_LGREATEREQUAL_OP (u16) 0x9295 | 187 | #define AML_LGREATEREQUAL_OP (u16) 0x9295 |
188 | #define AML_LLESSEQUAL_OP (u16) 0x9294 | 188 | #define AML_LLESSEQUAL_OP (u16) 0x9294 |
@@ -280,7 +280,7 @@ | |||
280 | 280 | ||
281 | /* Multiple/complex types */ | 281 | /* Multiple/complex types */ |
282 | 282 | ||
283 | #define ARGI_DATAOBJECT 0x12 /* Buffer, String, package or reference to a Node - Used only by size_of operator */ | 283 | #define ARGI_DATAOBJECT 0x12 /* Buffer, String, package or reference to a node - Used only by size_of operator */ |
284 | #define ARGI_COMPLEXOBJ 0x13 /* Buffer, String, or package (Used by INDEX op only) */ | 284 | #define ARGI_COMPLEXOBJ 0x13 /* Buffer, String, or package (Used by INDEX op only) */ |
285 | #define ARGI_REF_OR_STRING 0x14 /* Reference or String (Used by DEREFOF op only) */ | 285 | #define ARGI_REF_OR_STRING 0x14 /* Reference or String (Used by DEREFOF op only) */ |
286 | #define ARGI_REGION_OR_BUFFER 0x15 /* Used by LOAD op only */ | 286 | #define ARGI_REGION_OR_BUFFER 0x15 /* Used by LOAD op only */ |
diff --git a/drivers/acpi/acpica/amlresrc.h b/drivers/acpi/acpica/amlresrc.h index 7b2128f274e7..af4947956ec2 100644 --- a/drivers/acpi/acpica/amlresrc.h +++ b/drivers/acpi/acpica/amlresrc.h | |||
@@ -98,7 +98,7 @@ | |||
98 | #define ACPI_RESTAG_TRANSLATION "_TRA" | 98 | #define ACPI_RESTAG_TRANSLATION "_TRA" |
99 | #define ACPI_RESTAG_TRANSTYPE "_TRS" /* Sparse(1), Dense(0) */ | 99 | #define ACPI_RESTAG_TRANSTYPE "_TRS" /* Sparse(1), Dense(0) */ |
100 | #define ACPI_RESTAG_TYPE "_TTP" /* Translation(1), Static (0) */ | 100 | #define ACPI_RESTAG_TYPE "_TTP" /* Translation(1), Static (0) */ |
101 | #define ACPI_RESTAG_XFERTYPE "_SIZ" /* 8(0), 8_and16(1), 16(2) */ | 101 | #define ACPI_RESTAG_XFERTYPE "_SIZ" /* 8(0), 8And16(1), 16(2) */ |
102 | #define ACPI_RESTAG_VENDORDATA "_VEN" | 102 | #define ACPI_RESTAG_VENDORDATA "_VEN" |
103 | 103 | ||
104 | /* Default sizes for "small" resource descriptors */ | 104 | /* Default sizes for "small" resource descriptors */ |
@@ -235,7 +235,7 @@ AML_RESOURCE_LARGE_HEADER_COMMON AML_RESOURCE_ADDRESS_COMMON}; | |||
235 | 235 | ||
236 | struct aml_resource_extended_address64 { | 236 | struct aml_resource_extended_address64 { |
237 | AML_RESOURCE_LARGE_HEADER_COMMON | 237 | AML_RESOURCE_LARGE_HEADER_COMMON |
238 | AML_RESOURCE_ADDRESS_COMMON u8 revision_iD; | 238 | AML_RESOURCE_ADDRESS_COMMON u8 revision_ID; |
239 | u8 reserved; | 239 | u8 reserved; |
240 | u64 granularity; | 240 | u64 granularity; |
241 | u64 minimum; | 241 | u64 minimum; |
diff --git a/drivers/acpi/acpica/dsargs.c b/drivers/acpi/acpica/dsargs.c index 80eb1900297f..c8b5e2565b98 100644 --- a/drivers/acpi/acpica/dsargs.c +++ b/drivers/acpi/acpica/dsargs.c | |||
@@ -62,7 +62,7 @@ acpi_ds_execute_arguments(struct acpi_namespace_node *node, | |||
62 | * | 62 | * |
63 | * FUNCTION: acpi_ds_execute_arguments | 63 | * FUNCTION: acpi_ds_execute_arguments |
64 | * | 64 | * |
65 | * PARAMETERS: Node - Object NS node | 65 | * PARAMETERS: node - Object NS node |
66 | * scope_node - Parent NS node | 66 | * scope_node - Parent NS node |
67 | * aml_length - Length of executable AML | 67 | * aml_length - Length of executable AML |
68 | * aml_start - Pointer to the AML | 68 | * aml_start - Pointer to the AML |
diff --git a/drivers/acpi/acpica/dscontrol.c b/drivers/acpi/acpica/dscontrol.c index effe4ca1133f..465f02134b89 100644 --- a/drivers/acpi/acpica/dscontrol.c +++ b/drivers/acpi/acpica/dscontrol.c | |||
@@ -56,7 +56,7 @@ ACPI_MODULE_NAME("dscontrol") | |||
56 | * FUNCTION: acpi_ds_exec_begin_control_op | 56 | * FUNCTION: acpi_ds_exec_begin_control_op |
57 | * | 57 | * |
58 | * PARAMETERS: walk_list - The list that owns the walk stack | 58 | * PARAMETERS: walk_list - The list that owns the walk stack |
59 | * Op - The control Op | 59 | * op - The control Op |
60 | * | 60 | * |
61 | * RETURN: Status | 61 | * RETURN: Status |
62 | * | 62 | * |
@@ -153,7 +153,7 @@ acpi_ds_exec_begin_control_op(struct acpi_walk_state *walk_state, | |||
153 | * FUNCTION: acpi_ds_exec_end_control_op | 153 | * FUNCTION: acpi_ds_exec_end_control_op |
154 | * | 154 | * |
155 | * PARAMETERS: walk_list - The list that owns the walk stack | 155 | * PARAMETERS: walk_list - The list that owns the walk stack |
156 | * Op - The control Op | 156 | * op - The control Op |
157 | * | 157 | * |
158 | * RETURN: Status | 158 | * RETURN: Status |
159 | * | 159 | * |
diff --git a/drivers/acpi/acpica/dsfield.c b/drivers/acpi/acpica/dsfield.c index cd243cf2cab2..3da6fd8530c5 100644 --- a/drivers/acpi/acpica/dsfield.c +++ b/drivers/acpi/acpica/dsfield.c | |||
@@ -53,16 +53,84 @@ | |||
53 | ACPI_MODULE_NAME("dsfield") | 53 | ACPI_MODULE_NAME("dsfield") |
54 | 54 | ||
55 | /* Local prototypes */ | 55 | /* Local prototypes */ |
56 | #ifdef ACPI_ASL_COMPILER | ||
57 | #include "acdisasm.h" | ||
58 | static acpi_status | ||
59 | acpi_ds_create_external_region(acpi_status lookup_status, | ||
60 | union acpi_parse_object *op, | ||
61 | char *path, | ||
62 | struct acpi_walk_state *walk_state, | ||
63 | struct acpi_namespace_node **node); | ||
64 | #endif | ||
65 | |||
56 | static acpi_status | 66 | static acpi_status |
57 | acpi_ds_get_field_names(struct acpi_create_field_info *info, | 67 | acpi_ds_get_field_names(struct acpi_create_field_info *info, |
58 | struct acpi_walk_state *walk_state, | 68 | struct acpi_walk_state *walk_state, |
59 | union acpi_parse_object *arg); | 69 | union acpi_parse_object *arg); |
60 | 70 | ||
71 | #ifdef ACPI_ASL_COMPILER | ||
72 | /******************************************************************************* | ||
73 | * | ||
74 | * FUNCTION: acpi_ds_create_external_region (iASL Disassembler only) | ||
75 | * | ||
76 | * PARAMETERS: lookup_status - Status from ns_lookup operation | ||
77 | * op - Op containing the Field definition and args | ||
78 | * path - Pathname of the region | ||
79 | * ` walk_state - Current method state | ||
80 | * node - Where the new region node is returned | ||
81 | * | ||
82 | * RETURN: Status | ||
83 | * | ||
84 | * DESCRIPTION: Add region to the external list if NOT_FOUND. Create a new | ||
85 | * region node/object. | ||
86 | * | ||
87 | ******************************************************************************/ | ||
88 | |||
89 | static acpi_status | ||
90 | acpi_ds_create_external_region(acpi_status lookup_status, | ||
91 | union acpi_parse_object *op, | ||
92 | char *path, | ||
93 | struct acpi_walk_state *walk_state, | ||
94 | struct acpi_namespace_node **node) | ||
95 | { | ||
96 | acpi_status status; | ||
97 | union acpi_operand_object *obj_desc; | ||
98 | |||
99 | if (lookup_status != AE_NOT_FOUND) { | ||
100 | return (lookup_status); | ||
101 | } | ||
102 | |||
103 | /* | ||
104 | * Table disassembly: | ||
105 | * operation_region not found. Generate an External for it, and | ||
106 | * insert the name into the namespace. | ||
107 | */ | ||
108 | acpi_dm_add_to_external_list(op, path, ACPI_TYPE_REGION, 0); | ||
109 | status = acpi_ns_lookup(walk_state->scope_info, path, ACPI_TYPE_REGION, | ||
110 | ACPI_IMODE_LOAD_PASS1, ACPI_NS_SEARCH_PARENT, | ||
111 | walk_state, node); | ||
112 | if (ACPI_FAILURE(status)) { | ||
113 | return (status); | ||
114 | } | ||
115 | |||
116 | /* Must create and install a region object for the new node */ | ||
117 | |||
118 | obj_desc = acpi_ut_create_internal_object(ACPI_TYPE_REGION); | ||
119 | if (!obj_desc) { | ||
120 | return (AE_NO_MEMORY); | ||
121 | } | ||
122 | |||
123 | obj_desc->region.node = *node; | ||
124 | status = acpi_ns_attach_object(*node, obj_desc, ACPI_TYPE_REGION); | ||
125 | return (status); | ||
126 | } | ||
127 | #endif | ||
128 | |||
61 | /******************************************************************************* | 129 | /******************************************************************************* |
62 | * | 130 | * |
63 | * FUNCTION: acpi_ds_create_buffer_field | 131 | * FUNCTION: acpi_ds_create_buffer_field |
64 | * | 132 | * |
65 | * PARAMETERS: Op - Current parse op (create_xXField) | 133 | * PARAMETERS: op - Current parse op (create_XXField) |
66 | * walk_state - Current state | 134 | * walk_state - Current state |
67 | * | 135 | * |
68 | * RETURN: Status | 136 | * RETURN: Status |
@@ -99,7 +167,7 @@ acpi_ds_create_buffer_field(union acpi_parse_object *op, | |||
99 | 167 | ||
100 | arg = acpi_ps_get_arg(op, 3); | 168 | arg = acpi_ps_get_arg(op, 3); |
101 | } else { | 169 | } else { |
102 | /* For all other create_xXXField operators, name is the 3rd argument */ | 170 | /* For all other create_XXXField operators, name is the 3rd argument */ |
103 | 171 | ||
104 | arg = acpi_ps_get_arg(op, 2); | 172 | arg = acpi_ps_get_arg(op, 2); |
105 | } | 173 | } |
@@ -203,9 +271,9 @@ acpi_ds_create_buffer_field(union acpi_parse_object *op, | |||
203 | * | 271 | * |
204 | * FUNCTION: acpi_ds_get_field_names | 272 | * FUNCTION: acpi_ds_get_field_names |
205 | * | 273 | * |
206 | * PARAMETERS: Info - create_field info structure | 274 | * PARAMETERS: info - create_field info structure |
207 | * ` walk_state - Current method state | 275 | * ` walk_state - Current method state |
208 | * Arg - First parser arg for the field name list | 276 | * arg - First parser arg for the field name list |
209 | * | 277 | * |
210 | * RETURN: Status | 278 | * RETURN: Status |
211 | * | 279 | * |
@@ -234,10 +302,10 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info, | |||
234 | while (arg) { | 302 | while (arg) { |
235 | /* | 303 | /* |
236 | * Four types of field elements are handled: | 304 | * Four types of field elements are handled: |
237 | * 1) Name - Enters a new named field into the namespace | 305 | * 1) name - Enters a new named field into the namespace |
238 | * 2) Offset - specifies a bit offset | 306 | * 2) offset - specifies a bit offset |
239 | * 3) access_as - changes the access mode/attributes | 307 | * 3) access_as - changes the access mode/attributes |
240 | * 4) Connection - Associate a resource template with the field | 308 | * 4) connection - Associate a resource template with the field |
241 | */ | 309 | */ |
242 | switch (arg->common.aml_opcode) { | 310 | switch (arg->common.aml_opcode) { |
243 | case AML_INT_RESERVEDFIELD_OP: | 311 | case AML_INT_RESERVEDFIELD_OP: |
@@ -389,7 +457,7 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info, | |||
389 | * | 457 | * |
390 | * FUNCTION: acpi_ds_create_field | 458 | * FUNCTION: acpi_ds_create_field |
391 | * | 459 | * |
392 | * PARAMETERS: Op - Op containing the Field definition and args | 460 | * PARAMETERS: op - Op containing the Field definition and args |
393 | * region_node - Object for the containing Operation Region | 461 | * region_node - Object for the containing Operation Region |
394 | * ` walk_state - Current method state | 462 | * ` walk_state - Current method state |
395 | * | 463 | * |
@@ -413,12 +481,19 @@ acpi_ds_create_field(union acpi_parse_object *op, | |||
413 | /* First arg is the name of the parent op_region (must already exist) */ | 481 | /* First arg is the name of the parent op_region (must already exist) */ |
414 | 482 | ||
415 | arg = op->common.value.arg; | 483 | arg = op->common.value.arg; |
484 | |||
416 | if (!region_node) { | 485 | if (!region_node) { |
417 | status = | 486 | status = |
418 | acpi_ns_lookup(walk_state->scope_info, | 487 | acpi_ns_lookup(walk_state->scope_info, |
419 | arg->common.value.name, ACPI_TYPE_REGION, | 488 | arg->common.value.name, ACPI_TYPE_REGION, |
420 | ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT, | 489 | ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT, |
421 | walk_state, ®ion_node); | 490 | walk_state, ®ion_node); |
491 | #ifdef ACPI_ASL_COMPILER | ||
492 | status = acpi_ds_create_external_region(status, arg, | ||
493 | arg->common.value.name, | ||
494 | walk_state, | ||
495 | ®ion_node); | ||
496 | #endif | ||
422 | if (ACPI_FAILURE(status)) { | 497 | if (ACPI_FAILURE(status)) { |
423 | ACPI_ERROR_NAMESPACE(arg->common.value.name, status); | 498 | ACPI_ERROR_NAMESPACE(arg->common.value.name, status); |
424 | return_ACPI_STATUS(status); | 499 | return_ACPI_STATUS(status); |
@@ -446,7 +521,7 @@ acpi_ds_create_field(union acpi_parse_object *op, | |||
446 | * | 521 | * |
447 | * FUNCTION: acpi_ds_init_field_objects | 522 | * FUNCTION: acpi_ds_init_field_objects |
448 | * | 523 | * |
449 | * PARAMETERS: Op - Op containing the Field definition and args | 524 | * PARAMETERS: op - Op containing the Field definition and args |
450 | * ` walk_state - Current method state | 525 | * ` walk_state - Current method state |
451 | * | 526 | * |
452 | * RETURN: Status | 527 | * RETURN: Status |
@@ -561,7 +636,7 @@ acpi_ds_init_field_objects(union acpi_parse_object *op, | |||
561 | * | 636 | * |
562 | * FUNCTION: acpi_ds_create_bank_field | 637 | * FUNCTION: acpi_ds_create_bank_field |
563 | * | 638 | * |
564 | * PARAMETERS: Op - Op containing the Field definition and args | 639 | * PARAMETERS: op - Op containing the Field definition and args |
565 | * region_node - Object for the containing Operation Region | 640 | * region_node - Object for the containing Operation Region |
566 | * walk_state - Current method state | 641 | * walk_state - Current method state |
567 | * | 642 | * |
@@ -591,6 +666,12 @@ acpi_ds_create_bank_field(union acpi_parse_object *op, | |||
591 | arg->common.value.name, ACPI_TYPE_REGION, | 666 | arg->common.value.name, ACPI_TYPE_REGION, |
592 | ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT, | 667 | ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT, |
593 | walk_state, ®ion_node); | 668 | walk_state, ®ion_node); |
669 | #ifdef ACPI_ASL_COMPILER | ||
670 | status = acpi_ds_create_external_region(status, arg, | ||
671 | arg->common.value.name, | ||
672 | walk_state, | ||
673 | ®ion_node); | ||
674 | #endif | ||
594 | if (ACPI_FAILURE(status)) { | 675 | if (ACPI_FAILURE(status)) { |
595 | ACPI_ERROR_NAMESPACE(arg->common.value.name, status); | 676 | ACPI_ERROR_NAMESPACE(arg->common.value.name, status); |
596 | return_ACPI_STATUS(status); | 677 | return_ACPI_STATUS(status); |
@@ -645,7 +726,7 @@ acpi_ds_create_bank_field(union acpi_parse_object *op, | |||
645 | * | 726 | * |
646 | * FUNCTION: acpi_ds_create_index_field | 727 | * FUNCTION: acpi_ds_create_index_field |
647 | * | 728 | * |
648 | * PARAMETERS: Op - Op containing the Field definition and args | 729 | * PARAMETERS: op - Op containing the Field definition and args |
649 | * region_node - Object for the containing Operation Region | 730 | * region_node - Object for the containing Operation Region |
650 | * ` walk_state - Current method state | 731 | * ` walk_state - Current method state |
651 | * | 732 | * |
diff --git a/drivers/acpi/acpica/dsinit.c b/drivers/acpi/acpica/dsinit.c index 9e5ac7f780a7..87eff701ecfa 100644 --- a/drivers/acpi/acpica/dsinit.c +++ b/drivers/acpi/acpica/dsinit.c | |||
@@ -60,8 +60,8 @@ acpi_ds_init_one_object(acpi_handle obj_handle, | |||
60 | * FUNCTION: acpi_ds_init_one_object | 60 | * FUNCTION: acpi_ds_init_one_object |
61 | * | 61 | * |
62 | * PARAMETERS: obj_handle - Node for the object | 62 | * PARAMETERS: obj_handle - Node for the object |
63 | * Level - Current nesting level | 63 | * level - Current nesting level |
64 | * Context - Points to a init info struct | 64 | * context - Points to a init info struct |
65 | * return_value - Not used | 65 | * return_value - Not used |
66 | * | 66 | * |
67 | * RETURN: Status | 67 | * RETURN: Status |
diff --git a/drivers/acpi/acpica/dsmethod.c b/drivers/acpi/acpica/dsmethod.c index 00f5dab5bcc0..aa9a5d4e4052 100644 --- a/drivers/acpi/acpica/dsmethod.c +++ b/drivers/acpi/acpica/dsmethod.c | |||
@@ -61,7 +61,7 @@ acpi_ds_create_method_mutex(union acpi_operand_object *method_desc); | |||
61 | * | 61 | * |
62 | * FUNCTION: acpi_ds_method_error | 62 | * FUNCTION: acpi_ds_method_error |
63 | * | 63 | * |
64 | * PARAMETERS: Status - Execution status | 64 | * PARAMETERS: status - Execution status |
65 | * walk_state - Current state | 65 | * walk_state - Current state |
66 | * | 66 | * |
67 | * RETURN: Status | 67 | * RETURN: Status |
@@ -306,9 +306,9 @@ acpi_ds_begin_method_execution(struct acpi_namespace_node *method_node, | |||
306 | * | 306 | * |
307 | * FUNCTION: acpi_ds_call_control_method | 307 | * FUNCTION: acpi_ds_call_control_method |
308 | * | 308 | * |
309 | * PARAMETERS: Thread - Info for this thread | 309 | * PARAMETERS: thread - Info for this thread |
310 | * this_walk_state - Current walk state | 310 | * this_walk_state - Current walk state |
311 | * Op - Current Op to be walked | 311 | * op - Current Op to be walked |
312 | * | 312 | * |
313 | * RETURN: Status | 313 | * RETURN: Status |
314 | * | 314 | * |
diff --git a/drivers/acpi/acpica/dsmthdat.c b/drivers/acpi/acpica/dsmthdat.c index b40bd507be5d..8d55cebaa656 100644 --- a/drivers/acpi/acpica/dsmthdat.c +++ b/drivers/acpi/acpica/dsmthdat.c | |||
@@ -177,7 +177,7 @@ void acpi_ds_method_data_delete_all(struct acpi_walk_state *walk_state) | |||
177 | * | 177 | * |
178 | * FUNCTION: acpi_ds_method_data_init_args | 178 | * FUNCTION: acpi_ds_method_data_init_args |
179 | * | 179 | * |
180 | * PARAMETERS: *Params - Pointer to a parameter list for the method | 180 | * PARAMETERS: *params - Pointer to a parameter list for the method |
181 | * max_param_count - The arg count for this method | 181 | * max_param_count - The arg count for this method |
182 | * walk_state - Current walk state object | 182 | * walk_state - Current walk state object |
183 | * | 183 | * |
@@ -232,11 +232,11 @@ acpi_ds_method_data_init_args(union acpi_operand_object **params, | |||
232 | * | 232 | * |
233 | * FUNCTION: acpi_ds_method_data_get_node | 233 | * FUNCTION: acpi_ds_method_data_get_node |
234 | * | 234 | * |
235 | * PARAMETERS: Type - Either ACPI_REFCLASS_LOCAL or | 235 | * PARAMETERS: type - Either ACPI_REFCLASS_LOCAL or |
236 | * ACPI_REFCLASS_ARG | 236 | * ACPI_REFCLASS_ARG |
237 | * Index - Which Local or Arg whose type to get | 237 | * index - Which Local or Arg whose type to get |
238 | * walk_state - Current walk state object | 238 | * walk_state - Current walk state object |
239 | * Node - Where the node is returned. | 239 | * node - Where the node is returned. |
240 | * | 240 | * |
241 | * RETURN: Status and node | 241 | * RETURN: Status and node |
242 | * | 242 | * |
@@ -296,10 +296,10 @@ acpi_ds_method_data_get_node(u8 type, | |||
296 | * | 296 | * |
297 | * FUNCTION: acpi_ds_method_data_set_value | 297 | * FUNCTION: acpi_ds_method_data_set_value |
298 | * | 298 | * |
299 | * PARAMETERS: Type - Either ACPI_REFCLASS_LOCAL or | 299 | * PARAMETERS: type - Either ACPI_REFCLASS_LOCAL or |
300 | * ACPI_REFCLASS_ARG | 300 | * ACPI_REFCLASS_ARG |
301 | * Index - Which Local or Arg to get | 301 | * index - Which Local or Arg to get |
302 | * Object - Object to be inserted into the stack entry | 302 | * object - Object to be inserted into the stack entry |
303 | * walk_state - Current walk state object | 303 | * walk_state - Current walk state object |
304 | * | 304 | * |
305 | * RETURN: Status | 305 | * RETURN: Status |
@@ -336,7 +336,7 @@ acpi_ds_method_data_set_value(u8 type, | |||
336 | * Increment ref count so object can't be deleted while installed. | 336 | * Increment ref count so object can't be deleted while installed. |
337 | * NOTE: We do not copy the object in order to preserve the call by | 337 | * NOTE: We do not copy the object in order to preserve the call by |
338 | * reference semantics of ACPI Control Method invocation. | 338 | * reference semantics of ACPI Control Method invocation. |
339 | * (See ACPI Specification 2.0_c) | 339 | * (See ACPI Specification 2.0C) |
340 | */ | 340 | */ |
341 | acpi_ut_add_reference(object); | 341 | acpi_ut_add_reference(object); |
342 | 342 | ||
@@ -350,9 +350,9 @@ acpi_ds_method_data_set_value(u8 type, | |||
350 | * | 350 | * |
351 | * FUNCTION: acpi_ds_method_data_get_value | 351 | * FUNCTION: acpi_ds_method_data_get_value |
352 | * | 352 | * |
353 | * PARAMETERS: Type - Either ACPI_REFCLASS_LOCAL or | 353 | * PARAMETERS: type - Either ACPI_REFCLASS_LOCAL or |
354 | * ACPI_REFCLASS_ARG | 354 | * ACPI_REFCLASS_ARG |
355 | * Index - Which local_var or argument to get | 355 | * index - Which localVar or argument to get |
356 | * walk_state - Current walk state object | 356 | * walk_state - Current walk state object |
357 | * dest_desc - Where Arg or Local value is returned | 357 | * dest_desc - Where Arg or Local value is returned |
358 | * | 358 | * |
@@ -458,9 +458,9 @@ acpi_ds_method_data_get_value(u8 type, | |||
458 | * | 458 | * |
459 | * FUNCTION: acpi_ds_method_data_delete_value | 459 | * FUNCTION: acpi_ds_method_data_delete_value |
460 | * | 460 | * |
461 | * PARAMETERS: Type - Either ACPI_REFCLASS_LOCAL or | 461 | * PARAMETERS: type - Either ACPI_REFCLASS_LOCAL or |
462 | * ACPI_REFCLASS_ARG | 462 | * ACPI_REFCLASS_ARG |
463 | * Index - Which local_var or argument to delete | 463 | * index - Which localVar or argument to delete |
464 | * walk_state - Current walk state object | 464 | * walk_state - Current walk state object |
465 | * | 465 | * |
466 | * RETURN: None | 466 | * RETURN: None |
@@ -515,9 +515,9 @@ acpi_ds_method_data_delete_value(u8 type, | |||
515 | * | 515 | * |
516 | * FUNCTION: acpi_ds_store_object_to_local | 516 | * FUNCTION: acpi_ds_store_object_to_local |
517 | * | 517 | * |
518 | * PARAMETERS: Type - Either ACPI_REFCLASS_LOCAL or | 518 | * PARAMETERS: type - Either ACPI_REFCLASS_LOCAL or |
519 | * ACPI_REFCLASS_ARG | 519 | * ACPI_REFCLASS_ARG |
520 | * Index - Which Local or Arg to set | 520 | * index - Which Local or Arg to set |
521 | * obj_desc - Value to be stored | 521 | * obj_desc - Value to be stored |
522 | * walk_state - Current walk state | 522 | * walk_state - Current walk state |
523 | * | 523 | * |
@@ -670,8 +670,8 @@ acpi_ds_store_object_to_local(u8 type, | |||
670 | * | 670 | * |
671 | * FUNCTION: acpi_ds_method_data_get_type | 671 | * FUNCTION: acpi_ds_method_data_get_type |
672 | * | 672 | * |
673 | * PARAMETERS: Opcode - Either AML_LOCAL_OP or AML_ARG_OP | 673 | * PARAMETERS: opcode - Either AML_LOCAL_OP or AML_ARG_OP |
674 | * Index - Which Local or Arg whose type to get | 674 | * index - Which Local or Arg whose type to get |
675 | * walk_state - Current walk state object | 675 | * walk_state - Current walk state object |
676 | * | 676 | * |
677 | * RETURN: Data type of current value of the selected Arg or Local | 677 | * RETURN: Data type of current value of the selected Arg or Local |
diff --git a/drivers/acpi/acpica/dsobject.c b/drivers/acpi/acpica/dsobject.c index d7045ca3e32a..68592dd34960 100644 --- a/drivers/acpi/acpica/dsobject.c +++ b/drivers/acpi/acpica/dsobject.c | |||
@@ -64,7 +64,7 @@ acpi_ds_build_internal_object(struct acpi_walk_state *walk_state, | |||
64 | * FUNCTION: acpi_ds_build_internal_object | 64 | * FUNCTION: acpi_ds_build_internal_object |
65 | * | 65 | * |
66 | * PARAMETERS: walk_state - Current walk state | 66 | * PARAMETERS: walk_state - Current walk state |
67 | * Op - Parser object to be translated | 67 | * op - Parser object to be translated |
68 | * obj_desc_ptr - Where the ACPI internal object is returned | 68 | * obj_desc_ptr - Where the ACPI internal object is returned |
69 | * | 69 | * |
70 | * RETURN: Status | 70 | * RETURN: Status |
@@ -250,7 +250,7 @@ acpi_ds_build_internal_object(struct acpi_walk_state *walk_state, | |||
250 | * FUNCTION: acpi_ds_build_internal_buffer_obj | 250 | * FUNCTION: acpi_ds_build_internal_buffer_obj |
251 | * | 251 | * |
252 | * PARAMETERS: walk_state - Current walk state | 252 | * PARAMETERS: walk_state - Current walk state |
253 | * Op - Parser object to be translated | 253 | * op - Parser object to be translated |
254 | * buffer_length - Length of the buffer | 254 | * buffer_length - Length of the buffer |
255 | * obj_desc_ptr - Where the ACPI internal object is returned | 255 | * obj_desc_ptr - Where the ACPI internal object is returned |
256 | * | 256 | * |
@@ -354,7 +354,7 @@ acpi_ds_build_internal_buffer_obj(struct acpi_walk_state *walk_state, | |||
354 | * FUNCTION: acpi_ds_build_internal_package_obj | 354 | * FUNCTION: acpi_ds_build_internal_package_obj |
355 | * | 355 | * |
356 | * PARAMETERS: walk_state - Current walk state | 356 | * PARAMETERS: walk_state - Current walk state |
357 | * Op - Parser object to be translated | 357 | * op - Parser object to be translated |
358 | * element_count - Number of elements in the package - this is | 358 | * element_count - Number of elements in the package - this is |
359 | * the num_elements argument to Package() | 359 | * the num_elements argument to Package() |
360 | * obj_desc_ptr - Where the ACPI internal object is returned | 360 | * obj_desc_ptr - Where the ACPI internal object is returned |
@@ -547,8 +547,8 @@ acpi_ds_build_internal_package_obj(struct acpi_walk_state *walk_state, | |||
547 | * FUNCTION: acpi_ds_create_node | 547 | * FUNCTION: acpi_ds_create_node |
548 | * | 548 | * |
549 | * PARAMETERS: walk_state - Current walk state | 549 | * PARAMETERS: walk_state - Current walk state |
550 | * Node - NS Node to be initialized | 550 | * node - NS Node to be initialized |
551 | * Op - Parser object to be translated | 551 | * op - Parser object to be translated |
552 | * | 552 | * |
553 | * RETURN: Status | 553 | * RETURN: Status |
554 | * | 554 | * |
@@ -611,8 +611,8 @@ acpi_ds_create_node(struct acpi_walk_state *walk_state, | |||
611 | * FUNCTION: acpi_ds_init_object_from_op | 611 | * FUNCTION: acpi_ds_init_object_from_op |
612 | * | 612 | * |
613 | * PARAMETERS: walk_state - Current walk state | 613 | * PARAMETERS: walk_state - Current walk state |
614 | * Op - Parser op used to init the internal object | 614 | * op - Parser op used to init the internal object |
615 | * Opcode - AML opcode associated with the object | 615 | * opcode - AML opcode associated with the object |
616 | * ret_obj_desc - Namespace object to be initialized | 616 | * ret_obj_desc - Namespace object to be initialized |
617 | * | 617 | * |
618 | * RETURN: Status | 618 | * RETURN: Status |
diff --git a/drivers/acpi/acpica/dsopcode.c b/drivers/acpi/acpica/dsopcode.c index e5eff7585102..aa34d8984d34 100644 --- a/drivers/acpi/acpica/dsopcode.c +++ b/drivers/acpi/acpica/dsopcode.c | |||
@@ -286,7 +286,7 @@ acpi_ds_init_buffer_field(u16 aml_opcode, | |||
286 | * FUNCTION: acpi_ds_eval_buffer_field_operands | 286 | * FUNCTION: acpi_ds_eval_buffer_field_operands |
287 | * | 287 | * |
288 | * PARAMETERS: walk_state - Current walk | 288 | * PARAMETERS: walk_state - Current walk |
289 | * Op - A valid buffer_field Op object | 289 | * op - A valid buffer_field Op object |
290 | * | 290 | * |
291 | * RETURN: Status | 291 | * RETURN: Status |
292 | * | 292 | * |
@@ -370,7 +370,7 @@ acpi_ds_eval_buffer_field_operands(struct acpi_walk_state *walk_state, | |||
370 | * FUNCTION: acpi_ds_eval_region_operands | 370 | * FUNCTION: acpi_ds_eval_region_operands |
371 | * | 371 | * |
372 | * PARAMETERS: walk_state - Current walk | 372 | * PARAMETERS: walk_state - Current walk |
373 | * Op - A valid region Op object | 373 | * op - A valid region Op object |
374 | * | 374 | * |
375 | * RETURN: Status | 375 | * RETURN: Status |
376 | * | 376 | * |
@@ -397,7 +397,7 @@ acpi_ds_eval_region_operands(struct acpi_walk_state *walk_state, | |||
397 | */ | 397 | */ |
398 | node = op->common.node; | 398 | node = op->common.node; |
399 | 399 | ||
400 | /* next_op points to the op that holds the space_iD */ | 400 | /* next_op points to the op that holds the space_ID */ |
401 | 401 | ||
402 | next_op = op->common.value.arg; | 402 | next_op = op->common.value.arg; |
403 | 403 | ||
@@ -461,7 +461,7 @@ acpi_ds_eval_region_operands(struct acpi_walk_state *walk_state, | |||
461 | * FUNCTION: acpi_ds_eval_table_region_operands | 461 | * FUNCTION: acpi_ds_eval_table_region_operands |
462 | * | 462 | * |
463 | * PARAMETERS: walk_state - Current walk | 463 | * PARAMETERS: walk_state - Current walk |
464 | * Op - A valid region Op object | 464 | * op - A valid region Op object |
465 | * | 465 | * |
466 | * RETURN: Status | 466 | * RETURN: Status |
467 | * | 467 | * |
@@ -560,7 +560,7 @@ acpi_ds_eval_table_region_operands(struct acpi_walk_state *walk_state, | |||
560 | * FUNCTION: acpi_ds_eval_data_object_operands | 560 | * FUNCTION: acpi_ds_eval_data_object_operands |
561 | * | 561 | * |
562 | * PARAMETERS: walk_state - Current walk | 562 | * PARAMETERS: walk_state - Current walk |
563 | * Op - A valid data_object Op object | 563 | * op - A valid data_object Op object |
564 | * obj_desc - data_object | 564 | * obj_desc - data_object |
565 | * | 565 | * |
566 | * RETURN: Status | 566 | * RETURN: Status |
@@ -662,7 +662,7 @@ acpi_ds_eval_data_object_operands(struct acpi_walk_state *walk_state, | |||
662 | * FUNCTION: acpi_ds_eval_bank_field_operands | 662 | * FUNCTION: acpi_ds_eval_bank_field_operands |
663 | * | 663 | * |
664 | * PARAMETERS: walk_state - Current walk | 664 | * PARAMETERS: walk_state - Current walk |
665 | * Op - A valid bank_field Op object | 665 | * op - A valid bank_field Op object |
666 | * | 666 | * |
667 | * RETURN: Status | 667 | * RETURN: Status |
668 | * | 668 | * |
diff --git a/drivers/acpi/acpica/dsutils.c b/drivers/acpi/acpica/dsutils.c index 1abcda31037f..73a5447475f5 100644 --- a/drivers/acpi/acpica/dsutils.c +++ b/drivers/acpi/acpica/dsutils.c | |||
@@ -157,7 +157,7 @@ acpi_ds_do_implicit_return(union acpi_operand_object *return_desc, | |||
157 | * | 157 | * |
158 | * FUNCTION: acpi_ds_is_result_used | 158 | * FUNCTION: acpi_ds_is_result_used |
159 | * | 159 | * |
160 | * PARAMETERS: Op - Current Op | 160 | * PARAMETERS: op - Current Op |
161 | * walk_state - Current State | 161 | * walk_state - Current State |
162 | * | 162 | * |
163 | * RETURN: TRUE if result is used, FALSE otherwise | 163 | * RETURN: TRUE if result is used, FALSE otherwise |
@@ -323,7 +323,7 @@ acpi_ds_is_result_used(union acpi_parse_object * op, | |||
323 | * | 323 | * |
324 | * FUNCTION: acpi_ds_delete_result_if_not_used | 324 | * FUNCTION: acpi_ds_delete_result_if_not_used |
325 | * | 325 | * |
326 | * PARAMETERS: Op - Current parse Op | 326 | * PARAMETERS: op - Current parse Op |
327 | * result_obj - Result of the operation | 327 | * result_obj - Result of the operation |
328 | * walk_state - Current state | 328 | * walk_state - Current state |
329 | * | 329 | * |
@@ -445,7 +445,7 @@ void acpi_ds_clear_operands(struct acpi_walk_state *walk_state) | |||
445 | * FUNCTION: acpi_ds_create_operand | 445 | * FUNCTION: acpi_ds_create_operand |
446 | * | 446 | * |
447 | * PARAMETERS: walk_state - Current walk state | 447 | * PARAMETERS: walk_state - Current walk state |
448 | * Arg - Parse object for the argument | 448 | * arg - Parse object for the argument |
449 | * arg_index - Which argument (zero based) | 449 | * arg_index - Which argument (zero based) |
450 | * | 450 | * |
451 | * RETURN: Status | 451 | * RETURN: Status |
diff --git a/drivers/acpi/acpica/dswscope.c b/drivers/acpi/acpica/dswscope.c index 9e9490a9cbf0..f6c4295470ae 100644 --- a/drivers/acpi/acpica/dswscope.c +++ b/drivers/acpi/acpica/dswscope.c | |||
@@ -85,8 +85,8 @@ void acpi_ds_scope_stack_clear(struct acpi_walk_state *walk_state) | |||
85 | * | 85 | * |
86 | * FUNCTION: acpi_ds_scope_stack_push | 86 | * FUNCTION: acpi_ds_scope_stack_push |
87 | * | 87 | * |
88 | * PARAMETERS: Node - Name to be made current | 88 | * PARAMETERS: node - Name to be made current |
89 | * Type - Type of frame being pushed | 89 | * type - Type of frame being pushed |
90 | * walk_state - Current state | 90 | * walk_state - Current state |
91 | * | 91 | * |
92 | * RETURN: Status | 92 | * RETURN: Status |
diff --git a/drivers/acpi/acpica/dswstate.c b/drivers/acpi/acpica/dswstate.c index c9c2ac13e7cc..d0e6555061e4 100644 --- a/drivers/acpi/acpica/dswstate.c +++ b/drivers/acpi/acpica/dswstate.c | |||
@@ -58,7 +58,7 @@ static acpi_status acpi_ds_result_stack_pop(struct acpi_walk_state *ws); | |||
58 | * | 58 | * |
59 | * FUNCTION: acpi_ds_result_pop | 59 | * FUNCTION: acpi_ds_result_pop |
60 | * | 60 | * |
61 | * PARAMETERS: Object - Where to return the popped object | 61 | * PARAMETERS: object - Where to return the popped object |
62 | * walk_state - Current Walk state | 62 | * walk_state - Current Walk state |
63 | * | 63 | * |
64 | * RETURN: Status | 64 | * RETURN: Status |
@@ -132,7 +132,7 @@ acpi_ds_result_pop(union acpi_operand_object **object, | |||
132 | * | 132 | * |
133 | * FUNCTION: acpi_ds_result_push | 133 | * FUNCTION: acpi_ds_result_push |
134 | * | 134 | * |
135 | * PARAMETERS: Object - Where to return the popped object | 135 | * PARAMETERS: object - Where to return the popped object |
136 | * walk_state - Current Walk state | 136 | * walk_state - Current Walk state |
137 | * | 137 | * |
138 | * RETURN: Status | 138 | * RETURN: Status |
@@ -296,7 +296,7 @@ static acpi_status acpi_ds_result_stack_pop(struct acpi_walk_state *walk_state) | |||
296 | * | 296 | * |
297 | * FUNCTION: acpi_ds_obj_stack_push | 297 | * FUNCTION: acpi_ds_obj_stack_push |
298 | * | 298 | * |
299 | * PARAMETERS: Object - Object to push | 299 | * PARAMETERS: object - Object to push |
300 | * walk_state - Current Walk state | 300 | * walk_state - Current Walk state |
301 | * | 301 | * |
302 | * RETURN: Status | 302 | * RETURN: Status |
@@ -433,7 +433,7 @@ acpi_ds_obj_stack_pop_and_delete(u32 pop_count, | |||
433 | * | 433 | * |
434 | * FUNCTION: acpi_ds_get_current_walk_state | 434 | * FUNCTION: acpi_ds_get_current_walk_state |
435 | * | 435 | * |
436 | * PARAMETERS: Thread - Get current active state for this Thread | 436 | * PARAMETERS: thread - Get current active state for this Thread |
437 | * | 437 | * |
438 | * RETURN: Pointer to the current walk state | 438 | * RETURN: Pointer to the current walk state |
439 | * | 439 | * |
@@ -462,7 +462,7 @@ struct acpi_walk_state *acpi_ds_get_current_walk_state(struct acpi_thread_state | |||
462 | * FUNCTION: acpi_ds_push_walk_state | 462 | * FUNCTION: acpi_ds_push_walk_state |
463 | * | 463 | * |
464 | * PARAMETERS: walk_state - State to push | 464 | * PARAMETERS: walk_state - State to push |
465 | * Thread - Thread state object | 465 | * thread - Thread state object |
466 | * | 466 | * |
467 | * RETURN: None | 467 | * RETURN: None |
468 | * | 468 | * |
@@ -486,7 +486,7 @@ acpi_ds_push_walk_state(struct acpi_walk_state *walk_state, | |||
486 | * | 486 | * |
487 | * FUNCTION: acpi_ds_pop_walk_state | 487 | * FUNCTION: acpi_ds_pop_walk_state |
488 | * | 488 | * |
489 | * PARAMETERS: Thread - Current thread state | 489 | * PARAMETERS: thread - Current thread state |
490 | * | 490 | * |
491 | * RETURN: A walk_state object popped from the thread's stack | 491 | * RETURN: A walk_state object popped from the thread's stack |
492 | * | 492 | * |
@@ -525,9 +525,9 @@ struct acpi_walk_state *acpi_ds_pop_walk_state(struct acpi_thread_state *thread) | |||
525 | * FUNCTION: acpi_ds_create_walk_state | 525 | * FUNCTION: acpi_ds_create_walk_state |
526 | * | 526 | * |
527 | * PARAMETERS: owner_id - ID for object creation | 527 | * PARAMETERS: owner_id - ID for object creation |
528 | * Origin - Starting point for this walk | 528 | * origin - Starting point for this walk |
529 | * method_desc - Method object | 529 | * method_desc - Method object |
530 | * Thread - Current thread state | 530 | * thread - Current thread state |
531 | * | 531 | * |
532 | * RETURN: Pointer to the new walk state. | 532 | * RETURN: Pointer to the new walk state. |
533 | * | 533 | * |
@@ -578,11 +578,11 @@ struct acpi_walk_state *acpi_ds_create_walk_state(acpi_owner_id owner_id, union | |||
578 | * FUNCTION: acpi_ds_init_aml_walk | 578 | * FUNCTION: acpi_ds_init_aml_walk |
579 | * | 579 | * |
580 | * PARAMETERS: walk_state - New state to be initialized | 580 | * PARAMETERS: walk_state - New state to be initialized |
581 | * Op - Current parse op | 581 | * op - Current parse op |
582 | * method_node - Control method NS node, if any | 582 | * method_node - Control method NS node, if any |
583 | * aml_start - Start of AML | 583 | * aml_start - Start of AML |
584 | * aml_length - Length of AML | 584 | * aml_length - Length of AML |
585 | * Info - Method info block (params, etc.) | 585 | * info - Method info block (params, etc.) |
586 | * pass_number - 1, 2, or 3 | 586 | * pass_number - 1, 2, or 3 |
587 | * | 587 | * |
588 | * RETURN: Status | 588 | * RETURN: Status |
diff --git a/drivers/acpi/acpica/evevent.c b/drivers/acpi/acpica/evevent.c index 07e4dc44f81c..d4acfbbe5b29 100644 --- a/drivers/acpi/acpica/evevent.c +++ b/drivers/acpi/acpica/evevent.c | |||
@@ -251,7 +251,7 @@ u32 acpi_ev_fixed_event_detect(void) | |||
251 | * | 251 | * |
252 | * FUNCTION: acpi_ev_fixed_event_dispatch | 252 | * FUNCTION: acpi_ev_fixed_event_dispatch |
253 | * | 253 | * |
254 | * PARAMETERS: Event - Event type | 254 | * PARAMETERS: event - Event type |
255 | * | 255 | * |
256 | * RETURN: INTERRUPT_HANDLED or INTERRUPT_NOT_HANDLED | 256 | * RETURN: INTERRUPT_HANDLED or INTERRUPT_NOT_HANDLED |
257 | * | 257 | * |
diff --git a/drivers/acpi/acpica/evglock.c b/drivers/acpi/acpica/evglock.c index cfeab38795d8..af14a7137632 100644 --- a/drivers/acpi/acpica/evglock.c +++ b/drivers/acpi/acpica/evglock.c | |||
@@ -135,7 +135,7 @@ acpi_status acpi_ev_remove_global_lock_handler(void) | |||
135 | * | 135 | * |
136 | * FUNCTION: acpi_ev_global_lock_handler | 136 | * FUNCTION: acpi_ev_global_lock_handler |
137 | * | 137 | * |
138 | * PARAMETERS: Context - From thread interface, not used | 138 | * PARAMETERS: context - From thread interface, not used |
139 | * | 139 | * |
140 | * RETURN: ACPI_INTERRUPT_HANDLED | 140 | * RETURN: ACPI_INTERRUPT_HANDLED |
141 | * | 141 | * |
@@ -182,7 +182,7 @@ static u32 acpi_ev_global_lock_handler(void *context) | |||
182 | * | 182 | * |
183 | * FUNCTION: acpi_ev_acquire_global_lock | 183 | * FUNCTION: acpi_ev_acquire_global_lock |
184 | * | 184 | * |
185 | * PARAMETERS: Timeout - Max time to wait for the lock, in millisec. | 185 | * PARAMETERS: timeout - Max time to wait for the lock, in millisec. |
186 | * | 186 | * |
187 | * RETURN: Status | 187 | * RETURN: Status |
188 | * | 188 | * |
diff --git a/drivers/acpi/acpica/evgpe.c b/drivers/acpi/acpica/evgpe.c index 8ba0e5f17091..afbd5cb391f6 100644 --- a/drivers/acpi/acpica/evgpe.c +++ b/drivers/acpi/acpica/evgpe.c | |||
@@ -466,7 +466,7 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context) | |||
466 | acpi_status status; | 466 | acpi_status status; |
467 | struct acpi_gpe_event_info *local_gpe_event_info; | 467 | struct acpi_gpe_event_info *local_gpe_event_info; |
468 | struct acpi_evaluate_info *info; | 468 | struct acpi_evaluate_info *info; |
469 | struct acpi_gpe_notify_object *notify_object; | 469 | struct acpi_gpe_notify_info *notify; |
470 | 470 | ||
471 | ACPI_FUNCTION_TRACE(ev_asynch_execute_gpe_method); | 471 | ACPI_FUNCTION_TRACE(ev_asynch_execute_gpe_method); |
472 | 472 | ||
@@ -517,17 +517,17 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context) | |||
517 | * completes. The notify handlers are NOT invoked synchronously | 517 | * completes. The notify handlers are NOT invoked synchronously |
518 | * from this thread -- because handlers may in turn run other | 518 | * from this thread -- because handlers may in turn run other |
519 | * control methods. | 519 | * control methods. |
520 | * | ||
521 | * June 2012: Expand implicit notify mechanism to support | ||
522 | * notifies on multiple device objects. | ||
520 | */ | 523 | */ |
521 | status = acpi_ev_queue_notify_request( | 524 | notify = local_gpe_event_info->dispatch.notify_list; |
522 | local_gpe_event_info->dispatch.device.node, | 525 | while (ACPI_SUCCESS(status) && notify) { |
523 | ACPI_NOTIFY_DEVICE_WAKE); | 526 | status = |
524 | 527 | acpi_ev_queue_notify_request(notify->device_node, | |
525 | notify_object = local_gpe_event_info->dispatch.device.next; | 528 | ACPI_NOTIFY_DEVICE_WAKE); |
526 | while (ACPI_SUCCESS(status) && notify_object) { | 529 | |
527 | status = acpi_ev_queue_notify_request( | 530 | notify = notify->next; |
528 | notify_object->node, | ||
529 | ACPI_NOTIFY_DEVICE_WAKE); | ||
530 | notify_object = notify_object->next; | ||
531 | } | 531 | } |
532 | 532 | ||
533 | break; | 533 | break; |
diff --git a/drivers/acpi/acpica/evgpeblk.c b/drivers/acpi/acpica/evgpeblk.c index 23a3ca86b2eb..8cf4c104c7b7 100644 --- a/drivers/acpi/acpica/evgpeblk.c +++ b/drivers/acpi/acpica/evgpeblk.c | |||
@@ -318,7 +318,7 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block) | |||
318 | * FUNCTION: acpi_ev_create_gpe_block | 318 | * FUNCTION: acpi_ev_create_gpe_block |
319 | * | 319 | * |
320 | * PARAMETERS: gpe_device - Handle to the parent GPE block | 320 | * PARAMETERS: gpe_device - Handle to the parent GPE block |
321 | * gpe_block_address - Address and space_iD | 321 | * gpe_block_address - Address and space_ID |
322 | * register_count - Number of GPE register pairs in the block | 322 | * register_count - Number of GPE register pairs in the block |
323 | * gpe_block_base_number - Starting GPE number for the block | 323 | * gpe_block_base_number - Starting GPE number for the block |
324 | * interrupt_number - H/W interrupt for the block | 324 | * interrupt_number - H/W interrupt for the block |
diff --git a/drivers/acpi/acpica/evgpeutil.c b/drivers/acpi/acpica/evgpeutil.c index 3c43796b8361..cb50dd91bc18 100644 --- a/drivers/acpi/acpica/evgpeutil.c +++ b/drivers/acpi/acpica/evgpeutil.c | |||
@@ -54,7 +54,7 @@ ACPI_MODULE_NAME("evgpeutil") | |||
54 | * FUNCTION: acpi_ev_walk_gpe_list | 54 | * FUNCTION: acpi_ev_walk_gpe_list |
55 | * | 55 | * |
56 | * PARAMETERS: gpe_walk_callback - Routine called for each GPE block | 56 | * PARAMETERS: gpe_walk_callback - Routine called for each GPE block |
57 | * Context - Value passed to callback | 57 | * context - Value passed to callback |
58 | * | 58 | * |
59 | * RETURN: Status | 59 | * RETURN: Status |
60 | * | 60 | * |
@@ -347,6 +347,8 @@ acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info, | |||
347 | void *context) | 347 | void *context) |
348 | { | 348 | { |
349 | struct acpi_gpe_event_info *gpe_event_info; | 349 | struct acpi_gpe_event_info *gpe_event_info; |
350 | struct acpi_gpe_notify_info *notify; | ||
351 | struct acpi_gpe_notify_info *next; | ||
350 | u32 i; | 352 | u32 i; |
351 | u32 j; | 353 | u32 j; |
352 | 354 | ||
@@ -365,10 +367,28 @@ acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info, | |||
365 | 367 | ||
366 | if ((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) == | 368 | if ((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) == |
367 | ACPI_GPE_DISPATCH_HANDLER) { | 369 | ACPI_GPE_DISPATCH_HANDLER) { |
370 | |||
371 | /* Delete an installed handler block */ | ||
372 | |||
368 | ACPI_FREE(gpe_event_info->dispatch.handler); | 373 | ACPI_FREE(gpe_event_info->dispatch.handler); |
369 | gpe_event_info->dispatch.handler = NULL; | 374 | gpe_event_info->dispatch.handler = NULL; |
370 | gpe_event_info->flags &= | 375 | gpe_event_info->flags &= |
371 | ~ACPI_GPE_DISPATCH_MASK; | 376 | ~ACPI_GPE_DISPATCH_MASK; |
377 | } else if ((gpe_event_info-> | ||
378 | flags & ACPI_GPE_DISPATCH_MASK) == | ||
379 | ACPI_GPE_DISPATCH_NOTIFY) { | ||
380 | |||
381 | /* Delete the implicit notification device list */ | ||
382 | |||
383 | notify = gpe_event_info->dispatch.notify_list; | ||
384 | while (notify) { | ||
385 | next = notify->next; | ||
386 | ACPI_FREE(notify); | ||
387 | notify = next; | ||
388 | } | ||
389 | gpe_event_info->dispatch.notify_list = NULL; | ||
390 | gpe_event_info->flags &= | ||
391 | ~ACPI_GPE_DISPATCH_MASK; | ||
372 | } | 392 | } |
373 | } | 393 | } |
374 | } | 394 | } |
diff --git a/drivers/acpi/acpica/evmisc.c b/drivers/acpi/acpica/evmisc.c index 51ef9f5e002d..51f537937c1f 100644 --- a/drivers/acpi/acpica/evmisc.c +++ b/drivers/acpi/acpica/evmisc.c | |||
@@ -56,7 +56,7 @@ static void ACPI_SYSTEM_XFACE acpi_ev_notify_dispatch(void *context); | |||
56 | * | 56 | * |
57 | * FUNCTION: acpi_ev_is_notify_object | 57 | * FUNCTION: acpi_ev_is_notify_object |
58 | * | 58 | * |
59 | * PARAMETERS: Node - Node to check | 59 | * PARAMETERS: node - Node to check |
60 | * | 60 | * |
61 | * RETURN: TRUE if notifies allowed on this object | 61 | * RETURN: TRUE if notifies allowed on this object |
62 | * | 62 | * |
@@ -86,7 +86,7 @@ u8 acpi_ev_is_notify_object(struct acpi_namespace_node *node) | |||
86 | * | 86 | * |
87 | * FUNCTION: acpi_ev_queue_notify_request | 87 | * FUNCTION: acpi_ev_queue_notify_request |
88 | * | 88 | * |
89 | * PARAMETERS: Node - NS node for the notified object | 89 | * PARAMETERS: node - NS node for the notified object |
90 | * notify_value - Value from the Notify() request | 90 | * notify_value - Value from the Notify() request |
91 | * | 91 | * |
92 | * RETURN: Status | 92 | * RETURN: Status |
@@ -101,102 +101,77 @@ acpi_ev_queue_notify_request(struct acpi_namespace_node * node, | |||
101 | u32 notify_value) | 101 | u32 notify_value) |
102 | { | 102 | { |
103 | union acpi_operand_object *obj_desc; | 103 | union acpi_operand_object *obj_desc; |
104 | union acpi_operand_object *handler_obj = NULL; | 104 | union acpi_operand_object *handler_list_head = NULL; |
105 | union acpi_generic_state *notify_info; | 105 | union acpi_generic_state *info; |
106 | u8 handler_list_id = 0; | ||
106 | acpi_status status = AE_OK; | 107 | acpi_status status = AE_OK; |
107 | 108 | ||
108 | ACPI_FUNCTION_NAME(ev_queue_notify_request); | 109 | ACPI_FUNCTION_NAME(ev_queue_notify_request); |
109 | 110 | ||
110 | /* | 111 | /* Are Notifies allowed on this object? */ |
111 | * For value 0x03 (Ejection Request), may need to run a device method. | ||
112 | * For value 0x02 (Device Wake), if _PRW exists, may need to run | ||
113 | * the _PS0 method. | ||
114 | * For value 0x80 (Status Change) on the power button or sleep button, | ||
115 | * initiate soft-off or sleep operation. | ||
116 | * | ||
117 | * For all cases, simply dispatch the notify to the handler. | ||
118 | */ | ||
119 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | ||
120 | "Dispatching Notify on [%4.4s] (%s) Value 0x%2.2X (%s) Node %p\n", | ||
121 | acpi_ut_get_node_name(node), | ||
122 | acpi_ut_get_type_name(node->type), notify_value, | ||
123 | acpi_ut_get_notify_name(notify_value), node)); | ||
124 | 112 | ||
125 | /* Get the notify object attached to the NS Node */ | 113 | if (!acpi_ev_is_notify_object(node)) { |
126 | 114 | return (AE_TYPE); | |
127 | obj_desc = acpi_ns_get_attached_object(node); | 115 | } |
128 | if (obj_desc) { | ||
129 | |||
130 | /* We have the notify object, Get the correct handler */ | ||
131 | |||
132 | switch (node->type) { | ||
133 | 116 | ||
134 | /* Notify is allowed only on these types */ | 117 | /* Get the correct notify list type (System or Device) */ |
135 | 118 | ||
136 | case ACPI_TYPE_DEVICE: | 119 | if (notify_value <= ACPI_MAX_SYS_NOTIFY) { |
137 | case ACPI_TYPE_THERMAL: | 120 | handler_list_id = ACPI_SYSTEM_HANDLER_LIST; |
138 | case ACPI_TYPE_PROCESSOR: | 121 | } else { |
122 | handler_list_id = ACPI_DEVICE_HANDLER_LIST; | ||
123 | } | ||
139 | 124 | ||
140 | if (notify_value <= ACPI_MAX_SYS_NOTIFY) { | 125 | /* Get the notify object attached to the namespace Node */ |
141 | handler_obj = | ||
142 | obj_desc->common_notify.system_notify; | ||
143 | } else { | ||
144 | handler_obj = | ||
145 | obj_desc->common_notify.device_notify; | ||
146 | } | ||
147 | break; | ||
148 | 126 | ||
149 | default: | 127 | obj_desc = acpi_ns_get_attached_object(node); |
128 | if (obj_desc) { | ||
150 | 129 | ||
151 | /* All other types are not supported */ | 130 | /* We have an attached object, Get the correct handler list */ |
152 | 131 | ||
153 | return (AE_TYPE); | 132 | handler_list_head = |
154 | } | 133 | obj_desc->common_notify.notify_list[handler_list_id]; |
155 | } | 134 | } |
156 | 135 | ||
157 | /* | 136 | /* |
158 | * If there is a handler to run, schedule the dispatcher. | 137 | * If there is no notify handler (Global or Local) |
159 | * Check for: | 138 | * for this object, just ignore the notify |
160 | * 1) Global system notify handler | ||
161 | * 2) Global device notify handler | ||
162 | * 3) Per-device notify handler | ||
163 | */ | 139 | */ |
164 | if ((acpi_gbl_system_notify.handler && | 140 | if (!acpi_gbl_global_notify[handler_list_id].handler |
165 | (notify_value <= ACPI_MAX_SYS_NOTIFY)) || | 141 | && !handler_list_head) { |
166 | (acpi_gbl_device_notify.handler && | 142 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
167 | (notify_value > ACPI_MAX_SYS_NOTIFY)) || handler_obj) { | 143 | "No notify handler for Notify, ignoring (%4.4s, %X) node %p\n", |
168 | notify_info = acpi_ut_create_generic_state(); | 144 | acpi_ut_get_node_name(node), notify_value, |
169 | if (!notify_info) { | 145 | node)); |
170 | return (AE_NO_MEMORY); | ||
171 | } | ||
172 | 146 | ||
173 | if (!handler_obj) { | 147 | return (AE_OK); |
174 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 148 | } |
175 | "Executing system notify handler for Notify (%4.4s, %X) " | ||
176 | "node %p\n", | ||
177 | acpi_ut_get_node_name(node), | ||
178 | notify_value, node)); | ||
179 | } | ||
180 | 149 | ||
181 | notify_info->common.descriptor_type = | 150 | /* Setup notify info and schedule the notify dispatcher */ |
182 | ACPI_DESC_TYPE_STATE_NOTIFY; | ||
183 | notify_info->notify.node = node; | ||
184 | notify_info->notify.value = (u16) notify_value; | ||
185 | notify_info->notify.handler_obj = handler_obj; | ||
186 | 151 | ||
187 | status = | 152 | info = acpi_ut_create_generic_state(); |
188 | acpi_os_execute(OSL_NOTIFY_HANDLER, acpi_ev_notify_dispatch, | 153 | if (!info) { |
189 | notify_info); | 154 | return (AE_NO_MEMORY); |
190 | if (ACPI_FAILURE(status)) { | 155 | } |
191 | acpi_ut_delete_generic_state(notify_info); | ||
192 | } | ||
193 | } else { | ||
194 | /* There is no notify handler (per-device or system) for this device */ | ||
195 | 156 | ||
196 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 157 | info->common.descriptor_type = ACPI_DESC_TYPE_STATE_NOTIFY; |
197 | "No notify handler for Notify (%4.4s, %X) node %p\n", | 158 | |
198 | acpi_ut_get_node_name(node), notify_value, | 159 | info->notify.node = node; |
199 | node)); | 160 | info->notify.value = (u16)notify_value; |
161 | info->notify.handler_list_id = handler_list_id; | ||
162 | info->notify.handler_list_head = handler_list_head; | ||
163 | info->notify.global = &acpi_gbl_global_notify[handler_list_id]; | ||
164 | |||
165 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | ||
166 | "Dispatching Notify on [%4.4s] (%s) Value 0x%2.2X (%s) Node %p\n", | ||
167 | acpi_ut_get_node_name(node), | ||
168 | acpi_ut_get_type_name(node->type), notify_value, | ||
169 | acpi_ut_get_notify_name(notify_value), node)); | ||
170 | |||
171 | status = acpi_os_execute(OSL_NOTIFY_HANDLER, acpi_ev_notify_dispatch, | ||
172 | info); | ||
173 | if (ACPI_FAILURE(status)) { | ||
174 | acpi_ut_delete_generic_state(info); | ||
200 | } | 175 | } |
201 | 176 | ||
202 | return (status); | 177 | return (status); |
@@ -206,7 +181,7 @@ acpi_ev_queue_notify_request(struct acpi_namespace_node * node, | |||
206 | * | 181 | * |
207 | * FUNCTION: acpi_ev_notify_dispatch | 182 | * FUNCTION: acpi_ev_notify_dispatch |
208 | * | 183 | * |
209 | * PARAMETERS: Context - To be passed to the notify handler | 184 | * PARAMETERS: context - To be passed to the notify handler |
210 | * | 185 | * |
211 | * RETURN: None. | 186 | * RETURN: None. |
212 | * | 187 | * |
@@ -217,60 +192,34 @@ acpi_ev_queue_notify_request(struct acpi_namespace_node * node, | |||
217 | 192 | ||
218 | static void ACPI_SYSTEM_XFACE acpi_ev_notify_dispatch(void *context) | 193 | static void ACPI_SYSTEM_XFACE acpi_ev_notify_dispatch(void *context) |
219 | { | 194 | { |
220 | union acpi_generic_state *notify_info = | 195 | union acpi_generic_state *info = (union acpi_generic_state *)context; |
221 | (union acpi_generic_state *)context; | ||
222 | acpi_notify_handler global_handler = NULL; | ||
223 | void *global_context = NULL; | ||
224 | union acpi_operand_object *handler_obj; | 196 | union acpi_operand_object *handler_obj; |
225 | 197 | ||
226 | ACPI_FUNCTION_ENTRY(); | 198 | ACPI_FUNCTION_ENTRY(); |
227 | 199 | ||
228 | /* | 200 | /* Invoke a global notify handler if installed */ |
229 | * We will invoke a global notify handler if installed. This is done | ||
230 | * _before_ we invoke the per-device handler attached to the device. | ||
231 | */ | ||
232 | if (notify_info->notify.value <= ACPI_MAX_SYS_NOTIFY) { | ||
233 | |||
234 | /* Global system notification handler */ | ||
235 | |||
236 | if (acpi_gbl_system_notify.handler) { | ||
237 | global_handler = acpi_gbl_system_notify.handler; | ||
238 | global_context = acpi_gbl_system_notify.context; | ||
239 | } | ||
240 | } else { | ||
241 | /* Global driver notification handler */ | ||
242 | |||
243 | if (acpi_gbl_device_notify.handler) { | ||
244 | global_handler = acpi_gbl_device_notify.handler; | ||
245 | global_context = acpi_gbl_device_notify.context; | ||
246 | } | ||
247 | } | ||
248 | |||
249 | /* Invoke the system handler first, if present */ | ||
250 | 201 | ||
251 | if (global_handler) { | 202 | if (info->notify.global->handler) { |
252 | global_handler(notify_info->notify.node, | 203 | info->notify.global->handler(info->notify.node, |
253 | notify_info->notify.value, global_context); | 204 | info->notify.value, |
205 | info->notify.global->context); | ||
254 | } | 206 | } |
255 | 207 | ||
256 | /* Now invoke the per-device handler, if present */ | 208 | /* Now invoke the local notify handler(s) if any are installed */ |
257 | 209 | ||
258 | handler_obj = notify_info->notify.handler_obj; | 210 | handler_obj = info->notify.handler_list_head; |
259 | if (handler_obj) { | 211 | while (handler_obj) { |
260 | struct acpi_object_notify_handler *notifier; | 212 | handler_obj->notify.handler(info->notify.node, |
213 | info->notify.value, | ||
214 | handler_obj->notify.context); | ||
261 | 215 | ||
262 | notifier = &handler_obj->notify; | 216 | handler_obj = |
263 | while (notifier) { | 217 | handler_obj->notify.next[info->notify.handler_list_id]; |
264 | notifier->handler(notify_info->notify.node, | ||
265 | notify_info->notify.value, | ||
266 | notifier->context); | ||
267 | notifier = notifier->next; | ||
268 | } | ||
269 | } | 218 | } |
270 | 219 | ||
271 | /* All done with the info object */ | 220 | /* All done with the info object */ |
272 | 221 | ||
273 | acpi_ut_delete_generic_state(notify_info); | 222 | acpi_ut_delete_generic_state(info); |
274 | } | 223 | } |
275 | 224 | ||
276 | #if (!ACPI_REDUCED_HARDWARE) | 225 | #if (!ACPI_REDUCED_HARDWARE) |
diff --git a/drivers/acpi/acpica/evregion.c b/drivers/acpi/acpica/evregion.c index 1b0180a1b798..0cc6a16fedc7 100644 --- a/drivers/acpi/acpica/evregion.c +++ b/drivers/acpi/acpica/evregion.c | |||
@@ -150,7 +150,7 @@ acpi_status acpi_ev_install_region_handlers(void) | |||
150 | * | 150 | * |
151 | * FUNCTION: acpi_ev_has_default_handler | 151 | * FUNCTION: acpi_ev_has_default_handler |
152 | * | 152 | * |
153 | * PARAMETERS: Node - Namespace node for the device | 153 | * PARAMETERS: node - Namespace node for the device |
154 | * space_id - The address space ID | 154 | * space_id - The address space ID |
155 | * | 155 | * |
156 | * RETURN: TRUE if default handler is installed, FALSE otherwise | 156 | * RETURN: TRUE if default handler is installed, FALSE otherwise |
@@ -244,7 +244,7 @@ acpi_status acpi_ev_initialize_op_regions(void) | |||
244 | * FUNCTION: acpi_ev_execute_reg_method | 244 | * FUNCTION: acpi_ev_execute_reg_method |
245 | * | 245 | * |
246 | * PARAMETERS: region_obj - Region object | 246 | * PARAMETERS: region_obj - Region object |
247 | * Function - Passed to _REG: On (1) or Off (0) | 247 | * function - Passed to _REG: On (1) or Off (0) |
248 | * | 248 | * |
249 | * RETURN: Status | 249 | * RETURN: Status |
250 | * | 250 | * |
@@ -286,10 +286,10 @@ acpi_ev_execute_reg_method(union acpi_operand_object *region_obj, u32 function) | |||
286 | /* | 286 | /* |
287 | * The _REG method has two arguments: | 287 | * The _REG method has two arguments: |
288 | * | 288 | * |
289 | * Arg0 - Integer: | 289 | * arg0 - Integer: |
290 | * Operation region space ID Same value as region_obj->Region.space_id | 290 | * Operation region space ID Same value as region_obj->Region.space_id |
291 | * | 291 | * |
292 | * Arg1 - Integer: | 292 | * arg1 - Integer: |
293 | * connection status 1 for connecting the handler, 0 for disconnecting | 293 | * connection status 1 for connecting the handler, 0 for disconnecting |
294 | * the handler (Passed as a parameter) | 294 | * the handler (Passed as a parameter) |
295 | */ | 295 | */ |
@@ -330,10 +330,10 @@ acpi_ev_execute_reg_method(union acpi_operand_object *region_obj, u32 function) | |||
330 | * | 330 | * |
331 | * PARAMETERS: region_obj - Internal region object | 331 | * PARAMETERS: region_obj - Internal region object |
332 | * field_obj - Corresponding field. Can be NULL. | 332 | * field_obj - Corresponding field. Can be NULL. |
333 | * Function - Read or Write operation | 333 | * function - Read or Write operation |
334 | * region_offset - Where in the region to read or write | 334 | * region_offset - Where in the region to read or write |
335 | * bit_width - Field width in bits (8, 16, 32, or 64) | 335 | * bit_width - Field width in bits (8, 16, 32, or 64) |
336 | * Value - Pointer to in or out value, must be | 336 | * value - Pointer to in or out value, must be |
337 | * a full 64-bit integer | 337 | * a full 64-bit integer |
338 | * | 338 | * |
339 | * RETURN: Status | 339 | * RETURN: Status |
@@ -840,11 +840,11 @@ acpi_ev_install_handler(acpi_handle obj_handle, | |||
840 | * | 840 | * |
841 | * FUNCTION: acpi_ev_install_space_handler | 841 | * FUNCTION: acpi_ev_install_space_handler |
842 | * | 842 | * |
843 | * PARAMETERS: Node - Namespace node for the device | 843 | * PARAMETERS: node - Namespace node for the device |
844 | * space_id - The address space ID | 844 | * space_id - The address space ID |
845 | * Handler - Address of the handler | 845 | * handler - Address of the handler |
846 | * Setup - Address of the setup function | 846 | * setup - Address of the setup function |
847 | * Context - Value passed to the handler on each access | 847 | * context - Value passed to the handler on each access |
848 | * | 848 | * |
849 | * RETURN: Status | 849 | * RETURN: Status |
850 | * | 850 | * |
@@ -1061,7 +1061,7 @@ acpi_ev_install_space_handler(struct acpi_namespace_node * node, | |||
1061 | * | 1061 | * |
1062 | * FUNCTION: acpi_ev_execute_reg_methods | 1062 | * FUNCTION: acpi_ev_execute_reg_methods |
1063 | * | 1063 | * |
1064 | * PARAMETERS: Node - Namespace node for the device | 1064 | * PARAMETERS: node - Namespace node for the device |
1065 | * space_id - The address space ID | 1065 | * space_id - The address space ID |
1066 | * | 1066 | * |
1067 | * RETURN: Status | 1067 | * RETURN: Status |
@@ -1104,7 +1104,7 @@ acpi_ev_execute_reg_methods(struct acpi_namespace_node *node, | |||
1104 | * | 1104 | * |
1105 | * PARAMETERS: walk_namespace callback | 1105 | * PARAMETERS: walk_namespace callback |
1106 | * | 1106 | * |
1107 | * DESCRIPTION: Run _REG method for region objects of the requested space_iD | 1107 | * DESCRIPTION: Run _REG method for region objects of the requested spaceID |
1108 | * | 1108 | * |
1109 | ******************************************************************************/ | 1109 | ******************************************************************************/ |
1110 | 1110 | ||
diff --git a/drivers/acpi/acpica/evrgnini.c b/drivers/acpi/acpica/evrgnini.c index 819c17f5897a..4c1c8261166f 100644 --- a/drivers/acpi/acpica/evrgnini.c +++ b/drivers/acpi/acpica/evrgnini.c | |||
@@ -56,8 +56,8 @@ static u8 acpi_ev_is_pci_root_bridge(struct acpi_namespace_node *node); | |||
56 | * | 56 | * |
57 | * FUNCTION: acpi_ev_system_memory_region_setup | 57 | * FUNCTION: acpi_ev_system_memory_region_setup |
58 | * | 58 | * |
59 | * PARAMETERS: Handle - Region we are interested in | 59 | * PARAMETERS: handle - Region we are interested in |
60 | * Function - Start or stop | 60 | * function - Start or stop |
61 | * handler_context - Address space handler context | 61 | * handler_context - Address space handler context |
62 | * region_context - Region specific context | 62 | * region_context - Region specific context |
63 | * | 63 | * |
@@ -118,8 +118,8 @@ acpi_ev_system_memory_region_setup(acpi_handle handle, | |||
118 | * | 118 | * |
119 | * FUNCTION: acpi_ev_io_space_region_setup | 119 | * FUNCTION: acpi_ev_io_space_region_setup |
120 | * | 120 | * |
121 | * PARAMETERS: Handle - Region we are interested in | 121 | * PARAMETERS: handle - Region we are interested in |
122 | * Function - Start or stop | 122 | * function - Start or stop |
123 | * handler_context - Address space handler context | 123 | * handler_context - Address space handler context |
124 | * region_context - Region specific context | 124 | * region_context - Region specific context |
125 | * | 125 | * |
@@ -149,8 +149,8 @@ acpi_ev_io_space_region_setup(acpi_handle handle, | |||
149 | * | 149 | * |
150 | * FUNCTION: acpi_ev_pci_config_region_setup | 150 | * FUNCTION: acpi_ev_pci_config_region_setup |
151 | * | 151 | * |
152 | * PARAMETERS: Handle - Region we are interested in | 152 | * PARAMETERS: handle - Region we are interested in |
153 | * Function - Start or stop | 153 | * function - Start or stop |
154 | * handler_context - Address space handler context | 154 | * handler_context - Address space handler context |
155 | * region_context - Region specific context | 155 | * region_context - Region specific context |
156 | * | 156 | * |
@@ -338,7 +338,7 @@ acpi_ev_pci_config_region_setup(acpi_handle handle, | |||
338 | * | 338 | * |
339 | * FUNCTION: acpi_ev_is_pci_root_bridge | 339 | * FUNCTION: acpi_ev_is_pci_root_bridge |
340 | * | 340 | * |
341 | * PARAMETERS: Node - Device node being examined | 341 | * PARAMETERS: node - Device node being examined |
342 | * | 342 | * |
343 | * RETURN: TRUE if device is a PCI/PCI-Express Root Bridge | 343 | * RETURN: TRUE if device is a PCI/PCI-Express Root Bridge |
344 | * | 344 | * |
@@ -393,14 +393,14 @@ static u8 acpi_ev_is_pci_root_bridge(struct acpi_namespace_node *node) | |||
393 | * | 393 | * |
394 | * FUNCTION: acpi_ev_pci_bar_region_setup | 394 | * FUNCTION: acpi_ev_pci_bar_region_setup |
395 | * | 395 | * |
396 | * PARAMETERS: Handle - Region we are interested in | 396 | * PARAMETERS: handle - Region we are interested in |
397 | * Function - Start or stop | 397 | * function - Start or stop |
398 | * handler_context - Address space handler context | 398 | * handler_context - Address space handler context |
399 | * region_context - Region specific context | 399 | * region_context - Region specific context |
400 | * | 400 | * |
401 | * RETURN: Status | 401 | * RETURN: Status |
402 | * | 402 | * |
403 | * DESCRIPTION: Setup a pci_bAR operation region | 403 | * DESCRIPTION: Setup a pci_BAR operation region |
404 | * | 404 | * |
405 | * MUTEX: Assumes namespace is not locked | 405 | * MUTEX: Assumes namespace is not locked |
406 | * | 406 | * |
@@ -420,8 +420,8 @@ acpi_ev_pci_bar_region_setup(acpi_handle handle, | |||
420 | * | 420 | * |
421 | * FUNCTION: acpi_ev_cmos_region_setup | 421 | * FUNCTION: acpi_ev_cmos_region_setup |
422 | * | 422 | * |
423 | * PARAMETERS: Handle - Region we are interested in | 423 | * PARAMETERS: handle - Region we are interested in |
424 | * Function - Start or stop | 424 | * function - Start or stop |
425 | * handler_context - Address space handler context | 425 | * handler_context - Address space handler context |
426 | * region_context - Region specific context | 426 | * region_context - Region specific context |
427 | * | 427 | * |
@@ -447,8 +447,8 @@ acpi_ev_cmos_region_setup(acpi_handle handle, | |||
447 | * | 447 | * |
448 | * FUNCTION: acpi_ev_default_region_setup | 448 | * FUNCTION: acpi_ev_default_region_setup |
449 | * | 449 | * |
450 | * PARAMETERS: Handle - Region we are interested in | 450 | * PARAMETERS: handle - Region we are interested in |
451 | * Function - Start or stop | 451 | * function - Start or stop |
452 | * handler_context - Address space handler context | 452 | * handler_context - Address space handler context |
453 | * region_context - Region specific context | 453 | * region_context - Region specific context |
454 | * | 454 | * |
diff --git a/drivers/acpi/acpica/evsci.c b/drivers/acpi/acpica/evsci.c index 6a57aa2d70d1..f9661e2b46a9 100644 --- a/drivers/acpi/acpica/evsci.c +++ b/drivers/acpi/acpica/evsci.c | |||
@@ -56,7 +56,7 @@ static u32 ACPI_SYSTEM_XFACE acpi_ev_sci_xrupt_handler(void *context); | |||
56 | * | 56 | * |
57 | * FUNCTION: acpi_ev_sci_xrupt_handler | 57 | * FUNCTION: acpi_ev_sci_xrupt_handler |
58 | * | 58 | * |
59 | * PARAMETERS: Context - Calling Context | 59 | * PARAMETERS: context - Calling Context |
60 | * | 60 | * |
61 | * RETURN: Status code indicates whether interrupt was handled. | 61 | * RETURN: Status code indicates whether interrupt was handled. |
62 | * | 62 | * |
@@ -96,7 +96,7 @@ static u32 ACPI_SYSTEM_XFACE acpi_ev_sci_xrupt_handler(void *context) | |||
96 | * | 96 | * |
97 | * FUNCTION: acpi_ev_gpe_xrupt_handler | 97 | * FUNCTION: acpi_ev_gpe_xrupt_handler |
98 | * | 98 | * |
99 | * PARAMETERS: Context - Calling Context | 99 | * PARAMETERS: context - Calling Context |
100 | * | 100 | * |
101 | * RETURN: Status code indicates whether interrupt was handled. | 101 | * RETURN: Status code indicates whether interrupt was handled. |
102 | * | 102 | * |
diff --git a/drivers/acpi/acpica/evxface.c b/drivers/acpi/acpica/evxface.c index 44bef5744ebb..7587eb6c9584 100644 --- a/drivers/acpi/acpica/evxface.c +++ b/drivers/acpi/acpica/evxface.c | |||
@@ -54,86 +54,25 @@ ACPI_MODULE_NAME("evxface") | |||
54 | 54 | ||
55 | /******************************************************************************* | 55 | /******************************************************************************* |
56 | * | 56 | * |
57 | * FUNCTION: acpi_populate_handler_object | ||
58 | * | ||
59 | * PARAMETERS: handler_obj - Handler object to populate | ||
60 | * handler_type - The type of handler: | ||
61 | * ACPI_SYSTEM_NOTIFY: system_handler (00-7f) | ||
62 | * ACPI_DEVICE_NOTIFY: driver_handler (80-ff) | ||
63 | * ACPI_ALL_NOTIFY: both system and device | ||
64 | * handler - Address of the handler | ||
65 | * context - Value passed to the handler on each GPE | ||
66 | * next - Address of a handler object to link to | ||
67 | * | ||
68 | * RETURN: None | ||
69 | * | ||
70 | * DESCRIPTION: Populate a handler object. | ||
71 | * | ||
72 | ******************************************************************************/ | ||
73 | static void | ||
74 | acpi_populate_handler_object(struct acpi_object_notify_handler *handler_obj, | ||
75 | u32 handler_type, | ||
76 | acpi_notify_handler handler, void *context, | ||
77 | struct acpi_object_notify_handler *next) | ||
78 | { | ||
79 | handler_obj->handler_type = handler_type; | ||
80 | handler_obj->handler = handler; | ||
81 | handler_obj->context = context; | ||
82 | handler_obj->next = next; | ||
83 | } | ||
84 | |||
85 | /******************************************************************************* | ||
86 | * | ||
87 | * FUNCTION: acpi_add_handler_object | ||
88 | * | ||
89 | * PARAMETERS: parent_obj - Parent of the new object | ||
90 | * handler - Address of the handler | ||
91 | * context - Value passed to the handler on each GPE | ||
92 | * | ||
93 | * RETURN: Status | ||
94 | * | ||
95 | * DESCRIPTION: Create a new handler object and populate it. | ||
96 | * | ||
97 | ******************************************************************************/ | ||
98 | static acpi_status | ||
99 | acpi_add_handler_object(struct acpi_object_notify_handler *parent_obj, | ||
100 | acpi_notify_handler handler, void *context) | ||
101 | { | ||
102 | struct acpi_object_notify_handler *handler_obj; | ||
103 | |||
104 | /* The parent must not be a defice notify handler object. */ | ||
105 | if (parent_obj->handler_type & ACPI_DEVICE_NOTIFY) | ||
106 | return AE_BAD_PARAMETER; | ||
107 | |||
108 | handler_obj = ACPI_ALLOCATE_ZEROED(sizeof(*handler_obj)); | ||
109 | if (!handler_obj) | ||
110 | return AE_NO_MEMORY; | ||
111 | |||
112 | acpi_populate_handler_object(handler_obj, | ||
113 | ACPI_SYSTEM_NOTIFY, | ||
114 | handler, context, | ||
115 | parent_obj->next); | ||
116 | parent_obj->next = handler_obj; | ||
117 | |||
118 | return AE_OK; | ||
119 | } | ||
120 | |||
121 | |||
122 | /******************************************************************************* | ||
123 | * | ||
124 | * FUNCTION: acpi_install_notify_handler | 57 | * FUNCTION: acpi_install_notify_handler |
125 | * | 58 | * |
126 | * PARAMETERS: Device - The device for which notifies will be handled | 59 | * PARAMETERS: Device - The device for which notifies will be handled |
127 | * handler_type - The type of handler: | 60 | * handler_type - The type of handler: |
128 | * ACPI_SYSTEM_NOTIFY: system_handler (00-7f) | 61 | * ACPI_SYSTEM_NOTIFY: System Handler (00-7F) |
129 | * ACPI_DEVICE_NOTIFY: driver_handler (80-ff) | 62 | * ACPI_DEVICE_NOTIFY: Device Handler (80-FF) |
130 | * ACPI_ALL_NOTIFY: both system and device | 63 | * ACPI_ALL_NOTIFY: Both System and Device |
131 | * Handler - Address of the handler | 64 | * Handler - Address of the handler |
132 | * Context - Value passed to the handler on each GPE | 65 | * Context - Value passed to the handler on each GPE |
133 | * | 66 | * |
134 | * RETURN: Status | 67 | * RETURN: Status |
135 | * | 68 | * |
136 | * DESCRIPTION: Install a handler for notifies on an ACPI device | 69 | * DESCRIPTION: Install a handler for notifications on an ACPI Device, |
70 | * thermal_zone, or Processor object. | ||
71 | * | ||
72 | * NOTES: The Root namespace object may have only one handler for each | ||
73 | * type of notify (System/Device). Device/Thermal/Processor objects | ||
74 | * may have one device notify handler, and multiple system notify | ||
75 | * handlers. | ||
137 | * | 76 | * |
138 | ******************************************************************************/ | 77 | ******************************************************************************/ |
139 | acpi_status | 78 | acpi_status |
@@ -141,17 +80,19 @@ acpi_install_notify_handler(acpi_handle device, | |||
141 | u32 handler_type, | 80 | u32 handler_type, |
142 | acpi_notify_handler handler, void *context) | 81 | acpi_notify_handler handler, void *context) |
143 | { | 82 | { |
83 | struct acpi_namespace_node *node = | ||
84 | ACPI_CAST_PTR(struct acpi_namespace_node, device); | ||
144 | union acpi_operand_object *obj_desc; | 85 | union acpi_operand_object *obj_desc; |
145 | union acpi_operand_object *notify_obj; | 86 | union acpi_operand_object *handler_obj; |
146 | struct acpi_namespace_node *node; | ||
147 | acpi_status status; | 87 | acpi_status status; |
88 | u32 i; | ||
148 | 89 | ||
149 | ACPI_FUNCTION_TRACE(acpi_install_notify_handler); | 90 | ACPI_FUNCTION_TRACE(acpi_install_notify_handler); |
150 | 91 | ||
151 | /* Parameter validation */ | 92 | /* Parameter validation */ |
152 | 93 | ||
153 | if ((!device) || | 94 | if ((!device) || (!handler) || (!handler_type) || |
154 | (!handler) || (handler_type > ACPI_MAX_NOTIFY_HANDLER_TYPE)) { | 95 | (handler_type > ACPI_MAX_NOTIFY_HANDLER_TYPE)) { |
155 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 96 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
156 | } | 97 | } |
157 | 98 | ||
@@ -160,144 +101,112 @@ acpi_install_notify_handler(acpi_handle device, | |||
160 | return_ACPI_STATUS(status); | 101 | return_ACPI_STATUS(status); |
161 | } | 102 | } |
162 | 103 | ||
163 | /* Convert and validate the device handle */ | ||
164 | |||
165 | node = acpi_ns_validate_handle(device); | ||
166 | if (!node) { | ||
167 | status = AE_BAD_PARAMETER; | ||
168 | goto unlock_and_exit; | ||
169 | } | ||
170 | |||
171 | /* | 104 | /* |
172 | * Root Object: | 105 | * Root Object: |
173 | * Registering a notify handler on the root object indicates that the | 106 | * Registering a notify handler on the root object indicates that the |
174 | * caller wishes to receive notifications for all objects. Note that | 107 | * caller wishes to receive notifications for all objects. Note that |
175 | * only one <external> global handler can be regsitered (per notify type). | 108 | * only one global handler can be registered per notify type. |
109 | * Ensure that a handler is not already installed. | ||
176 | */ | 110 | */ |
177 | if (device == ACPI_ROOT_OBJECT) { | 111 | if (device == ACPI_ROOT_OBJECT) { |
112 | for (i = 0; i < ACPI_NUM_NOTIFY_TYPES; i++) { | ||
113 | if (handler_type & (i + 1)) { | ||
114 | if (acpi_gbl_global_notify[i].handler) { | ||
115 | status = AE_ALREADY_EXISTS; | ||
116 | goto unlock_and_exit; | ||
117 | } | ||
178 | 118 | ||
179 | /* Make sure the handler is not already installed */ | 119 | acpi_gbl_global_notify[i].handler = handler; |
180 | 120 | acpi_gbl_global_notify[i].context = context; | |
181 | if (((handler_type & ACPI_SYSTEM_NOTIFY) && | 121 | } |
182 | acpi_gbl_system_notify.handler) || | ||
183 | ((handler_type & ACPI_DEVICE_NOTIFY) && | ||
184 | acpi_gbl_device_notify.handler)) { | ||
185 | status = AE_ALREADY_EXISTS; | ||
186 | goto unlock_and_exit; | ||
187 | } | ||
188 | |||
189 | if (handler_type & ACPI_SYSTEM_NOTIFY) { | ||
190 | acpi_gbl_system_notify.node = node; | ||
191 | acpi_gbl_system_notify.handler = handler; | ||
192 | acpi_gbl_system_notify.context = context; | ||
193 | } | ||
194 | |||
195 | if (handler_type & ACPI_DEVICE_NOTIFY) { | ||
196 | acpi_gbl_device_notify.node = node; | ||
197 | acpi_gbl_device_notify.handler = handler; | ||
198 | acpi_gbl_device_notify.context = context; | ||
199 | } | 122 | } |
200 | 123 | ||
201 | /* Global notify handler installed */ | 124 | goto unlock_and_exit; /* Global notify handler installed, all done */ |
202 | } | 125 | } |
203 | 126 | ||
204 | /* | 127 | /* |
205 | * All Other Objects: | 128 | * All Other Objects: |
206 | * Caller will only receive notifications specific to the target object. | 129 | * Caller will only receive notifications specific to the target |
207 | * Note that only certain object types can receive notifications. | 130 | * object. Note that only certain object types are allowed to |
131 | * receive notifications. | ||
208 | */ | 132 | */ |
209 | else { | ||
210 | /* Notifies allowed on this object? */ | ||
211 | 133 | ||
212 | if (!acpi_ev_is_notify_object(node)) { | 134 | /* Are Notifies allowed on this object? */ |
213 | status = AE_TYPE; | ||
214 | goto unlock_and_exit; | ||
215 | } | ||
216 | 135 | ||
217 | /* Check for an existing internal object */ | 136 | if (!acpi_ev_is_notify_object(node)) { |
137 | status = AE_TYPE; | ||
138 | goto unlock_and_exit; | ||
139 | } | ||
218 | 140 | ||
219 | obj_desc = acpi_ns_get_attached_object(node); | 141 | /* Check for an existing internal object, might not exist */ |
220 | if (obj_desc) { | ||
221 | 142 | ||
222 | /* Object exists. */ | 143 | obj_desc = acpi_ns_get_attached_object(node); |
144 | if (!obj_desc) { | ||
223 | 145 | ||
224 | /* For a device notify, make sure there's no handler. */ | 146 | /* Create a new object */ |
225 | if ((handler_type & ACPI_DEVICE_NOTIFY) && | ||
226 | obj_desc->common_notify.device_notify) { | ||
227 | status = AE_ALREADY_EXISTS; | ||
228 | goto unlock_and_exit; | ||
229 | } | ||
230 | 147 | ||
231 | /* System notifies may have more handlers installed. */ | 148 | obj_desc = acpi_ut_create_internal_object(node->type); |
232 | notify_obj = obj_desc->common_notify.system_notify; | 149 | if (!obj_desc) { |
150 | status = AE_NO_MEMORY; | ||
151 | goto unlock_and_exit; | ||
152 | } | ||
233 | 153 | ||
234 | if ((handler_type & ACPI_SYSTEM_NOTIFY) && notify_obj) { | 154 | /* Attach new object to the Node, remove local reference */ |
235 | struct acpi_object_notify_handler *parent_obj; | 155 | |
156 | status = acpi_ns_attach_object(device, obj_desc, node->type); | ||
157 | acpi_ut_remove_reference(obj_desc); | ||
158 | if (ACPI_FAILURE(status)) { | ||
159 | goto unlock_and_exit; | ||
160 | } | ||
161 | } | ||
236 | 162 | ||
237 | if (handler_type & ACPI_DEVICE_NOTIFY) { | 163 | /* Ensure that the handler is not already installed in the lists */ |
164 | |||
165 | for (i = 0; i < ACPI_NUM_NOTIFY_TYPES; i++) { | ||
166 | if (handler_type & (i + 1)) { | ||
167 | handler_obj = obj_desc->common_notify.notify_list[i]; | ||
168 | while (handler_obj) { | ||
169 | if (handler_obj->notify.handler == handler) { | ||
238 | status = AE_ALREADY_EXISTS; | 170 | status = AE_ALREADY_EXISTS; |
239 | goto unlock_and_exit; | 171 | goto unlock_and_exit; |
240 | } | 172 | } |
241 | 173 | ||
242 | parent_obj = ¬ify_obj->notify; | 174 | handler_obj = handler_obj->notify.next[i]; |
243 | status = acpi_add_handler_object(parent_obj, | ||
244 | handler, | ||
245 | context); | ||
246 | goto unlock_and_exit; | ||
247 | } | ||
248 | } else { | ||
249 | /* Create a new object */ | ||
250 | |||
251 | obj_desc = acpi_ut_create_internal_object(node->type); | ||
252 | if (!obj_desc) { | ||
253 | status = AE_NO_MEMORY; | ||
254 | goto unlock_and_exit; | ||
255 | } | ||
256 | |||
257 | /* Attach new object to the Node */ | ||
258 | |||
259 | status = | ||
260 | acpi_ns_attach_object(device, obj_desc, node->type); | ||
261 | |||
262 | /* Remove local reference to the object */ | ||
263 | |||
264 | acpi_ut_remove_reference(obj_desc); | ||
265 | if (ACPI_FAILURE(status)) { | ||
266 | goto unlock_and_exit; | ||
267 | } | 175 | } |
268 | } | 176 | } |
177 | } | ||
269 | 178 | ||
270 | /* Install the handler */ | 179 | /* Create and populate a new notify handler object */ |
271 | 180 | ||
272 | notify_obj = | 181 | handler_obj = acpi_ut_create_internal_object(ACPI_TYPE_LOCAL_NOTIFY); |
273 | acpi_ut_create_internal_object(ACPI_TYPE_LOCAL_NOTIFY); | 182 | if (!handler_obj) { |
274 | if (!notify_obj) { | 183 | status = AE_NO_MEMORY; |
275 | status = AE_NO_MEMORY; | 184 | goto unlock_and_exit; |
276 | goto unlock_and_exit; | 185 | } |
277 | } | ||
278 | 186 | ||
279 | acpi_populate_handler_object(¬ify_obj->notify, | 187 | handler_obj->notify.node = node; |
280 | handler_type, | 188 | handler_obj->notify.handler_type = handler_type; |
281 | handler, context, | 189 | handler_obj->notify.handler = handler; |
282 | NULL); | 190 | handler_obj->notify.context = context; |
283 | 191 | ||
284 | if (handler_type & ACPI_SYSTEM_NOTIFY) { | 192 | /* Install the handler at the list head(s) */ |
285 | obj_desc->common_notify.system_notify = notify_obj; | ||
286 | } | ||
287 | 193 | ||
288 | if (handler_type & ACPI_DEVICE_NOTIFY) { | 194 | for (i = 0; i < ACPI_NUM_NOTIFY_TYPES; i++) { |
289 | obj_desc->common_notify.device_notify = notify_obj; | 195 | if (handler_type & (i + 1)) { |
290 | } | 196 | handler_obj->notify.next[i] = |
197 | obj_desc->common_notify.notify_list[i]; | ||
291 | 198 | ||
292 | if (handler_type == ACPI_ALL_NOTIFY) { | 199 | obj_desc->common_notify.notify_list[i] = handler_obj; |
200 | } | ||
201 | } | ||
293 | 202 | ||
294 | /* Extra ref if installed in both */ | 203 | /* Add an extra reference if handler was installed in both lists */ |
295 | 204 | ||
296 | acpi_ut_add_reference(notify_obj); | 205 | if (handler_type == ACPI_ALL_NOTIFY) { |
297 | } | 206 | acpi_ut_add_reference(handler_obj); |
298 | } | 207 | } |
299 | 208 | ||
300 | unlock_and_exit: | 209 | unlock_and_exit: |
301 | (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); | 210 | (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); |
302 | return_ACPI_STATUS(status); | 211 | return_ACPI_STATUS(status); |
303 | } | 212 | } |
@@ -308,11 +217,11 @@ ACPI_EXPORT_SYMBOL(acpi_install_notify_handler) | |||
308 | * | 217 | * |
309 | * FUNCTION: acpi_remove_notify_handler | 218 | * FUNCTION: acpi_remove_notify_handler |
310 | * | 219 | * |
311 | * PARAMETERS: Device - The device for which notifies will be handled | 220 | * PARAMETERS: Device - The device for which the handler is installed |
312 | * handler_type - The type of handler: | 221 | * handler_type - The type of handler: |
313 | * ACPI_SYSTEM_NOTIFY: system_handler (00-7f) | 222 | * ACPI_SYSTEM_NOTIFY: System Handler (00-7F) |
314 | * ACPI_DEVICE_NOTIFY: driver_handler (80-ff) | 223 | * ACPI_DEVICE_NOTIFY: Device Handler (80-FF) |
315 | * ACPI_ALL_NOTIFY: both system and device | 224 | * ACPI_ALL_NOTIFY: Both System and Device |
316 | * Handler - Address of the handler | 225 | * Handler - Address of the handler |
317 | * | 226 | * |
318 | * RETURN: Status | 227 | * RETURN: Status |
@@ -324,165 +233,106 @@ acpi_status | |||
324 | acpi_remove_notify_handler(acpi_handle device, | 233 | acpi_remove_notify_handler(acpi_handle device, |
325 | u32 handler_type, acpi_notify_handler handler) | 234 | u32 handler_type, acpi_notify_handler handler) |
326 | { | 235 | { |
327 | union acpi_operand_object *notify_obj; | 236 | struct acpi_namespace_node *node = |
237 | ACPI_CAST_PTR(struct acpi_namespace_node, device); | ||
328 | union acpi_operand_object *obj_desc; | 238 | union acpi_operand_object *obj_desc; |
329 | struct acpi_namespace_node *node; | 239 | union acpi_operand_object *handler_obj; |
240 | union acpi_operand_object *previous_handler_obj; | ||
330 | acpi_status status; | 241 | acpi_status status; |
242 | u32 i; | ||
331 | 243 | ||
332 | ACPI_FUNCTION_TRACE(acpi_remove_notify_handler); | 244 | ACPI_FUNCTION_TRACE(acpi_remove_notify_handler); |
333 | 245 | ||
334 | /* Parameter validation */ | 246 | /* Parameter validation */ |
335 | 247 | ||
336 | if ((!device) || | 248 | if ((!device) || (!handler) || (!handler_type) || |
337 | (!handler) || (handler_type > ACPI_MAX_NOTIFY_HANDLER_TYPE)) { | 249 | (handler_type > ACPI_MAX_NOTIFY_HANDLER_TYPE)) { |
338 | status = AE_BAD_PARAMETER; | 250 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
339 | goto exit; | ||
340 | } | 251 | } |
341 | |||
342 | |||
343 | /* Make sure all deferred tasks are completed */ | 252 | /* Make sure all deferred tasks are completed */ |
344 | acpi_os_wait_events_complete(NULL); | 253 | |
254 | acpi_os_wait_events_complete(); | ||
345 | 255 | ||
346 | status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); | 256 | status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); |
347 | if (ACPI_FAILURE(status)) { | 257 | if (ACPI_FAILURE(status)) { |
348 | goto exit; | 258 | return_ACPI_STATUS(status); |
349 | } | ||
350 | |||
351 | /* Convert and validate the device handle */ | ||
352 | |||
353 | node = acpi_ns_validate_handle(device); | ||
354 | if (!node) { | ||
355 | status = AE_BAD_PARAMETER; | ||
356 | goto unlock_and_exit; | ||
357 | } | 259 | } |
358 | 260 | ||
359 | /* Root Object */ | 261 | /* Root Object. Global handlers are removed here */ |
360 | 262 | ||
361 | if (device == ACPI_ROOT_OBJECT) { | 263 | if (device == ACPI_ROOT_OBJECT) { |
362 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 264 | for (i = 0; i < ACPI_NUM_NOTIFY_TYPES; i++) { |
363 | "Removing notify handler for namespace root object\n")); | 265 | if (handler_type & (i + 1)) { |
266 | if (!acpi_gbl_global_notify[i].handler || | ||
267 | (acpi_gbl_global_notify[i].handler != | ||
268 | handler)) { | ||
269 | status = AE_NOT_EXIST; | ||
270 | goto unlock_and_exit; | ||
271 | } | ||
364 | 272 | ||
365 | if (((handler_type & ACPI_SYSTEM_NOTIFY) && | 273 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
366 | !acpi_gbl_system_notify.handler) || | 274 | "Removing global notify handler\n")); |
367 | ((handler_type & ACPI_DEVICE_NOTIFY) && | ||
368 | !acpi_gbl_device_notify.handler)) { | ||
369 | status = AE_NOT_EXIST; | ||
370 | goto unlock_and_exit; | ||
371 | } | ||
372 | 275 | ||
373 | if (handler_type & ACPI_SYSTEM_NOTIFY) { | 276 | acpi_gbl_global_notify[i].handler = NULL; |
374 | acpi_gbl_system_notify.node = NULL; | 277 | acpi_gbl_global_notify[i].context = NULL; |
375 | acpi_gbl_system_notify.handler = NULL; | 278 | } |
376 | acpi_gbl_system_notify.context = NULL; | ||
377 | } | 279 | } |
378 | 280 | ||
379 | if (handler_type & ACPI_DEVICE_NOTIFY) { | 281 | goto unlock_and_exit; |
380 | acpi_gbl_device_notify.node = NULL; | ||
381 | acpi_gbl_device_notify.handler = NULL; | ||
382 | acpi_gbl_device_notify.context = NULL; | ||
383 | } | ||
384 | } | 282 | } |
385 | 283 | ||
386 | /* All Other Objects */ | 284 | /* All other objects: Are Notifies allowed on this object? */ |
387 | 285 | ||
388 | else { | 286 | if (!acpi_ev_is_notify_object(node)) { |
389 | /* Notifies allowed on this object? */ | 287 | status = AE_TYPE; |
288 | goto unlock_and_exit; | ||
289 | } | ||
390 | 290 | ||
391 | if (!acpi_ev_is_notify_object(node)) { | 291 | /* Must have an existing internal object */ |
392 | status = AE_TYPE; | ||
393 | goto unlock_and_exit; | ||
394 | } | ||
395 | 292 | ||
396 | /* Check for an existing internal object */ | 293 | obj_desc = acpi_ns_get_attached_object(node); |
294 | if (!obj_desc) { | ||
295 | status = AE_NOT_EXIST; | ||
296 | goto unlock_and_exit; | ||
297 | } | ||
397 | 298 | ||
398 | obj_desc = acpi_ns_get_attached_object(node); | 299 | /* Internal object exists. Find the handler and remove it */ |
399 | if (!obj_desc) { | ||
400 | status = AE_NOT_EXIST; | ||
401 | goto unlock_and_exit; | ||
402 | } | ||
403 | 300 | ||
404 | /* Object exists - make sure there's an existing handler */ | 301 | for (i = 0; i < ACPI_NUM_NOTIFY_TYPES; i++) { |
302 | if (handler_type & (i + 1)) { | ||
303 | handler_obj = obj_desc->common_notify.notify_list[i]; | ||
304 | previous_handler_obj = NULL; | ||
405 | 305 | ||
406 | if (handler_type & ACPI_SYSTEM_NOTIFY) { | 306 | /* Attempt to find the handler in the handler list */ |
407 | struct acpi_object_notify_handler *handler_obj; | ||
408 | struct acpi_object_notify_handler *parent_obj; | ||
409 | 307 | ||
410 | notify_obj = obj_desc->common_notify.system_notify; | 308 | while (handler_obj && |
411 | if (!notify_obj) { | 309 | (handler_obj->notify.handler != handler)) { |
412 | status = AE_NOT_EXIST; | 310 | previous_handler_obj = handler_obj; |
413 | goto unlock_and_exit; | 311 | handler_obj = handler_obj->notify.next[i]; |
414 | } | ||
415 | |||
416 | handler_obj = ¬ify_obj->notify; | ||
417 | parent_obj = NULL; | ||
418 | while (handler_obj->handler != handler) { | ||
419 | if (handler_obj->next) { | ||
420 | parent_obj = handler_obj; | ||
421 | handler_obj = handler_obj->next; | ||
422 | } else { | ||
423 | break; | ||
424 | } | ||
425 | } | 312 | } |
426 | 313 | ||
427 | if (handler_obj->handler != handler) { | 314 | if (!handler_obj) { |
428 | status = AE_BAD_PARAMETER; | 315 | status = AE_NOT_EXIST; |
429 | goto unlock_and_exit; | 316 | goto unlock_and_exit; |
430 | } | 317 | } |
431 | 318 | ||
432 | /* | 319 | /* Remove the handler object from the list */ |
433 | * Remove the handler. There are three possible cases. | ||
434 | * First, we may need to remove a non-embedded object. | ||
435 | * Second, we may need to remove the embedded object's | ||
436 | * handler data, while non-embedded objects exist. | ||
437 | * Finally, we may need to remove the embedded object | ||
438 | * entirely along with its container. | ||
439 | */ | ||
440 | if (parent_obj) { | ||
441 | /* Non-embedded object is being removed. */ | ||
442 | parent_obj->next = handler_obj->next; | ||
443 | ACPI_FREE(handler_obj); | ||
444 | } else if (notify_obj->notify.next) { | ||
445 | /* | ||
446 | * The handler matches the embedded object, but | ||
447 | * there are more handler objects in the list. | ||
448 | * Replace the embedded object's data with the | ||
449 | * first next object's data and remove that | ||
450 | * object. | ||
451 | */ | ||
452 | parent_obj = ¬ify_obj->notify; | ||
453 | handler_obj = notify_obj->notify.next; | ||
454 | *parent_obj = *handler_obj; | ||
455 | ACPI_FREE(handler_obj); | ||
456 | } else { | ||
457 | /* No more handler objects in the list. */ | ||
458 | obj_desc->common_notify.system_notify = NULL; | ||
459 | acpi_ut_remove_reference(notify_obj); | ||
460 | } | ||
461 | } | ||
462 | 320 | ||
463 | if (handler_type & ACPI_DEVICE_NOTIFY) { | 321 | if (previous_handler_obj) { /* Handler is not at the list head */ |
464 | notify_obj = obj_desc->common_notify.device_notify; | 322 | previous_handler_obj->notify.next[i] = |
465 | if (!notify_obj) { | 323 | handler_obj->notify.next[i]; |
466 | status = AE_NOT_EXIST; | 324 | } else { /* Handler is at the list head */ |
467 | goto unlock_and_exit; | ||
468 | } | ||
469 | 325 | ||
470 | if (notify_obj->notify.handler != handler) { | 326 | obj_desc->common_notify.notify_list[i] = |
471 | status = AE_BAD_PARAMETER; | 327 | handler_obj->notify.next[i]; |
472 | goto unlock_and_exit; | ||
473 | } | 328 | } |
474 | 329 | ||
475 | /* Remove the handler */ | 330 | acpi_ut_remove_reference(handler_obj); |
476 | obj_desc->common_notify.device_notify = NULL; | ||
477 | acpi_ut_remove_reference(notify_obj); | ||
478 | } | 331 | } |
479 | } | 332 | } |
480 | 333 | ||
481 | unlock_and_exit: | 334 | unlock_and_exit: |
482 | (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); | 335 | (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); |
483 | exit: | ||
484 | if (ACPI_FAILURE(status)) | ||
485 | ACPI_EXCEPTION((AE_INFO, status, "Removing notify handler")); | ||
486 | return_ACPI_STATUS(status); | 336 | return_ACPI_STATUS(status); |
487 | } | 337 | } |
488 | 338 | ||
@@ -492,7 +342,7 @@ ACPI_EXPORT_SYMBOL(acpi_remove_notify_handler) | |||
492 | * | 342 | * |
493 | * FUNCTION: acpi_install_exception_handler | 343 | * FUNCTION: acpi_install_exception_handler |
494 | * | 344 | * |
495 | * PARAMETERS: Handler - Pointer to the handler function for the | 345 | * PARAMETERS: handler - Pointer to the handler function for the |
496 | * event | 346 | * event |
497 | * | 347 | * |
498 | * RETURN: Status | 348 | * RETURN: Status |
@@ -536,8 +386,8 @@ ACPI_EXPORT_SYMBOL(acpi_install_exception_handler) | |||
536 | * | 386 | * |
537 | * FUNCTION: acpi_install_global_event_handler | 387 | * FUNCTION: acpi_install_global_event_handler |
538 | * | 388 | * |
539 | * PARAMETERS: Handler - Pointer to the global event handler function | 389 | * PARAMETERS: handler - Pointer to the global event handler function |
540 | * Context - Value passed to the handler on each event | 390 | * context - Value passed to the handler on each event |
541 | * | 391 | * |
542 | * RETURN: Status | 392 | * RETURN: Status |
543 | * | 393 | * |
@@ -586,10 +436,10 @@ ACPI_EXPORT_SYMBOL(acpi_install_global_event_handler) | |||
586 | * | 436 | * |
587 | * FUNCTION: acpi_install_fixed_event_handler | 437 | * FUNCTION: acpi_install_fixed_event_handler |
588 | * | 438 | * |
589 | * PARAMETERS: Event - Event type to enable. | 439 | * PARAMETERS: event - Event type to enable. |
590 | * Handler - Pointer to the handler function for the | 440 | * handler - Pointer to the handler function for the |
591 | * event | 441 | * event |
592 | * Context - Value passed to the handler on each GPE | 442 | * context - Value passed to the handler on each GPE |
593 | * | 443 | * |
594 | * RETURN: Status | 444 | * RETURN: Status |
595 | * | 445 | * |
@@ -656,8 +506,8 @@ ACPI_EXPORT_SYMBOL(acpi_install_fixed_event_handler) | |||
656 | * | 506 | * |
657 | * FUNCTION: acpi_remove_fixed_event_handler | 507 | * FUNCTION: acpi_remove_fixed_event_handler |
658 | * | 508 | * |
659 | * PARAMETERS: Event - Event type to disable. | 509 | * PARAMETERS: event - Event type to disable. |
660 | * Handler - Address of the handler | 510 | * handler - Address of the handler |
661 | * | 511 | * |
662 | * RETURN: Status | 512 | * RETURN: Status |
663 | * | 513 | * |
@@ -713,10 +563,10 @@ ACPI_EXPORT_SYMBOL(acpi_remove_fixed_event_handler) | |||
713 | * PARAMETERS: gpe_device - Namespace node for the GPE (NULL for FADT | 563 | * PARAMETERS: gpe_device - Namespace node for the GPE (NULL for FADT |
714 | * defined GPEs) | 564 | * defined GPEs) |
715 | * gpe_number - The GPE number within the GPE block | 565 | * gpe_number - The GPE number within the GPE block |
716 | * Type - Whether this GPE should be treated as an | 566 | * type - Whether this GPE should be treated as an |
717 | * edge- or level-triggered interrupt. | 567 | * edge- or level-triggered interrupt. |
718 | * Address - Address of the handler | 568 | * address - Address of the handler |
719 | * Context - Value passed to the handler on each GPE | 569 | * context - Value passed to the handler on each GPE |
720 | * | 570 | * |
721 | * RETURN: Status | 571 | * RETURN: Status |
722 | * | 572 | * |
@@ -823,7 +673,7 @@ ACPI_EXPORT_SYMBOL(acpi_install_gpe_handler) | |||
823 | * PARAMETERS: gpe_device - Namespace node for the GPE (NULL for FADT | 673 | * PARAMETERS: gpe_device - Namespace node for the GPE (NULL for FADT |
824 | * defined GPEs) | 674 | * defined GPEs) |
825 | * gpe_number - The event to remove a handler | 675 | * gpe_number - The event to remove a handler |
826 | * Address - Address of the handler | 676 | * address - Address of the handler |
827 | * | 677 | * |
828 | * RETURN: Status | 678 | * RETURN: Status |
829 | * | 679 | * |
@@ -849,7 +699,7 @@ acpi_remove_gpe_handler(acpi_handle gpe_device, | |||
849 | 699 | ||
850 | /* Make sure all deferred tasks are completed */ | 700 | /* Make sure all deferred tasks are completed */ |
851 | 701 | ||
852 | acpi_os_wait_events_complete(NULL); | 702 | acpi_os_wait_events_complete(); |
853 | 703 | ||
854 | status = acpi_ut_acquire_mutex(ACPI_MTX_EVENTS); | 704 | status = acpi_ut_acquire_mutex(ACPI_MTX_EVENTS); |
855 | if (ACPI_FAILURE(status)) { | 705 | if (ACPI_FAILURE(status)) { |
@@ -919,8 +769,8 @@ ACPI_EXPORT_SYMBOL(acpi_remove_gpe_handler) | |||
919 | * | 769 | * |
920 | * FUNCTION: acpi_acquire_global_lock | 770 | * FUNCTION: acpi_acquire_global_lock |
921 | * | 771 | * |
922 | * PARAMETERS: Timeout - How long the caller is willing to wait | 772 | * PARAMETERS: timeout - How long the caller is willing to wait |
923 | * Handle - Where the handle to the lock is returned | 773 | * handle - Where the handle to the lock is returned |
924 | * (if acquired) | 774 | * (if acquired) |
925 | * | 775 | * |
926 | * RETURN: Status | 776 | * RETURN: Status |
@@ -967,7 +817,7 @@ ACPI_EXPORT_SYMBOL(acpi_acquire_global_lock) | |||
967 | * | 817 | * |
968 | * FUNCTION: acpi_release_global_lock | 818 | * FUNCTION: acpi_release_global_lock |
969 | * | 819 | * |
970 | * PARAMETERS: Handle - Returned from acpi_acquire_global_lock | 820 | * PARAMETERS: handle - Returned from acpi_acquire_global_lock |
971 | * | 821 | * |
972 | * RETURN: Status | 822 | * RETURN: Status |
973 | * | 823 | * |
diff --git a/drivers/acpi/acpica/evxfevnt.c b/drivers/acpi/acpica/evxfevnt.c index 77cee5a5e891..35520c6eeefb 100644 --- a/drivers/acpi/acpica/evxfevnt.c +++ b/drivers/acpi/acpica/evxfevnt.c | |||
@@ -153,8 +153,8 @@ ACPI_EXPORT_SYMBOL(acpi_disable) | |||
153 | * | 153 | * |
154 | * FUNCTION: acpi_enable_event | 154 | * FUNCTION: acpi_enable_event |
155 | * | 155 | * |
156 | * PARAMETERS: Event - The fixed eventto be enabled | 156 | * PARAMETERS: event - The fixed eventto be enabled |
157 | * Flags - Reserved | 157 | * flags - Reserved |
158 | * | 158 | * |
159 | * RETURN: Status | 159 | * RETURN: Status |
160 | * | 160 | * |
@@ -265,7 +265,7 @@ ACPI_EXPORT_SYMBOL(acpi_disable_event) | |||
265 | * | 265 | * |
266 | * FUNCTION: acpi_clear_event | 266 | * FUNCTION: acpi_clear_event |
267 | * | 267 | * |
268 | * PARAMETERS: Event - The fixed event to be cleared | 268 | * PARAMETERS: event - The fixed event to be cleared |
269 | * | 269 | * |
270 | * RETURN: Status | 270 | * RETURN: Status |
271 | * | 271 | * |
@@ -301,7 +301,7 @@ ACPI_EXPORT_SYMBOL(acpi_clear_event) | |||
301 | * | 301 | * |
302 | * FUNCTION: acpi_get_event_status | 302 | * FUNCTION: acpi_get_event_status |
303 | * | 303 | * |
304 | * PARAMETERS: Event - The fixed event | 304 | * PARAMETERS: event - The fixed event |
305 | * event_status - Where the current status of the event will | 305 | * event_status - Where the current status of the event will |
306 | * be returned | 306 | * be returned |
307 | * | 307 | * |
diff --git a/drivers/acpi/acpica/evxfgpe.c b/drivers/acpi/acpica/evxfgpe.c index 86f9b343ebd4..6affbdb4b88c 100644 --- a/drivers/acpi/acpica/evxfgpe.c +++ b/drivers/acpi/acpica/evxfgpe.c | |||
@@ -197,12 +197,12 @@ acpi_status | |||
197 | acpi_setup_gpe_for_wake(acpi_handle wake_device, | 197 | acpi_setup_gpe_for_wake(acpi_handle wake_device, |
198 | acpi_handle gpe_device, u32 gpe_number) | 198 | acpi_handle gpe_device, u32 gpe_number) |
199 | { | 199 | { |
200 | acpi_status status = AE_BAD_PARAMETER; | 200 | acpi_status status; |
201 | struct acpi_gpe_event_info *gpe_event_info; | 201 | struct acpi_gpe_event_info *gpe_event_info; |
202 | struct acpi_namespace_node *device_node; | 202 | struct acpi_namespace_node *device_node; |
203 | struct acpi_gpe_notify_object *notify_object; | 203 | struct acpi_gpe_notify_info *notify; |
204 | struct acpi_gpe_notify_info *new_notify; | ||
204 | acpi_cpu_flags flags; | 205 | acpi_cpu_flags flags; |
205 | u8 gpe_dispatch_mask; | ||
206 | 206 | ||
207 | ACPI_FUNCTION_TRACE(acpi_setup_gpe_for_wake); | 207 | ACPI_FUNCTION_TRACE(acpi_setup_gpe_for_wake); |
208 | 208 | ||
@@ -216,63 +216,95 @@ acpi_setup_gpe_for_wake(acpi_handle wake_device, | |||
216 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 216 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
217 | } | 217 | } |
218 | 218 | ||
219 | /* Handle root object case */ | ||
220 | |||
221 | if (wake_device == ACPI_ROOT_OBJECT) { | ||
222 | device_node = acpi_gbl_root_node; | ||
223 | } else { | ||
224 | device_node = ACPI_CAST_PTR(struct acpi_namespace_node, wake_device); | ||
225 | } | ||
226 | |||
227 | /* Validate WakeDevice is of type Device */ | ||
228 | |||
229 | if (device_node->type != ACPI_TYPE_DEVICE) { | ||
230 | return_ACPI_STATUS (AE_BAD_PARAMETER); | ||
231 | } | ||
232 | |||
233 | /* | ||
234 | * Allocate a new notify object up front, in case it is needed. | ||
235 | * Memory allocation while holding a spinlock is a big no-no | ||
236 | * on some hosts. | ||
237 | */ | ||
238 | new_notify = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_gpe_notify_info)); | ||
239 | if (!new_notify) { | ||
240 | return_ACPI_STATUS(AE_NO_MEMORY); | ||
241 | } | ||
242 | |||
219 | flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock); | 243 | flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock); |
220 | 244 | ||
221 | /* Ensure that we have a valid GPE number */ | 245 | /* Ensure that we have a valid GPE number */ |
222 | 246 | ||
223 | gpe_event_info = acpi_ev_get_gpe_event_info(gpe_device, gpe_number); | 247 | gpe_event_info = acpi_ev_get_gpe_event_info(gpe_device, gpe_number); |
224 | if (!gpe_event_info) { | 248 | if (!gpe_event_info) { |
249 | status = AE_BAD_PARAMETER; | ||
225 | goto unlock_and_exit; | 250 | goto unlock_and_exit; |
226 | } | 251 | } |
227 | 252 | ||
228 | if (wake_device == ACPI_ROOT_OBJECT) { | ||
229 | goto out; | ||
230 | } | ||
231 | |||
232 | /* | 253 | /* |
233 | * If there is no method or handler for this GPE, then the | 254 | * If there is no method or handler for this GPE, then the |
234 | * wake_device will be notified whenever this GPE fires (aka | 255 | * wake_device will be notified whenever this GPE fires. This is |
235 | * "implicit notify") Note: The GPE is assumed to be | 256 | * known as an "implicit notify". Note: The GPE is assumed to be |
236 | * level-triggered (for windows compatibility). | 257 | * level-triggered (for windows compatibility). |
237 | */ | 258 | */ |
238 | gpe_dispatch_mask = gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK; | 259 | if ((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) == |
239 | if (gpe_dispatch_mask != ACPI_GPE_DISPATCH_NONE | 260 | ACPI_GPE_DISPATCH_NONE) { |
240 | && gpe_dispatch_mask != ACPI_GPE_DISPATCH_NOTIFY) { | 261 | /* |
241 | goto out; | 262 | * This is the first device for implicit notify on this GPE. |
242 | } | 263 | * Just set the flags here, and enter the NOTIFY block below. |
243 | 264 | */ | |
244 | /* Validate wake_device is of type Device */ | 265 | gpe_event_info->flags = |
245 | 266 | (ACPI_GPE_DISPATCH_NOTIFY | ACPI_GPE_LEVEL_TRIGGERED); | |
246 | device_node = ACPI_CAST_PTR(struct acpi_namespace_node, wake_device); | ||
247 | if (device_node->type != ACPI_TYPE_DEVICE) { | ||
248 | goto unlock_and_exit; | ||
249 | } | 267 | } |
250 | 268 | ||
251 | if (gpe_dispatch_mask == ACPI_GPE_DISPATCH_NONE) { | 269 | /* |
252 | gpe_event_info->flags = (ACPI_GPE_DISPATCH_NOTIFY | | 270 | * If we already have an implicit notify on this GPE, add |
253 | ACPI_GPE_LEVEL_TRIGGERED); | 271 | * this device to the notify list. |
254 | gpe_event_info->dispatch.device.node = device_node; | 272 | */ |
255 | gpe_event_info->dispatch.device.next = NULL; | 273 | if ((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) == |
256 | } else { | 274 | ACPI_GPE_DISPATCH_NOTIFY) { |
257 | /* There are multiple devices to notify implicitly. */ | 275 | |
258 | 276 | /* Ensure that the device is not already in the list */ | |
259 | notify_object = ACPI_ALLOCATE_ZEROED(sizeof(*notify_object)); | 277 | |
260 | if (!notify_object) { | 278 | notify = gpe_event_info->dispatch.notify_list; |
261 | status = AE_NO_MEMORY; | 279 | while (notify) { |
262 | goto unlock_and_exit; | 280 | if (notify->device_node == device_node) { |
281 | status = AE_ALREADY_EXISTS; | ||
282 | goto unlock_and_exit; | ||
283 | } | ||
284 | notify = notify->next; | ||
263 | } | 285 | } |
264 | 286 | ||
265 | notify_object->node = device_node; | 287 | /* Add this device to the notify list for this GPE */ |
266 | notify_object->next = gpe_event_info->dispatch.device.next; | 288 | |
267 | gpe_event_info->dispatch.device.next = notify_object; | 289 | new_notify->device_node = device_node; |
290 | new_notify->next = gpe_event_info->dispatch.notify_list; | ||
291 | gpe_event_info->dispatch.notify_list = new_notify; | ||
292 | new_notify = NULL; | ||
268 | } | 293 | } |
269 | 294 | ||
270 | out: | 295 | /* Mark the GPE as a possible wake event */ |
296 | |||
271 | gpe_event_info->flags |= ACPI_GPE_CAN_WAKE; | 297 | gpe_event_info->flags |= ACPI_GPE_CAN_WAKE; |
272 | status = AE_OK; | 298 | status = AE_OK; |
273 | 299 | ||
274 | unlock_and_exit: | 300 | unlock_and_exit: |
275 | acpi_os_release_lock(acpi_gbl_gpe_lock, flags); | 301 | acpi_os_release_lock(acpi_gbl_gpe_lock, flags); |
302 | |||
303 | /* Delete the notify object if it was not used above */ | ||
304 | |||
305 | if (new_notify) { | ||
306 | ACPI_FREE(new_notify); | ||
307 | } | ||
276 | return_ACPI_STATUS(status); | 308 | return_ACPI_STATUS(status); |
277 | } | 309 | } |
278 | ACPI_EXPORT_SYMBOL(acpi_setup_gpe_for_wake) | 310 | ACPI_EXPORT_SYMBOL(acpi_setup_gpe_for_wake) |
@@ -283,7 +315,7 @@ ACPI_EXPORT_SYMBOL(acpi_setup_gpe_for_wake) | |||
283 | * | 315 | * |
284 | * PARAMETERS: gpe_device - Parent GPE Device. NULL for GPE0/GPE1 | 316 | * PARAMETERS: gpe_device - Parent GPE Device. NULL for GPE0/GPE1 |
285 | * gpe_number - GPE level within the GPE block | 317 | * gpe_number - GPE level within the GPE block |
286 | * Action - Enable or Disable | 318 | * action - Enable or Disable |
287 | * | 319 | * |
288 | * RETURN: Status | 320 | * RETURN: Status |
289 | * | 321 | * |
@@ -508,7 +540,7 @@ ACPI_EXPORT_SYMBOL(acpi_enable_all_runtime_gpes) | |||
508 | * FUNCTION: acpi_install_gpe_block | 540 | * FUNCTION: acpi_install_gpe_block |
509 | * | 541 | * |
510 | * PARAMETERS: gpe_device - Handle to the parent GPE Block Device | 542 | * PARAMETERS: gpe_device - Handle to the parent GPE Block Device |
511 | * gpe_block_address - Address and space_iD | 543 | * gpe_block_address - Address and space_ID |
512 | * register_count - Number of GPE register pairs in the block | 544 | * register_count - Number of GPE register pairs in the block |
513 | * interrupt_number - H/W interrupt for the block | 545 | * interrupt_number - H/W interrupt for the block |
514 | * | 546 | * |
@@ -653,7 +685,7 @@ ACPI_EXPORT_SYMBOL(acpi_remove_gpe_block) | |||
653 | * | 685 | * |
654 | * FUNCTION: acpi_get_gpe_device | 686 | * FUNCTION: acpi_get_gpe_device |
655 | * | 687 | * |
656 | * PARAMETERS: Index - System GPE index (0-current_gpe_count) | 688 | * PARAMETERS: index - System GPE index (0-current_gpe_count) |
657 | * gpe_device - Where the parent GPE Device is returned | 689 | * gpe_device - Where the parent GPE Device is returned |
658 | * | 690 | * |
659 | * RETURN: Status | 691 | * RETURN: Status |
diff --git a/drivers/acpi/acpica/evxfregn.c b/drivers/acpi/acpica/evxfregn.c index 6019208cd4b6..96b412d03950 100644 --- a/drivers/acpi/acpica/evxfregn.c +++ b/drivers/acpi/acpica/evxfregn.c | |||
@@ -55,11 +55,11 @@ ACPI_MODULE_NAME("evxfregn") | |||
55 | * | 55 | * |
56 | * FUNCTION: acpi_install_address_space_handler | 56 | * FUNCTION: acpi_install_address_space_handler |
57 | * | 57 | * |
58 | * PARAMETERS: Device - Handle for the device | 58 | * PARAMETERS: device - Handle for the device |
59 | * space_id - The address space ID | 59 | * space_id - The address space ID |
60 | * Handler - Address of the handler | 60 | * handler - Address of the handler |
61 | * Setup - Address of the setup function | 61 | * setup - Address of the setup function |
62 | * Context - Value passed to the handler on each access | 62 | * context - Value passed to the handler on each access |
63 | * | 63 | * |
64 | * RETURN: Status | 64 | * RETURN: Status |
65 | * | 65 | * |
@@ -112,16 +112,16 @@ acpi_install_address_space_handler(acpi_handle device, | |||
112 | } | 112 | } |
113 | 113 | ||
114 | /* | 114 | /* |
115 | * For the default space_iDs, (the IDs for which there are default region handlers | 115 | * For the default space_IDs, (the IDs for which there are default region handlers |
116 | * installed) Only execute the _REG methods if the global initialization _REG | 116 | * installed) Only execute the _REG methods if the global initialization _REG |
117 | * methods have already been run (via acpi_initialize_objects). In other words, | 117 | * methods have already been run (via acpi_initialize_objects). In other words, |
118 | * we will defer the execution of the _REG methods for these space_iDs until | 118 | * we will defer the execution of the _REG methods for these space_IDs until |
119 | * execution of acpi_initialize_objects. This is done because we need the handlers | 119 | * execution of acpi_initialize_objects. This is done because we need the handlers |
120 | * for the default spaces (mem/io/pci/table) to be installed before we can run | 120 | * for the default spaces (mem/io/pci/table) to be installed before we can run |
121 | * any control methods (or _REG methods). There is known BIOS code that depends | 121 | * any control methods (or _REG methods). There is known BIOS code that depends |
122 | * on this. | 122 | * on this. |
123 | * | 123 | * |
124 | * For all other space_iDs, we can safely execute the _REG methods immediately. | 124 | * For all other space_IDs, we can safely execute the _REG methods immediately. |
125 | * This means that for IDs like embedded_controller, this function should be called | 125 | * This means that for IDs like embedded_controller, this function should be called |
126 | * only after acpi_enable_subsystem has been called. | 126 | * only after acpi_enable_subsystem has been called. |
127 | */ | 127 | */ |
@@ -157,9 +157,9 @@ ACPI_EXPORT_SYMBOL(acpi_install_address_space_handler) | |||
157 | * | 157 | * |
158 | * FUNCTION: acpi_remove_address_space_handler | 158 | * FUNCTION: acpi_remove_address_space_handler |
159 | * | 159 | * |
160 | * PARAMETERS: Device - Handle for the device | 160 | * PARAMETERS: device - Handle for the device |
161 | * space_id - The address space ID | 161 | * space_id - The address space ID |
162 | * Handler - Address of the handler | 162 | * handler - Address of the handler |
163 | * | 163 | * |
164 | * RETURN: Status | 164 | * RETURN: Status |
165 | * | 165 | * |
diff --git a/drivers/acpi/acpica/exconfig.c b/drivers/acpi/acpica/exconfig.c index c86d44e41bc8..16219bde48da 100644 --- a/drivers/acpi/acpica/exconfig.c +++ b/drivers/acpi/acpica/exconfig.c | |||
@@ -66,7 +66,7 @@ acpi_ex_region_read(union acpi_operand_object *obj_desc, | |||
66 | * | 66 | * |
67 | * FUNCTION: acpi_ex_add_table | 67 | * FUNCTION: acpi_ex_add_table |
68 | * | 68 | * |
69 | * PARAMETERS: Table - Pointer to raw table | 69 | * PARAMETERS: table - Pointer to raw table |
70 | * parent_node - Where to load the table (scope) | 70 | * parent_node - Where to load the table (scope) |
71 | * ddb_handle - Where to return the table handle. | 71 | * ddb_handle - Where to return the table handle. |
72 | * | 72 | * |
@@ -276,8 +276,8 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state, | |||
276 | * FUNCTION: acpi_ex_region_read | 276 | * FUNCTION: acpi_ex_region_read |
277 | * | 277 | * |
278 | * PARAMETERS: obj_desc - Region descriptor | 278 | * PARAMETERS: obj_desc - Region descriptor |
279 | * Length - Number of bytes to read | 279 | * length - Number of bytes to read |
280 | * Buffer - Pointer to where to put the data | 280 | * buffer - Pointer to where to put the data |
281 | * | 281 | * |
282 | * RETURN: Status | 282 | * RETURN: Status |
283 | * | 283 | * |
@@ -318,7 +318,7 @@ acpi_ex_region_read(union acpi_operand_object *obj_desc, u32 length, u8 *buffer) | |||
318 | * | 318 | * |
319 | * PARAMETERS: obj_desc - Region or Buffer/Field where the table will be | 319 | * PARAMETERS: obj_desc - Region or Buffer/Field where the table will be |
320 | * obtained | 320 | * obtained |
321 | * Target - Where a handle to the table will be stored | 321 | * target - Where a handle to the table will be stored |
322 | * walk_state - Current state | 322 | * walk_state - Current state |
323 | * | 323 | * |
324 | * RETURN: Status | 324 | * RETURN: Status |
diff --git a/drivers/acpi/acpica/exconvrt.c b/drivers/acpi/acpica/exconvrt.c index e385436bd424..bfb062e4c4b4 100644 --- a/drivers/acpi/acpica/exconvrt.c +++ b/drivers/acpi/acpica/exconvrt.c | |||
@@ -60,7 +60,7 @@ acpi_ex_convert_to_ascii(u64 integer, u16 base, u8 *string, u8 max_length); | |||
60 | * PARAMETERS: obj_desc - Object to be converted. Must be an | 60 | * PARAMETERS: obj_desc - Object to be converted. Must be an |
61 | * Integer, Buffer, or String | 61 | * Integer, Buffer, or String |
62 | * result_desc - Where the new Integer object is returned | 62 | * result_desc - Where the new Integer object is returned |
63 | * Flags - Used for string conversion | 63 | * flags - Used for string conversion |
64 | * | 64 | * |
65 | * RETURN: Status | 65 | * RETURN: Status |
66 | * | 66 | * |
@@ -272,9 +272,9 @@ acpi_ex_convert_to_buffer(union acpi_operand_object *obj_desc, | |||
272 | * | 272 | * |
273 | * FUNCTION: acpi_ex_convert_to_ascii | 273 | * FUNCTION: acpi_ex_convert_to_ascii |
274 | * | 274 | * |
275 | * PARAMETERS: Integer - Value to be converted | 275 | * PARAMETERS: integer - Value to be converted |
276 | * Base - ACPI_STRING_DECIMAL or ACPI_STRING_HEX | 276 | * base - ACPI_STRING_DECIMAL or ACPI_STRING_HEX |
277 | * String - Where the string is returned | 277 | * string - Where the string is returned |
278 | * data_width - Size of data item to be converted, in bytes | 278 | * data_width - Size of data item to be converted, in bytes |
279 | * | 279 | * |
280 | * RETURN: Actual string length | 280 | * RETURN: Actual string length |
@@ -385,7 +385,7 @@ acpi_ex_convert_to_ascii(u64 integer, u16 base, u8 *string, u8 data_width) | |||
385 | * PARAMETERS: obj_desc - Object to be converted. Must be an | 385 | * PARAMETERS: obj_desc - Object to be converted. Must be an |
386 | * Integer, Buffer, or String | 386 | * Integer, Buffer, or String |
387 | * result_desc - Where the string object is returned | 387 | * result_desc - Where the string object is returned |
388 | * Type - String flags (base and conversion type) | 388 | * type - String flags (base and conversion type) |
389 | * | 389 | * |
390 | * RETURN: Status | 390 | * RETURN: Status |
391 | * | 391 | * |
diff --git a/drivers/acpi/acpica/excreate.c b/drivers/acpi/acpica/excreate.c index 3f5bc998c1cb..691d4763102c 100644 --- a/drivers/acpi/acpica/excreate.c +++ b/drivers/acpi/acpica/excreate.c | |||
@@ -369,7 +369,7 @@ acpi_ex_create_region(u8 * aml_start, | |||
369 | * | 369 | * |
370 | * DESCRIPTION: Create a new processor object and populate the fields | 370 | * DESCRIPTION: Create a new processor object and populate the fields |
371 | * | 371 | * |
372 | * Processor (Name[0], cpu_iD[1], pblock_addr[2], pblock_length[3]) | 372 | * Processor (Name[0], cpu_ID[1], pblock_addr[2], pblock_length[3]) |
373 | * | 373 | * |
374 | ******************************************************************************/ | 374 | ******************************************************************************/ |
375 | 375 | ||
diff --git a/drivers/acpi/acpica/exdebug.c b/drivers/acpi/acpica/exdebug.c index e211e9c19215..bc5b9a6a1316 100644 --- a/drivers/acpi/acpica/exdebug.c +++ b/drivers/acpi/acpica/exdebug.c | |||
@@ -54,8 +54,8 @@ ACPI_MODULE_NAME("exdebug") | |||
54 | * FUNCTION: acpi_ex_do_debug_object | 54 | * FUNCTION: acpi_ex_do_debug_object |
55 | * | 55 | * |
56 | * PARAMETERS: source_desc - Object to be output to "Debug Object" | 56 | * PARAMETERS: source_desc - Object to be output to "Debug Object" |
57 | * Level - Indentation level (used for packages) | 57 | * level - Indentation level (used for packages) |
58 | * Index - Current package element, zero if not pkg | 58 | * index - Current package element, zero if not pkg |
59 | * | 59 | * |
60 | * RETURN: None | 60 | * RETURN: None |
61 | * | 61 | * |
diff --git a/drivers/acpi/acpica/exdump.c b/drivers/acpi/acpica/exdump.c index 2a6ac0a3bc1e..213c081776fc 100644 --- a/drivers/acpi/acpica/exdump.c +++ b/drivers/acpi/acpica/exdump.c | |||
@@ -109,9 +109,9 @@ static struct acpi_exdump_info acpi_ex_dump_package[5] = { | |||
109 | static struct acpi_exdump_info acpi_ex_dump_device[4] = { | 109 | static struct acpi_exdump_info acpi_ex_dump_device[4] = { |
110 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_device), NULL}, | 110 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_device), NULL}, |
111 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(device.handler), "Handler"}, | 111 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(device.handler), "Handler"}, |
112 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(device.system_notify), | 112 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(device.notify_list[0]), |
113 | "System Notify"}, | 113 | "System Notify"}, |
114 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(device.device_notify), | 114 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(device.notify_list[1]), |
115 | "Device Notify"} | 115 | "Device Notify"} |
116 | }; | 116 | }; |
117 | 117 | ||
@@ -158,9 +158,9 @@ static struct acpi_exdump_info acpi_ex_dump_power[5] = { | |||
158 | "System Level"}, | 158 | "System Level"}, |
159 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(power_resource.resource_order), | 159 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(power_resource.resource_order), |
160 | "Resource Order"}, | 160 | "Resource Order"}, |
161 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(power_resource.system_notify), | 161 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(power_resource.notify_list[0]), |
162 | "System Notify"}, | 162 | "System Notify"}, |
163 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(power_resource.device_notify), | 163 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(power_resource.notify_list[1]), |
164 | "Device Notify"} | 164 | "Device Notify"} |
165 | }; | 165 | }; |
166 | 166 | ||
@@ -169,18 +169,18 @@ static struct acpi_exdump_info acpi_ex_dump_processor[7] = { | |||
169 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(processor.proc_id), "Processor ID"}, | 169 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(processor.proc_id), "Processor ID"}, |
170 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(processor.length), "Length"}, | 170 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(processor.length), "Length"}, |
171 | {ACPI_EXD_ADDRESS, ACPI_EXD_OFFSET(processor.address), "Address"}, | 171 | {ACPI_EXD_ADDRESS, ACPI_EXD_OFFSET(processor.address), "Address"}, |
172 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(processor.system_notify), | 172 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(processor.notify_list[0]), |
173 | "System Notify"}, | 173 | "System Notify"}, |
174 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(processor.device_notify), | 174 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(processor.notify_list[1]), |
175 | "Device Notify"}, | 175 | "Device Notify"}, |
176 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(processor.handler), "Handler"} | 176 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(processor.handler), "Handler"} |
177 | }; | 177 | }; |
178 | 178 | ||
179 | static struct acpi_exdump_info acpi_ex_dump_thermal[4] = { | 179 | static struct acpi_exdump_info acpi_ex_dump_thermal[4] = { |
180 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_thermal), NULL}, | 180 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_thermal), NULL}, |
181 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(thermal_zone.system_notify), | 181 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(thermal_zone.notify_list[0]), |
182 | "System Notify"}, | 182 | "System Notify"}, |
183 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(thermal_zone.device_notify), | 183 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(thermal_zone.notify_list[1]), |
184 | "Device Notify"}, | 184 | "Device Notify"}, |
185 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(thermal_zone.handler), "Handler"} | 185 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(thermal_zone.handler), "Handler"} |
186 | }; | 186 | }; |
@@ -241,10 +241,15 @@ static struct acpi_exdump_info acpi_ex_dump_address_handler[6] = { | |||
241 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(address_space.context), "Context"} | 241 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(address_space.context), "Context"} |
242 | }; | 242 | }; |
243 | 243 | ||
244 | static struct acpi_exdump_info acpi_ex_dump_notify[3] = { | 244 | static struct acpi_exdump_info acpi_ex_dump_notify[7] = { |
245 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_notify), NULL}, | 245 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_notify), NULL}, |
246 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(notify.node), "Node"}, | 246 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(notify.node), "Node"}, |
247 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(notify.context), "Context"} | 247 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(notify.handler_type), "Handler Type"}, |
248 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(notify.handler), "Handler"}, | ||
249 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(notify.context), "Context"}, | ||
250 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(notify.next[0]), | ||
251 | "Next System Notify"}, | ||
252 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(notify.next[1]), "Next Device Notify"} | ||
248 | }; | 253 | }; |
249 | 254 | ||
250 | /* Miscellaneous tables */ | 255 | /* Miscellaneous tables */ |
@@ -318,7 +323,7 @@ static struct acpi_exdump_info *acpi_ex_dump_info[] = { | |||
318 | * FUNCTION: acpi_ex_dump_object | 323 | * FUNCTION: acpi_ex_dump_object |
319 | * | 324 | * |
320 | * PARAMETERS: obj_desc - Descriptor to dump | 325 | * PARAMETERS: obj_desc - Descriptor to dump |
321 | * Info - Info table corresponding to this object | 326 | * info - Info table corresponding to this object |
322 | * type | 327 | * type |
323 | * | 328 | * |
324 | * RETURN: None | 329 | * RETURN: None |
@@ -444,7 +449,7 @@ acpi_ex_dump_object(union acpi_operand_object *obj_desc, | |||
444 | * FUNCTION: acpi_ex_dump_operand | 449 | * FUNCTION: acpi_ex_dump_operand |
445 | * | 450 | * |
446 | * PARAMETERS: *obj_desc - Pointer to entry to be dumped | 451 | * PARAMETERS: *obj_desc - Pointer to entry to be dumped |
447 | * Depth - Current nesting depth | 452 | * depth - Current nesting depth |
448 | * | 453 | * |
449 | * RETURN: None | 454 | * RETURN: None |
450 | * | 455 | * |
@@ -726,7 +731,7 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) | |||
726 | * | 731 | * |
727 | * FUNCTION: acpi_ex_dump_operands | 732 | * FUNCTION: acpi_ex_dump_operands |
728 | * | 733 | * |
729 | * PARAMETERS: Operands - A list of Operand objects | 734 | * PARAMETERS: operands - A list of Operand objects |
730 | * opcode_name - AML opcode name | 735 | * opcode_name - AML opcode name |
731 | * num_operands - Operand count for this opcode | 736 | * num_operands - Operand count for this opcode |
732 | * | 737 | * |
@@ -769,8 +774,8 @@ acpi_ex_dump_operands(union acpi_operand_object **operands, | |||
769 | * | 774 | * |
770 | * FUNCTION: acpi_ex_out* functions | 775 | * FUNCTION: acpi_ex_out* functions |
771 | * | 776 | * |
772 | * PARAMETERS: Title - Descriptive text | 777 | * PARAMETERS: title - Descriptive text |
773 | * Value - Value to be displayed | 778 | * value - Value to be displayed |
774 | * | 779 | * |
775 | * DESCRIPTION: Object dump output formatting functions. These functions | 780 | * DESCRIPTION: Object dump output formatting functions. These functions |
776 | * reduce the number of format strings required and keeps them | 781 | * reduce the number of format strings required and keeps them |
@@ -792,8 +797,8 @@ static void acpi_ex_out_pointer(char *title, void *value) | |||
792 | * | 797 | * |
793 | * FUNCTION: acpi_ex_dump_namespace_node | 798 | * FUNCTION: acpi_ex_dump_namespace_node |
794 | * | 799 | * |
795 | * PARAMETERS: Node - Descriptor to dump | 800 | * PARAMETERS: node - Descriptor to dump |
796 | * Flags - Force display if TRUE | 801 | * flags - Force display if TRUE |
797 | * | 802 | * |
798 | * DESCRIPTION: Dumps the members of the given.Node | 803 | * DESCRIPTION: Dumps the members of the given.Node |
799 | * | 804 | * |
@@ -825,7 +830,7 @@ void acpi_ex_dump_namespace_node(struct acpi_namespace_node *node, u32 flags) | |||
825 | * | 830 | * |
826 | * FUNCTION: acpi_ex_dump_reference_obj | 831 | * FUNCTION: acpi_ex_dump_reference_obj |
827 | * | 832 | * |
828 | * PARAMETERS: Object - Descriptor to dump | 833 | * PARAMETERS: object - Descriptor to dump |
829 | * | 834 | * |
830 | * DESCRIPTION: Dumps a reference object | 835 | * DESCRIPTION: Dumps a reference object |
831 | * | 836 | * |
@@ -882,8 +887,8 @@ static void acpi_ex_dump_reference_obj(union acpi_operand_object *obj_desc) | |||
882 | * FUNCTION: acpi_ex_dump_package_obj | 887 | * FUNCTION: acpi_ex_dump_package_obj |
883 | * | 888 | * |
884 | * PARAMETERS: obj_desc - Descriptor to dump | 889 | * PARAMETERS: obj_desc - Descriptor to dump |
885 | * Level - Indentation Level | 890 | * level - Indentation Level |
886 | * Index - Package index for this object | 891 | * index - Package index for this object |
887 | * | 892 | * |
888 | * DESCRIPTION: Dumps the elements of the package | 893 | * DESCRIPTION: Dumps the elements of the package |
889 | * | 894 | * |
@@ -926,9 +931,7 @@ acpi_ex_dump_package_obj(union acpi_operand_object *obj_desc, | |||
926 | case ACPI_TYPE_STRING: | 931 | case ACPI_TYPE_STRING: |
927 | 932 | ||
928 | acpi_os_printf("[String] Value: "); | 933 | acpi_os_printf("[String] Value: "); |
929 | for (i = 0; i < obj_desc->string.length; i++) { | 934 | acpi_ut_print_string(obj_desc->string.pointer, ACPI_UINT8_MAX); |
930 | acpi_os_printf("%c", obj_desc->string.pointer[i]); | ||
931 | } | ||
932 | acpi_os_printf("\n"); | 935 | acpi_os_printf("\n"); |
933 | break; | 936 | break; |
934 | 937 | ||
@@ -977,7 +980,7 @@ acpi_ex_dump_package_obj(union acpi_operand_object *obj_desc, | |||
977 | * FUNCTION: acpi_ex_dump_object_descriptor | 980 | * FUNCTION: acpi_ex_dump_object_descriptor |
978 | * | 981 | * |
979 | * PARAMETERS: obj_desc - Descriptor to dump | 982 | * PARAMETERS: obj_desc - Descriptor to dump |
980 | * Flags - Force display if TRUE | 983 | * flags - Force display if TRUE |
981 | * | 984 | * |
982 | * DESCRIPTION: Dumps the members of the object descriptor given. | 985 | * DESCRIPTION: Dumps the members of the object descriptor given. |
983 | * | 986 | * |
diff --git a/drivers/acpi/acpica/exfldio.c b/drivers/acpi/acpica/exfldio.c index 149de45fdadd..a7784152ed30 100644 --- a/drivers/acpi/acpica/exfldio.c +++ b/drivers/acpi/acpica/exfldio.c | |||
@@ -222,9 +222,9 @@ acpi_ex_setup_region(union acpi_operand_object *obj_desc, | |||
222 | * PARAMETERS: obj_desc - Field to be read | 222 | * PARAMETERS: obj_desc - Field to be read |
223 | * field_datum_byte_offset - Byte offset of this datum within the | 223 | * field_datum_byte_offset - Byte offset of this datum within the |
224 | * parent field | 224 | * parent field |
225 | * Value - Where to store value (must at least | 225 | * value - Where to store value (must at least |
226 | * 64 bits) | 226 | * 64 bits) |
227 | * Function - Read or Write flag plus other region- | 227 | * function - Read or Write flag plus other region- |
228 | * dependent flags | 228 | * dependent flags |
229 | * | 229 | * |
230 | * RETURN: Status | 230 | * RETURN: Status |
@@ -315,7 +315,7 @@ acpi_ex_access_region(union acpi_operand_object *obj_desc, | |||
315 | * FUNCTION: acpi_ex_register_overflow | 315 | * FUNCTION: acpi_ex_register_overflow |
316 | * | 316 | * |
317 | * PARAMETERS: obj_desc - Register(Field) to be written | 317 | * PARAMETERS: obj_desc - Register(Field) to be written |
318 | * Value - Value to be stored | 318 | * value - Value to be stored |
319 | * | 319 | * |
320 | * RETURN: TRUE if value overflows the field, FALSE otherwise | 320 | * RETURN: TRUE if value overflows the field, FALSE otherwise |
321 | * | 321 | * |
@@ -365,7 +365,7 @@ acpi_ex_register_overflow(union acpi_operand_object *obj_desc, u64 value) | |||
365 | * PARAMETERS: obj_desc - Field to be read | 365 | * PARAMETERS: obj_desc - Field to be read |
366 | * field_datum_byte_offset - Byte offset of this datum within the | 366 | * field_datum_byte_offset - Byte offset of this datum within the |
367 | * parent field | 367 | * parent field |
368 | * Value - Where to store value (must be 64 bits) | 368 | * value - Where to store value (must be 64 bits) |
369 | * read_write - Read or Write flag | 369 | * read_write - Read or Write flag |
370 | * | 370 | * |
371 | * RETURN: Status | 371 | * RETURN: Status |
@@ -574,7 +574,7 @@ acpi_ex_field_datum_io(union acpi_operand_object *obj_desc, | |||
574 | * FUNCTION: acpi_ex_write_with_update_rule | 574 | * FUNCTION: acpi_ex_write_with_update_rule |
575 | * | 575 | * |
576 | * PARAMETERS: obj_desc - Field to be written | 576 | * PARAMETERS: obj_desc - Field to be written |
577 | * Mask - bitmask within field datum | 577 | * mask - bitmask within field datum |
578 | * field_value - Value to write | 578 | * field_value - Value to write |
579 | * field_datum_byte_offset - Offset of datum within field | 579 | * field_datum_byte_offset - Offset of datum within field |
580 | * | 580 | * |
@@ -678,7 +678,7 @@ acpi_ex_write_with_update_rule(union acpi_operand_object *obj_desc, | |||
678 | * FUNCTION: acpi_ex_extract_from_field | 678 | * FUNCTION: acpi_ex_extract_from_field |
679 | * | 679 | * |
680 | * PARAMETERS: obj_desc - Field to be read | 680 | * PARAMETERS: obj_desc - Field to be read |
681 | * Buffer - Where to store the field data | 681 | * buffer - Where to store the field data |
682 | * buffer_length - Length of Buffer | 682 | * buffer_length - Length of Buffer |
683 | * | 683 | * |
684 | * RETURN: Status | 684 | * RETURN: Status |
@@ -823,7 +823,7 @@ acpi_ex_extract_from_field(union acpi_operand_object *obj_desc, | |||
823 | * FUNCTION: acpi_ex_insert_into_field | 823 | * FUNCTION: acpi_ex_insert_into_field |
824 | * | 824 | * |
825 | * PARAMETERS: obj_desc - Field to be written | 825 | * PARAMETERS: obj_desc - Field to be written |
826 | * Buffer - Data to be written | 826 | * buffer - Data to be written |
827 | * buffer_length - Length of Buffer | 827 | * buffer_length - Length of Buffer |
828 | * | 828 | * |
829 | * RETURN: Status | 829 | * RETURN: Status |
diff --git a/drivers/acpi/acpica/exmisc.c b/drivers/acpi/acpica/exmisc.c index 0a0893310348..271c0c57ea10 100644 --- a/drivers/acpi/acpica/exmisc.c +++ b/drivers/acpi/acpica/exmisc.c | |||
@@ -144,8 +144,8 @@ acpi_ex_get_object_reference(union acpi_operand_object *obj_desc, | |||
144 | * | 144 | * |
145 | * FUNCTION: acpi_ex_concat_template | 145 | * FUNCTION: acpi_ex_concat_template |
146 | * | 146 | * |
147 | * PARAMETERS: Operand0 - First source object | 147 | * PARAMETERS: operand0 - First source object |
148 | * Operand1 - Second source object | 148 | * operand1 - Second source object |
149 | * actual_return_desc - Where to place the return object | 149 | * actual_return_desc - Where to place the return object |
150 | * walk_state - Current walk state | 150 | * walk_state - Current walk state |
151 | * | 151 | * |
@@ -229,8 +229,8 @@ acpi_ex_concat_template(union acpi_operand_object *operand0, | |||
229 | * | 229 | * |
230 | * FUNCTION: acpi_ex_do_concatenate | 230 | * FUNCTION: acpi_ex_do_concatenate |
231 | * | 231 | * |
232 | * PARAMETERS: Operand0 - First source object | 232 | * PARAMETERS: operand0 - First source object |
233 | * Operand1 - Second source object | 233 | * operand1 - Second source object |
234 | * actual_return_desc - Where to place the return object | 234 | * actual_return_desc - Where to place the return object |
235 | * walk_state - Current walk state | 235 | * walk_state - Current walk state |
236 | * | 236 | * |
@@ -397,9 +397,9 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0, | |||
397 | * | 397 | * |
398 | * FUNCTION: acpi_ex_do_math_op | 398 | * FUNCTION: acpi_ex_do_math_op |
399 | * | 399 | * |
400 | * PARAMETERS: Opcode - AML opcode | 400 | * PARAMETERS: opcode - AML opcode |
401 | * Integer0 - Integer operand #0 | 401 | * integer0 - Integer operand #0 |
402 | * Integer1 - Integer operand #1 | 402 | * integer1 - Integer operand #1 |
403 | * | 403 | * |
404 | * RETURN: Integer result of the operation | 404 | * RETURN: Integer result of the operation |
405 | * | 405 | * |
@@ -479,9 +479,9 @@ u64 acpi_ex_do_math_op(u16 opcode, u64 integer0, u64 integer1) | |||
479 | * | 479 | * |
480 | * FUNCTION: acpi_ex_do_logical_numeric_op | 480 | * FUNCTION: acpi_ex_do_logical_numeric_op |
481 | * | 481 | * |
482 | * PARAMETERS: Opcode - AML opcode | 482 | * PARAMETERS: opcode - AML opcode |
483 | * Integer0 - Integer operand #0 | 483 | * integer0 - Integer operand #0 |
484 | * Integer1 - Integer operand #1 | 484 | * integer1 - Integer operand #1 |
485 | * logical_result - TRUE/FALSE result of the operation | 485 | * logical_result - TRUE/FALSE result of the operation |
486 | * | 486 | * |
487 | * RETURN: Status | 487 | * RETURN: Status |
@@ -534,9 +534,9 @@ acpi_ex_do_logical_numeric_op(u16 opcode, | |||
534 | * | 534 | * |
535 | * FUNCTION: acpi_ex_do_logical_op | 535 | * FUNCTION: acpi_ex_do_logical_op |
536 | * | 536 | * |
537 | * PARAMETERS: Opcode - AML opcode | 537 | * PARAMETERS: opcode - AML opcode |
538 | * Operand0 - operand #0 | 538 | * operand0 - operand #0 |
539 | * Operand1 - operand #1 | 539 | * operand1 - operand #1 |
540 | * logical_result - TRUE/FALSE result of the operation | 540 | * logical_result - TRUE/FALSE result of the operation |
541 | * | 541 | * |
542 | * RETURN: Status | 542 | * RETURN: Status |
diff --git a/drivers/acpi/acpica/exmutex.c b/drivers/acpi/acpica/exmutex.c index 60933e9dc3c0..bcceda5be9e3 100644 --- a/drivers/acpi/acpica/exmutex.c +++ b/drivers/acpi/acpica/exmutex.c | |||
@@ -102,7 +102,7 @@ void acpi_ex_unlink_mutex(union acpi_operand_object *obj_desc) | |||
102 | * FUNCTION: acpi_ex_link_mutex | 102 | * FUNCTION: acpi_ex_link_mutex |
103 | * | 103 | * |
104 | * PARAMETERS: obj_desc - The mutex to be linked | 104 | * PARAMETERS: obj_desc - The mutex to be linked |
105 | * Thread - Current executing thread object | 105 | * thread - Current executing thread object |
106 | * | 106 | * |
107 | * RETURN: None | 107 | * RETURN: None |
108 | * | 108 | * |
@@ -138,7 +138,7 @@ acpi_ex_link_mutex(union acpi_operand_object *obj_desc, | |||
138 | * | 138 | * |
139 | * FUNCTION: acpi_ex_acquire_mutex_object | 139 | * FUNCTION: acpi_ex_acquire_mutex_object |
140 | * | 140 | * |
141 | * PARAMETERS: Timeout - Timeout in milliseconds | 141 | * PARAMETERS: timeout - Timeout in milliseconds |
142 | * obj_desc - Mutex object | 142 | * obj_desc - Mutex object |
143 | * thread_id - Current thread state | 143 | * thread_id - Current thread state |
144 | * | 144 | * |
@@ -443,7 +443,7 @@ acpi_ex_release_mutex(union acpi_operand_object *obj_desc, | |||
443 | * | 443 | * |
444 | * FUNCTION: acpi_ex_release_all_mutexes | 444 | * FUNCTION: acpi_ex_release_all_mutexes |
445 | * | 445 | * |
446 | * PARAMETERS: Thread - Current executing thread object | 446 | * PARAMETERS: thread - Current executing thread object |
447 | * | 447 | * |
448 | * RETURN: Status | 448 | * RETURN: Status |
449 | * | 449 | * |
diff --git a/drivers/acpi/acpica/exprep.c b/drivers/acpi/acpica/exprep.c index 30157f5a12d7..81eca60d2748 100644 --- a/drivers/acpi/acpica/exprep.c +++ b/drivers/acpi/acpica/exprep.c | |||
@@ -391,12 +391,12 @@ acpi_ex_prep_common_field_object(union acpi_operand_object *obj_desc, | |||
391 | * | 391 | * |
392 | * FUNCTION: acpi_ex_prep_field_value | 392 | * FUNCTION: acpi_ex_prep_field_value |
393 | * | 393 | * |
394 | * PARAMETERS: Info - Contains all field creation info | 394 | * PARAMETERS: info - Contains all field creation info |
395 | * | 395 | * |
396 | * RETURN: Status | 396 | * RETURN: Status |
397 | * | 397 | * |
398 | * DESCRIPTION: Construct a union acpi_operand_object of type def_field and | 398 | * DESCRIPTION: Construct an object of type union acpi_operand_object with a |
399 | * connect it to the parent Node. | 399 | * subtype of def_field and connect it to the parent Node. |
400 | * | 400 | * |
401 | ******************************************************************************/ | 401 | ******************************************************************************/ |
402 | 402 | ||
diff --git a/drivers/acpi/acpica/exregion.c b/drivers/acpi/acpica/exregion.c index 12d51df6d3bf..1f1ce0c3d2f8 100644 --- a/drivers/acpi/acpica/exregion.c +++ b/drivers/acpi/acpica/exregion.c | |||
@@ -53,10 +53,10 @@ ACPI_MODULE_NAME("exregion") | |||
53 | * | 53 | * |
54 | * FUNCTION: acpi_ex_system_memory_space_handler | 54 | * FUNCTION: acpi_ex_system_memory_space_handler |
55 | * | 55 | * |
56 | * PARAMETERS: Function - Read or Write operation | 56 | * PARAMETERS: function - Read or Write operation |
57 | * Address - Where in the space to read or write | 57 | * address - Where in the space to read or write |
58 | * bit_width - Field width in bits (8, 16, or 32) | 58 | * bit_width - Field width in bits (8, 16, or 32) |
59 | * Value - Pointer to in or out value | 59 | * value - Pointer to in or out value |
60 | * handler_context - Pointer to Handler's context | 60 | * handler_context - Pointer to Handler's context |
61 | * region_context - Pointer to context specific to the | 61 | * region_context - Pointer to context specific to the |
62 | * accessed region | 62 | * accessed region |
@@ -270,10 +270,10 @@ acpi_ex_system_memory_space_handler(u32 function, | |||
270 | * | 270 | * |
271 | * FUNCTION: acpi_ex_system_io_space_handler | 271 | * FUNCTION: acpi_ex_system_io_space_handler |
272 | * | 272 | * |
273 | * PARAMETERS: Function - Read or Write operation | 273 | * PARAMETERS: function - Read or Write operation |
274 | * Address - Where in the space to read or write | 274 | * address - Where in the space to read or write |
275 | * bit_width - Field width in bits (8, 16, or 32) | 275 | * bit_width - Field width in bits (8, 16, or 32) |
276 | * Value - Pointer to in or out value | 276 | * value - Pointer to in or out value |
277 | * handler_context - Pointer to Handler's context | 277 | * handler_context - Pointer to Handler's context |
278 | * region_context - Pointer to context specific to the | 278 | * region_context - Pointer to context specific to the |
279 | * accessed region | 279 | * accessed region |
@@ -329,10 +329,10 @@ acpi_ex_system_io_space_handler(u32 function, | |||
329 | * | 329 | * |
330 | * FUNCTION: acpi_ex_pci_config_space_handler | 330 | * FUNCTION: acpi_ex_pci_config_space_handler |
331 | * | 331 | * |
332 | * PARAMETERS: Function - Read or Write operation | 332 | * PARAMETERS: function - Read or Write operation |
333 | * Address - Where in the space to read or write | 333 | * address - Where in the space to read or write |
334 | * bit_width - Field width in bits (8, 16, or 32) | 334 | * bit_width - Field width in bits (8, 16, or 32) |
335 | * Value - Pointer to in or out value | 335 | * value - Pointer to in or out value |
336 | * handler_context - Pointer to Handler's context | 336 | * handler_context - Pointer to Handler's context |
337 | * region_context - Pointer to context specific to the | 337 | * region_context - Pointer to context specific to the |
338 | * accessed region | 338 | * accessed region |
@@ -365,7 +365,7 @@ acpi_ex_pci_config_space_handler(u32 function, | |||
365 | * pci_function is the PCI device function number | 365 | * pci_function is the PCI device function number |
366 | * pci_register is the Config space register range 0-255 bytes | 366 | * pci_register is the Config space register range 0-255 bytes |
367 | * | 367 | * |
368 | * Value - input value for write, output address for read | 368 | * value - input value for write, output address for read |
369 | * | 369 | * |
370 | */ | 370 | */ |
371 | pci_id = (struct acpi_pci_id *)region_context; | 371 | pci_id = (struct acpi_pci_id *)region_context; |
@@ -402,10 +402,10 @@ acpi_ex_pci_config_space_handler(u32 function, | |||
402 | * | 402 | * |
403 | * FUNCTION: acpi_ex_cmos_space_handler | 403 | * FUNCTION: acpi_ex_cmos_space_handler |
404 | * | 404 | * |
405 | * PARAMETERS: Function - Read or Write operation | 405 | * PARAMETERS: function - Read or Write operation |
406 | * Address - Where in the space to read or write | 406 | * address - Where in the space to read or write |
407 | * bit_width - Field width in bits (8, 16, or 32) | 407 | * bit_width - Field width in bits (8, 16, or 32) |
408 | * Value - Pointer to in or out value | 408 | * value - Pointer to in or out value |
409 | * handler_context - Pointer to Handler's context | 409 | * handler_context - Pointer to Handler's context |
410 | * region_context - Pointer to context specific to the | 410 | * region_context - Pointer to context specific to the |
411 | * accessed region | 411 | * accessed region |
@@ -434,10 +434,10 @@ acpi_ex_cmos_space_handler(u32 function, | |||
434 | * | 434 | * |
435 | * FUNCTION: acpi_ex_pci_bar_space_handler | 435 | * FUNCTION: acpi_ex_pci_bar_space_handler |
436 | * | 436 | * |
437 | * PARAMETERS: Function - Read or Write operation | 437 | * PARAMETERS: function - Read or Write operation |
438 | * Address - Where in the space to read or write | 438 | * address - Where in the space to read or write |
439 | * bit_width - Field width in bits (8, 16, or 32) | 439 | * bit_width - Field width in bits (8, 16, or 32) |
440 | * Value - Pointer to in or out value | 440 | * value - Pointer to in or out value |
441 | * handler_context - Pointer to Handler's context | 441 | * handler_context - Pointer to Handler's context |
442 | * region_context - Pointer to context specific to the | 442 | * region_context - Pointer to context specific to the |
443 | * accessed region | 443 | * accessed region |
@@ -466,10 +466,10 @@ acpi_ex_pci_bar_space_handler(u32 function, | |||
466 | * | 466 | * |
467 | * FUNCTION: acpi_ex_data_table_space_handler | 467 | * FUNCTION: acpi_ex_data_table_space_handler |
468 | * | 468 | * |
469 | * PARAMETERS: Function - Read or Write operation | 469 | * PARAMETERS: function - Read or Write operation |
470 | * Address - Where in the space to read or write | 470 | * address - Where in the space to read or write |
471 | * bit_width - Field width in bits (8, 16, or 32) | 471 | * bit_width - Field width in bits (8, 16, or 32) |
472 | * Value - Pointer to in or out value | 472 | * value - Pointer to in or out value |
473 | * handler_context - Pointer to Handler's context | 473 | * handler_context - Pointer to Handler's context |
474 | * region_context - Pointer to context specific to the | 474 | * region_context - Pointer to context specific to the |
475 | * accessed region | 475 | * accessed region |
diff --git a/drivers/acpi/acpica/exresolv.c b/drivers/acpi/acpica/exresolv.c index 6e335dc34528..bbf40ac27585 100644 --- a/drivers/acpi/acpica/exresolv.c +++ b/drivers/acpi/acpica/exresolv.c | |||
@@ -147,7 +147,7 @@ acpi_ex_resolve_object_to_value(union acpi_operand_object **stack_ptr, | |||
147 | 147 | ||
148 | stack_desc = *stack_ptr; | 148 | stack_desc = *stack_ptr; |
149 | 149 | ||
150 | /* This is a union acpi_operand_object */ | 150 | /* This is an object of type union acpi_operand_object */ |
151 | 151 | ||
152 | switch (stack_desc->common.type) { | 152 | switch (stack_desc->common.type) { |
153 | case ACPI_TYPE_LOCAL_REFERENCE: | 153 | case ACPI_TYPE_LOCAL_REFERENCE: |
@@ -321,7 +321,7 @@ acpi_ex_resolve_object_to_value(union acpi_operand_object **stack_ptr, | |||
321 | * FUNCTION: acpi_ex_resolve_multiple | 321 | * FUNCTION: acpi_ex_resolve_multiple |
322 | * | 322 | * |
323 | * PARAMETERS: walk_state - Current state (contains AML opcode) | 323 | * PARAMETERS: walk_state - Current state (contains AML opcode) |
324 | * Operand - Starting point for resolution | 324 | * operand - Starting point for resolution |
325 | * return_type - Where the object type is returned | 325 | * return_type - Where the object type is returned |
326 | * return_desc - Where the resolved object is returned | 326 | * return_desc - Where the resolved object is returned |
327 | * | 327 | * |
diff --git a/drivers/acpi/acpica/exresop.c b/drivers/acpi/acpica/exresop.c index a67b1d925ddd..f232fbabdea8 100644 --- a/drivers/acpi/acpica/exresop.c +++ b/drivers/acpi/acpica/exresop.c | |||
@@ -113,7 +113,7 @@ acpi_ex_check_object_type(acpi_object_type type_needed, | |||
113 | * | 113 | * |
114 | * FUNCTION: acpi_ex_resolve_operands | 114 | * FUNCTION: acpi_ex_resolve_operands |
115 | * | 115 | * |
116 | * PARAMETERS: Opcode - Opcode being interpreted | 116 | * PARAMETERS: opcode - Opcode being interpreted |
117 | * stack_ptr - Pointer to the operand stack to be | 117 | * stack_ptr - Pointer to the operand stack to be |
118 | * resolved | 118 | * resolved |
119 | * walk_state - Current state | 119 | * walk_state - Current state |
@@ -307,7 +307,7 @@ acpi_ex_resolve_operands(u16 opcode, | |||
307 | case ARGI_DEVICE_REF: | 307 | case ARGI_DEVICE_REF: |
308 | case ARGI_TARGETREF: /* Allows implicit conversion rules before store */ | 308 | case ARGI_TARGETREF: /* Allows implicit conversion rules before store */ |
309 | case ARGI_FIXED_TARGET: /* No implicit conversion before store to target */ | 309 | case ARGI_FIXED_TARGET: /* No implicit conversion before store to target */ |
310 | case ARGI_SIMPLE_TARGET: /* Name, Local, or Arg - no implicit conversion */ | 310 | case ARGI_SIMPLE_TARGET: /* Name, Local, or arg - no implicit conversion */ |
311 | 311 | ||
312 | /* | 312 | /* |
313 | * Need an operand of type ACPI_TYPE_LOCAL_REFERENCE | 313 | * Need an operand of type ACPI_TYPE_LOCAL_REFERENCE |
@@ -410,7 +410,7 @@ acpi_ex_resolve_operands(u16 opcode, | |||
410 | /* | 410 | /* |
411 | * Need an operand of type ACPI_TYPE_INTEGER, | 411 | * Need an operand of type ACPI_TYPE_INTEGER, |
412 | * But we can implicitly convert from a STRING or BUFFER | 412 | * But we can implicitly convert from a STRING or BUFFER |
413 | * Aka - "Implicit Source Operand Conversion" | 413 | * aka - "Implicit Source Operand Conversion" |
414 | */ | 414 | */ |
415 | status = | 415 | status = |
416 | acpi_ex_convert_to_integer(obj_desc, stack_ptr, 16); | 416 | acpi_ex_convert_to_integer(obj_desc, stack_ptr, 16); |
@@ -437,7 +437,7 @@ acpi_ex_resolve_operands(u16 opcode, | |||
437 | /* | 437 | /* |
438 | * Need an operand of type ACPI_TYPE_BUFFER, | 438 | * Need an operand of type ACPI_TYPE_BUFFER, |
439 | * But we can implicitly convert from a STRING or INTEGER | 439 | * But we can implicitly convert from a STRING or INTEGER |
440 | * Aka - "Implicit Source Operand Conversion" | 440 | * aka - "Implicit Source Operand Conversion" |
441 | */ | 441 | */ |
442 | status = acpi_ex_convert_to_buffer(obj_desc, stack_ptr); | 442 | status = acpi_ex_convert_to_buffer(obj_desc, stack_ptr); |
443 | if (ACPI_FAILURE(status)) { | 443 | if (ACPI_FAILURE(status)) { |
@@ -463,7 +463,7 @@ acpi_ex_resolve_operands(u16 opcode, | |||
463 | /* | 463 | /* |
464 | * Need an operand of type ACPI_TYPE_STRING, | 464 | * Need an operand of type ACPI_TYPE_STRING, |
465 | * But we can implicitly convert from a BUFFER or INTEGER | 465 | * But we can implicitly convert from a BUFFER or INTEGER |
466 | * Aka - "Implicit Source Operand Conversion" | 466 | * aka - "Implicit Source Operand Conversion" |
467 | */ | 467 | */ |
468 | status = acpi_ex_convert_to_string(obj_desc, stack_ptr, | 468 | status = acpi_ex_convert_to_string(obj_desc, stack_ptr, |
469 | ACPI_IMPLICIT_CONVERT_HEX); | 469 | ACPI_IMPLICIT_CONVERT_HEX); |
diff --git a/drivers/acpi/acpica/exstore.c b/drivers/acpi/acpica/exstore.c index c6cf843cc4c9..5fffe7ab5ece 100644 --- a/drivers/acpi/acpica/exstore.c +++ b/drivers/acpi/acpica/exstore.c | |||
@@ -62,8 +62,8 @@ acpi_ex_store_object_to_index(union acpi_operand_object *val_desc, | |||
62 | * FUNCTION: acpi_ex_store | 62 | * FUNCTION: acpi_ex_store |
63 | * | 63 | * |
64 | * PARAMETERS: *source_desc - Value to be stored | 64 | * PARAMETERS: *source_desc - Value to be stored |
65 | * *dest_desc - Where to store it. Must be an NS node | 65 | * *dest_desc - Where to store it. Must be an NS node |
66 | * or a union acpi_operand_object of type | 66 | * or union acpi_operand_object of type |
67 | * Reference; | 67 | * Reference; |
68 | * walk_state - Current walk state | 68 | * walk_state - Current walk state |
69 | * | 69 | * |
@@ -361,7 +361,7 @@ acpi_ex_store_object_to_index(union acpi_operand_object *source_desc, | |||
361 | * FUNCTION: acpi_ex_store_object_to_node | 361 | * FUNCTION: acpi_ex_store_object_to_node |
362 | * | 362 | * |
363 | * PARAMETERS: source_desc - Value to be stored | 363 | * PARAMETERS: source_desc - Value to be stored |
364 | * Node - Named object to receive the value | 364 | * node - Named object to receive the value |
365 | * walk_state - Current walk state | 365 | * walk_state - Current walk state |
366 | * implicit_conversion - Perform implicit conversion (yes/no) | 366 | * implicit_conversion - Perform implicit conversion (yes/no) |
367 | * | 367 | * |
diff --git a/drivers/acpi/acpica/exstorob.c b/drivers/acpi/acpica/exstorob.c index 65a45d8335c8..53c248473547 100644 --- a/drivers/acpi/acpica/exstorob.c +++ b/drivers/acpi/acpica/exstorob.c | |||
@@ -110,7 +110,7 @@ acpi_ex_store_buffer_to_buffer(union acpi_operand_object *source_desc, | |||
110 | * NOTE: ACPI versions up to 3.0 specified that the buffer must be | 110 | * NOTE: ACPI versions up to 3.0 specified that the buffer must be |
111 | * truncated if the string is smaller than the buffer. However, "other" | 111 | * truncated if the string is smaller than the buffer. However, "other" |
112 | * implementations of ACPI never did this and thus became the defacto | 112 | * implementations of ACPI never did this and thus became the defacto |
113 | * standard. ACPI 3.0_a changes this behavior such that the buffer | 113 | * standard. ACPI 3.0A changes this behavior such that the buffer |
114 | * is no longer truncated. | 114 | * is no longer truncated. |
115 | */ | 115 | */ |
116 | 116 | ||
diff --git a/drivers/acpi/acpica/exsystem.c b/drivers/acpi/acpica/exsystem.c index 191a12945226..b760641e2fc6 100644 --- a/drivers/acpi/acpica/exsystem.c +++ b/drivers/acpi/acpica/exsystem.c | |||
@@ -53,8 +53,8 @@ ACPI_MODULE_NAME("exsystem") | |||
53 | * | 53 | * |
54 | * FUNCTION: acpi_ex_system_wait_semaphore | 54 | * FUNCTION: acpi_ex_system_wait_semaphore |
55 | * | 55 | * |
56 | * PARAMETERS: Semaphore - Semaphore to wait on | 56 | * PARAMETERS: semaphore - Semaphore to wait on |
57 | * Timeout - Max time to wait | 57 | * timeout - Max time to wait |
58 | * | 58 | * |
59 | * RETURN: Status | 59 | * RETURN: Status |
60 | * | 60 | * |
@@ -98,8 +98,8 @@ acpi_status acpi_ex_system_wait_semaphore(acpi_semaphore semaphore, u16 timeout) | |||
98 | * | 98 | * |
99 | * FUNCTION: acpi_ex_system_wait_mutex | 99 | * FUNCTION: acpi_ex_system_wait_mutex |
100 | * | 100 | * |
101 | * PARAMETERS: Mutex - Mutex to wait on | 101 | * PARAMETERS: mutex - Mutex to wait on |
102 | * Timeout - Max time to wait | 102 | * timeout - Max time to wait |
103 | * | 103 | * |
104 | * RETURN: Status | 104 | * RETURN: Status |
105 | * | 105 | * |
diff --git a/drivers/acpi/acpica/exutils.c b/drivers/acpi/acpica/exutils.c index eb6798ba8b59..d1ab7917eed7 100644 --- a/drivers/acpi/acpica/exutils.c +++ b/drivers/acpi/acpica/exutils.c | |||
@@ -109,7 +109,7 @@ void acpi_ex_enter_interpreter(void) | |||
109 | * | 109 | * |
110 | * DESCRIPTION: Reacquire the interpreter execution region from within the | 110 | * DESCRIPTION: Reacquire the interpreter execution region from within the |
111 | * interpreter code. Failure to enter the interpreter region is a | 111 | * interpreter code. Failure to enter the interpreter region is a |
112 | * fatal system error. Used in conjunction with | 112 | * fatal system error. Used in conjunction with |
113 | * relinquish_interpreter | 113 | * relinquish_interpreter |
114 | * | 114 | * |
115 | ******************************************************************************/ | 115 | ******************************************************************************/ |
@@ -317,8 +317,8 @@ void acpi_ex_release_global_lock(u32 field_flags) | |||
317 | * | 317 | * |
318 | * FUNCTION: acpi_ex_digits_needed | 318 | * FUNCTION: acpi_ex_digits_needed |
319 | * | 319 | * |
320 | * PARAMETERS: Value - Value to be represented | 320 | * PARAMETERS: value - Value to be represented |
321 | * Base - Base of representation | 321 | * base - Base of representation |
322 | * | 322 | * |
323 | * RETURN: The number of digits. | 323 | * RETURN: The number of digits. |
324 | * | 324 | * |
@@ -408,7 +408,7 @@ void acpi_ex_eisa_id_to_string(char *out_string, u64 compressed_id) | |||
408 | * PARAMETERS: out_string - Where to put the converted string. At least | 408 | * PARAMETERS: out_string - Where to put the converted string. At least |
409 | * 21 bytes are needed to hold the largest | 409 | * 21 bytes are needed to hold the largest |
410 | * possible 64-bit integer. | 410 | * possible 64-bit integer. |
411 | * Value - Value to be converted | 411 | * value - Value to be converted |
412 | * | 412 | * |
413 | * RETURN: None, string | 413 | * RETURN: None, string |
414 | * | 414 | * |
@@ -443,7 +443,7 @@ void acpi_ex_integer_to_string(char *out_string, u64 value) | |||
443 | * | 443 | * |
444 | * RETURN: TRUE if valid/supported ID. | 444 | * RETURN: TRUE if valid/supported ID. |
445 | * | 445 | * |
446 | * DESCRIPTION: Validate an operation region space_iD. | 446 | * DESCRIPTION: Validate an operation region space_ID. |
447 | * | 447 | * |
448 | ******************************************************************************/ | 448 | ******************************************************************************/ |
449 | 449 | ||
diff --git a/drivers/acpi/acpica/hwacpi.c b/drivers/acpi/acpica/hwacpi.c index d0b9ed5df97e..a1e71d0ef57b 100644 --- a/drivers/acpi/acpica/hwacpi.c +++ b/drivers/acpi/acpica/hwacpi.c | |||
@@ -53,7 +53,7 @@ ACPI_MODULE_NAME("hwacpi") | |||
53 | * | 53 | * |
54 | * FUNCTION: acpi_hw_set_mode | 54 | * FUNCTION: acpi_hw_set_mode |
55 | * | 55 | * |
56 | * PARAMETERS: Mode - SYS_MODE_ACPI or SYS_MODE_LEGACY | 56 | * PARAMETERS: mode - SYS_MODE_ACPI or SYS_MODE_LEGACY |
57 | * | 57 | * |
58 | * RETURN: Status | 58 | * RETURN: Status |
59 | * | 59 | * |
diff --git a/drivers/acpi/acpica/hwesleep.c b/drivers/acpi/acpica/hwesleep.c index 29e859293edd..48518dac5342 100644 --- a/drivers/acpi/acpica/hwesleep.c +++ b/drivers/acpi/acpica/hwesleep.c | |||
@@ -90,7 +90,7 @@ void acpi_hw_execute_sleep_method(char *method_pathname, u32 integer_argument) | |||
90 | * FUNCTION: acpi_hw_extended_sleep | 90 | * FUNCTION: acpi_hw_extended_sleep |
91 | * | 91 | * |
92 | * PARAMETERS: sleep_state - Which sleep state to enter | 92 | * PARAMETERS: sleep_state - Which sleep state to enter |
93 | * Flags - ACPI_EXECUTE_GTS to run optional method | 93 | * flags - ACPI_EXECUTE_GTS to run optional method |
94 | * | 94 | * |
95 | * RETURN: Status | 95 | * RETURN: Status |
96 | * | 96 | * |
@@ -117,7 +117,8 @@ acpi_status acpi_hw_extended_sleep(u8 sleep_state, u8 flags) | |||
117 | 117 | ||
118 | /* Clear wake status (WAK_STS) */ | 118 | /* Clear wake status (WAK_STS) */ |
119 | 119 | ||
120 | status = acpi_write(ACPI_X_WAKE_STATUS, &acpi_gbl_FADT.sleep_status); | 120 | status = |
121 | acpi_write((u64)ACPI_X_WAKE_STATUS, &acpi_gbl_FADT.sleep_status); | ||
121 | if (ACPI_FAILURE(status)) { | 122 | if (ACPI_FAILURE(status)) { |
122 | return_ACPI_STATUS(status); | 123 | return_ACPI_STATUS(status); |
123 | } | 124 | } |
@@ -147,7 +148,7 @@ acpi_status acpi_hw_extended_sleep(u8 sleep_state, u8 flags) | |||
147 | ((acpi_gbl_sleep_type_a << ACPI_X_SLEEP_TYPE_POSITION) & | 148 | ((acpi_gbl_sleep_type_a << ACPI_X_SLEEP_TYPE_POSITION) & |
148 | ACPI_X_SLEEP_TYPE_MASK); | 149 | ACPI_X_SLEEP_TYPE_MASK); |
149 | 150 | ||
150 | status = acpi_write((sleep_type_value | ACPI_X_SLEEP_ENABLE), | 151 | status = acpi_write((u64)(sleep_type_value | ACPI_X_SLEEP_ENABLE), |
151 | &acpi_gbl_FADT.sleep_control); | 152 | &acpi_gbl_FADT.sleep_control); |
152 | if (ACPI_FAILURE(status)) { | 153 | if (ACPI_FAILURE(status)) { |
153 | return_ACPI_STATUS(status); | 154 | return_ACPI_STATUS(status); |
@@ -171,7 +172,7 @@ acpi_status acpi_hw_extended_sleep(u8 sleep_state, u8 flags) | |||
171 | * FUNCTION: acpi_hw_extended_wake_prep | 172 | * FUNCTION: acpi_hw_extended_wake_prep |
172 | * | 173 | * |
173 | * PARAMETERS: sleep_state - Which sleep state we just exited | 174 | * PARAMETERS: sleep_state - Which sleep state we just exited |
174 | * Flags - ACPI_EXECUTE_BFS to run optional method | 175 | * flags - ACPI_EXECUTE_BFS to run optional method |
175 | * | 176 | * |
176 | * RETURN: Status | 177 | * RETURN: Status |
177 | * | 178 | * |
@@ -195,7 +196,7 @@ acpi_status acpi_hw_extended_wake_prep(u8 sleep_state, u8 flags) | |||
195 | ((acpi_gbl_sleep_type_a << ACPI_X_SLEEP_TYPE_POSITION) & | 196 | ((acpi_gbl_sleep_type_a << ACPI_X_SLEEP_TYPE_POSITION) & |
196 | ACPI_X_SLEEP_TYPE_MASK); | 197 | ACPI_X_SLEEP_TYPE_MASK); |
197 | 198 | ||
198 | (void)acpi_write((sleep_type_value | ACPI_X_SLEEP_ENABLE), | 199 | (void)acpi_write((u64)(sleep_type_value | ACPI_X_SLEEP_ENABLE), |
199 | &acpi_gbl_FADT.sleep_control); | 200 | &acpi_gbl_FADT.sleep_control); |
200 | } | 201 | } |
201 | 202 | ||
@@ -212,7 +213,7 @@ acpi_status acpi_hw_extended_wake_prep(u8 sleep_state, u8 flags) | |||
212 | * FUNCTION: acpi_hw_extended_wake | 213 | * FUNCTION: acpi_hw_extended_wake |
213 | * | 214 | * |
214 | * PARAMETERS: sleep_state - Which sleep state we just exited | 215 | * PARAMETERS: sleep_state - Which sleep state we just exited |
215 | * Flags - Reserved, set to zero | 216 | * flags - Reserved, set to zero |
216 | * | 217 | * |
217 | * RETURN: Status | 218 | * RETURN: Status |
218 | * | 219 | * |
@@ -239,7 +240,7 @@ acpi_status acpi_hw_extended_wake(u8 sleep_state, u8 flags) | |||
239 | * and use it to determine whether the system is rebooting or | 240 | * and use it to determine whether the system is rebooting or |
240 | * resuming. Clear WAK_STS for compatibility. | 241 | * resuming. Clear WAK_STS for compatibility. |
241 | */ | 242 | */ |
242 | (void)acpi_write(ACPI_X_WAKE_STATUS, &acpi_gbl_FADT.sleep_status); | 243 | (void)acpi_write((u64)ACPI_X_WAKE_STATUS, &acpi_gbl_FADT.sleep_status); |
243 | acpi_gbl_system_awake_and_running = TRUE; | 244 | acpi_gbl_system_awake_and_running = TRUE; |
244 | 245 | ||
245 | acpi_hw_execute_sleep_method(METHOD_PATHNAME__SST, ACPI_SST_WORKING); | 246 | acpi_hw_execute_sleep_method(METHOD_PATHNAME__SST, ACPI_SST_WORKING); |
diff --git a/drivers/acpi/acpica/hwregs.c b/drivers/acpi/acpica/hwregs.c index 6b6c83b87b52..4af6d20ef077 100644 --- a/drivers/acpi/acpica/hwregs.c +++ b/drivers/acpi/acpica/hwregs.c | |||
@@ -69,9 +69,9 @@ acpi_hw_write_multiple(u32 value, | |||
69 | * | 69 | * |
70 | * FUNCTION: acpi_hw_validate_register | 70 | * FUNCTION: acpi_hw_validate_register |
71 | * | 71 | * |
72 | * PARAMETERS: Reg - GAS register structure | 72 | * PARAMETERS: reg - GAS register structure |
73 | * max_bit_width - Max bit_width supported (32 or 64) | 73 | * max_bit_width - Max bit_width supported (32 or 64) |
74 | * Address - Pointer to where the gas->address | 74 | * address - Pointer to where the gas->address |
75 | * is returned | 75 | * is returned |
76 | * | 76 | * |
77 | * RETURN: Status | 77 | * RETURN: Status |
@@ -102,7 +102,7 @@ acpi_hw_validate_register(struct acpi_generic_address *reg, | |||
102 | return (AE_BAD_ADDRESS); | 102 | return (AE_BAD_ADDRESS); |
103 | } | 103 | } |
104 | 104 | ||
105 | /* Validate the space_iD */ | 105 | /* Validate the space_ID */ |
106 | 106 | ||
107 | if ((reg->space_id != ACPI_ADR_SPACE_SYSTEM_MEMORY) && | 107 | if ((reg->space_id != ACPI_ADR_SPACE_SYSTEM_MEMORY) && |
108 | (reg->space_id != ACPI_ADR_SPACE_SYSTEM_IO)) { | 108 | (reg->space_id != ACPI_ADR_SPACE_SYSTEM_IO)) { |
@@ -137,8 +137,8 @@ acpi_hw_validate_register(struct acpi_generic_address *reg, | |||
137 | * | 137 | * |
138 | * FUNCTION: acpi_hw_read | 138 | * FUNCTION: acpi_hw_read |
139 | * | 139 | * |
140 | * PARAMETERS: Value - Where the value is returned | 140 | * PARAMETERS: value - Where the value is returned |
141 | * Reg - GAS register structure | 141 | * reg - GAS register structure |
142 | * | 142 | * |
143 | * RETURN: Status | 143 | * RETURN: Status |
144 | * | 144 | * |
@@ -148,7 +148,7 @@ acpi_hw_validate_register(struct acpi_generic_address *reg, | |||
148 | * | 148 | * |
149 | * LIMITATIONS: <These limitations also apply to acpi_hw_write> | 149 | * LIMITATIONS: <These limitations also apply to acpi_hw_write> |
150 | * bit_width must be exactly 8, 16, or 32. | 150 | * bit_width must be exactly 8, 16, or 32. |
151 | * space_iD must be system_memory or system_iO. | 151 | * space_ID must be system_memory or system_IO. |
152 | * bit_offset and access_width are currently ignored, as there has | 152 | * bit_offset and access_width are currently ignored, as there has |
153 | * not been a need to implement these. | 153 | * not been a need to implement these. |
154 | * | 154 | * |
@@ -200,8 +200,8 @@ acpi_status acpi_hw_read(u32 *value, struct acpi_generic_address *reg) | |||
200 | * | 200 | * |
201 | * FUNCTION: acpi_hw_write | 201 | * FUNCTION: acpi_hw_write |
202 | * | 202 | * |
203 | * PARAMETERS: Value - Value to be written | 203 | * PARAMETERS: value - Value to be written |
204 | * Reg - GAS register structure | 204 | * reg - GAS register structure |
205 | * | 205 | * |
206 | * RETURN: Status | 206 | * RETURN: Status |
207 | * | 207 | * |
@@ -439,7 +439,7 @@ acpi_hw_register_read(u32 register_id, u32 * return_value) | |||
439 | * FUNCTION: acpi_hw_register_write | 439 | * FUNCTION: acpi_hw_register_write |
440 | * | 440 | * |
441 | * PARAMETERS: register_id - ACPI Register ID | 441 | * PARAMETERS: register_id - ACPI Register ID |
442 | * Value - The value to write | 442 | * value - The value to write |
443 | * | 443 | * |
444 | * RETURN: Status | 444 | * RETURN: Status |
445 | * | 445 | * |
@@ -571,7 +571,7 @@ acpi_status acpi_hw_register_write(u32 register_id, u32 value) | |||
571 | * | 571 | * |
572 | * FUNCTION: acpi_hw_read_multiple | 572 | * FUNCTION: acpi_hw_read_multiple |
573 | * | 573 | * |
574 | * PARAMETERS: Value - Where the register value is returned | 574 | * PARAMETERS: value - Where the register value is returned |
575 | * register_a - First ACPI register (required) | 575 | * register_a - First ACPI register (required) |
576 | * register_b - Second ACPI register (optional) | 576 | * register_b - Second ACPI register (optional) |
577 | * | 577 | * |
@@ -624,7 +624,7 @@ acpi_hw_read_multiple(u32 *value, | |||
624 | * | 624 | * |
625 | * FUNCTION: acpi_hw_write_multiple | 625 | * FUNCTION: acpi_hw_write_multiple |
626 | * | 626 | * |
627 | * PARAMETERS: Value - The value to write | 627 | * PARAMETERS: value - The value to write |
628 | * register_a - First ACPI register (required) | 628 | * register_a - First ACPI register (required) |
629 | * register_b - Second ACPI register (optional) | 629 | * register_b - Second ACPI register (optional) |
630 | * | 630 | * |
diff --git a/drivers/acpi/acpica/hwsleep.c b/drivers/acpi/acpica/hwsleep.c index 615996a36bed..9960fe9ef533 100644 --- a/drivers/acpi/acpica/hwsleep.c +++ b/drivers/acpi/acpica/hwsleep.c | |||
@@ -56,7 +56,7 @@ ACPI_MODULE_NAME("hwsleep") | |||
56 | * FUNCTION: acpi_hw_legacy_sleep | 56 | * FUNCTION: acpi_hw_legacy_sleep |
57 | * | 57 | * |
58 | * PARAMETERS: sleep_state - Which sleep state to enter | 58 | * PARAMETERS: sleep_state - Which sleep state to enter |
59 | * Flags - ACPI_EXECUTE_GTS to run optional method | 59 | * flags - ACPI_EXECUTE_GTS to run optional method |
60 | * | 60 | * |
61 | * RETURN: Status | 61 | * RETURN: Status |
62 | * | 62 | * |
@@ -214,7 +214,7 @@ acpi_status acpi_hw_legacy_sleep(u8 sleep_state, u8 flags) | |||
214 | * FUNCTION: acpi_hw_legacy_wake_prep | 214 | * FUNCTION: acpi_hw_legacy_wake_prep |
215 | * | 215 | * |
216 | * PARAMETERS: sleep_state - Which sleep state we just exited | 216 | * PARAMETERS: sleep_state - Which sleep state we just exited |
217 | * Flags - ACPI_EXECUTE_BFS to run optional method | 217 | * flags - ACPI_EXECUTE_BFS to run optional method |
218 | * | 218 | * |
219 | * RETURN: Status | 219 | * RETURN: Status |
220 | * | 220 | * |
@@ -288,7 +288,7 @@ acpi_status acpi_hw_legacy_wake_prep(u8 sleep_state, u8 flags) | |||
288 | * FUNCTION: acpi_hw_legacy_wake | 288 | * FUNCTION: acpi_hw_legacy_wake |
289 | * | 289 | * |
290 | * PARAMETERS: sleep_state - Which sleep state we just exited | 290 | * PARAMETERS: sleep_state - Which sleep state we just exited |
291 | * Flags - Reserved, set to zero | 291 | * flags - Reserved, set to zero |
292 | * | 292 | * |
293 | * RETURN: Status | 293 | * RETURN: Status |
294 | * | 294 | * |
diff --git a/drivers/acpi/acpica/hwtimer.c b/drivers/acpi/acpica/hwtimer.c index f1b2c3b94cac..b6411f16832f 100644 --- a/drivers/acpi/acpica/hwtimer.c +++ b/drivers/acpi/acpica/hwtimer.c | |||
@@ -54,7 +54,7 @@ ACPI_MODULE_NAME("hwtimer") | |||
54 | * | 54 | * |
55 | * FUNCTION: acpi_get_timer_resolution | 55 | * FUNCTION: acpi_get_timer_resolution |
56 | * | 56 | * |
57 | * PARAMETERS: Resolution - Where the resolution is returned | 57 | * PARAMETERS: resolution - Where the resolution is returned |
58 | * | 58 | * |
59 | * RETURN: Status and timer resolution | 59 | * RETURN: Status and timer resolution |
60 | * | 60 | * |
@@ -84,7 +84,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_timer_resolution) | |||
84 | * | 84 | * |
85 | * FUNCTION: acpi_get_timer | 85 | * FUNCTION: acpi_get_timer |
86 | * | 86 | * |
87 | * PARAMETERS: Ticks - Where the timer value is returned | 87 | * PARAMETERS: ticks - Where the timer value is returned |
88 | * | 88 | * |
89 | * RETURN: Status and current timer value (ticks) | 89 | * RETURN: Status and current timer value (ticks) |
90 | * | 90 | * |
diff --git a/drivers/acpi/acpica/hwvalid.c b/drivers/acpi/acpica/hwvalid.c index 6e5c43a60bb7..c99d546b217f 100644 --- a/drivers/acpi/acpica/hwvalid.c +++ b/drivers/acpi/acpica/hwvalid.c | |||
@@ -58,7 +58,7 @@ acpi_hw_validate_io_request(acpi_io_address address, u32 bit_width); | |||
58 | * | 58 | * |
59 | * The table is used to implement the Microsoft port access rules that | 59 | * The table is used to implement the Microsoft port access rules that |
60 | * first appeared in Windows XP. Some ports are always illegal, and some | 60 | * first appeared in Windows XP. Some ports are always illegal, and some |
61 | * ports are only illegal if the BIOS calls _OSI with a win_xP string or | 61 | * ports are only illegal if the BIOS calls _OSI with a win_XP string or |
62 | * later (meaning that the BIOS itelf is post-XP.) | 62 | * later (meaning that the BIOS itelf is post-XP.) |
63 | * | 63 | * |
64 | * This provides ACPICA with the desired port protections and | 64 | * This provides ACPICA with the desired port protections and |
@@ -66,7 +66,7 @@ acpi_hw_validate_io_request(acpi_io_address address, u32 bit_width); | |||
66 | * | 66 | * |
67 | * Description of port entries: | 67 | * Description of port entries: |
68 | * DMA: DMA controller | 68 | * DMA: DMA controller |
69 | * PIC0: Programmable Interrupt Controller (8259_a) | 69 | * PIC0: Programmable Interrupt Controller (8259A) |
70 | * PIT1: System Timer 1 | 70 | * PIT1: System Timer 1 |
71 | * PIT2: System Timer 2 failsafe | 71 | * PIT2: System Timer 2 failsafe |
72 | * RTC: Real-time clock | 72 | * RTC: Real-time clock |
diff --git a/drivers/acpi/acpica/hwxface.c b/drivers/acpi/acpica/hwxface.c index a716fede4f25..7bfd649d1996 100644 --- a/drivers/acpi/acpica/hwxface.c +++ b/drivers/acpi/acpica/hwxface.c | |||
@@ -104,8 +104,8 @@ ACPI_EXPORT_SYMBOL(acpi_reset) | |||
104 | * | 104 | * |
105 | * FUNCTION: acpi_read | 105 | * FUNCTION: acpi_read |
106 | * | 106 | * |
107 | * PARAMETERS: Value - Where the value is returned | 107 | * PARAMETERS: value - Where the value is returned |
108 | * Reg - GAS register structure | 108 | * reg - GAS register structure |
109 | * | 109 | * |
110 | * RETURN: Status | 110 | * RETURN: Status |
111 | * | 111 | * |
@@ -113,7 +113,7 @@ ACPI_EXPORT_SYMBOL(acpi_reset) | |||
113 | * | 113 | * |
114 | * LIMITATIONS: <These limitations also apply to acpi_write> | 114 | * LIMITATIONS: <These limitations also apply to acpi_write> |
115 | * bit_width must be exactly 8, 16, 32, or 64. | 115 | * bit_width must be exactly 8, 16, 32, or 64. |
116 | * space_iD must be system_memory or system_iO. | 116 | * space_ID must be system_memory or system_IO. |
117 | * bit_offset and access_width are currently ignored, as there has | 117 | * bit_offset and access_width are currently ignored, as there has |
118 | * not been a need to implement these. | 118 | * not been a need to implement these. |
119 | * | 119 | * |
@@ -196,8 +196,8 @@ ACPI_EXPORT_SYMBOL(acpi_read) | |||
196 | * | 196 | * |
197 | * FUNCTION: acpi_write | 197 | * FUNCTION: acpi_write |
198 | * | 198 | * |
199 | * PARAMETERS: Value - Value to be written | 199 | * PARAMETERS: value - Value to be written |
200 | * Reg - GAS register structure | 200 | * reg - GAS register structure |
201 | * | 201 | * |
202 | * RETURN: Status | 202 | * RETURN: Status |
203 | * | 203 | * |
@@ -441,7 +441,7 @@ ACPI_EXPORT_SYMBOL(acpi_write_bit_register) | |||
441 | * *sleep_type_a - Where SLP_TYPa is returned | 441 | * *sleep_type_a - Where SLP_TYPa is returned |
442 | * *sleep_type_b - Where SLP_TYPb is returned | 442 | * *sleep_type_b - Where SLP_TYPb is returned |
443 | * | 443 | * |
444 | * RETURN: Status - ACPI status | 444 | * RETURN: status - ACPI status |
445 | * | 445 | * |
446 | * DESCRIPTION: Obtain the SLP_TYPa and SLP_TYPb values for the requested sleep | 446 | * DESCRIPTION: Obtain the SLP_TYPa and SLP_TYPb values for the requested sleep |
447 | * state. | 447 | * state. |
diff --git a/drivers/acpi/acpica/hwxfsleep.c b/drivers/acpi/acpica/hwxfsleep.c index 762d059bb508..f8684bfe7907 100644 --- a/drivers/acpi/acpica/hwxfsleep.c +++ b/drivers/acpi/acpica/hwxfsleep.c | |||
@@ -205,7 +205,7 @@ acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void) | |||
205 | ACPI_FLUSH_CPU_CACHE(); | 205 | ACPI_FLUSH_CPU_CACHE(); |
206 | 206 | ||
207 | status = acpi_hw_write_port(acpi_gbl_FADT.smi_command, | 207 | status = acpi_hw_write_port(acpi_gbl_FADT.smi_command, |
208 | (u32)acpi_gbl_FADT.S4bios_request, 8); | 208 | (u32)acpi_gbl_FADT.s4_bios_request, 8); |
209 | 209 | ||
210 | do { | 210 | do { |
211 | acpi_os_stall(1000); | 211 | acpi_os_stall(1000); |
@@ -349,7 +349,7 @@ ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_prep) | |||
349 | * FUNCTION: acpi_enter_sleep_state | 349 | * FUNCTION: acpi_enter_sleep_state |
350 | * | 350 | * |
351 | * PARAMETERS: sleep_state - Which sleep state to enter | 351 | * PARAMETERS: sleep_state - Which sleep state to enter |
352 | * Flags - ACPI_EXECUTE_GTS to run optional method | 352 | * flags - ACPI_EXECUTE_GTS to run optional method |
353 | * | 353 | * |
354 | * RETURN: Status | 354 | * RETURN: Status |
355 | * | 355 | * |
@@ -382,7 +382,7 @@ ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state) | |||
382 | * FUNCTION: acpi_leave_sleep_state_prep | 382 | * FUNCTION: acpi_leave_sleep_state_prep |
383 | * | 383 | * |
384 | * PARAMETERS: sleep_state - Which sleep state we are exiting | 384 | * PARAMETERS: sleep_state - Which sleep state we are exiting |
385 | * Flags - ACPI_EXECUTE_BFS to run optional method | 385 | * flags - ACPI_EXECUTE_BFS to run optional method |
386 | * | 386 | * |
387 | * RETURN: Status | 387 | * RETURN: Status |
388 | * | 388 | * |
diff --git a/drivers/acpi/acpica/nsaccess.c b/drivers/acpi/acpica/nsaccess.c index 61623f3f6826..23db53ce2293 100644 --- a/drivers/acpi/acpica/nsaccess.c +++ b/drivers/acpi/acpica/nsaccess.c | |||
@@ -157,7 +157,7 @@ acpi_status acpi_ns_root_initialize(void) | |||
157 | 157 | ||
158 | #if defined (ACPI_ASL_COMPILER) | 158 | #if defined (ACPI_ASL_COMPILER) |
159 | 159 | ||
160 | /* Save the parameter count for the i_aSL compiler */ | 160 | /* Save the parameter count for the iASL compiler */ |
161 | 161 | ||
162 | new_node->value = obj_desc->method.param_count; | 162 | new_node->value = obj_desc->method.param_count; |
163 | #else | 163 | #else |
@@ -258,11 +258,11 @@ acpi_status acpi_ns_root_initialize(void) | |||
258 | * FUNCTION: acpi_ns_lookup | 258 | * FUNCTION: acpi_ns_lookup |
259 | * | 259 | * |
260 | * PARAMETERS: scope_info - Current scope info block | 260 | * PARAMETERS: scope_info - Current scope info block |
261 | * Pathname - Search pathname, in internal format | 261 | * pathname - Search pathname, in internal format |
262 | * (as represented in the AML stream) | 262 | * (as represented in the AML stream) |
263 | * Type - Type associated with name | 263 | * type - Type associated with name |
264 | * interpreter_mode - IMODE_LOAD_PASS2 => add name if not found | 264 | * interpreter_mode - IMODE_LOAD_PASS2 => add name if not found |
265 | * Flags - Flags describing the search restrictions | 265 | * flags - Flags describing the search restrictions |
266 | * walk_state - Current state of the walk | 266 | * walk_state - Current state of the walk |
267 | * return_node - Where the Node is placed (if found | 267 | * return_node - Where the Node is placed (if found |
268 | * or created successfully) | 268 | * or created successfully) |
diff --git a/drivers/acpi/acpica/nsalloc.c b/drivers/acpi/acpica/nsalloc.c index 7c3d3ceb98b3..ac389e5bb594 100644 --- a/drivers/acpi/acpica/nsalloc.c +++ b/drivers/acpi/acpica/nsalloc.c | |||
@@ -52,7 +52,7 @@ ACPI_MODULE_NAME("nsalloc") | |||
52 | * | 52 | * |
53 | * FUNCTION: acpi_ns_create_node | 53 | * FUNCTION: acpi_ns_create_node |
54 | * | 54 | * |
55 | * PARAMETERS: Name - Name of the new node (4 char ACPI name) | 55 | * PARAMETERS: name - Name of the new node (4 char ACPI name) |
56 | * | 56 | * |
57 | * RETURN: New namespace node (Null on failure) | 57 | * RETURN: New namespace node (Null on failure) |
58 | * | 58 | * |
@@ -92,7 +92,7 @@ struct acpi_namespace_node *acpi_ns_create_node(u32 name) | |||
92 | * | 92 | * |
93 | * FUNCTION: acpi_ns_delete_node | 93 | * FUNCTION: acpi_ns_delete_node |
94 | * | 94 | * |
95 | * PARAMETERS: Node - Node to be deleted | 95 | * PARAMETERS: node - Node to be deleted |
96 | * | 96 | * |
97 | * RETURN: None | 97 | * RETURN: None |
98 | * | 98 | * |
@@ -143,7 +143,7 @@ void acpi_ns_delete_node(struct acpi_namespace_node *node) | |||
143 | * | 143 | * |
144 | * FUNCTION: acpi_ns_remove_node | 144 | * FUNCTION: acpi_ns_remove_node |
145 | * | 145 | * |
146 | * PARAMETERS: Node - Node to be removed/deleted | 146 | * PARAMETERS: node - Node to be removed/deleted |
147 | * | 147 | * |
148 | * RETURN: None | 148 | * RETURN: None |
149 | * | 149 | * |
@@ -196,8 +196,8 @@ void acpi_ns_remove_node(struct acpi_namespace_node *node) | |||
196 | * | 196 | * |
197 | * PARAMETERS: walk_state - Current state of the walk | 197 | * PARAMETERS: walk_state - Current state of the walk |
198 | * parent_node - The parent of the new Node | 198 | * parent_node - The parent of the new Node |
199 | * Node - The new Node to install | 199 | * node - The new Node to install |
200 | * Type - ACPI object type of the new Node | 200 | * type - ACPI object type of the new Node |
201 | * | 201 | * |
202 | * RETURN: None | 202 | * RETURN: None |
203 | * | 203 | * |
diff --git a/drivers/acpi/acpica/nsdump.c b/drivers/acpi/acpica/nsdump.c index 3f7f3f6e7dd5..7ee4e6aeb0a2 100644 --- a/drivers/acpi/acpica/nsdump.c +++ b/drivers/acpi/acpica/nsdump.c | |||
@@ -63,7 +63,7 @@ acpi_ns_dump_one_device(acpi_handle obj_handle, | |||
63 | * FUNCTION: acpi_ns_print_pathname | 63 | * FUNCTION: acpi_ns_print_pathname |
64 | * | 64 | * |
65 | * PARAMETERS: num_segments - Number of ACPI name segments | 65 | * PARAMETERS: num_segments - Number of ACPI name segments |
66 | * Pathname - The compressed (internal) path | 66 | * pathname - The compressed (internal) path |
67 | * | 67 | * |
68 | * RETURN: None | 68 | * RETURN: None |
69 | * | 69 | * |
@@ -107,10 +107,10 @@ void acpi_ns_print_pathname(u32 num_segments, char *pathname) | |||
107 | * | 107 | * |
108 | * FUNCTION: acpi_ns_dump_pathname | 108 | * FUNCTION: acpi_ns_dump_pathname |
109 | * | 109 | * |
110 | * PARAMETERS: Handle - Object | 110 | * PARAMETERS: handle - Object |
111 | * Msg - Prefix message | 111 | * msg - Prefix message |
112 | * Level - Desired debug level | 112 | * level - Desired debug level |
113 | * Component - Caller's component ID | 113 | * component - Caller's component ID |
114 | * | 114 | * |
115 | * RETURN: None | 115 | * RETURN: None |
116 | * | 116 | * |
@@ -143,8 +143,8 @@ acpi_ns_dump_pathname(acpi_handle handle, char *msg, u32 level, u32 component) | |||
143 | * FUNCTION: acpi_ns_dump_one_object | 143 | * FUNCTION: acpi_ns_dump_one_object |
144 | * | 144 | * |
145 | * PARAMETERS: obj_handle - Node to be dumped | 145 | * PARAMETERS: obj_handle - Node to be dumped |
146 | * Level - Nesting level of the handle | 146 | * level - Nesting level of the handle |
147 | * Context - Passed into walk_namespace | 147 | * context - Passed into walk_namespace |
148 | * return_value - Not used | 148 | * return_value - Not used |
149 | * | 149 | * |
150 | * RETURN: Status | 150 | * RETURN: Status |
@@ -615,7 +615,7 @@ acpi_ns_dump_one_object(acpi_handle obj_handle, | |||
615 | * | 615 | * |
616 | * FUNCTION: acpi_ns_dump_objects | 616 | * FUNCTION: acpi_ns_dump_objects |
617 | * | 617 | * |
618 | * PARAMETERS: Type - Object type to be dumped | 618 | * PARAMETERS: type - Object type to be dumped |
619 | * display_type - 0 or ACPI_DISPLAY_SUMMARY | 619 | * display_type - 0 or ACPI_DISPLAY_SUMMARY |
620 | * max_depth - Maximum depth of dump. Use ACPI_UINT32_MAX | 620 | * max_depth - Maximum depth of dump. Use ACPI_UINT32_MAX |
621 | * for an effectively unlimited depth. | 621 | * for an effectively unlimited depth. |
@@ -671,7 +671,7 @@ acpi_ns_dump_objects(acpi_object_type type, | |||
671 | * | 671 | * |
672 | * FUNCTION: acpi_ns_dump_entry | 672 | * FUNCTION: acpi_ns_dump_entry |
673 | * | 673 | * |
674 | * PARAMETERS: Handle - Node to be dumped | 674 | * PARAMETERS: handle - Node to be dumped |
675 | * debug_level - Output level | 675 | * debug_level - Output level |
676 | * | 676 | * |
677 | * RETURN: None | 677 | * RETURN: None |
diff --git a/drivers/acpi/acpica/nsdumpdv.c b/drivers/acpi/acpica/nsdumpdv.c index 3b5acb0eb406..944d4c8d9438 100644 --- a/drivers/acpi/acpica/nsdumpdv.c +++ b/drivers/acpi/acpica/nsdumpdv.c | |||
@@ -55,9 +55,9 @@ ACPI_MODULE_NAME("nsdumpdv") | |||
55 | * | 55 | * |
56 | * FUNCTION: acpi_ns_dump_one_device | 56 | * FUNCTION: acpi_ns_dump_one_device |
57 | * | 57 | * |
58 | * PARAMETERS: Handle - Node to be dumped | 58 | * PARAMETERS: handle - Node to be dumped |
59 | * Level - Nesting level of the handle | 59 | * level - Nesting level of the handle |
60 | * Context - Passed into walk_namespace | 60 | * context - Passed into walk_namespace |
61 | * return_value - Not used | 61 | * return_value - Not used |
62 | * | 62 | * |
63 | * RETURN: Status | 63 | * RETURN: Status |
diff --git a/drivers/acpi/acpica/nseval.c b/drivers/acpi/acpica/nseval.c index f375cb82e321..69074be498e8 100644 --- a/drivers/acpi/acpica/nseval.c +++ b/drivers/acpi/acpica/nseval.c | |||
@@ -59,11 +59,11 @@ acpi_ns_exec_module_code(union acpi_operand_object *method_obj, | |||
59 | * | 59 | * |
60 | * FUNCTION: acpi_ns_evaluate | 60 | * FUNCTION: acpi_ns_evaluate |
61 | * | 61 | * |
62 | * PARAMETERS: Info - Evaluation info block, contains: | 62 | * PARAMETERS: info - Evaluation info block, contains: |
63 | * prefix_node - Prefix or Method/Object Node to execute | 63 | * prefix_node - Prefix or Method/Object Node to execute |
64 | * Pathname - Name of method to execute, If NULL, the | 64 | * pathname - Name of method to execute, If NULL, the |
65 | * Node is the object to execute | 65 | * Node is the object to execute |
66 | * Parameters - List of parameters to pass to the method, | 66 | * parameters - List of parameters to pass to the method, |
67 | * terminated by NULL. Params itself may be | 67 | * terminated by NULL. Params itself may be |
68 | * NULL if no parameters are being passed. | 68 | * NULL if no parameters are being passed. |
69 | * return_object - Where to put method's return value (if | 69 | * return_object - Where to put method's return value (if |
@@ -71,7 +71,7 @@ acpi_ns_exec_module_code(union acpi_operand_object *method_obj, | |||
71 | * parameter_type - Type of Parameter list | 71 | * parameter_type - Type of Parameter list |
72 | * return_object - Where to put method's return value (if | 72 | * return_object - Where to put method's return value (if |
73 | * any). If NULL, no value is returned. | 73 | * any). If NULL, no value is returned. |
74 | * Flags - ACPI_IGNORE_RETURN_VALUE to delete return | 74 | * flags - ACPI_IGNORE_RETURN_VALUE to delete return |
75 | * | 75 | * |
76 | * RETURN: Status | 76 | * RETURN: Status |
77 | * | 77 | * |
@@ -351,7 +351,7 @@ void acpi_ns_exec_module_code_list(void) | |||
351 | * FUNCTION: acpi_ns_exec_module_code | 351 | * FUNCTION: acpi_ns_exec_module_code |
352 | * | 352 | * |
353 | * PARAMETERS: method_obj - Object container for the module-level code | 353 | * PARAMETERS: method_obj - Object container for the module-level code |
354 | * Info - Info block for method evaluation | 354 | * info - Info block for method evaluation |
355 | * | 355 | * |
356 | * RETURN: None. Exceptions during method execution are ignored, since | 356 | * RETURN: None. Exceptions during method execution are ignored, since |
357 | * we cannot abort a table load. | 357 | * we cannot abort a table load. |
diff --git a/drivers/acpi/acpica/nsinit.c b/drivers/acpi/acpica/nsinit.c index 9d84ec2f0211..95ffe8dfa1f1 100644 --- a/drivers/acpi/acpica/nsinit.c +++ b/drivers/acpi/acpica/nsinit.c | |||
@@ -224,8 +224,8 @@ acpi_status acpi_ns_initialize_devices(void) | |||
224 | * FUNCTION: acpi_ns_init_one_object | 224 | * FUNCTION: acpi_ns_init_one_object |
225 | * | 225 | * |
226 | * PARAMETERS: obj_handle - Node | 226 | * PARAMETERS: obj_handle - Node |
227 | * Level - Current nesting level | 227 | * level - Current nesting level |
228 | * Context - Points to a init info struct | 228 | * context - Points to a init info struct |
229 | * return_value - Not used | 229 | * return_value - Not used |
230 | * | 230 | * |
231 | * RETURN: Status | 231 | * RETURN: Status |
@@ -530,7 +530,7 @@ acpi_ns_init_one_device(acpi_handle obj_handle, | |||
530 | * we will not run _INI, but we continue to examine the children | 530 | * we will not run _INI, but we continue to examine the children |
531 | * of this device. | 531 | * of this device. |
532 | * | 532 | * |
533 | * From the ACPI spec, description of _STA: (Note - no mention | 533 | * From the ACPI spec, description of _STA: (note - no mention |
534 | * of whether to run _INI or not on the device in question) | 534 | * of whether to run _INI or not on the device in question) |
535 | * | 535 | * |
536 | * "_STA may return bit 0 clear (not present) with bit 3 set | 536 | * "_STA may return bit 0 clear (not present) with bit 3 set |
diff --git a/drivers/acpi/acpica/nsload.c b/drivers/acpi/acpica/nsload.c index 5cbf15ffe7d8..76935ff29289 100644 --- a/drivers/acpi/acpica/nsload.c +++ b/drivers/acpi/acpica/nsload.c | |||
@@ -63,7 +63,7 @@ static acpi_status acpi_ns_delete_subtree(acpi_handle start_handle); | |||
63 | * FUNCTION: acpi_ns_load_table | 63 | * FUNCTION: acpi_ns_load_table |
64 | * | 64 | * |
65 | * PARAMETERS: table_index - Index for table to be loaded | 65 | * PARAMETERS: table_index - Index for table to be loaded |
66 | * Node - Owning NS node | 66 | * node - Owning NS node |
67 | * | 67 | * |
68 | * RETURN: Status | 68 | * RETURN: Status |
69 | * | 69 | * |
@@ -278,7 +278,7 @@ static acpi_status acpi_ns_delete_subtree(acpi_handle start_handle) | |||
278 | * | 278 | * |
279 | * FUNCTION: acpi_ns_unload_name_space | 279 | * FUNCTION: acpi_ns_unload_name_space |
280 | * | 280 | * |
281 | * PARAMETERS: Handle - Root of namespace subtree to be deleted | 281 | * PARAMETERS: handle - Root of namespace subtree to be deleted |
282 | * | 282 | * |
283 | * RETURN: Status | 283 | * RETURN: Status |
284 | * | 284 | * |
diff --git a/drivers/acpi/acpica/nsnames.c b/drivers/acpi/acpica/nsnames.c index b20e7c8c3ffb..96e0eb609bb4 100644 --- a/drivers/acpi/acpica/nsnames.c +++ b/drivers/acpi/acpica/nsnames.c | |||
@@ -53,8 +53,8 @@ ACPI_MODULE_NAME("nsnames") | |||
53 | * | 53 | * |
54 | * FUNCTION: acpi_ns_build_external_path | 54 | * FUNCTION: acpi_ns_build_external_path |
55 | * | 55 | * |
56 | * PARAMETERS: Node - NS node whose pathname is needed | 56 | * PARAMETERS: node - NS node whose pathname is needed |
57 | * Size - Size of the pathname | 57 | * size - Size of the pathname |
58 | * *name_buffer - Where to return the pathname | 58 | * *name_buffer - Where to return the pathname |
59 | * | 59 | * |
60 | * RETURN: Status | 60 | * RETURN: Status |
@@ -120,7 +120,7 @@ acpi_ns_build_external_path(struct acpi_namespace_node *node, | |||
120 | * | 120 | * |
121 | * FUNCTION: acpi_ns_get_external_pathname | 121 | * FUNCTION: acpi_ns_get_external_pathname |
122 | * | 122 | * |
123 | * PARAMETERS: Node - Namespace node whose pathname is needed | 123 | * PARAMETERS: node - Namespace node whose pathname is needed |
124 | * | 124 | * |
125 | * RETURN: Pointer to storage containing the fully qualified name of | 125 | * RETURN: Pointer to storage containing the fully qualified name of |
126 | * the node, In external format (name segments separated by path | 126 | * the node, In external format (name segments separated by path |
@@ -168,7 +168,7 @@ char *acpi_ns_get_external_pathname(struct acpi_namespace_node *node) | |||
168 | * | 168 | * |
169 | * FUNCTION: acpi_ns_get_pathname_length | 169 | * FUNCTION: acpi_ns_get_pathname_length |
170 | * | 170 | * |
171 | * PARAMETERS: Node - Namespace node | 171 | * PARAMETERS: node - Namespace node |
172 | * | 172 | * |
173 | * RETURN: Length of path, including prefix | 173 | * RETURN: Length of path, including prefix |
174 | * | 174 | * |
@@ -214,7 +214,7 @@ acpi_size acpi_ns_get_pathname_length(struct acpi_namespace_node *node) | |||
214 | * | 214 | * |
215 | * PARAMETERS: target_handle - Handle of named object whose name is | 215 | * PARAMETERS: target_handle - Handle of named object whose name is |
216 | * to be found | 216 | * to be found |
217 | * Buffer - Where the pathname is returned | 217 | * buffer - Where the pathname is returned |
218 | * | 218 | * |
219 | * RETURN: Status, Buffer is filled with pathname if status is AE_OK | 219 | * RETURN: Status, Buffer is filled with pathname if status is AE_OK |
220 | * | 220 | * |
diff --git a/drivers/acpi/acpica/nsobject.c b/drivers/acpi/acpica/nsobject.c index dd77a3ce6e50..d6c9a3cc6716 100644 --- a/drivers/acpi/acpica/nsobject.c +++ b/drivers/acpi/acpica/nsobject.c | |||
@@ -53,9 +53,9 @@ ACPI_MODULE_NAME("nsobject") | |||
53 | * | 53 | * |
54 | * FUNCTION: acpi_ns_attach_object | 54 | * FUNCTION: acpi_ns_attach_object |
55 | * | 55 | * |
56 | * PARAMETERS: Node - Parent Node | 56 | * PARAMETERS: node - Parent Node |
57 | * Object - Object to be attached | 57 | * object - Object to be attached |
58 | * Type - Type of object, or ACPI_TYPE_ANY if not | 58 | * type - Type of object, or ACPI_TYPE_ANY if not |
59 | * known | 59 | * known |
60 | * | 60 | * |
61 | * RETURN: Status | 61 | * RETURN: Status |
@@ -191,7 +191,7 @@ acpi_ns_attach_object(struct acpi_namespace_node *node, | |||
191 | * | 191 | * |
192 | * FUNCTION: acpi_ns_detach_object | 192 | * FUNCTION: acpi_ns_detach_object |
193 | * | 193 | * |
194 | * PARAMETERS: Node - A Namespace node whose object will be detached | 194 | * PARAMETERS: node - A Namespace node whose object will be detached |
195 | * | 195 | * |
196 | * RETURN: None. | 196 | * RETURN: None. |
197 | * | 197 | * |
@@ -250,7 +250,7 @@ void acpi_ns_detach_object(struct acpi_namespace_node *node) | |||
250 | * | 250 | * |
251 | * FUNCTION: acpi_ns_get_attached_object | 251 | * FUNCTION: acpi_ns_get_attached_object |
252 | * | 252 | * |
253 | * PARAMETERS: Node - Namespace node | 253 | * PARAMETERS: node - Namespace node |
254 | * | 254 | * |
255 | * RETURN: Current value of the object field from the Node whose | 255 | * RETURN: Current value of the object field from the Node whose |
256 | * handle is passed | 256 | * handle is passed |
@@ -285,7 +285,7 @@ union acpi_operand_object *acpi_ns_get_attached_object(struct | |||
285 | * | 285 | * |
286 | * FUNCTION: acpi_ns_get_secondary_object | 286 | * FUNCTION: acpi_ns_get_secondary_object |
287 | * | 287 | * |
288 | * PARAMETERS: Node - Namespace node | 288 | * PARAMETERS: node - Namespace node |
289 | * | 289 | * |
290 | * RETURN: Current value of the object field from the Node whose | 290 | * RETURN: Current value of the object field from the Node whose |
291 | * handle is passed. | 291 | * handle is passed. |
@@ -315,9 +315,9 @@ union acpi_operand_object *acpi_ns_get_secondary_object(union | |||
315 | * | 315 | * |
316 | * FUNCTION: acpi_ns_attach_data | 316 | * FUNCTION: acpi_ns_attach_data |
317 | * | 317 | * |
318 | * PARAMETERS: Node - Namespace node | 318 | * PARAMETERS: node - Namespace node |
319 | * Handler - Handler to be associated with the data | 319 | * handler - Handler to be associated with the data |
320 | * Data - Data to be attached | 320 | * data - Data to be attached |
321 | * | 321 | * |
322 | * RETURN: Status | 322 | * RETURN: Status |
323 | * | 323 | * |
@@ -372,8 +372,8 @@ acpi_ns_attach_data(struct acpi_namespace_node *node, | |||
372 | * | 372 | * |
373 | * FUNCTION: acpi_ns_detach_data | 373 | * FUNCTION: acpi_ns_detach_data |
374 | * | 374 | * |
375 | * PARAMETERS: Node - Namespace node | 375 | * PARAMETERS: node - Namespace node |
376 | * Handler - Handler associated with the data | 376 | * handler - Handler associated with the data |
377 | * | 377 | * |
378 | * RETURN: Status | 378 | * RETURN: Status |
379 | * | 379 | * |
@@ -416,9 +416,9 @@ acpi_ns_detach_data(struct acpi_namespace_node * node, | |||
416 | * | 416 | * |
417 | * FUNCTION: acpi_ns_get_attached_data | 417 | * FUNCTION: acpi_ns_get_attached_data |
418 | * | 418 | * |
419 | * PARAMETERS: Node - Namespace node | 419 | * PARAMETERS: node - Namespace node |
420 | * Handler - Handler associated with the data | 420 | * handler - Handler associated with the data |
421 | * Data - Where the data is returned | 421 | * data - Where the data is returned |
422 | * | 422 | * |
423 | * RETURN: Status | 423 | * RETURN: Status |
424 | * | 424 | * |
diff --git a/drivers/acpi/acpica/nspredef.c b/drivers/acpi/acpica/nspredef.c index fe6626035495..2419f417ea33 100644 --- a/drivers/acpi/acpica/nspredef.c +++ b/drivers/acpi/acpica/nspredef.c | |||
@@ -116,7 +116,7 @@ static const char *acpi_rtype_names[] = { | |||
116 | * | 116 | * |
117 | * FUNCTION: acpi_ns_check_predefined_names | 117 | * FUNCTION: acpi_ns_check_predefined_names |
118 | * | 118 | * |
119 | * PARAMETERS: Node - Namespace node for the method/object | 119 | * PARAMETERS: node - Namespace node for the method/object |
120 | * user_param_count - Number of parameters actually passed | 120 | * user_param_count - Number of parameters actually passed |
121 | * return_status - Status from the object evaluation | 121 | * return_status - Status from the object evaluation |
122 | * return_object_ptr - Pointer to the object returned from the | 122 | * return_object_ptr - Pointer to the object returned from the |
@@ -275,10 +275,10 @@ cleanup: | |||
275 | * | 275 | * |
276 | * FUNCTION: acpi_ns_check_parameter_count | 276 | * FUNCTION: acpi_ns_check_parameter_count |
277 | * | 277 | * |
278 | * PARAMETERS: Pathname - Full pathname to the node (for error msgs) | 278 | * PARAMETERS: pathname - Full pathname to the node (for error msgs) |
279 | * Node - Namespace node for the method/object | 279 | * node - Namespace node for the method/object |
280 | * user_param_count - Number of args passed in by the caller | 280 | * user_param_count - Number of args passed in by the caller |
281 | * Predefined - Pointer to entry in predefined name table | 281 | * predefined - Pointer to entry in predefined name table |
282 | * | 282 | * |
283 | * RETURN: None | 283 | * RETURN: None |
284 | * | 284 | * |
@@ -364,7 +364,7 @@ acpi_ns_check_parameter_count(char *pathname, | |||
364 | * | 364 | * |
365 | * FUNCTION: acpi_ns_check_for_predefined_name | 365 | * FUNCTION: acpi_ns_check_for_predefined_name |
366 | * | 366 | * |
367 | * PARAMETERS: Node - Namespace node for the method/object | 367 | * PARAMETERS: node - Namespace node for the method/object |
368 | * | 368 | * |
369 | * RETURN: Pointer to entry in predefined table. NULL indicates not found. | 369 | * RETURN: Pointer to entry in predefined table. NULL indicates not found. |
370 | * | 370 | * |
@@ -410,7 +410,7 @@ const union acpi_predefined_info *acpi_ns_check_for_predefined_name(struct | |||
410 | * | 410 | * |
411 | * FUNCTION: acpi_ns_check_package | 411 | * FUNCTION: acpi_ns_check_package |
412 | * | 412 | * |
413 | * PARAMETERS: Data - Pointer to validation data structure | 413 | * PARAMETERS: data - Pointer to validation data structure |
414 | * return_object_ptr - Pointer to the object returned from the | 414 | * return_object_ptr - Pointer to the object returned from the |
415 | * evaluation of a method or object | 415 | * evaluation of a method or object |
416 | * | 416 | * |
@@ -685,11 +685,11 @@ package_too_small: | |||
685 | * | 685 | * |
686 | * FUNCTION: acpi_ns_check_package_list | 686 | * FUNCTION: acpi_ns_check_package_list |
687 | * | 687 | * |
688 | * PARAMETERS: Data - Pointer to validation data structure | 688 | * PARAMETERS: data - Pointer to validation data structure |
689 | * Package - Pointer to package-specific info for method | 689 | * package - Pointer to package-specific info for method |
690 | * Elements - Element list of parent package. All elements | 690 | * elements - Element list of parent package. All elements |
691 | * of this list should be of type Package. | 691 | * of this list should be of type Package. |
692 | * Count - Count of subpackages | 692 | * count - Count of subpackages |
693 | * | 693 | * |
694 | * RETURN: Status | 694 | * RETURN: Status |
695 | * | 695 | * |
@@ -911,12 +911,12 @@ package_too_small: | |||
911 | * | 911 | * |
912 | * FUNCTION: acpi_ns_check_package_elements | 912 | * FUNCTION: acpi_ns_check_package_elements |
913 | * | 913 | * |
914 | * PARAMETERS: Data - Pointer to validation data structure | 914 | * PARAMETERS: data - Pointer to validation data structure |
915 | * Elements - Pointer to the package elements array | 915 | * elements - Pointer to the package elements array |
916 | * Type1 - Object type for first group | 916 | * type1 - Object type for first group |
917 | * Count1 - Count for first group | 917 | * count1 - Count for first group |
918 | * Type2 - Object type for second group | 918 | * type2 - Object type for second group |
919 | * Count2 - Count for second group | 919 | * count2 - Count for second group |
920 | * start_index - Start of the first group of elements | 920 | * start_index - Start of the first group of elements |
921 | * | 921 | * |
922 | * RETURN: Status | 922 | * RETURN: Status |
@@ -968,7 +968,7 @@ acpi_ns_check_package_elements(struct acpi_predefined_data *data, | |||
968 | * | 968 | * |
969 | * FUNCTION: acpi_ns_check_object_type | 969 | * FUNCTION: acpi_ns_check_object_type |
970 | * | 970 | * |
971 | * PARAMETERS: Data - Pointer to validation data structure | 971 | * PARAMETERS: data - Pointer to validation data structure |
972 | * return_object_ptr - Pointer to the object returned from the | 972 | * return_object_ptr - Pointer to the object returned from the |
973 | * evaluation of a method or object | 973 | * evaluation of a method or object |
974 | * expected_btypes - Bitmap of expected return type(s) | 974 | * expected_btypes - Bitmap of expected return type(s) |
@@ -1102,7 +1102,7 @@ acpi_ns_check_object_type(struct acpi_predefined_data *data, | |||
1102 | * | 1102 | * |
1103 | * FUNCTION: acpi_ns_check_reference | 1103 | * FUNCTION: acpi_ns_check_reference |
1104 | * | 1104 | * |
1105 | * PARAMETERS: Data - Pointer to validation data structure | 1105 | * PARAMETERS: data - Pointer to validation data structure |
1106 | * return_object - Object returned from the evaluation of a | 1106 | * return_object - Object returned from the evaluation of a |
1107 | * method or object | 1107 | * method or object |
1108 | * | 1108 | * |
@@ -1140,7 +1140,7 @@ acpi_ns_check_reference(struct acpi_predefined_data *data, | |||
1140 | * | 1140 | * |
1141 | * FUNCTION: acpi_ns_get_expected_types | 1141 | * FUNCTION: acpi_ns_get_expected_types |
1142 | * | 1142 | * |
1143 | * PARAMETERS: Buffer - Pointer to where the string is returned | 1143 | * PARAMETERS: buffer - Pointer to where the string is returned |
1144 | * expected_btypes - Bitmap of expected return type(s) | 1144 | * expected_btypes - Bitmap of expected return type(s) |
1145 | * | 1145 | * |
1146 | * RETURN: Buffer is populated with type names. | 1146 | * RETURN: Buffer is populated with type names. |
diff --git a/drivers/acpi/acpica/nsrepair.c b/drivers/acpi/acpica/nsrepair.c index 5519a64a353f..8c5f292860fc 100644 --- a/drivers/acpi/acpica/nsrepair.c +++ b/drivers/acpi/acpica/nsrepair.c | |||
@@ -94,7 +94,7 @@ acpi_ns_convert_to_buffer(union acpi_operand_object *original_object, | |||
94 | * | 94 | * |
95 | * FUNCTION: acpi_ns_repair_object | 95 | * FUNCTION: acpi_ns_repair_object |
96 | * | 96 | * |
97 | * PARAMETERS: Data - Pointer to validation data structure | 97 | * PARAMETERS: data - Pointer to validation data structure |
98 | * expected_btypes - Object types expected | 98 | * expected_btypes - Object types expected |
99 | * package_index - Index of object within parent package (if | 99 | * package_index - Index of object within parent package (if |
100 | * applicable - ACPI_NOT_PACKAGE_ELEMENT | 100 | * applicable - ACPI_NOT_PACKAGE_ELEMENT |
@@ -470,7 +470,7 @@ acpi_ns_convert_to_buffer(union acpi_operand_object *original_object, | |||
470 | * | 470 | * |
471 | * FUNCTION: acpi_ns_repair_null_element | 471 | * FUNCTION: acpi_ns_repair_null_element |
472 | * | 472 | * |
473 | * PARAMETERS: Data - Pointer to validation data structure | 473 | * PARAMETERS: data - Pointer to validation data structure |
474 | * expected_btypes - Object types expected | 474 | * expected_btypes - Object types expected |
475 | * package_index - Index of object within parent package (if | 475 | * package_index - Index of object within parent package (if |
476 | * applicable - ACPI_NOT_PACKAGE_ELEMENT | 476 | * applicable - ACPI_NOT_PACKAGE_ELEMENT |
@@ -509,17 +509,17 @@ acpi_ns_repair_null_element(struct acpi_predefined_data *data, | |||
509 | */ | 509 | */ |
510 | if (expected_btypes & ACPI_RTYPE_INTEGER) { | 510 | if (expected_btypes & ACPI_RTYPE_INTEGER) { |
511 | 511 | ||
512 | /* Need an Integer - create a zero-value integer */ | 512 | /* Need an integer - create a zero-value integer */ |
513 | 513 | ||
514 | new_object = acpi_ut_create_integer_object((u64)0); | 514 | new_object = acpi_ut_create_integer_object((u64)0); |
515 | } else if (expected_btypes & ACPI_RTYPE_STRING) { | 515 | } else if (expected_btypes & ACPI_RTYPE_STRING) { |
516 | 516 | ||
517 | /* Need a String - create a NULL string */ | 517 | /* Need a string - create a NULL string */ |
518 | 518 | ||
519 | new_object = acpi_ut_create_string_object(0); | 519 | new_object = acpi_ut_create_string_object(0); |
520 | } else if (expected_btypes & ACPI_RTYPE_BUFFER) { | 520 | } else if (expected_btypes & ACPI_RTYPE_BUFFER) { |
521 | 521 | ||
522 | /* Need a Buffer - create a zero-length buffer */ | 522 | /* Need a buffer - create a zero-length buffer */ |
523 | 523 | ||
524 | new_object = acpi_ut_create_buffer_object(0); | 524 | new_object = acpi_ut_create_buffer_object(0); |
525 | } else { | 525 | } else { |
@@ -552,7 +552,7 @@ acpi_ns_repair_null_element(struct acpi_predefined_data *data, | |||
552 | * | 552 | * |
553 | * FUNCTION: acpi_ns_remove_null_elements | 553 | * FUNCTION: acpi_ns_remove_null_elements |
554 | * | 554 | * |
555 | * PARAMETERS: Data - Pointer to validation data structure | 555 | * PARAMETERS: data - Pointer to validation data structure |
556 | * package_type - An acpi_return_package_types value | 556 | * package_type - An acpi_return_package_types value |
557 | * obj_desc - A Package object | 557 | * obj_desc - A Package object |
558 | * | 558 | * |
@@ -635,7 +635,7 @@ acpi_ns_remove_null_elements(struct acpi_predefined_data *data, | |||
635 | * | 635 | * |
636 | * FUNCTION: acpi_ns_wrap_with_package | 636 | * FUNCTION: acpi_ns_wrap_with_package |
637 | * | 637 | * |
638 | * PARAMETERS: Data - Pointer to validation data structure | 638 | * PARAMETERS: data - Pointer to validation data structure |
639 | * original_object - Pointer to the object to repair. | 639 | * original_object - Pointer to the object to repair. |
640 | * obj_desc_ptr - The new package object is returned here | 640 | * obj_desc_ptr - The new package object is returned here |
641 | * | 641 | * |
diff --git a/drivers/acpi/acpica/nsrepair2.c b/drivers/acpi/acpica/nsrepair2.c index 726bc8e687f7..90189251cdf0 100644 --- a/drivers/acpi/acpica/nsrepair2.c +++ b/drivers/acpi/acpica/nsrepair2.c | |||
@@ -149,8 +149,8 @@ static const struct acpi_repair_info acpi_ns_repairable_names[] = { | |||
149 | * | 149 | * |
150 | * FUNCTION: acpi_ns_complex_repairs | 150 | * FUNCTION: acpi_ns_complex_repairs |
151 | * | 151 | * |
152 | * PARAMETERS: Data - Pointer to validation data structure | 152 | * PARAMETERS: data - Pointer to validation data structure |
153 | * Node - Namespace node for the method/object | 153 | * node - Namespace node for the method/object |
154 | * validate_status - Original status of earlier validation | 154 | * validate_status - Original status of earlier validation |
155 | * return_object_ptr - Pointer to the object returned from the | 155 | * return_object_ptr - Pointer to the object returned from the |
156 | * evaluation of a method or object | 156 | * evaluation of a method or object |
@@ -187,7 +187,7 @@ acpi_ns_complex_repairs(struct acpi_predefined_data *data, | |||
187 | * | 187 | * |
188 | * FUNCTION: acpi_ns_match_repairable_name | 188 | * FUNCTION: acpi_ns_match_repairable_name |
189 | * | 189 | * |
190 | * PARAMETERS: Node - Namespace node for the method/object | 190 | * PARAMETERS: node - Namespace node for the method/object |
191 | * | 191 | * |
192 | * RETURN: Pointer to entry in repair table. NULL indicates not found. | 192 | * RETURN: Pointer to entry in repair table. NULL indicates not found. |
193 | * | 193 | * |
@@ -218,7 +218,7 @@ static const struct acpi_repair_info *acpi_ns_match_repairable_name(struct | |||
218 | * | 218 | * |
219 | * FUNCTION: acpi_ns_repair_ALR | 219 | * FUNCTION: acpi_ns_repair_ALR |
220 | * | 220 | * |
221 | * PARAMETERS: Data - Pointer to validation data structure | 221 | * PARAMETERS: data - Pointer to validation data structure |
222 | * return_object_ptr - Pointer to the object returned from the | 222 | * return_object_ptr - Pointer to the object returned from the |
223 | * evaluation of a method or object | 223 | * evaluation of a method or object |
224 | * | 224 | * |
@@ -247,7 +247,7 @@ acpi_ns_repair_ALR(struct acpi_predefined_data *data, | |||
247 | * | 247 | * |
248 | * FUNCTION: acpi_ns_repair_FDE | 248 | * FUNCTION: acpi_ns_repair_FDE |
249 | * | 249 | * |
250 | * PARAMETERS: Data - Pointer to validation data structure | 250 | * PARAMETERS: data - Pointer to validation data structure |
251 | * return_object_ptr - Pointer to the object returned from the | 251 | * return_object_ptr - Pointer to the object returned from the |
252 | * evaluation of a method or object | 252 | * evaluation of a method or object |
253 | * | 253 | * |
@@ -335,7 +335,7 @@ acpi_ns_repair_FDE(struct acpi_predefined_data *data, | |||
335 | * | 335 | * |
336 | * FUNCTION: acpi_ns_repair_CID | 336 | * FUNCTION: acpi_ns_repair_CID |
337 | * | 337 | * |
338 | * PARAMETERS: Data - Pointer to validation data structure | 338 | * PARAMETERS: data - Pointer to validation data structure |
339 | * return_object_ptr - Pointer to the object returned from the | 339 | * return_object_ptr - Pointer to the object returned from the |
340 | * evaluation of a method or object | 340 | * evaluation of a method or object |
341 | * | 341 | * |
@@ -405,7 +405,7 @@ acpi_ns_repair_CID(struct acpi_predefined_data *data, | |||
405 | * | 405 | * |
406 | * FUNCTION: acpi_ns_repair_HID | 406 | * FUNCTION: acpi_ns_repair_HID |
407 | * | 407 | * |
408 | * PARAMETERS: Data - Pointer to validation data structure | 408 | * PARAMETERS: data - Pointer to validation data structure |
409 | * return_object_ptr - Pointer to the object returned from the | 409 | * return_object_ptr - Pointer to the object returned from the |
410 | * evaluation of a method or object | 410 | * evaluation of a method or object |
411 | * | 411 | * |
@@ -487,7 +487,7 @@ acpi_ns_repair_HID(struct acpi_predefined_data *data, | |||
487 | * | 487 | * |
488 | * FUNCTION: acpi_ns_repair_TSS | 488 | * FUNCTION: acpi_ns_repair_TSS |
489 | * | 489 | * |
490 | * PARAMETERS: Data - Pointer to validation data structure | 490 | * PARAMETERS: data - Pointer to validation data structure |
491 | * return_object_ptr - Pointer to the object returned from the | 491 | * return_object_ptr - Pointer to the object returned from the |
492 | * evaluation of a method or object | 492 | * evaluation of a method or object |
493 | * | 493 | * |
@@ -531,7 +531,7 @@ acpi_ns_repair_TSS(struct acpi_predefined_data *data, | |||
531 | * | 531 | * |
532 | * FUNCTION: acpi_ns_repair_PSS | 532 | * FUNCTION: acpi_ns_repair_PSS |
533 | * | 533 | * |
534 | * PARAMETERS: Data - Pointer to validation data structure | 534 | * PARAMETERS: data - Pointer to validation data structure |
535 | * return_object_ptr - Pointer to the object returned from the | 535 | * return_object_ptr - Pointer to the object returned from the |
536 | * evaluation of a method or object | 536 | * evaluation of a method or object |
537 | * | 537 | * |
@@ -600,7 +600,7 @@ acpi_ns_repair_PSS(struct acpi_predefined_data *data, | |||
600 | * | 600 | * |
601 | * FUNCTION: acpi_ns_check_sorted_list | 601 | * FUNCTION: acpi_ns_check_sorted_list |
602 | * | 602 | * |
603 | * PARAMETERS: Data - Pointer to validation data structure | 603 | * PARAMETERS: data - Pointer to validation data structure |
604 | * return_object - Pointer to the top-level returned object | 604 | * return_object - Pointer to the top-level returned object |
605 | * expected_count - Minimum length of each sub-package | 605 | * expected_count - Minimum length of each sub-package |
606 | * sort_index - Sub-package entry to sort on | 606 | * sort_index - Sub-package entry to sort on |
@@ -707,9 +707,9 @@ acpi_ns_check_sorted_list(struct acpi_predefined_data *data, | |||
707 | * | 707 | * |
708 | * FUNCTION: acpi_ns_sort_list | 708 | * FUNCTION: acpi_ns_sort_list |
709 | * | 709 | * |
710 | * PARAMETERS: Elements - Package object element list | 710 | * PARAMETERS: elements - Package object element list |
711 | * Count - Element count for above | 711 | * count - Element count for above |
712 | * Index - Sort by which package element | 712 | * index - Sort by which package element |
713 | * sort_direction - Ascending or Descending sort | 713 | * sort_direction - Ascending or Descending sort |
714 | * | 714 | * |
715 | * RETURN: None | 715 | * RETURN: None |
diff --git a/drivers/acpi/acpica/nssearch.c b/drivers/acpi/acpica/nssearch.c index 507043d66114..456cc859f869 100644 --- a/drivers/acpi/acpica/nssearch.c +++ b/drivers/acpi/acpica/nssearch.c | |||
@@ -65,7 +65,7 @@ acpi_ns_search_parent_tree(u32 target_name, | |||
65 | * | 65 | * |
66 | * PARAMETERS: target_name - Ascii ACPI name to search for | 66 | * PARAMETERS: target_name - Ascii ACPI name to search for |
67 | * parent_node - Starting node where search will begin | 67 | * parent_node - Starting node where search will begin |
68 | * Type - Object type to match | 68 | * type - Object type to match |
69 | * return_node - Where the matched Named obj is returned | 69 | * return_node - Where the matched Named obj is returned |
70 | * | 70 | * |
71 | * RETURN: Status | 71 | * RETURN: Status |
@@ -175,8 +175,8 @@ acpi_ns_search_one_scope(u32 target_name, | |||
175 | * FUNCTION: acpi_ns_search_parent_tree | 175 | * FUNCTION: acpi_ns_search_parent_tree |
176 | * | 176 | * |
177 | * PARAMETERS: target_name - Ascii ACPI name to search for | 177 | * PARAMETERS: target_name - Ascii ACPI name to search for |
178 | * Node - Starting node where search will begin | 178 | * node - Starting node where search will begin |
179 | * Type - Object type to match | 179 | * type - Object type to match |
180 | * return_node - Where the matched Node is returned | 180 | * return_node - Where the matched Node is returned |
181 | * | 181 | * |
182 | * RETURN: Status | 182 | * RETURN: Status |
@@ -264,11 +264,11 @@ acpi_ns_search_parent_tree(u32 target_name, | |||
264 | * | 264 | * |
265 | * PARAMETERS: target_name - Ascii ACPI name to search for (4 chars) | 265 | * PARAMETERS: target_name - Ascii ACPI name to search for (4 chars) |
266 | * walk_state - Current state of the walk | 266 | * walk_state - Current state of the walk |
267 | * Node - Starting node where search will begin | 267 | * node - Starting node where search will begin |
268 | * interpreter_mode - Add names only in ACPI_MODE_LOAD_PASS_x. | 268 | * interpreter_mode - Add names only in ACPI_MODE_LOAD_PASS_x. |
269 | * Otherwise,search only. | 269 | * Otherwise,search only. |
270 | * Type - Object type to match | 270 | * type - Object type to match |
271 | * Flags - Flags describing the search restrictions | 271 | * flags - Flags describing the search restrictions |
272 | * return_node - Where the Node is returned | 272 | * return_node - Where the Node is returned |
273 | * | 273 | * |
274 | * RETURN: Status | 274 | * RETURN: Status |
diff --git a/drivers/acpi/acpica/nsutils.c b/drivers/acpi/acpica/nsutils.c index 75113759f69d..ef753a41e087 100644 --- a/drivers/acpi/acpica/nsutils.c +++ b/drivers/acpi/acpica/nsutils.c | |||
@@ -62,8 +62,8 @@ acpi_name acpi_ns_find_parent_name(struct acpi_namespace_node *node_to_search); | |||
62 | * | 62 | * |
63 | * FUNCTION: acpi_ns_print_node_pathname | 63 | * FUNCTION: acpi_ns_print_node_pathname |
64 | * | 64 | * |
65 | * PARAMETERS: Node - Object | 65 | * PARAMETERS: node - Object |
66 | * Message - Prefix message | 66 | * message - Prefix message |
67 | * | 67 | * |
68 | * DESCRIPTION: Print an object's full namespace pathname | 68 | * DESCRIPTION: Print an object's full namespace pathname |
69 | * Manages allocation/freeing of a pathname buffer | 69 | * Manages allocation/freeing of a pathname buffer |
@@ -101,7 +101,7 @@ acpi_ns_print_node_pathname(struct acpi_namespace_node *node, | |||
101 | * | 101 | * |
102 | * FUNCTION: acpi_ns_valid_root_prefix | 102 | * FUNCTION: acpi_ns_valid_root_prefix |
103 | * | 103 | * |
104 | * PARAMETERS: Prefix - Character to be checked | 104 | * PARAMETERS: prefix - Character to be checked |
105 | * | 105 | * |
106 | * RETURN: TRUE if a valid prefix | 106 | * RETURN: TRUE if a valid prefix |
107 | * | 107 | * |
@@ -119,7 +119,7 @@ u8 acpi_ns_valid_root_prefix(char prefix) | |||
119 | * | 119 | * |
120 | * FUNCTION: acpi_ns_valid_path_separator | 120 | * FUNCTION: acpi_ns_valid_path_separator |
121 | * | 121 | * |
122 | * PARAMETERS: Sep - Character to be checked | 122 | * PARAMETERS: sep - Character to be checked |
123 | * | 123 | * |
124 | * RETURN: TRUE if a valid path separator | 124 | * RETURN: TRUE if a valid path separator |
125 | * | 125 | * |
@@ -137,7 +137,7 @@ static u8 acpi_ns_valid_path_separator(char sep) | |||
137 | * | 137 | * |
138 | * FUNCTION: acpi_ns_get_type | 138 | * FUNCTION: acpi_ns_get_type |
139 | * | 139 | * |
140 | * PARAMETERS: Node - Parent Node to be examined | 140 | * PARAMETERS: node - Parent Node to be examined |
141 | * | 141 | * |
142 | * RETURN: Type field from Node whose handle is passed | 142 | * RETURN: Type field from Node whose handle is passed |
143 | * | 143 | * |
@@ -161,7 +161,7 @@ acpi_object_type acpi_ns_get_type(struct acpi_namespace_node * node) | |||
161 | * | 161 | * |
162 | * FUNCTION: acpi_ns_local | 162 | * FUNCTION: acpi_ns_local |
163 | * | 163 | * |
164 | * PARAMETERS: Type - A namespace object type | 164 | * PARAMETERS: type - A namespace object type |
165 | * | 165 | * |
166 | * RETURN: LOCAL if names must be found locally in objects of the | 166 | * RETURN: LOCAL if names must be found locally in objects of the |
167 | * passed type, 0 if enclosing scopes should be searched | 167 | * passed type, 0 if enclosing scopes should be searched |
@@ -189,7 +189,7 @@ u32 acpi_ns_local(acpi_object_type type) | |||
189 | * | 189 | * |
190 | * FUNCTION: acpi_ns_get_internal_name_length | 190 | * FUNCTION: acpi_ns_get_internal_name_length |
191 | * | 191 | * |
192 | * PARAMETERS: Info - Info struct initialized with the | 192 | * PARAMETERS: info - Info struct initialized with the |
193 | * external name pointer. | 193 | * external name pointer. |
194 | * | 194 | * |
195 | * RETURN: None | 195 | * RETURN: None |
@@ -260,7 +260,7 @@ void acpi_ns_get_internal_name_length(struct acpi_namestring_info *info) | |||
260 | * | 260 | * |
261 | * FUNCTION: acpi_ns_build_internal_name | 261 | * FUNCTION: acpi_ns_build_internal_name |
262 | * | 262 | * |
263 | * PARAMETERS: Info - Info struct fully initialized | 263 | * PARAMETERS: info - Info struct fully initialized |
264 | * | 264 | * |
265 | * RETURN: Status | 265 | * RETURN: Status |
266 | * | 266 | * |
@@ -371,7 +371,7 @@ acpi_status acpi_ns_build_internal_name(struct acpi_namestring_info *info) | |||
371 | * FUNCTION: acpi_ns_internalize_name | 371 | * FUNCTION: acpi_ns_internalize_name |
372 | * | 372 | * |
373 | * PARAMETERS: *external_name - External representation of name | 373 | * PARAMETERS: *external_name - External representation of name |
374 | * **Converted Name - Where to return the resulting | 374 | * **Converted name - Where to return the resulting |
375 | * internal represention of the name | 375 | * internal represention of the name |
376 | * | 376 | * |
377 | * RETURN: Status | 377 | * RETURN: Status |
@@ -575,7 +575,7 @@ acpi_ns_externalize_name(u32 internal_name_length, | |||
575 | * | 575 | * |
576 | * FUNCTION: acpi_ns_validate_handle | 576 | * FUNCTION: acpi_ns_validate_handle |
577 | * | 577 | * |
578 | * PARAMETERS: Handle - Handle to be validated and typecast to a | 578 | * PARAMETERS: handle - Handle to be validated and typecast to a |
579 | * namespace node. | 579 | * namespace node. |
580 | * | 580 | * |
581 | * RETURN: A pointer to a namespace node | 581 | * RETURN: A pointer to a namespace node |
@@ -651,7 +651,7 @@ void acpi_ns_terminate(void) | |||
651 | * | 651 | * |
652 | * FUNCTION: acpi_ns_opens_scope | 652 | * FUNCTION: acpi_ns_opens_scope |
653 | * | 653 | * |
654 | * PARAMETERS: Type - A valid namespace type | 654 | * PARAMETERS: type - A valid namespace type |
655 | * | 655 | * |
656 | * RETURN: NEWSCOPE if the passed type "opens a name scope" according | 656 | * RETURN: NEWSCOPE if the passed type "opens a name scope" according |
657 | * to the ACPI specification, else 0 | 657 | * to the ACPI specification, else 0 |
@@ -677,14 +677,14 @@ u32 acpi_ns_opens_scope(acpi_object_type type) | |||
677 | * | 677 | * |
678 | * FUNCTION: acpi_ns_get_node | 678 | * FUNCTION: acpi_ns_get_node |
679 | * | 679 | * |
680 | * PARAMETERS: *Pathname - Name to be found, in external (ASL) format. The | 680 | * PARAMETERS: *pathname - Name to be found, in external (ASL) format. The |
681 | * \ (backslash) and ^ (carat) prefixes, and the | 681 | * \ (backslash) and ^ (carat) prefixes, and the |
682 | * . (period) to separate segments are supported. | 682 | * . (period) to separate segments are supported. |
683 | * prefix_node - Root of subtree to be searched, or NS_ALL for the | 683 | * prefix_node - Root of subtree to be searched, or NS_ALL for the |
684 | * root of the name space. If Name is fully | 684 | * root of the name space. If Name is fully |
685 | * qualified (first s8 is '\'), the passed value | 685 | * qualified (first s8 is '\'), the passed value |
686 | * of Scope will not be accessed. | 686 | * of Scope will not be accessed. |
687 | * Flags - Used to indicate whether to perform upsearch or | 687 | * flags - Used to indicate whether to perform upsearch or |
688 | * not. | 688 | * not. |
689 | * return_node - Where the Node is returned | 689 | * return_node - Where the Node is returned |
690 | * | 690 | * |
diff --git a/drivers/acpi/acpica/nswalk.c b/drivers/acpi/acpica/nswalk.c index f69895a54895..730bccc5e7f7 100644 --- a/drivers/acpi/acpica/nswalk.c +++ b/drivers/acpi/acpica/nswalk.c | |||
@@ -88,7 +88,7 @@ struct acpi_namespace_node *acpi_ns_get_next_node(struct acpi_namespace_node | |||
88 | * | 88 | * |
89 | * FUNCTION: acpi_ns_get_next_node_typed | 89 | * FUNCTION: acpi_ns_get_next_node_typed |
90 | * | 90 | * |
91 | * PARAMETERS: Type - Type of node to be searched for | 91 | * PARAMETERS: type - Type of node to be searched for |
92 | * parent_node - Parent node whose children we are | 92 | * parent_node - Parent node whose children we are |
93 | * getting | 93 | * getting |
94 | * child_node - Previous child that was found. | 94 | * child_node - Previous child that was found. |
@@ -151,16 +151,16 @@ struct acpi_namespace_node *acpi_ns_get_next_node_typed(acpi_object_type type, | |||
151 | * | 151 | * |
152 | * FUNCTION: acpi_ns_walk_namespace | 152 | * FUNCTION: acpi_ns_walk_namespace |
153 | * | 153 | * |
154 | * PARAMETERS: Type - acpi_object_type to search for | 154 | * PARAMETERS: type - acpi_object_type to search for |
155 | * start_node - Handle in namespace where search begins | 155 | * start_node - Handle in namespace where search begins |
156 | * max_depth - Depth to which search is to reach | 156 | * max_depth - Depth to which search is to reach |
157 | * Flags - Whether to unlock the NS before invoking | 157 | * flags - Whether to unlock the NS before invoking |
158 | * the callback routine | 158 | * the callback routine |
159 | * pre_order_visit - Called during tree pre-order visit | 159 | * pre_order_visit - Called during tree pre-order visit |
160 | * when an object of "Type" is found | 160 | * when an object of "Type" is found |
161 | * post_order_visit - Called during tree post-order visit | 161 | * post_order_visit - Called during tree post-order visit |
162 | * when an object of "Type" is found | 162 | * when an object of "Type" is found |
163 | * Context - Passed to user function(s) above | 163 | * context - Passed to user function(s) above |
164 | * return_value - from the user_function if terminated | 164 | * return_value - from the user_function if terminated |
165 | * early. Otherwise, returns NULL. | 165 | * early. Otherwise, returns NULL. |
166 | * RETURNS: Status | 166 | * RETURNS: Status |
diff --git a/drivers/acpi/acpica/nsxfeval.c b/drivers/acpi/acpica/nsxfeval.c index 71d15f61807b..9692e6702333 100644 --- a/drivers/acpi/acpica/nsxfeval.c +++ b/drivers/acpi/acpica/nsxfeval.c | |||
@@ -58,8 +58,8 @@ static void acpi_ns_resolve_references(struct acpi_evaluate_info *info); | |||
58 | * | 58 | * |
59 | * FUNCTION: acpi_evaluate_object_typed | 59 | * FUNCTION: acpi_evaluate_object_typed |
60 | * | 60 | * |
61 | * PARAMETERS: Handle - Object handle (optional) | 61 | * PARAMETERS: handle - Object handle (optional) |
62 | * Pathname - Object pathname (optional) | 62 | * pathname - Object pathname (optional) |
63 | * external_params - List of parameters to pass to method, | 63 | * external_params - List of parameters to pass to method, |
64 | * terminated by NULL. May be NULL | 64 | * terminated by NULL. May be NULL |
65 | * if no parameters are being passed. | 65 | * if no parameters are being passed. |
@@ -152,8 +152,8 @@ ACPI_EXPORT_SYMBOL(acpi_evaluate_object_typed) | |||
152 | * | 152 | * |
153 | * FUNCTION: acpi_evaluate_object | 153 | * FUNCTION: acpi_evaluate_object |
154 | * | 154 | * |
155 | * PARAMETERS: Handle - Object handle (optional) | 155 | * PARAMETERS: handle - Object handle (optional) |
156 | * Pathname - Object pathname (optional) | 156 | * pathname - Object pathname (optional) |
157 | * external_params - List of parameters to pass to method, | 157 | * external_params - List of parameters to pass to method, |
158 | * terminated by NULL. May be NULL | 158 | * terminated by NULL. May be NULL |
159 | * if no parameters are being passed. | 159 | * if no parameters are being passed. |
@@ -364,7 +364,7 @@ ACPI_EXPORT_SYMBOL(acpi_evaluate_object) | |||
364 | * | 364 | * |
365 | * FUNCTION: acpi_ns_resolve_references | 365 | * FUNCTION: acpi_ns_resolve_references |
366 | * | 366 | * |
367 | * PARAMETERS: Info - Evaluation info block | 367 | * PARAMETERS: info - Evaluation info block |
368 | * | 368 | * |
369 | * RETURN: Info->return_object is replaced with the dereferenced object | 369 | * RETURN: Info->return_object is replaced with the dereferenced object |
370 | * | 370 | * |
@@ -431,14 +431,14 @@ static void acpi_ns_resolve_references(struct acpi_evaluate_info *info) | |||
431 | * | 431 | * |
432 | * FUNCTION: acpi_walk_namespace | 432 | * FUNCTION: acpi_walk_namespace |
433 | * | 433 | * |
434 | * PARAMETERS: Type - acpi_object_type to search for | 434 | * PARAMETERS: type - acpi_object_type to search for |
435 | * start_object - Handle in namespace where search begins | 435 | * start_object - Handle in namespace where search begins |
436 | * max_depth - Depth to which search is to reach | 436 | * max_depth - Depth to which search is to reach |
437 | * pre_order_visit - Called during tree pre-order visit | 437 | * pre_order_visit - Called during tree pre-order visit |
438 | * when an object of "Type" is found | 438 | * when an object of "Type" is found |
439 | * post_order_visit - Called during tree post-order visit | 439 | * post_order_visit - Called during tree post-order visit |
440 | * when an object of "Type" is found | 440 | * when an object of "Type" is found |
441 | * Context - Passed to user function(s) above | 441 | * context - Passed to user function(s) above |
442 | * return_value - Location where return value of | 442 | * return_value - Location where return value of |
443 | * user_function is put if terminated early | 443 | * user_function is put if terminated early |
444 | * | 444 | * |
@@ -646,7 +646,7 @@ acpi_ns_get_device_callback(acpi_handle obj_handle, | |||
646 | * | 646 | * |
647 | * PARAMETERS: HID - HID to search for. Can be NULL. | 647 | * PARAMETERS: HID - HID to search for. Can be NULL. |
648 | * user_function - Called when a matching object is found | 648 | * user_function - Called when a matching object is found |
649 | * Context - Passed to user function | 649 | * context - Passed to user function |
650 | * return_value - Location where return value of | 650 | * return_value - Location where return value of |
651 | * user_function is put if terminated early | 651 | * user_function is put if terminated early |
652 | * | 652 | * |
@@ -716,8 +716,8 @@ ACPI_EXPORT_SYMBOL(acpi_get_devices) | |||
716 | * FUNCTION: acpi_attach_data | 716 | * FUNCTION: acpi_attach_data |
717 | * | 717 | * |
718 | * PARAMETERS: obj_handle - Namespace node | 718 | * PARAMETERS: obj_handle - Namespace node |
719 | * Handler - Handler for this attachment | 719 | * handler - Handler for this attachment |
720 | * Data - Pointer to data to be attached | 720 | * data - Pointer to data to be attached |
721 | * | 721 | * |
722 | * RETURN: Status | 722 | * RETURN: Status |
723 | * | 723 | * |
@@ -764,7 +764,7 @@ ACPI_EXPORT_SYMBOL(acpi_attach_data) | |||
764 | * FUNCTION: acpi_detach_data | 764 | * FUNCTION: acpi_detach_data |
765 | * | 765 | * |
766 | * PARAMETERS: obj_handle - Namespace node handle | 766 | * PARAMETERS: obj_handle - Namespace node handle |
767 | * Handler - Handler used in call to acpi_attach_data | 767 | * handler - Handler used in call to acpi_attach_data |
768 | * | 768 | * |
769 | * RETURN: Status | 769 | * RETURN: Status |
770 | * | 770 | * |
@@ -810,8 +810,8 @@ ACPI_EXPORT_SYMBOL(acpi_detach_data) | |||
810 | * FUNCTION: acpi_get_data | 810 | * FUNCTION: acpi_get_data |
811 | * | 811 | * |
812 | * PARAMETERS: obj_handle - Namespace node | 812 | * PARAMETERS: obj_handle - Namespace node |
813 | * Handler - Handler used in call to attach_data | 813 | * handler - Handler used in call to attach_data |
814 | * Data - Where the data is returned | 814 | * data - Where the data is returned |
815 | * | 815 | * |
816 | * RETURN: Status | 816 | * RETURN: Status |
817 | * | 817 | * |
diff --git a/drivers/acpi/acpica/nsxfname.c b/drivers/acpi/acpica/nsxfname.c index af401c9c4dfc..08e9610b34ca 100644 --- a/drivers/acpi/acpica/nsxfname.c +++ b/drivers/acpi/acpica/nsxfname.c | |||
@@ -61,8 +61,8 @@ static char *acpi_ns_copy_device_id(struct acpica_device_id *dest, | |||
61 | * | 61 | * |
62 | * FUNCTION: acpi_get_handle | 62 | * FUNCTION: acpi_get_handle |
63 | * | 63 | * |
64 | * PARAMETERS: Parent - Object to search under (search scope). | 64 | * PARAMETERS: parent - Object to search under (search scope). |
65 | * Pathname - Pointer to an asciiz string containing the | 65 | * pathname - Pointer to an asciiz string containing the |
66 | * name | 66 | * name |
67 | * ret_handle - Where the return handle is returned | 67 | * ret_handle - Where the return handle is returned |
68 | * | 68 | * |
@@ -142,9 +142,9 @@ ACPI_EXPORT_SYMBOL(acpi_get_handle) | |||
142 | * | 142 | * |
143 | * FUNCTION: acpi_get_name | 143 | * FUNCTION: acpi_get_name |
144 | * | 144 | * |
145 | * PARAMETERS: Handle - Handle to be converted to a pathname | 145 | * PARAMETERS: handle - Handle to be converted to a pathname |
146 | * name_type - Full pathname or single segment | 146 | * name_type - Full pathname or single segment |
147 | * Buffer - Buffer for returned path | 147 | * buffer - Buffer for returned path |
148 | * | 148 | * |
149 | * RETURN: Pointer to a string containing the fully qualified Name. | 149 | * RETURN: Pointer to a string containing the fully qualified Name. |
150 | * | 150 | * |
@@ -219,8 +219,8 @@ ACPI_EXPORT_SYMBOL(acpi_get_name) | |||
219 | * | 219 | * |
220 | * FUNCTION: acpi_ns_copy_device_id | 220 | * FUNCTION: acpi_ns_copy_device_id |
221 | * | 221 | * |
222 | * PARAMETERS: Dest - Pointer to the destination DEVICE_ID | 222 | * PARAMETERS: dest - Pointer to the destination DEVICE_ID |
223 | * Source - Pointer to the source DEVICE_ID | 223 | * source - Pointer to the source DEVICE_ID |
224 | * string_area - Pointer to where to copy the dest string | 224 | * string_area - Pointer to where to copy the dest string |
225 | * | 225 | * |
226 | * RETURN: Pointer to the next string area | 226 | * RETURN: Pointer to the next string area |
@@ -247,7 +247,7 @@ static char *acpi_ns_copy_device_id(struct acpica_device_id *dest, | |||
247 | * | 247 | * |
248 | * FUNCTION: acpi_get_object_info | 248 | * FUNCTION: acpi_get_object_info |
249 | * | 249 | * |
250 | * PARAMETERS: Handle - Object Handle | 250 | * PARAMETERS: handle - Object Handle |
251 | * return_buffer - Where the info is returned | 251 | * return_buffer - Where the info is returned |
252 | * | 252 | * |
253 | * RETURN: Status | 253 | * RETURN: Status |
@@ -493,7 +493,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_object_info) | |||
493 | * | 493 | * |
494 | * FUNCTION: acpi_install_method | 494 | * FUNCTION: acpi_install_method |
495 | * | 495 | * |
496 | * PARAMETERS: Buffer - An ACPI table containing one control method | 496 | * PARAMETERS: buffer - An ACPI table containing one control method |
497 | * | 497 | * |
498 | * RETURN: Status | 498 | * RETURN: Status |
499 | * | 499 | * |
diff --git a/drivers/acpi/acpica/nsxfobj.c b/drivers/acpi/acpica/nsxfobj.c index 880a605cee20..6766fc4f088f 100644 --- a/drivers/acpi/acpica/nsxfobj.c +++ b/drivers/acpi/acpica/nsxfobj.c | |||
@@ -98,7 +98,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_id) | |||
98 | * | 98 | * |
99 | * FUNCTION: acpi_get_type | 99 | * FUNCTION: acpi_get_type |
100 | * | 100 | * |
101 | * PARAMETERS: Handle - Handle of object whose type is desired | 101 | * PARAMETERS: handle - Handle of object whose type is desired |
102 | * ret_type - Where the type will be placed | 102 | * ret_type - Where the type will be placed |
103 | * | 103 | * |
104 | * RETURN: Status | 104 | * RETURN: Status |
@@ -151,7 +151,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_type) | |||
151 | * | 151 | * |
152 | * FUNCTION: acpi_get_parent | 152 | * FUNCTION: acpi_get_parent |
153 | * | 153 | * |
154 | * PARAMETERS: Handle - Handle of object whose parent is desired | 154 | * PARAMETERS: handle - Handle of object whose parent is desired |
155 | * ret_handle - Where the parent handle will be placed | 155 | * ret_handle - Where the parent handle will be placed |
156 | * | 156 | * |
157 | * RETURN: Status | 157 | * RETURN: Status |
@@ -212,8 +212,8 @@ ACPI_EXPORT_SYMBOL(acpi_get_parent) | |||
212 | * | 212 | * |
213 | * FUNCTION: acpi_get_next_object | 213 | * FUNCTION: acpi_get_next_object |
214 | * | 214 | * |
215 | * PARAMETERS: Type - Type of object to be searched for | 215 | * PARAMETERS: type - Type of object to be searched for |
216 | * Parent - Parent object whose children we are getting | 216 | * parent - Parent object whose children we are getting |
217 | * last_child - Previous child that was found. | 217 | * last_child - Previous child that was found. |
218 | * The NEXT child will be returned | 218 | * The NEXT child will be returned |
219 | * ret_handle - Where handle to the next object is placed | 219 | * ret_handle - Where handle to the next object is placed |
diff --git a/drivers/acpi/acpica/psargs.c b/drivers/acpi/acpica/psargs.c index 5ac36aba507c..844464c4f901 100644 --- a/drivers/acpi/acpica/psargs.c +++ b/drivers/acpi/acpica/psargs.c | |||
@@ -210,7 +210,7 @@ char *acpi_ps_get_next_namestring(struct acpi_parse_state *parser_state) | |||
210 | * FUNCTION: acpi_ps_get_next_namepath | 210 | * FUNCTION: acpi_ps_get_next_namepath |
211 | * | 211 | * |
212 | * PARAMETERS: parser_state - Current parser state object | 212 | * PARAMETERS: parser_state - Current parser state object |
213 | * Arg - Where the namepath will be stored | 213 | * arg - Where the namepath will be stored |
214 | * arg_count - If the namepath points to a control method | 214 | * arg_count - If the namepath points to a control method |
215 | * the method's argument is returned here. | 215 | * the method's argument is returned here. |
216 | * possible_method_call - Whether the namepath can possibly be the | 216 | * possible_method_call - Whether the namepath can possibly be the |
@@ -379,7 +379,7 @@ acpi_ps_get_next_namepath(struct acpi_walk_state *walk_state, | |||
379 | * | 379 | * |
380 | * PARAMETERS: parser_state - Current parser state object | 380 | * PARAMETERS: parser_state - Current parser state object |
381 | * arg_type - The argument type (AML_*_ARG) | 381 | * arg_type - The argument type (AML_*_ARG) |
382 | * Arg - Where the argument is returned | 382 | * arg - Where the argument is returned |
383 | * | 383 | * |
384 | * RETURN: None | 384 | * RETURN: None |
385 | * | 385 | * |
@@ -618,6 +618,7 @@ static union acpi_parse_object *acpi_ps_get_next_field(struct acpi_parse_state | |||
618 | 618 | ||
619 | arg = acpi_ps_alloc_op(AML_INT_BYTELIST_OP); | 619 | arg = acpi_ps_alloc_op(AML_INT_BYTELIST_OP); |
620 | if (!arg) { | 620 | if (!arg) { |
621 | acpi_ps_free_op(field); | ||
621 | return_PTR(NULL); | 622 | return_PTR(NULL); |
622 | } | 623 | } |
623 | 624 | ||
@@ -662,6 +663,7 @@ static union acpi_parse_object *acpi_ps_get_next_field(struct acpi_parse_state | |||
662 | } else { | 663 | } else { |
663 | arg = acpi_ps_alloc_op(AML_INT_NAMEPATH_OP); | 664 | arg = acpi_ps_alloc_op(AML_INT_NAMEPATH_OP); |
664 | if (!arg) { | 665 | if (!arg) { |
666 | acpi_ps_free_op(field); | ||
665 | return_PTR(NULL); | 667 | return_PTR(NULL); |
666 | } | 668 | } |
667 | 669 | ||
diff --git a/drivers/acpi/acpica/psloop.c b/drivers/acpi/acpica/psloop.c index 9547ad8a620b..799162c1b6df 100644 --- a/drivers/acpi/acpica/psloop.c +++ b/drivers/acpi/acpica/psloop.c | |||
@@ -167,7 +167,7 @@ static acpi_status acpi_ps_get_aml_opcode(struct acpi_walk_state *walk_state) | |||
167 | * PARAMETERS: walk_state - Current state | 167 | * PARAMETERS: walk_state - Current state |
168 | * aml_op_start - Begin of named Op in AML | 168 | * aml_op_start - Begin of named Op in AML |
169 | * unnamed_op - Early Op (not a named Op) | 169 | * unnamed_op - Early Op (not a named Op) |
170 | * Op - Returned Op | 170 | * op - Returned Op |
171 | * | 171 | * |
172 | * RETURN: Status | 172 | * RETURN: Status |
173 | * | 173 | * |
@@ -323,7 +323,7 @@ acpi_ps_create_op(struct acpi_walk_state *walk_state, | |||
323 | 323 | ||
324 | if (walk_state->op_info->flags & AML_CREATE) { | 324 | if (walk_state->op_info->flags & AML_CREATE) { |
325 | /* | 325 | /* |
326 | * Backup to beginning of create_xXXfield declaration | 326 | * Backup to beginning of create_XXXfield declaration |
327 | * body_length is unknown until we parse the body | 327 | * body_length is unknown until we parse the body |
328 | */ | 328 | */ |
329 | op->named.data = aml_op_start; | 329 | op->named.data = aml_op_start; |
@@ -380,7 +380,7 @@ acpi_ps_create_op(struct acpi_walk_state *walk_state, | |||
380 | * | 380 | * |
381 | * PARAMETERS: walk_state - Current state | 381 | * PARAMETERS: walk_state - Current state |
382 | * aml_op_start - Op start in AML | 382 | * aml_op_start - Op start in AML |
383 | * Op - Current Op | 383 | * op - Current Op |
384 | * | 384 | * |
385 | * RETURN: Status | 385 | * RETURN: Status |
386 | * | 386 | * |
@@ -679,8 +679,8 @@ acpi_ps_link_module_code(union acpi_parse_object *parent_op, | |||
679 | * FUNCTION: acpi_ps_complete_op | 679 | * FUNCTION: acpi_ps_complete_op |
680 | * | 680 | * |
681 | * PARAMETERS: walk_state - Current state | 681 | * PARAMETERS: walk_state - Current state |
682 | * Op - Returned Op | 682 | * op - Returned Op |
683 | * Status - Parse status before complete Op | 683 | * status - Parse status before complete Op |
684 | * | 684 | * |
685 | * RETURN: Status | 685 | * RETURN: Status |
686 | * | 686 | * |
@@ -853,8 +853,8 @@ acpi_ps_complete_op(struct acpi_walk_state *walk_state, | |||
853 | * FUNCTION: acpi_ps_complete_final_op | 853 | * FUNCTION: acpi_ps_complete_final_op |
854 | * | 854 | * |
855 | * PARAMETERS: walk_state - Current state | 855 | * PARAMETERS: walk_state - Current state |
856 | * Op - Current Op | 856 | * op - Current Op |
857 | * Status - Current parse status before complete last | 857 | * status - Current parse status before complete last |
858 | * Op | 858 | * Op |
859 | * | 859 | * |
860 | * RETURN: Status | 860 | * RETURN: Status |
@@ -1165,7 +1165,7 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state) | |||
1165 | 1165 | ||
1166 | if (walk_state->op_info->flags & AML_CREATE) { | 1166 | if (walk_state->op_info->flags & AML_CREATE) { |
1167 | /* | 1167 | /* |
1168 | * Backup to beginning of create_xXXfield declaration (1 for | 1168 | * Backup to beginning of create_XXXfield declaration (1 for |
1169 | * Opcode) | 1169 | * Opcode) |
1170 | * | 1170 | * |
1171 | * body_length is unknown until we parse the body | 1171 | * body_length is unknown until we parse the body |
diff --git a/drivers/acpi/acpica/psopcode.c b/drivers/acpi/acpica/psopcode.c index a0226fdcf75c..ed1d457bd5ca 100644 --- a/drivers/acpi/acpica/psopcode.c +++ b/drivers/acpi/acpica/psopcode.c | |||
@@ -724,7 +724,7 @@ static const u8 acpi_gbl_long_op_index[NUM_EXTENDED_OPCODE] = { | |||
724 | * | 724 | * |
725 | * FUNCTION: acpi_ps_get_opcode_info | 725 | * FUNCTION: acpi_ps_get_opcode_info |
726 | * | 726 | * |
727 | * PARAMETERS: Opcode - The AML opcode | 727 | * PARAMETERS: opcode - The AML opcode |
728 | * | 728 | * |
729 | * RETURN: A pointer to the info about the opcode. | 729 | * RETURN: A pointer to the info about the opcode. |
730 | * | 730 | * |
@@ -769,7 +769,7 @@ const struct acpi_opcode_info *acpi_ps_get_opcode_info(u16 opcode) | |||
769 | * | 769 | * |
770 | * FUNCTION: acpi_ps_get_opcode_name | 770 | * FUNCTION: acpi_ps_get_opcode_name |
771 | * | 771 | * |
772 | * PARAMETERS: Opcode - The AML opcode | 772 | * PARAMETERS: opcode - The AML opcode |
773 | * | 773 | * |
774 | * RETURN: A pointer to the name of the opcode (ASCII String) | 774 | * RETURN: A pointer to the name of the opcode (ASCII String) |
775 | * Note: Never returns NULL. | 775 | * Note: Never returns NULL. |
diff --git a/drivers/acpi/acpica/psparse.c b/drivers/acpi/acpica/psparse.c index 2ff9c35a1968..01985703bb98 100644 --- a/drivers/acpi/acpica/psparse.c +++ b/drivers/acpi/acpica/psparse.c | |||
@@ -64,7 +64,7 @@ ACPI_MODULE_NAME("psparse") | |||
64 | * | 64 | * |
65 | * FUNCTION: acpi_ps_get_opcode_size | 65 | * FUNCTION: acpi_ps_get_opcode_size |
66 | * | 66 | * |
67 | * PARAMETERS: Opcode - An AML opcode | 67 | * PARAMETERS: opcode - An AML opcode |
68 | * | 68 | * |
69 | * RETURN: Size of the opcode, in bytes (1 or 2) | 69 | * RETURN: Size of the opcode, in bytes (1 or 2) |
70 | * | 70 | * |
@@ -121,7 +121,7 @@ u16 acpi_ps_peek_opcode(struct acpi_parse_state * parser_state) | |||
121 | * FUNCTION: acpi_ps_complete_this_op | 121 | * FUNCTION: acpi_ps_complete_this_op |
122 | * | 122 | * |
123 | * PARAMETERS: walk_state - Current State | 123 | * PARAMETERS: walk_state - Current State |
124 | * Op - Op to complete | 124 | * op - Op to complete |
125 | * | 125 | * |
126 | * RETURN: Status | 126 | * RETURN: Status |
127 | * | 127 | * |
@@ -311,7 +311,7 @@ acpi_ps_complete_this_op(struct acpi_walk_state * walk_state, | |||
311 | * FUNCTION: acpi_ps_next_parse_state | 311 | * FUNCTION: acpi_ps_next_parse_state |
312 | * | 312 | * |
313 | * PARAMETERS: walk_state - Current state | 313 | * PARAMETERS: walk_state - Current state |
314 | * Op - Current parse op | 314 | * op - Current parse op |
315 | * callback_status - Status from previous operation | 315 | * callback_status - Status from previous operation |
316 | * | 316 | * |
317 | * RETURN: Status | 317 | * RETURN: Status |
diff --git a/drivers/acpi/acpica/psscope.c b/drivers/acpi/acpica/psscope.c index c872aa4b926e..608dc20dc173 100644 --- a/drivers/acpi/acpica/psscope.c +++ b/drivers/acpi/acpica/psscope.c | |||
@@ -93,7 +93,7 @@ u8 acpi_ps_has_completed_scope(struct acpi_parse_state * parser_state) | |||
93 | * FUNCTION: acpi_ps_init_scope | 93 | * FUNCTION: acpi_ps_init_scope |
94 | * | 94 | * |
95 | * PARAMETERS: parser_state - Current parser state object | 95 | * PARAMETERS: parser_state - Current parser state object |
96 | * Root - the Root Node of this new scope | 96 | * root - the Root Node of this new scope |
97 | * | 97 | * |
98 | * RETURN: Status | 98 | * RETURN: Status |
99 | * | 99 | * |
@@ -131,7 +131,7 @@ acpi_ps_init_scope(struct acpi_parse_state * parser_state, | |||
131 | * FUNCTION: acpi_ps_push_scope | 131 | * FUNCTION: acpi_ps_push_scope |
132 | * | 132 | * |
133 | * PARAMETERS: parser_state - Current parser state object | 133 | * PARAMETERS: parser_state - Current parser state object |
134 | * Op - Current op to be pushed | 134 | * op - Current op to be pushed |
135 | * remaining_args - List of args remaining | 135 | * remaining_args - List of args remaining |
136 | * arg_count - Fixed or variable number of args | 136 | * arg_count - Fixed or variable number of args |
137 | * | 137 | * |
@@ -184,7 +184,7 @@ acpi_ps_push_scope(struct acpi_parse_state *parser_state, | |||
184 | * FUNCTION: acpi_ps_pop_scope | 184 | * FUNCTION: acpi_ps_pop_scope |
185 | * | 185 | * |
186 | * PARAMETERS: parser_state - Current parser state object | 186 | * PARAMETERS: parser_state - Current parser state object |
187 | * Op - Where the popped op is returned | 187 | * op - Where the popped op is returned |
188 | * arg_list - Where the popped "next argument" is | 188 | * arg_list - Where the popped "next argument" is |
189 | * returned | 189 | * returned |
190 | * arg_count - Count of objects in arg_list | 190 | * arg_count - Count of objects in arg_list |
diff --git a/drivers/acpi/acpica/pstree.c b/drivers/acpi/acpica/pstree.c index 2b03cdbbe1c0..fdb2e71f3046 100644 --- a/drivers/acpi/acpica/pstree.c +++ b/drivers/acpi/acpica/pstree.c | |||
@@ -58,8 +58,8 @@ union acpi_parse_object *acpi_ps_get_child(union acpi_parse_object *op); | |||
58 | * | 58 | * |
59 | * FUNCTION: acpi_ps_get_arg | 59 | * FUNCTION: acpi_ps_get_arg |
60 | * | 60 | * |
61 | * PARAMETERS: Op - Get an argument for this op | 61 | * PARAMETERS: op - Get an argument for this op |
62 | * Argn - Nth argument to get | 62 | * argn - Nth argument to get |
63 | * | 63 | * |
64 | * RETURN: The argument (as an Op object). NULL if argument does not exist | 64 | * RETURN: The argument (as an Op object). NULL if argument does not exist |
65 | * | 65 | * |
@@ -114,8 +114,8 @@ union acpi_parse_object *acpi_ps_get_arg(union acpi_parse_object *op, u32 argn) | |||
114 | * | 114 | * |
115 | * FUNCTION: acpi_ps_append_arg | 115 | * FUNCTION: acpi_ps_append_arg |
116 | * | 116 | * |
117 | * PARAMETERS: Op - Append an argument to this Op. | 117 | * PARAMETERS: op - Append an argument to this Op. |
118 | * Arg - Argument Op to append | 118 | * arg - Argument Op to append |
119 | * | 119 | * |
120 | * RETURN: None. | 120 | * RETURN: None. |
121 | * | 121 | * |
@@ -188,8 +188,8 @@ acpi_ps_append_arg(union acpi_parse_object *op, union acpi_parse_object *arg) | |||
188 | * | 188 | * |
189 | * FUNCTION: acpi_ps_get_depth_next | 189 | * FUNCTION: acpi_ps_get_depth_next |
190 | * | 190 | * |
191 | * PARAMETERS: Origin - Root of subtree to search | 191 | * PARAMETERS: origin - Root of subtree to search |
192 | * Op - Last (previous) Op that was found | 192 | * op - Last (previous) Op that was found |
193 | * | 193 | * |
194 | * RETURN: Next Op found in the search. | 194 | * RETURN: Next Op found in the search. |
195 | * | 195 | * |
@@ -261,7 +261,7 @@ union acpi_parse_object *acpi_ps_get_depth_next(union acpi_parse_object *origin, | |||
261 | * | 261 | * |
262 | * FUNCTION: acpi_ps_get_child | 262 | * FUNCTION: acpi_ps_get_child |
263 | * | 263 | * |
264 | * PARAMETERS: Op - Get the child of this Op | 264 | * PARAMETERS: op - Get the child of this Op |
265 | * | 265 | * |
266 | * RETURN: Child Op, Null if none is found. | 266 | * RETURN: Child Op, Null if none is found. |
267 | * | 267 | * |
diff --git a/drivers/acpi/acpica/psutils.c b/drivers/acpi/acpica/psutils.c index 13bb131ae125..8736ad5f04d3 100644 --- a/drivers/acpi/acpica/psutils.c +++ b/drivers/acpi/acpica/psutils.c | |||
@@ -77,8 +77,8 @@ union acpi_parse_object *acpi_ps_create_scope_op(void) | |||
77 | * | 77 | * |
78 | * FUNCTION: acpi_ps_init_op | 78 | * FUNCTION: acpi_ps_init_op |
79 | * | 79 | * |
80 | * PARAMETERS: Op - A newly allocated Op object | 80 | * PARAMETERS: op - A newly allocated Op object |
81 | * Opcode - Opcode to store in the Op | 81 | * opcode - Opcode to store in the Op |
82 | * | 82 | * |
83 | * RETURN: None | 83 | * RETURN: None |
84 | * | 84 | * |
@@ -103,7 +103,7 @@ void acpi_ps_init_op(union acpi_parse_object *op, u16 opcode) | |||
103 | * | 103 | * |
104 | * FUNCTION: acpi_ps_alloc_op | 104 | * FUNCTION: acpi_ps_alloc_op |
105 | * | 105 | * |
106 | * PARAMETERS: Opcode - Opcode that will be stored in the new Op | 106 | * PARAMETERS: opcode - Opcode that will be stored in the new Op |
107 | * | 107 | * |
108 | * RETURN: Pointer to the new Op, null on failure | 108 | * RETURN: Pointer to the new Op, null on failure |
109 | * | 109 | * |
@@ -160,7 +160,7 @@ union acpi_parse_object *acpi_ps_alloc_op(u16 opcode) | |||
160 | * | 160 | * |
161 | * FUNCTION: acpi_ps_free_op | 161 | * FUNCTION: acpi_ps_free_op |
162 | * | 162 | * |
163 | * PARAMETERS: Op - Op to be freed | 163 | * PARAMETERS: op - Op to be freed |
164 | * | 164 | * |
165 | * RETURN: None. | 165 | * RETURN: None. |
166 | * | 166 | * |
diff --git a/drivers/acpi/acpica/psxface.c b/drivers/acpi/acpica/psxface.c index 9d98c5ff66a5..963e16225797 100644 --- a/drivers/acpi/acpica/psxface.c +++ b/drivers/acpi/acpica/psxface.c | |||
@@ -66,7 +66,7 @@ acpi_ps_update_parameter_list(struct acpi_evaluate_info *info, u16 action); | |||
66 | * PARAMETERS: method_name - Valid ACPI name string | 66 | * PARAMETERS: method_name - Valid ACPI name string |
67 | * debug_level - Optional level mask. 0 to use default | 67 | * debug_level - Optional level mask. 0 to use default |
68 | * debug_layer - Optional layer mask. 0 to use default | 68 | * debug_layer - Optional layer mask. 0 to use default |
69 | * Flags - bit 1: one shot(1) or persistent(0) | 69 | * flags - bit 1: one shot(1) or persistent(0) |
70 | * | 70 | * |
71 | * RETURN: Status | 71 | * RETURN: Status |
72 | * | 72 | * |
@@ -105,7 +105,7 @@ acpi_debug_trace(char *name, u32 debug_level, u32 debug_layer, u32 flags) | |||
105 | * | 105 | * |
106 | * FUNCTION: acpi_ps_start_trace | 106 | * FUNCTION: acpi_ps_start_trace |
107 | * | 107 | * |
108 | * PARAMETERS: Info - Method info struct | 108 | * PARAMETERS: info - Method info struct |
109 | * | 109 | * |
110 | * RETURN: None | 110 | * RETURN: None |
111 | * | 111 | * |
@@ -150,7 +150,7 @@ static void acpi_ps_start_trace(struct acpi_evaluate_info *info) | |||
150 | * | 150 | * |
151 | * FUNCTION: acpi_ps_stop_trace | 151 | * FUNCTION: acpi_ps_stop_trace |
152 | * | 152 | * |
153 | * PARAMETERS: Info - Method info struct | 153 | * PARAMETERS: info - Method info struct |
154 | * | 154 | * |
155 | * RETURN: None | 155 | * RETURN: None |
156 | * | 156 | * |
@@ -193,10 +193,10 @@ static void acpi_ps_stop_trace(struct acpi_evaluate_info *info) | |||
193 | * | 193 | * |
194 | * FUNCTION: acpi_ps_execute_method | 194 | * FUNCTION: acpi_ps_execute_method |
195 | * | 195 | * |
196 | * PARAMETERS: Info - Method info block, contains: | 196 | * PARAMETERS: info - Method info block, contains: |
197 | * Node - Method Node to execute | 197 | * node - Method Node to execute |
198 | * obj_desc - Method object | 198 | * obj_desc - Method object |
199 | * Parameters - List of parameters to pass to the method, | 199 | * parameters - List of parameters to pass to the method, |
200 | * terminated by NULL. Params itself may be | 200 | * terminated by NULL. Params itself may be |
201 | * NULL if no parameters are being passed. | 201 | * NULL if no parameters are being passed. |
202 | * return_object - Where to put method's return value (if | 202 | * return_object - Where to put method's return value (if |
@@ -361,9 +361,9 @@ acpi_status acpi_ps_execute_method(struct acpi_evaluate_info *info) | |||
361 | * | 361 | * |
362 | * FUNCTION: acpi_ps_update_parameter_list | 362 | * FUNCTION: acpi_ps_update_parameter_list |
363 | * | 363 | * |
364 | * PARAMETERS: Info - See struct acpi_evaluate_info | 364 | * PARAMETERS: info - See struct acpi_evaluate_info |
365 | * (Used: parameter_type and Parameters) | 365 | * (Used: parameter_type and Parameters) |
366 | * Action - Add or Remove reference | 366 | * action - Add or Remove reference |
367 | * | 367 | * |
368 | * RETURN: Status | 368 | * RETURN: Status |
369 | * | 369 | * |
diff --git a/drivers/acpi/acpica/rsaddr.c b/drivers/acpi/acpica/rsaddr.c index a0305652394f..856ff075b6ab 100644 --- a/drivers/acpi/acpica/rsaddr.c +++ b/drivers/acpi/acpica/rsaddr.c | |||
@@ -182,8 +182,8 @@ struct acpi_rsconvert_info acpi_rs_convert_ext_address64[5] = { | |||
182 | 182 | ||
183 | /* Revision ID */ | 183 | /* Revision ID */ |
184 | 184 | ||
185 | {ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.ext_address64.revision_iD), | 185 | {ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.ext_address64.revision_ID), |
186 | AML_OFFSET(ext_address64.revision_iD), | 186 | AML_OFFSET(ext_address64.revision_ID), |
187 | 1}, | 187 | 1}, |
188 | /* | 188 | /* |
189 | * These fields are contiguous in both the source and destination: | 189 | * These fields are contiguous in both the source and destination: |
@@ -215,7 +215,7 @@ static struct acpi_rsconvert_info acpi_rs_convert_general_flags[6] = { | |||
215 | AML_OFFSET(address.resource_type), | 215 | AML_OFFSET(address.resource_type), |
216 | 1}, | 216 | 1}, |
217 | 217 | ||
218 | /* General Flags - Consume, Decode, min_fixed, max_fixed */ | 218 | /* General flags - Consume, Decode, min_fixed, max_fixed */ |
219 | 219 | ||
220 | {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.address.producer_consumer), | 220 | {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.address.producer_consumer), |
221 | AML_OFFSET(address.flags), | 221 | AML_OFFSET(address.flags), |
@@ -293,8 +293,8 @@ static struct acpi_rsconvert_info acpi_rs_convert_io_flags[4] = { | |||
293 | * | 293 | * |
294 | * FUNCTION: acpi_rs_get_address_common | 294 | * FUNCTION: acpi_rs_get_address_common |
295 | * | 295 | * |
296 | * PARAMETERS: Resource - Pointer to the internal resource struct | 296 | * PARAMETERS: resource - Pointer to the internal resource struct |
297 | * Aml - Pointer to the AML resource descriptor | 297 | * aml - Pointer to the AML resource descriptor |
298 | * | 298 | * |
299 | * RETURN: TRUE if the resource_type field is OK, FALSE otherwise | 299 | * RETURN: TRUE if the resource_type field is OK, FALSE otherwise |
300 | * | 300 | * |
@@ -343,8 +343,8 @@ acpi_rs_get_address_common(struct acpi_resource *resource, | |||
343 | * | 343 | * |
344 | * FUNCTION: acpi_rs_set_address_common | 344 | * FUNCTION: acpi_rs_set_address_common |
345 | * | 345 | * |
346 | * PARAMETERS: Aml - Pointer to the AML resource descriptor | 346 | * PARAMETERS: aml - Pointer to the AML resource descriptor |
347 | * Resource - Pointer to the internal resource struct | 347 | * resource - Pointer to the internal resource struct |
348 | * | 348 | * |
349 | * RETURN: None | 349 | * RETURN: None |
350 | * | 350 | * |
diff --git a/drivers/acpi/acpica/rscalc.c b/drivers/acpi/acpica/rscalc.c index 3c6df4b7eb2d..de12469d1c9c 100644 --- a/drivers/acpi/acpica/rscalc.c +++ b/drivers/acpi/acpica/rscalc.c | |||
@@ -173,7 +173,7 @@ acpi_rs_stream_option_length(u32 resource_length, | |||
173 | * | 173 | * |
174 | * FUNCTION: acpi_rs_get_aml_length | 174 | * FUNCTION: acpi_rs_get_aml_length |
175 | * | 175 | * |
176 | * PARAMETERS: Resource - Pointer to the resource linked list | 176 | * PARAMETERS: resource - Pointer to the resource linked list |
177 | * size_needed - Where the required size is returned | 177 | * size_needed - Where the required size is returned |
178 | * | 178 | * |
179 | * RETURN: Status | 179 | * RETURN: Status |
diff --git a/drivers/acpi/acpica/rscreate.c b/drivers/acpi/acpica/rscreate.c index 46d6eb38ae66..311cbc4f05fa 100644 --- a/drivers/acpi/acpica/rscreate.c +++ b/drivers/acpi/acpica/rscreate.c | |||
@@ -190,8 +190,8 @@ acpi_rs_create_resource_list(union acpi_operand_object *aml_buffer, | |||
190 | * | 190 | * |
191 | * FUNCTION: acpi_rs_create_pci_routing_table | 191 | * FUNCTION: acpi_rs_create_pci_routing_table |
192 | * | 192 | * |
193 | * PARAMETERS: package_object - Pointer to a union acpi_operand_object | 193 | * PARAMETERS: package_object - Pointer to a package containing one |
194 | * package | 194 | * of more ACPI_OPERAND_OBJECTs |
195 | * output_buffer - Pointer to the user's buffer | 195 | * output_buffer - Pointer to the user's buffer |
196 | * | 196 | * |
197 | * RETURN: Status AE_OK if okay, else a valid acpi_status code. | 197 | * RETURN: Status AE_OK if okay, else a valid acpi_status code. |
@@ -199,7 +199,7 @@ acpi_rs_create_resource_list(union acpi_operand_object *aml_buffer, | |||
199 | * AE_BUFFER_OVERFLOW and output_buffer->Length will point | 199 | * AE_BUFFER_OVERFLOW and output_buffer->Length will point |
200 | * to the size buffer needed. | 200 | * to the size buffer needed. |
201 | * | 201 | * |
202 | * DESCRIPTION: Takes the union acpi_operand_object package and creates a | 202 | * DESCRIPTION: Takes the union acpi_operand_object package and creates a |
203 | * linked list of PCI interrupt descriptions | 203 | * linked list of PCI interrupt descriptions |
204 | * | 204 | * |
205 | * NOTE: It is the caller's responsibility to ensure that the start of the | 205 | * NOTE: It is the caller's responsibility to ensure that the start of the |
diff --git a/drivers/acpi/acpica/rsdump.c b/drivers/acpi/acpica/rsdump.c index b4c581132393..4d11b072388c 100644 --- a/drivers/acpi/acpica/rsdump.c +++ b/drivers/acpi/acpica/rsdump.c | |||
@@ -703,7 +703,7 @@ acpi_rs_dump_resource_source(struct acpi_resource_source *resource_source) | |||
703 | * | 703 | * |
704 | * FUNCTION: acpi_rs_dump_address_common | 704 | * FUNCTION: acpi_rs_dump_address_common |
705 | * | 705 | * |
706 | * PARAMETERS: Resource - Pointer to an internal resource descriptor | 706 | * PARAMETERS: resource - Pointer to an internal resource descriptor |
707 | * | 707 | * |
708 | * RETURN: None | 708 | * RETURN: None |
709 | * | 709 | * |
@@ -850,8 +850,8 @@ void acpi_rs_dump_irq_list(u8 * route_table) | |||
850 | * | 850 | * |
851 | * FUNCTION: acpi_rs_out* | 851 | * FUNCTION: acpi_rs_out* |
852 | * | 852 | * |
853 | * PARAMETERS: Title - Name of the resource field | 853 | * PARAMETERS: title - Name of the resource field |
854 | * Value - Value of the resource field | 854 | * value - Value of the resource field |
855 | * | 855 | * |
856 | * RETURN: None | 856 | * RETURN: None |
857 | * | 857 | * |
@@ -898,8 +898,8 @@ static void acpi_rs_out_title(char *title) | |||
898 | * | 898 | * |
899 | * FUNCTION: acpi_rs_dump*List | 899 | * FUNCTION: acpi_rs_dump*List |
900 | * | 900 | * |
901 | * PARAMETERS: Length - Number of elements in the list | 901 | * PARAMETERS: length - Number of elements in the list |
902 | * Data - Start of the list | 902 | * data - Start of the list |
903 | * | 903 | * |
904 | * RETURN: None | 904 | * RETURN: None |
905 | * | 905 | * |
diff --git a/drivers/acpi/acpica/rslist.c b/drivers/acpi/acpica/rslist.c index 9be129f5d6f4..46b5324b22d6 100644 --- a/drivers/acpi/acpica/rslist.c +++ b/drivers/acpi/acpica/rslist.c | |||
@@ -139,7 +139,7 @@ acpi_rs_convert_aml_to_resources(u8 * aml, | |||
139 | * | 139 | * |
140 | * FUNCTION: acpi_rs_convert_resources_to_aml | 140 | * FUNCTION: acpi_rs_convert_resources_to_aml |
141 | * | 141 | * |
142 | * PARAMETERS: Resource - Pointer to the resource linked list | 142 | * PARAMETERS: resource - Pointer to the resource linked list |
143 | * aml_size_needed - Calculated size of the byte stream | 143 | * aml_size_needed - Calculated size of the byte stream |
144 | * needed from calling acpi_rs_get_aml_length() | 144 | * needed from calling acpi_rs_get_aml_length() |
145 | * The size of the output_buffer is | 145 | * The size of the output_buffer is |
diff --git a/drivers/acpi/acpica/rsmisc.c b/drivers/acpi/acpica/rsmisc.c index 8073b371cc7c..c6f291c2bc83 100644 --- a/drivers/acpi/acpica/rsmisc.c +++ b/drivers/acpi/acpica/rsmisc.c | |||
@@ -57,9 +57,9 @@ ACPI_MODULE_NAME("rsmisc") | |||
57 | * | 57 | * |
58 | * FUNCTION: acpi_rs_convert_aml_to_resource | 58 | * FUNCTION: acpi_rs_convert_aml_to_resource |
59 | * | 59 | * |
60 | * PARAMETERS: Resource - Pointer to the resource descriptor | 60 | * PARAMETERS: resource - Pointer to the resource descriptor |
61 | * Aml - Where the AML descriptor is returned | 61 | * aml - Where the AML descriptor is returned |
62 | * Info - Pointer to appropriate conversion table | 62 | * info - Pointer to appropriate conversion table |
63 | * | 63 | * |
64 | * RETURN: Status | 64 | * RETURN: Status |
65 | * | 65 | * |
@@ -406,7 +406,7 @@ acpi_rs_convert_aml_to_resource(struct acpi_resource *resource, | |||
406 | 406 | ||
407 | case ACPI_RSC_EXIT_NE: | 407 | case ACPI_RSC_EXIT_NE: |
408 | /* | 408 | /* |
409 | * Control - Exit conversion if not equal | 409 | * control - Exit conversion if not equal |
410 | */ | 410 | */ |
411 | switch (info->resource_offset) { | 411 | switch (info->resource_offset) { |
412 | case ACPI_RSC_COMPARE_AML_LENGTH: | 412 | case ACPI_RSC_COMPARE_AML_LENGTH: |
@@ -454,9 +454,9 @@ acpi_rs_convert_aml_to_resource(struct acpi_resource *resource, | |||
454 | * | 454 | * |
455 | * FUNCTION: acpi_rs_convert_resource_to_aml | 455 | * FUNCTION: acpi_rs_convert_resource_to_aml |
456 | * | 456 | * |
457 | * PARAMETERS: Resource - Pointer to the resource descriptor | 457 | * PARAMETERS: resource - Pointer to the resource descriptor |
458 | * Aml - Where the AML descriptor is returned | 458 | * aml - Where the AML descriptor is returned |
459 | * Info - Pointer to appropriate conversion table | 459 | * info - Pointer to appropriate conversion table |
460 | * | 460 | * |
461 | * RETURN: Status | 461 | * RETURN: Status |
462 | * | 462 | * |
@@ -726,7 +726,7 @@ acpi_rs_convert_resource_to_aml(struct acpi_resource *resource, | |||
726 | 726 | ||
727 | case ACPI_RSC_EXIT_LE: | 727 | case ACPI_RSC_EXIT_LE: |
728 | /* | 728 | /* |
729 | * Control - Exit conversion if less than or equal | 729 | * control - Exit conversion if less than or equal |
730 | */ | 730 | */ |
731 | if (item_count <= info->value) { | 731 | if (item_count <= info->value) { |
732 | goto exit; | 732 | goto exit; |
@@ -735,7 +735,7 @@ acpi_rs_convert_resource_to_aml(struct acpi_resource *resource, | |||
735 | 735 | ||
736 | case ACPI_RSC_EXIT_NE: | 736 | case ACPI_RSC_EXIT_NE: |
737 | /* | 737 | /* |
738 | * Control - Exit conversion if not equal | 738 | * control - Exit conversion if not equal |
739 | */ | 739 | */ |
740 | switch (COMPARE_OPCODE(info)) { | 740 | switch (COMPARE_OPCODE(info)) { |
741 | case ACPI_RSC_COMPARE_VALUE: | 741 | case ACPI_RSC_COMPARE_VALUE: |
@@ -757,7 +757,7 @@ acpi_rs_convert_resource_to_aml(struct acpi_resource *resource, | |||
757 | 757 | ||
758 | case ACPI_RSC_EXIT_EQ: | 758 | case ACPI_RSC_EXIT_EQ: |
759 | /* | 759 | /* |
760 | * Control - Exit conversion if equal | 760 | * control - Exit conversion if equal |
761 | */ | 761 | */ |
762 | if (*ACPI_ADD_PTR(u8, resource, | 762 | if (*ACPI_ADD_PTR(u8, resource, |
763 | COMPARE_TARGET(info)) == | 763 | COMPARE_TARGET(info)) == |
@@ -783,7 +783,7 @@ acpi_rs_convert_resource_to_aml(struct acpi_resource *resource, | |||
783 | #if 0 | 783 | #if 0 |
784 | /* Previous resource validations */ | 784 | /* Previous resource validations */ |
785 | 785 | ||
786 | if (aml->ext_address64.revision_iD != AML_RESOURCE_EXTENDED_ADDRESS_REVISION) { | 786 | if (aml->ext_address64.revision_ID != AML_RESOURCE_EXTENDED_ADDRESS_REVISION) { |
787 | return_ACPI_STATUS(AE_SUPPORT); | 787 | return_ACPI_STATUS(AE_SUPPORT); |
788 | } | 788 | } |
789 | 789 | ||
diff --git a/drivers/acpi/acpica/rsutils.c b/drivers/acpi/acpica/rsutils.c index 433a375deb93..37d5241c0acf 100644 --- a/drivers/acpi/acpica/rsutils.c +++ b/drivers/acpi/acpica/rsutils.c | |||
@@ -53,8 +53,8 @@ ACPI_MODULE_NAME("rsutils") | |||
53 | * | 53 | * |
54 | * FUNCTION: acpi_rs_decode_bitmask | 54 | * FUNCTION: acpi_rs_decode_bitmask |
55 | * | 55 | * |
56 | * PARAMETERS: Mask - Bitmask to decode | 56 | * PARAMETERS: mask - Bitmask to decode |
57 | * List - Where the converted list is returned | 57 | * list - Where the converted list is returned |
58 | * | 58 | * |
59 | * RETURN: Count of bits set (length of list) | 59 | * RETURN: Count of bits set (length of list) |
60 | * | 60 | * |
@@ -86,8 +86,8 @@ u8 acpi_rs_decode_bitmask(u16 mask, u8 * list) | |||
86 | * | 86 | * |
87 | * FUNCTION: acpi_rs_encode_bitmask | 87 | * FUNCTION: acpi_rs_encode_bitmask |
88 | * | 88 | * |
89 | * PARAMETERS: List - List of values to encode | 89 | * PARAMETERS: list - List of values to encode |
90 | * Count - Length of list | 90 | * count - Length of list |
91 | * | 91 | * |
92 | * RETURN: Encoded bitmask | 92 | * RETURN: Encoded bitmask |
93 | * | 93 | * |
@@ -115,8 +115,8 @@ u16 acpi_rs_encode_bitmask(u8 * list, u8 count) | |||
115 | * | 115 | * |
116 | * FUNCTION: acpi_rs_move_data | 116 | * FUNCTION: acpi_rs_move_data |
117 | * | 117 | * |
118 | * PARAMETERS: Destination - Pointer to the destination descriptor | 118 | * PARAMETERS: destination - Pointer to the destination descriptor |
119 | * Source - Pointer to the source descriptor | 119 | * source - Pointer to the source descriptor |
120 | * item_count - How many items to move | 120 | * item_count - How many items to move |
121 | * move_type - Byte width | 121 | * move_type - Byte width |
122 | * | 122 | * |
@@ -183,7 +183,7 @@ acpi_rs_move_data(void *destination, void *source, u16 item_count, u8 move_type) | |||
183 | * | 183 | * |
184 | * PARAMETERS: total_length - Length of the AML descriptor, including | 184 | * PARAMETERS: total_length - Length of the AML descriptor, including |
185 | * the header and length fields. | 185 | * the header and length fields. |
186 | * Aml - Pointer to the raw AML descriptor | 186 | * aml - Pointer to the raw AML descriptor |
187 | * | 187 | * |
188 | * RETURN: None | 188 | * RETURN: None |
189 | * | 189 | * |
@@ -235,7 +235,7 @@ acpi_rs_set_resource_length(acpi_rsdesc_size total_length, | |||
235 | * PARAMETERS: descriptor_type - Byte to be inserted as the type | 235 | * PARAMETERS: descriptor_type - Byte to be inserted as the type |
236 | * total_length - Length of the AML descriptor, including | 236 | * total_length - Length of the AML descriptor, including |
237 | * the header and length fields. | 237 | * the header and length fields. |
238 | * Aml - Pointer to the raw AML descriptor | 238 | * aml - Pointer to the raw AML descriptor |
239 | * | 239 | * |
240 | * RETURN: None | 240 | * RETURN: None |
241 | * | 241 | * |
@@ -265,8 +265,8 @@ acpi_rs_set_resource_header(u8 descriptor_type, | |||
265 | * | 265 | * |
266 | * FUNCTION: acpi_rs_strcpy | 266 | * FUNCTION: acpi_rs_strcpy |
267 | * | 267 | * |
268 | * PARAMETERS: Destination - Pointer to the destination string | 268 | * PARAMETERS: destination - Pointer to the destination string |
269 | * Source - Pointer to the source string | 269 | * source - Pointer to the source string |
270 | * | 270 | * |
271 | * RETURN: String length, including NULL terminator | 271 | * RETURN: String length, including NULL terminator |
272 | * | 272 | * |
@@ -300,7 +300,7 @@ static u16 acpi_rs_strcpy(char *destination, char *source) | |||
300 | * minimum_length - Minimum length of the descriptor (minus | 300 | * minimum_length - Minimum length of the descriptor (minus |
301 | * any optional fields) | 301 | * any optional fields) |
302 | * resource_source - Where the resource_source is returned | 302 | * resource_source - Where the resource_source is returned |
303 | * Aml - Pointer to the raw AML descriptor | 303 | * aml - Pointer to the raw AML descriptor |
304 | * string_ptr - (optional) where to store the actual | 304 | * string_ptr - (optional) where to store the actual |
305 | * resource_source string | 305 | * resource_source string |
306 | * | 306 | * |
@@ -386,7 +386,7 @@ acpi_rs_get_resource_source(acpi_rs_length resource_length, | |||
386 | * | 386 | * |
387 | * FUNCTION: acpi_rs_set_resource_source | 387 | * FUNCTION: acpi_rs_set_resource_source |
388 | * | 388 | * |
389 | * PARAMETERS: Aml - Pointer to the raw AML descriptor | 389 | * PARAMETERS: aml - Pointer to the raw AML descriptor |
390 | * minimum_length - Minimum length of the descriptor (minus | 390 | * minimum_length - Minimum length of the descriptor (minus |
391 | * any optional fields) | 391 | * any optional fields) |
392 | * resource_source - Internal resource_source | 392 | * resource_source - Internal resource_source |
@@ -445,7 +445,7 @@ acpi_rs_set_resource_source(union aml_resource * aml, | |||
445 | * | 445 | * |
446 | * FUNCTION: acpi_rs_get_prt_method_data | 446 | * FUNCTION: acpi_rs_get_prt_method_data |
447 | * | 447 | * |
448 | * PARAMETERS: Node - Device node | 448 | * PARAMETERS: node - Device node |
449 | * ret_buffer - Pointer to a buffer structure for the | 449 | * ret_buffer - Pointer to a buffer structure for the |
450 | * results | 450 | * results |
451 | * | 451 | * |
@@ -494,7 +494,7 @@ acpi_rs_get_prt_method_data(struct acpi_namespace_node * node, | |||
494 | * | 494 | * |
495 | * FUNCTION: acpi_rs_get_crs_method_data | 495 | * FUNCTION: acpi_rs_get_crs_method_data |
496 | * | 496 | * |
497 | * PARAMETERS: Node - Device node | 497 | * PARAMETERS: node - Device node |
498 | * ret_buffer - Pointer to a buffer structure for the | 498 | * ret_buffer - Pointer to a buffer structure for the |
499 | * results | 499 | * results |
500 | * | 500 | * |
@@ -534,7 +534,7 @@ acpi_rs_get_crs_method_data(struct acpi_namespace_node *node, | |||
534 | */ | 534 | */ |
535 | status = acpi_rs_create_resource_list(obj_desc, ret_buffer); | 535 | status = acpi_rs_create_resource_list(obj_desc, ret_buffer); |
536 | 536 | ||
537 | /* On exit, we must delete the object returned by evaluate_object */ | 537 | /* On exit, we must delete the object returned by evaluateObject */ |
538 | 538 | ||
539 | acpi_ut_remove_reference(obj_desc); | 539 | acpi_ut_remove_reference(obj_desc); |
540 | return_ACPI_STATUS(status); | 540 | return_ACPI_STATUS(status); |
@@ -544,7 +544,7 @@ acpi_rs_get_crs_method_data(struct acpi_namespace_node *node, | |||
544 | * | 544 | * |
545 | * FUNCTION: acpi_rs_get_prs_method_data | 545 | * FUNCTION: acpi_rs_get_prs_method_data |
546 | * | 546 | * |
547 | * PARAMETERS: Node - Device node | 547 | * PARAMETERS: node - Device node |
548 | * ret_buffer - Pointer to a buffer structure for the | 548 | * ret_buffer - Pointer to a buffer structure for the |
549 | * results | 549 | * results |
550 | * | 550 | * |
@@ -585,7 +585,7 @@ acpi_rs_get_prs_method_data(struct acpi_namespace_node *node, | |||
585 | */ | 585 | */ |
586 | status = acpi_rs_create_resource_list(obj_desc, ret_buffer); | 586 | status = acpi_rs_create_resource_list(obj_desc, ret_buffer); |
587 | 587 | ||
588 | /* On exit, we must delete the object returned by evaluate_object */ | 588 | /* On exit, we must delete the object returned by evaluateObject */ |
589 | 589 | ||
590 | acpi_ut_remove_reference(obj_desc); | 590 | acpi_ut_remove_reference(obj_desc); |
591 | return_ACPI_STATUS(status); | 591 | return_ACPI_STATUS(status); |
@@ -596,7 +596,7 @@ acpi_rs_get_prs_method_data(struct acpi_namespace_node *node, | |||
596 | * | 596 | * |
597 | * FUNCTION: acpi_rs_get_aei_method_data | 597 | * FUNCTION: acpi_rs_get_aei_method_data |
598 | * | 598 | * |
599 | * PARAMETERS: Node - Device node | 599 | * PARAMETERS: node - Device node |
600 | * ret_buffer - Pointer to a buffer structure for the | 600 | * ret_buffer - Pointer to a buffer structure for the |
601 | * results | 601 | * results |
602 | * | 602 | * |
@@ -636,7 +636,7 @@ acpi_rs_get_aei_method_data(struct acpi_namespace_node *node, | |||
636 | */ | 636 | */ |
637 | status = acpi_rs_create_resource_list(obj_desc, ret_buffer); | 637 | status = acpi_rs_create_resource_list(obj_desc, ret_buffer); |
638 | 638 | ||
639 | /* On exit, we must delete the object returned by evaluate_object */ | 639 | /* On exit, we must delete the object returned by evaluateObject */ |
640 | 640 | ||
641 | acpi_ut_remove_reference(obj_desc); | 641 | acpi_ut_remove_reference(obj_desc); |
642 | return_ACPI_STATUS(status); | 642 | return_ACPI_STATUS(status); |
@@ -646,8 +646,8 @@ acpi_rs_get_aei_method_data(struct acpi_namespace_node *node, | |||
646 | * | 646 | * |
647 | * FUNCTION: acpi_rs_get_method_data | 647 | * FUNCTION: acpi_rs_get_method_data |
648 | * | 648 | * |
649 | * PARAMETERS: Handle - Handle to the containing object | 649 | * PARAMETERS: handle - Handle to the containing object |
650 | * Path - Path to method, relative to Handle | 650 | * path - Path to method, relative to Handle |
651 | * ret_buffer - Pointer to a buffer structure for the | 651 | * ret_buffer - Pointer to a buffer structure for the |
652 | * results | 652 | * results |
653 | * | 653 | * |
@@ -697,7 +697,7 @@ acpi_rs_get_method_data(acpi_handle handle, | |||
697 | * | 697 | * |
698 | * FUNCTION: acpi_rs_set_srs_method_data | 698 | * FUNCTION: acpi_rs_set_srs_method_data |
699 | * | 699 | * |
700 | * PARAMETERS: Node - Device node | 700 | * PARAMETERS: node - Device node |
701 | * in_buffer - Pointer to a buffer structure of the | 701 | * in_buffer - Pointer to a buffer structure of the |
702 | * parameter | 702 | * parameter |
703 | * | 703 | * |
diff --git a/drivers/acpi/acpica/rsxface.c b/drivers/acpi/acpica/rsxface.c index f58c098c7aeb..5aad744b5b83 100644 --- a/drivers/acpi/acpica/rsxface.c +++ b/drivers/acpi/acpica/rsxface.c | |||
@@ -79,7 +79,7 @@ acpi_rs_validate_parameters(acpi_handle device_handle, | |||
79 | * FUNCTION: acpi_rs_validate_parameters | 79 | * FUNCTION: acpi_rs_validate_parameters |
80 | * | 80 | * |
81 | * PARAMETERS: device_handle - Handle to a device | 81 | * PARAMETERS: device_handle - Handle to a device |
82 | * Buffer - Pointer to a data buffer | 82 | * buffer - Pointer to a data buffer |
83 | * return_node - Pointer to where the device node is returned | 83 | * return_node - Pointer to where the device node is returned |
84 | * | 84 | * |
85 | * RETURN: Status | 85 | * RETURN: Status |
@@ -351,8 +351,8 @@ ACPI_EXPORT_SYMBOL(acpi_get_event_resources) | |||
351 | * | 351 | * |
352 | * FUNCTION: acpi_resource_to_address64 | 352 | * FUNCTION: acpi_resource_to_address64 |
353 | * | 353 | * |
354 | * PARAMETERS: Resource - Pointer to a resource | 354 | * PARAMETERS: resource - Pointer to a resource |
355 | * Out - Pointer to the users's return buffer | 355 | * out - Pointer to the users's return buffer |
356 | * (a struct acpi_resource_address64) | 356 | * (a struct acpi_resource_address64) |
357 | * | 357 | * |
358 | * RETURN: Status | 358 | * RETURN: Status |
@@ -415,9 +415,9 @@ ACPI_EXPORT_SYMBOL(acpi_resource_to_address64) | |||
415 | * FUNCTION: acpi_get_vendor_resource | 415 | * FUNCTION: acpi_get_vendor_resource |
416 | * | 416 | * |
417 | * PARAMETERS: device_handle - Handle for the parent device object | 417 | * PARAMETERS: device_handle - Handle for the parent device object |
418 | * Name - Method name for the parent resource | 418 | * name - Method name for the parent resource |
419 | * (METHOD_NAME__CRS or METHOD_NAME__PRS) | 419 | * (METHOD_NAME__CRS or METHOD_NAME__PRS) |
420 | * Uuid - Pointer to the UUID to be matched. | 420 | * uuid - Pointer to the UUID to be matched. |
421 | * includes both subtype and 16-byte UUID | 421 | * includes both subtype and 16-byte UUID |
422 | * ret_buffer - Where the vendor resource is returned | 422 | * ret_buffer - Where the vendor resource is returned |
423 | * | 423 | * |
@@ -526,11 +526,11 @@ acpi_rs_match_vendor_resource(struct acpi_resource *resource, void *context) | |||
526 | * | 526 | * |
527 | * PARAMETERS: device_handle - Handle to the device object for the | 527 | * PARAMETERS: device_handle - Handle to the device object for the |
528 | * device we are querying | 528 | * device we are querying |
529 | * Name - Method name of the resources we want. | 529 | * name - Method name of the resources we want. |
530 | * (METHOD_NAME__CRS, METHOD_NAME__PRS, or | 530 | * (METHOD_NAME__CRS, METHOD_NAME__PRS, or |
531 | * METHOD_NAME__AEI) | 531 | * METHOD_NAME__AEI) |
532 | * user_function - Called for each resource | 532 | * user_function - Called for each resource |
533 | * Context - Passed to user_function | 533 | * context - Passed to user_function |
534 | * | 534 | * |
535 | * RETURN: Status | 535 | * RETURN: Status |
536 | * | 536 | * |
diff --git a/drivers/acpi/acpica/tbfadt.c b/drivers/acpi/acpica/tbfadt.c index 4c9c760db4a4..390651860bf0 100644 --- a/drivers/acpi/acpica/tbfadt.c +++ b/drivers/acpi/acpica/tbfadt.c | |||
@@ -49,9 +49,10 @@ | |||
49 | ACPI_MODULE_NAME("tbfadt") | 49 | ACPI_MODULE_NAME("tbfadt") |
50 | 50 | ||
51 | /* Local prototypes */ | 51 | /* Local prototypes */ |
52 | static ACPI_INLINE void | 52 | static void |
53 | acpi_tb_init_generic_address(struct acpi_generic_address *generic_address, | 53 | acpi_tb_init_generic_address(struct acpi_generic_address *generic_address, |
54 | u8 space_id, u8 byte_width, u64 address); | 54 | u8 space_id, |
55 | u8 byte_width, u64 address, char *register_name); | ||
55 | 56 | ||
56 | static void acpi_tb_convert_fadt(void); | 57 | static void acpi_tb_convert_fadt(void); |
57 | 58 | ||
@@ -172,7 +173,7 @@ static struct acpi_fadt_pm_info fadt_pm_info_table[] = { | |||
172 | * | 173 | * |
173 | * PARAMETERS: generic_address - GAS struct to be initialized | 174 | * PARAMETERS: generic_address - GAS struct to be initialized |
174 | * byte_width - Width of this register | 175 | * byte_width - Width of this register |
175 | * Address - Address of the register | 176 | * address - Address of the register |
176 | * | 177 | * |
177 | * RETURN: None | 178 | * RETURN: None |
178 | * | 179 | * |
@@ -182,10 +183,25 @@ static struct acpi_fadt_pm_info fadt_pm_info_table[] = { | |||
182 | * | 183 | * |
183 | ******************************************************************************/ | 184 | ******************************************************************************/ |
184 | 185 | ||
185 | static ACPI_INLINE void | 186 | static void |
186 | acpi_tb_init_generic_address(struct acpi_generic_address *generic_address, | 187 | acpi_tb_init_generic_address(struct acpi_generic_address *generic_address, |
187 | u8 space_id, u8 byte_width, u64 address) | 188 | u8 space_id, |
189 | u8 byte_width, u64 address, char *register_name) | ||
188 | { | 190 | { |
191 | u8 bit_width; | ||
192 | |||
193 | /* Bit width field in the GAS is only one byte long, 255 max */ | ||
194 | |||
195 | bit_width = (u8)(byte_width * 8); | ||
196 | |||
197 | if (byte_width > 31) { /* (31*8)=248 */ | ||
198 | ACPI_ERROR((AE_INFO, | ||
199 | "%s - 32-bit FADT register is too long (%u bytes, %u bits) " | ||
200 | "to convert to GAS struct - 255 bits max, truncating", | ||
201 | register_name, byte_width, (byte_width * 8))); | ||
202 | |||
203 | bit_width = 255; | ||
204 | } | ||
189 | 205 | ||
190 | /* | 206 | /* |
191 | * The 64-bit Address field is non-aligned in the byte packed | 207 | * The 64-bit Address field is non-aligned in the byte packed |
@@ -196,7 +212,7 @@ acpi_tb_init_generic_address(struct acpi_generic_address *generic_address, | |||
196 | /* All other fields are byte-wide */ | 212 | /* All other fields are byte-wide */ |
197 | 213 | ||
198 | generic_address->space_id = space_id; | 214 | generic_address->space_id = space_id; |
199 | generic_address->bit_width = (u8)ACPI_MUL_8(byte_width); | 215 | generic_address->bit_width = bit_width; |
200 | generic_address->bit_offset = 0; | 216 | generic_address->bit_offset = 0; |
201 | generic_address->access_width = 0; /* Access width ANY */ | 217 | generic_address->access_width = 0; /* Access width ANY */ |
202 | } | 218 | } |
@@ -267,8 +283,8 @@ void acpi_tb_parse_fadt(u32 table_index) | |||
267 | * | 283 | * |
268 | * FUNCTION: acpi_tb_create_local_fadt | 284 | * FUNCTION: acpi_tb_create_local_fadt |
269 | * | 285 | * |
270 | * PARAMETERS: Table - Pointer to BIOS FADT | 286 | * PARAMETERS: table - Pointer to BIOS FADT |
271 | * Length - Length of the table | 287 | * length - Length of the table |
272 | * | 288 | * |
273 | * RETURN: None | 289 | * RETURN: None |
274 | * | 290 | * |
@@ -287,11 +303,11 @@ void acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length) | |||
287 | * a warning. | 303 | * a warning. |
288 | */ | 304 | */ |
289 | if (length > sizeof(struct acpi_table_fadt)) { | 305 | if (length > sizeof(struct acpi_table_fadt)) { |
290 | ACPI_WARNING((AE_INFO, | 306 | ACPI_BIOS_WARNING((AE_INFO, |
291 | "FADT (revision %u) is longer than ACPI 5.0 version, " | 307 | "FADT (revision %u) is longer than ACPI 5.0 version, " |
292 | "truncating length %u to %u", | 308 | "truncating length %u to %u", |
293 | table->revision, length, | 309 | table->revision, length, |
294 | (u32)sizeof(struct acpi_table_fadt))); | 310 | (u32)sizeof(struct acpi_table_fadt))); |
295 | } | 311 | } |
296 | 312 | ||
297 | /* Clear the entire local FADT */ | 313 | /* Clear the entire local FADT */ |
@@ -436,11 +452,13 @@ static void acpi_tb_convert_fadt(void) | |||
436 | * they must match. | 452 | * they must match. |
437 | */ | 453 | */ |
438 | if (address64->address && address32 && | 454 | if (address64->address && address32 && |
439 | (address64->address != (u64) address32)) { | 455 | (address64->address != (u64)address32)) { |
440 | ACPI_ERROR((AE_INFO, | 456 | ACPI_BIOS_ERROR((AE_INFO, |
441 | "32/64X address mismatch in %s: 0x%8.8X/0x%8.8X%8.8X, using 32", | 457 | "32/64X address mismatch in FADT/%s: " |
442 | fadt_info_table[i].name, address32, | 458 | "0x%8.8X/0x%8.8X%8.8X, using 32", |
443 | ACPI_FORMAT_UINT64(address64->address))); | 459 | fadt_info_table[i].name, address32, |
460 | ACPI_FORMAT_UINT64(address64-> | ||
461 | address))); | ||
444 | } | 462 | } |
445 | 463 | ||
446 | /* Always use 32-bit address if it is valid (non-null) */ | 464 | /* Always use 32-bit address if it is valid (non-null) */ |
@@ -456,7 +474,8 @@ static void acpi_tb_convert_fadt(void) | |||
456 | &acpi_gbl_FADT, | 474 | &acpi_gbl_FADT, |
457 | fadt_info_table | 475 | fadt_info_table |
458 | [i].length), | 476 | [i].length), |
459 | (u64) address32); | 477 | (u64) address32, |
478 | fadt_info_table[i].name); | ||
460 | } | 479 | } |
461 | } | 480 | } |
462 | } | 481 | } |
@@ -465,7 +484,7 @@ static void acpi_tb_convert_fadt(void) | |||
465 | * | 484 | * |
466 | * FUNCTION: acpi_tb_validate_fadt | 485 | * FUNCTION: acpi_tb_validate_fadt |
467 | * | 486 | * |
468 | * PARAMETERS: Table - Pointer to the FADT to be validated | 487 | * PARAMETERS: table - Pointer to the FADT to be validated |
469 | * | 488 | * |
470 | * RETURN: None | 489 | * RETURN: None |
471 | * | 490 | * |
@@ -494,25 +513,25 @@ static void acpi_tb_validate_fadt(void) | |||
494 | * DSDT/X_DSDT) would indicate the presence of two FACS or two DSDT tables. | 513 | * DSDT/X_DSDT) would indicate the presence of two FACS or two DSDT tables. |
495 | */ | 514 | */ |
496 | if (acpi_gbl_FADT.facs && | 515 | if (acpi_gbl_FADT.facs && |
497 | (acpi_gbl_FADT.Xfacs != (u64) acpi_gbl_FADT.facs)) { | 516 | (acpi_gbl_FADT.Xfacs != (u64)acpi_gbl_FADT.facs)) { |
498 | ACPI_WARNING((AE_INFO, | 517 | ACPI_BIOS_WARNING((AE_INFO, |
499 | "32/64X FACS address mismatch in FADT - " | 518 | "32/64X FACS address mismatch in FADT - " |
500 | "0x%8.8X/0x%8.8X%8.8X, using 32", | 519 | "0x%8.8X/0x%8.8X%8.8X, using 32", |
501 | acpi_gbl_FADT.facs, | 520 | acpi_gbl_FADT.facs, |
502 | ACPI_FORMAT_UINT64(acpi_gbl_FADT.Xfacs))); | 521 | ACPI_FORMAT_UINT64(acpi_gbl_FADT.Xfacs))); |
503 | 522 | ||
504 | acpi_gbl_FADT.Xfacs = (u64) acpi_gbl_FADT.facs; | 523 | acpi_gbl_FADT.Xfacs = (u64)acpi_gbl_FADT.facs; |
505 | } | 524 | } |
506 | 525 | ||
507 | if (acpi_gbl_FADT.dsdt && | 526 | if (acpi_gbl_FADT.dsdt && |
508 | (acpi_gbl_FADT.Xdsdt != (u64) acpi_gbl_FADT.dsdt)) { | 527 | (acpi_gbl_FADT.Xdsdt != (u64)acpi_gbl_FADT.dsdt)) { |
509 | ACPI_WARNING((AE_INFO, | 528 | ACPI_BIOS_WARNING((AE_INFO, |
510 | "32/64X DSDT address mismatch in FADT - " | 529 | "32/64X DSDT address mismatch in FADT - " |
511 | "0x%8.8X/0x%8.8X%8.8X, using 32", | 530 | "0x%8.8X/0x%8.8X%8.8X, using 32", |
512 | acpi_gbl_FADT.dsdt, | 531 | acpi_gbl_FADT.dsdt, |
513 | ACPI_FORMAT_UINT64(acpi_gbl_FADT.Xdsdt))); | 532 | ACPI_FORMAT_UINT64(acpi_gbl_FADT.Xdsdt))); |
514 | 533 | ||
515 | acpi_gbl_FADT.Xdsdt = (u64) acpi_gbl_FADT.dsdt; | 534 | acpi_gbl_FADT.Xdsdt = (u64)acpi_gbl_FADT.dsdt; |
516 | } | 535 | } |
517 | 536 | ||
518 | /* If Hardware Reduced flag is set, we are all done */ | 537 | /* If Hardware Reduced flag is set, we are all done */ |
@@ -542,10 +561,10 @@ static void acpi_tb_validate_fadt(void) | |||
542 | */ | 561 | */ |
543 | if (address64->address && | 562 | if (address64->address && |
544 | (address64->bit_width != ACPI_MUL_8(length))) { | 563 | (address64->bit_width != ACPI_MUL_8(length))) { |
545 | ACPI_WARNING((AE_INFO, | 564 | ACPI_BIOS_WARNING((AE_INFO, |
546 | "32/64X length mismatch in %s: %u/%u", | 565 | "32/64X length mismatch in FADT/%s: %u/%u", |
547 | name, ACPI_MUL_8(length), | 566 | name, ACPI_MUL_8(length), |
548 | address64->bit_width)); | 567 | address64->bit_width)); |
549 | } | 568 | } |
550 | 569 | ||
551 | if (fadt_info_table[i].type & ACPI_FADT_REQUIRED) { | 570 | if (fadt_info_table[i].type & ACPI_FADT_REQUIRED) { |
@@ -554,29 +573,29 @@ static void acpi_tb_validate_fadt(void) | |||
554 | * Both the address and length must be non-zero. | 573 | * Both the address and length must be non-zero. |
555 | */ | 574 | */ |
556 | if (!address64->address || !length) { | 575 | if (!address64->address || !length) { |
557 | ACPI_ERROR((AE_INFO, | 576 | ACPI_BIOS_ERROR((AE_INFO, |
558 | "Required field %s has zero address and/or length:" | 577 | "Required FADT field %s has zero address and/or length: " |
559 | " 0x%8.8X%8.8X/0x%X", | 578 | "0x%8.8X%8.8X/0x%X", |
560 | name, | 579 | name, |
561 | ACPI_FORMAT_UINT64(address64-> | 580 | ACPI_FORMAT_UINT64(address64-> |
562 | address), | 581 | address), |
563 | length)); | 582 | length)); |
564 | } | 583 | } |
565 | } else if (fadt_info_table[i].type & ACPI_FADT_SEPARATE_LENGTH) { | 584 | } else if (fadt_info_table[i].type & ACPI_FADT_SEPARATE_LENGTH) { |
566 | /* | 585 | /* |
567 | * Field is optional (PM2Control, GPE0, GPE1) AND has its own | 586 | * Field is optional (Pm2_control, GPE0, GPE1) AND has its own |
568 | * length field. If present, both the address and length must | 587 | * length field. If present, both the address and length must |
569 | * be valid. | 588 | * be valid. |
570 | */ | 589 | */ |
571 | if ((address64->address && !length) || | 590 | if ((address64->address && !length) || |
572 | (!address64->address && length)) { | 591 | (!address64->address && length)) { |
573 | ACPI_WARNING((AE_INFO, | 592 | ACPI_BIOS_WARNING((AE_INFO, |
574 | "Optional field %s has zero address or length: " | 593 | "Optional FADT field %s has zero address or length: " |
575 | "0x%8.8X%8.8X/0x%X", | 594 | "0x%8.8X%8.8X/0x%X", |
576 | name, | 595 | name, |
577 | ACPI_FORMAT_UINT64(address64-> | 596 | ACPI_FORMAT_UINT64 |
578 | address), | 597 | (address64->address), |
579 | length)); | 598 | length)); |
580 | } | 599 | } |
581 | } | 600 | } |
582 | } | 601 | } |
@@ -621,12 +640,12 @@ static void acpi_tb_setup_fadt_registers(void) | |||
621 | (fadt_info_table[i].default_length > 0) && | 640 | (fadt_info_table[i].default_length > 0) && |
622 | (fadt_info_table[i].default_length != | 641 | (fadt_info_table[i].default_length != |
623 | target64->bit_width)) { | 642 | target64->bit_width)) { |
624 | ACPI_WARNING((AE_INFO, | 643 | ACPI_BIOS_WARNING((AE_INFO, |
625 | "Invalid length for %s: %u, using default %u", | 644 | "Invalid length for FADT/%s: %u, using default %u", |
626 | fadt_info_table[i].name, | 645 | fadt_info_table[i].name, |
627 | target64->bit_width, | 646 | target64->bit_width, |
628 | fadt_info_table[i]. | 647 | fadt_info_table[i]. |
629 | default_length)); | 648 | default_length)); |
630 | 649 | ||
631 | /* Incorrect size, set width to the default */ | 650 | /* Incorrect size, set width to the default */ |
632 | 651 | ||
@@ -670,7 +689,8 @@ static void acpi_tb_setup_fadt_registers(void) | |||
670 | source64->address + | 689 | source64->address + |
671 | (fadt_pm_info_table[i]. | 690 | (fadt_pm_info_table[i]. |
672 | register_num * | 691 | register_num * |
673 | pm1_register_byte_width)); | 692 | pm1_register_byte_width), |
693 | "PmRegisters"); | ||
674 | } | 694 | } |
675 | } | 695 | } |
676 | } | 696 | } |
diff --git a/drivers/acpi/acpica/tbfind.c b/drivers/acpi/acpica/tbfind.c index 4903e36ea75a..57deae166577 100644 --- a/drivers/acpi/acpica/tbfind.c +++ b/drivers/acpi/acpica/tbfind.c | |||
@@ -52,7 +52,7 @@ ACPI_MODULE_NAME("tbfind") | |||
52 | * | 52 | * |
53 | * FUNCTION: acpi_tb_find_table | 53 | * FUNCTION: acpi_tb_find_table |
54 | * | 54 | * |
55 | * PARAMETERS: Signature - String with ACPI table signature | 55 | * PARAMETERS: signature - String with ACPI table signature |
56 | * oem_id - String with the table OEM ID | 56 | * oem_id - String with the table OEM ID |
57 | * oem_table_id - String with the OEM Table ID | 57 | * oem_table_id - String with the OEM Table ID |
58 | * table_index - Where the table index is returned | 58 | * table_index - Where the table index is returned |
diff --git a/drivers/acpi/acpica/tbinstal.c b/drivers/acpi/acpica/tbinstal.c index c03500b4cc7a..74f97d74db1c 100644 --- a/drivers/acpi/acpica/tbinstal.c +++ b/drivers/acpi/acpica/tbinstal.c | |||
@@ -138,13 +138,14 @@ acpi_tb_add_table(struct acpi_table_desc *table_desc, u32 *table_index) | |||
138 | if ((table_desc->pointer->signature[0] != 0x00) && | 138 | if ((table_desc->pointer->signature[0] != 0x00) && |
139 | (!ACPI_COMPARE_NAME(table_desc->pointer->signature, ACPI_SIG_SSDT)) | 139 | (!ACPI_COMPARE_NAME(table_desc->pointer->signature, ACPI_SIG_SSDT)) |
140 | && (ACPI_STRNCMP(table_desc->pointer->signature, "OEM", 3))) { | 140 | && (ACPI_STRNCMP(table_desc->pointer->signature, "OEM", 3))) { |
141 | ACPI_ERROR((AE_INFO, | 141 | ACPI_BIOS_ERROR((AE_INFO, |
142 | "Table has invalid signature [%4.4s] (0x%8.8X), must be SSDT or OEMx", | 142 | "Table has invalid signature [%4.4s] (0x%8.8X), " |
143 | acpi_ut_valid_acpi_name(*(u32 *)table_desc-> | 143 | "must be SSDT or OEMx", |
144 | pointer-> | 144 | acpi_ut_valid_acpi_name(*(u32 *)table_desc-> |
145 | signature) ? table_desc-> | 145 | pointer-> |
146 | pointer->signature : "????", | 146 | signature) ? |
147 | *(u32 *)table_desc->pointer->signature)); | 147 | table_desc->pointer->signature : "????", |
148 | *(u32 *)table_desc->pointer->signature)); | ||
148 | 149 | ||
149 | return_ACPI_STATUS(AE_BAD_SIGNATURE); | 150 | return_ACPI_STATUS(AE_BAD_SIGNATURE); |
150 | } | 151 | } |
@@ -396,10 +397,10 @@ acpi_status acpi_tb_resize_root_table_list(void) | |||
396 | * | 397 | * |
397 | * FUNCTION: acpi_tb_store_table | 398 | * FUNCTION: acpi_tb_store_table |
398 | * | 399 | * |
399 | * PARAMETERS: Address - Table address | 400 | * PARAMETERS: address - Table address |
400 | * Table - Table header | 401 | * table - Table header |
401 | * Length - Table length | 402 | * length - Table length |
402 | * Flags - flags | 403 | * flags - flags |
403 | * | 404 | * |
404 | * RETURN: Status and table index. | 405 | * RETURN: Status and table index. |
405 | * | 406 | * |
diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c index 0a706cac37de..b6cea30da638 100644 --- a/drivers/acpi/acpica/tbutils.c +++ b/drivers/acpi/acpica/tbutils.c | |||
@@ -178,8 +178,8 @@ u8 acpi_tb_tables_loaded(void) | |||
178 | * | 178 | * |
179 | * FUNCTION: acpi_tb_fix_string | 179 | * FUNCTION: acpi_tb_fix_string |
180 | * | 180 | * |
181 | * PARAMETERS: String - String to be repaired | 181 | * PARAMETERS: string - String to be repaired |
182 | * Length - Maximum length | 182 | * length - Maximum length |
183 | * | 183 | * |
184 | * RETURN: None | 184 | * RETURN: None |
185 | * | 185 | * |
@@ -205,7 +205,7 @@ static void acpi_tb_fix_string(char *string, acpi_size length) | |||
205 | * FUNCTION: acpi_tb_cleanup_table_header | 205 | * FUNCTION: acpi_tb_cleanup_table_header |
206 | * | 206 | * |
207 | * PARAMETERS: out_header - Where the cleaned header is returned | 207 | * PARAMETERS: out_header - Where the cleaned header is returned |
208 | * Header - Input ACPI table header | 208 | * header - Input ACPI table header |
209 | * | 209 | * |
210 | * RETURN: Returns the cleaned header in out_header | 210 | * RETURN: Returns the cleaned header in out_header |
211 | * | 211 | * |
@@ -231,8 +231,8 @@ acpi_tb_cleanup_table_header(struct acpi_table_header *out_header, | |||
231 | * | 231 | * |
232 | * FUNCTION: acpi_tb_print_table_header | 232 | * FUNCTION: acpi_tb_print_table_header |
233 | * | 233 | * |
234 | * PARAMETERS: Address - Table physical address | 234 | * PARAMETERS: address - Table physical address |
235 | * Header - Table header | 235 | * header - Table header |
236 | * | 236 | * |
237 | * RETURN: None | 237 | * RETURN: None |
238 | * | 238 | * |
@@ -296,8 +296,8 @@ acpi_tb_print_table_header(acpi_physical_address address, | |||
296 | * | 296 | * |
297 | * FUNCTION: acpi_tb_validate_checksum | 297 | * FUNCTION: acpi_tb_validate_checksum |
298 | * | 298 | * |
299 | * PARAMETERS: Table - ACPI table to verify | 299 | * PARAMETERS: table - ACPI table to verify |
300 | * Length - Length of entire table | 300 | * length - Length of entire table |
301 | * | 301 | * |
302 | * RETURN: Status | 302 | * RETURN: Status |
303 | * | 303 | * |
@@ -317,10 +317,11 @@ acpi_status acpi_tb_verify_checksum(struct acpi_table_header *table, u32 length) | |||
317 | /* Checksum ok? (should be zero) */ | 317 | /* Checksum ok? (should be zero) */ |
318 | 318 | ||
319 | if (checksum) { | 319 | if (checksum) { |
320 | ACPI_WARNING((AE_INFO, | 320 | ACPI_BIOS_WARNING((AE_INFO, |
321 | "Incorrect checksum in table [%4.4s] - 0x%2.2X, should be 0x%2.2X", | 321 | "Incorrect checksum in table [%4.4s] - 0x%2.2X, " |
322 | table->signature, table->checksum, | 322 | "should be 0x%2.2X", |
323 | (u8) (table->checksum - checksum))); | 323 | table->signature, table->checksum, |
324 | (u8)(table->checksum - checksum))); | ||
324 | 325 | ||
325 | #if (ACPI_CHECKSUM_ABORT) | 326 | #if (ACPI_CHECKSUM_ABORT) |
326 | 327 | ||
@@ -335,8 +336,8 @@ acpi_status acpi_tb_verify_checksum(struct acpi_table_header *table, u32 length) | |||
335 | * | 336 | * |
336 | * FUNCTION: acpi_tb_checksum | 337 | * FUNCTION: acpi_tb_checksum |
337 | * | 338 | * |
338 | * PARAMETERS: Buffer - Pointer to memory region to be checked | 339 | * PARAMETERS: buffer - Pointer to memory region to be checked |
339 | * Length - Length of this memory region | 340 | * length - Length of this memory region |
340 | * | 341 | * |
341 | * RETURN: Checksum (u8) | 342 | * RETURN: Checksum (u8) |
342 | * | 343 | * |
@@ -377,8 +378,9 @@ void acpi_tb_check_dsdt_header(void) | |||
377 | 378 | ||
378 | if (acpi_gbl_original_dsdt_header.length != acpi_gbl_DSDT->length || | 379 | if (acpi_gbl_original_dsdt_header.length != acpi_gbl_DSDT->length || |
379 | acpi_gbl_original_dsdt_header.checksum != acpi_gbl_DSDT->checksum) { | 380 | acpi_gbl_original_dsdt_header.checksum != acpi_gbl_DSDT->checksum) { |
380 | ACPI_ERROR((AE_INFO, | 381 | ACPI_BIOS_ERROR((AE_INFO, |
381 | "The DSDT has been corrupted or replaced - old, new headers below")); | 382 | "The DSDT has been corrupted or replaced - " |
383 | "old, new headers below")); | ||
382 | acpi_tb_print_table_header(0, &acpi_gbl_original_dsdt_header); | 384 | acpi_tb_print_table_header(0, &acpi_gbl_original_dsdt_header); |
383 | acpi_tb_print_table_header(0, acpi_gbl_DSDT); | 385 | acpi_tb_print_table_header(0, acpi_gbl_DSDT); |
384 | 386 | ||
@@ -438,8 +440,8 @@ struct acpi_table_header *acpi_tb_copy_dsdt(u32 table_index) | |||
438 | * | 440 | * |
439 | * FUNCTION: acpi_tb_install_table | 441 | * FUNCTION: acpi_tb_install_table |
440 | * | 442 | * |
441 | * PARAMETERS: Address - Physical address of DSDT or FACS | 443 | * PARAMETERS: address - Physical address of DSDT or FACS |
442 | * Signature - Table signature, NULL if no need to | 444 | * signature - Table signature, NULL if no need to |
443 | * match | 445 | * match |
444 | * table_index - Index into root table array | 446 | * table_index - Index into root table array |
445 | * | 447 | * |
@@ -480,9 +482,10 @@ acpi_tb_install_table(acpi_physical_address address, | |||
480 | /* If a particular signature is expected (DSDT/FACS), it must match */ | 482 | /* If a particular signature is expected (DSDT/FACS), it must match */ |
481 | 483 | ||
482 | if (signature && !ACPI_COMPARE_NAME(table->signature, signature)) { | 484 | if (signature && !ACPI_COMPARE_NAME(table->signature, signature)) { |
483 | ACPI_ERROR((AE_INFO, | 485 | ACPI_BIOS_ERROR((AE_INFO, |
484 | "Invalid signature 0x%X for ACPI table, expected [%s]", | 486 | "Invalid signature 0x%X for ACPI table, expected [%s]", |
485 | *ACPI_CAST_PTR(u32, table->signature), signature)); | 487 | *ACPI_CAST_PTR(u32, table->signature), |
488 | signature)); | ||
486 | goto unmap_and_exit; | 489 | goto unmap_and_exit; |
487 | } | 490 | } |
488 | 491 | ||
@@ -589,10 +592,10 @@ acpi_tb_get_root_table_entry(u8 *table_entry, u32 table_entry_size) | |||
589 | 592 | ||
590 | /* Will truncate 64-bit address to 32 bits, issue warning */ | 593 | /* Will truncate 64-bit address to 32 bits, issue warning */ |
591 | 594 | ||
592 | ACPI_WARNING((AE_INFO, | 595 | ACPI_BIOS_WARNING((AE_INFO, |
593 | "64-bit Physical Address in XSDT is too large (0x%8.8X%8.8X)," | 596 | "64-bit Physical Address in XSDT is too large (0x%8.8X%8.8X)," |
594 | " truncating", | 597 | " truncating", |
595 | ACPI_FORMAT_UINT64(address64))); | 598 | ACPI_FORMAT_UINT64(address64))); |
596 | } | 599 | } |
597 | #endif | 600 | #endif |
598 | return ((acpi_physical_address) (address64)); | 601 | return ((acpi_physical_address) (address64)); |
@@ -603,7 +606,7 @@ acpi_tb_get_root_table_entry(u8 *table_entry, u32 table_entry_size) | |||
603 | * | 606 | * |
604 | * FUNCTION: acpi_tb_parse_root_table | 607 | * FUNCTION: acpi_tb_parse_root_table |
605 | * | 608 | * |
606 | * PARAMETERS: Rsdp - Pointer to the RSDP | 609 | * PARAMETERS: rsdp - Pointer to the RSDP |
607 | * | 610 | * |
608 | * RETURN: Status | 611 | * RETURN: Status |
609 | * | 612 | * |
@@ -694,8 +697,9 @@ acpi_tb_parse_root_table(acpi_physical_address rsdp_address) | |||
694 | acpi_os_unmap_memory(table, sizeof(struct acpi_table_header)); | 697 | acpi_os_unmap_memory(table, sizeof(struct acpi_table_header)); |
695 | 698 | ||
696 | if (length < sizeof(struct acpi_table_header)) { | 699 | if (length < sizeof(struct acpi_table_header)) { |
697 | ACPI_ERROR((AE_INFO, "Invalid length 0x%X in RSDT/XSDT", | 700 | ACPI_BIOS_ERROR((AE_INFO, |
698 | length)); | 701 | "Invalid table length 0x%X in RSDT/XSDT", |
702 | length)); | ||
699 | return_ACPI_STATUS(AE_INVALID_TABLE_LENGTH); | 703 | return_ACPI_STATUS(AE_INVALID_TABLE_LENGTH); |
700 | } | 704 | } |
701 | 705 | ||
diff --git a/drivers/acpi/acpica/tbxface.c b/drivers/acpi/acpica/tbxface.c index abcc6412c244..ea4c6d52605a 100644 --- a/drivers/acpi/acpica/tbxface.c +++ b/drivers/acpi/acpica/tbxface.c | |||
@@ -1,7 +1,6 @@ | |||
1 | /****************************************************************************** | 1 | /****************************************************************************** |
2 | * | 2 | * |
3 | * Module Name: tbxface - Public interfaces to the ACPI subsystem | 3 | * Module Name: tbxface - ACPI table oriented external interfaces |
4 | * ACPI table oriented interfaces | ||
5 | * | 4 | * |
6 | *****************************************************************************/ | 5 | *****************************************************************************/ |
7 | 6 | ||
@@ -51,11 +50,6 @@ | |||
51 | #define _COMPONENT ACPI_TABLES | 50 | #define _COMPONENT ACPI_TABLES |
52 | ACPI_MODULE_NAME("tbxface") | 51 | ACPI_MODULE_NAME("tbxface") |
53 | 52 | ||
54 | /* Local prototypes */ | ||
55 | static acpi_status acpi_tb_load_namespace(void); | ||
56 | |||
57 | static int no_auto_ssdt; | ||
58 | |||
59 | /******************************************************************************* | 53 | /******************************************************************************* |
60 | * | 54 | * |
61 | * FUNCTION: acpi_allocate_root_table | 55 | * FUNCTION: acpi_allocate_root_table |
@@ -65,11 +59,10 @@ static int no_auto_ssdt; | |||
65 | * | 59 | * |
66 | * RETURN: Status | 60 | * RETURN: Status |
67 | * | 61 | * |
68 | * DESCRIPTION: Allocate a root table array. Used by i_aSL compiler and | 62 | * DESCRIPTION: Allocate a root table array. Used by iASL compiler and |
69 | * acpi_initialize_tables. | 63 | * acpi_initialize_tables. |
70 | * | 64 | * |
71 | ******************************************************************************/ | 65 | ******************************************************************************/ |
72 | |||
73 | acpi_status acpi_allocate_root_table(u32 initial_table_count) | 66 | acpi_status acpi_allocate_root_table(u32 initial_table_count) |
74 | { | 67 | { |
75 | 68 | ||
@@ -222,52 +215,10 @@ acpi_status acpi_reallocate_root_table(void) | |||
222 | 215 | ||
223 | /******************************************************************************* | 216 | /******************************************************************************* |
224 | * | 217 | * |
225 | * FUNCTION: acpi_load_table | ||
226 | * | ||
227 | * PARAMETERS: table_ptr - pointer to a buffer containing the entire | ||
228 | * table to be loaded | ||
229 | * | ||
230 | * RETURN: Status | ||
231 | * | ||
232 | * DESCRIPTION: This function is called to load a table from the caller's | ||
233 | * buffer. The buffer must contain an entire ACPI Table including | ||
234 | * a valid header. The header fields will be verified, and if it | ||
235 | * is determined that the table is invalid, the call will fail. | ||
236 | * | ||
237 | ******************************************************************************/ | ||
238 | acpi_status acpi_load_table(struct acpi_table_header *table_ptr) | ||
239 | { | ||
240 | acpi_status status; | ||
241 | u32 table_index; | ||
242 | struct acpi_table_desc table_desc; | ||
243 | |||
244 | if (!table_ptr) | ||
245 | return AE_BAD_PARAMETER; | ||
246 | |||
247 | ACPI_MEMSET(&table_desc, 0, sizeof(struct acpi_table_desc)); | ||
248 | table_desc.pointer = table_ptr; | ||
249 | table_desc.length = table_ptr->length; | ||
250 | table_desc.flags = ACPI_TABLE_ORIGIN_UNKNOWN; | ||
251 | |||
252 | /* | ||
253 | * Install the new table into the local data structures | ||
254 | */ | ||
255 | status = acpi_tb_add_table(&table_desc, &table_index); | ||
256 | if (ACPI_FAILURE(status)) { | ||
257 | return status; | ||
258 | } | ||
259 | status = acpi_ns_load_table(table_index, acpi_gbl_root_node); | ||
260 | return status; | ||
261 | } | ||
262 | |||
263 | ACPI_EXPORT_SYMBOL(acpi_load_table) | ||
264 | |||
265 | /******************************************************************************* | ||
266 | * | ||
267 | * FUNCTION: acpi_get_table_header | 218 | * FUNCTION: acpi_get_table_header |
268 | * | 219 | * |
269 | * PARAMETERS: Signature - ACPI signature of needed table | 220 | * PARAMETERS: signature - ACPI signature of needed table |
270 | * Instance - Which instance (for SSDTs) | 221 | * instance - Which instance (for SSDTs) |
271 | * out_table_header - The pointer to the table header to fill | 222 | * out_table_header - The pointer to the table header to fill |
272 | * | 223 | * |
273 | * RETURN: Status and pointer to mapped table header | 224 | * RETURN: Status and pointer to mapped table header |
@@ -382,8 +333,8 @@ ACPI_EXPORT_SYMBOL(acpi_unload_table_id) | |||
382 | * | 333 | * |
383 | * FUNCTION: acpi_get_table_with_size | 334 | * FUNCTION: acpi_get_table_with_size |
384 | * | 335 | * |
385 | * PARAMETERS: Signature - ACPI signature of needed table | 336 | * PARAMETERS: signature - ACPI signature of needed table |
386 | * Instance - Which instance (for SSDTs) | 337 | * instance - Which instance (for SSDTs) |
387 | * out_table - Where the pointer to the table is returned | 338 | * out_table - Where the pointer to the table is returned |
388 | * | 339 | * |
389 | * RETURN: Status and pointer to table | 340 | * RETURN: Status and pointer to table |
@@ -453,7 +404,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_table) | |||
453 | * FUNCTION: acpi_get_table_by_index | 404 | * FUNCTION: acpi_get_table_by_index |
454 | * | 405 | * |
455 | * PARAMETERS: table_index - Table index | 406 | * PARAMETERS: table_index - Table index |
456 | * Table - Where the pointer to the table is returned | 407 | * table - Where the pointer to the table is returned |
457 | * | 408 | * |
458 | * RETURN: Status and pointer to the table | 409 | * RETURN: Status and pointer to the table |
459 | * | 410 | * |
@@ -502,157 +453,13 @@ acpi_get_table_by_index(u32 table_index, struct acpi_table_header **table) | |||
502 | 453 | ||
503 | ACPI_EXPORT_SYMBOL(acpi_get_table_by_index) | 454 | ACPI_EXPORT_SYMBOL(acpi_get_table_by_index) |
504 | 455 | ||
505 | /******************************************************************************* | ||
506 | * | ||
507 | * FUNCTION: acpi_tb_load_namespace | ||
508 | * | ||
509 | * PARAMETERS: None | ||
510 | * | ||
511 | * RETURN: Status | ||
512 | * | ||
513 | * DESCRIPTION: Load the namespace from the DSDT and all SSDTs/PSDTs found in | ||
514 | * the RSDT/XSDT. | ||
515 | * | ||
516 | ******************************************************************************/ | ||
517 | static acpi_status acpi_tb_load_namespace(void) | ||
518 | { | ||
519 | acpi_status status; | ||
520 | u32 i; | ||
521 | struct acpi_table_header *new_dsdt; | ||
522 | |||
523 | ACPI_FUNCTION_TRACE(tb_load_namespace); | ||
524 | |||
525 | (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES); | ||
526 | |||
527 | /* | ||
528 | * Load the namespace. The DSDT is required, but any SSDT and | ||
529 | * PSDT tables are optional. Verify the DSDT. | ||
530 | */ | ||
531 | if (!acpi_gbl_root_table_list.current_table_count || | ||
532 | !ACPI_COMPARE_NAME(& | ||
533 | (acpi_gbl_root_table_list. | ||
534 | tables[ACPI_TABLE_INDEX_DSDT].signature), | ||
535 | ACPI_SIG_DSDT) | ||
536 | || | ||
537 | ACPI_FAILURE(acpi_tb_verify_table | ||
538 | (&acpi_gbl_root_table_list. | ||
539 | tables[ACPI_TABLE_INDEX_DSDT]))) { | ||
540 | status = AE_NO_ACPI_TABLES; | ||
541 | goto unlock_and_exit; | ||
542 | } | ||
543 | |||
544 | /* | ||
545 | * Save the DSDT pointer for simple access. This is the mapped memory | ||
546 | * address. We must take care here because the address of the .Tables | ||
547 | * array can change dynamically as tables are loaded at run-time. Note: | ||
548 | * .Pointer field is not validated until after call to acpi_tb_verify_table. | ||
549 | */ | ||
550 | acpi_gbl_DSDT = | ||
551 | acpi_gbl_root_table_list.tables[ACPI_TABLE_INDEX_DSDT].pointer; | ||
552 | |||
553 | /* | ||
554 | * Optionally copy the entire DSDT to local memory (instead of simply | ||
555 | * mapping it.) There are some BIOSs that corrupt or replace the original | ||
556 | * DSDT, creating the need for this option. Default is FALSE, do not copy | ||
557 | * the DSDT. | ||
558 | */ | ||
559 | if (acpi_gbl_copy_dsdt_locally) { | ||
560 | new_dsdt = acpi_tb_copy_dsdt(ACPI_TABLE_INDEX_DSDT); | ||
561 | if (new_dsdt) { | ||
562 | acpi_gbl_DSDT = new_dsdt; | ||
563 | } | ||
564 | } | ||
565 | |||
566 | /* | ||
567 | * Save the original DSDT header for detection of table corruption | ||
568 | * and/or replacement of the DSDT from outside the OS. | ||
569 | */ | ||
570 | ACPI_MEMCPY(&acpi_gbl_original_dsdt_header, acpi_gbl_DSDT, | ||
571 | sizeof(struct acpi_table_header)); | ||
572 | |||
573 | (void)acpi_ut_release_mutex(ACPI_MTX_TABLES); | ||
574 | |||
575 | /* Load and parse tables */ | ||
576 | |||
577 | status = acpi_ns_load_table(ACPI_TABLE_INDEX_DSDT, acpi_gbl_root_node); | ||
578 | if (ACPI_FAILURE(status)) { | ||
579 | return_ACPI_STATUS(status); | ||
580 | } | ||
581 | |||
582 | /* Load any SSDT or PSDT tables. Note: Loop leaves tables locked */ | ||
583 | |||
584 | (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES); | ||
585 | for (i = 0; i < acpi_gbl_root_table_list.current_table_count; ++i) { | ||
586 | if ((!ACPI_COMPARE_NAME | ||
587 | (&(acpi_gbl_root_table_list.tables[i].signature), | ||
588 | ACPI_SIG_SSDT) | ||
589 | && | ||
590 | !ACPI_COMPARE_NAME(& | ||
591 | (acpi_gbl_root_table_list.tables[i]. | ||
592 | signature), ACPI_SIG_PSDT)) | ||
593 | || | ||
594 | ACPI_FAILURE(acpi_tb_verify_table | ||
595 | (&acpi_gbl_root_table_list.tables[i]))) { | ||
596 | continue; | ||
597 | } | ||
598 | |||
599 | if (no_auto_ssdt) { | ||
600 | printk(KERN_WARNING "ACPI: SSDT ignored due to \"acpi_no_auto_ssdt\"\n"); | ||
601 | continue; | ||
602 | } | ||
603 | |||
604 | /* Ignore errors while loading tables, get as many as possible */ | ||
605 | |||
606 | (void)acpi_ut_release_mutex(ACPI_MTX_TABLES); | ||
607 | (void)acpi_ns_load_table(i, acpi_gbl_root_node); | ||
608 | (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES); | ||
609 | } | ||
610 | |||
611 | ACPI_DEBUG_PRINT((ACPI_DB_INIT, "ACPI Tables successfully acquired\n")); | ||
612 | |||
613 | unlock_and_exit: | ||
614 | (void)acpi_ut_release_mutex(ACPI_MTX_TABLES); | ||
615 | return_ACPI_STATUS(status); | ||
616 | } | ||
617 | |||
618 | /******************************************************************************* | ||
619 | * | ||
620 | * FUNCTION: acpi_load_tables | ||
621 | * | ||
622 | * PARAMETERS: None | ||
623 | * | ||
624 | * RETURN: Status | ||
625 | * | ||
626 | * DESCRIPTION: Load the ACPI tables from the RSDT/XSDT | ||
627 | * | ||
628 | ******************************************************************************/ | ||
629 | |||
630 | acpi_status acpi_load_tables(void) | ||
631 | { | ||
632 | acpi_status status; | ||
633 | |||
634 | ACPI_FUNCTION_TRACE(acpi_load_tables); | ||
635 | |||
636 | /* Load the namespace from the tables */ | ||
637 | |||
638 | status = acpi_tb_load_namespace(); | ||
639 | if (ACPI_FAILURE(status)) { | ||
640 | ACPI_EXCEPTION((AE_INFO, status, | ||
641 | "While loading namespace from ACPI tables")); | ||
642 | } | ||
643 | |||
644 | return_ACPI_STATUS(status); | ||
645 | } | ||
646 | |||
647 | ACPI_EXPORT_SYMBOL(acpi_load_tables) | ||
648 | |||
649 | 456 | ||
650 | /******************************************************************************* | 457 | /******************************************************************************* |
651 | * | 458 | * |
652 | * FUNCTION: acpi_install_table_handler | 459 | * FUNCTION: acpi_install_table_handler |
653 | * | 460 | * |
654 | * PARAMETERS: Handler - Table event handler | 461 | * PARAMETERS: handler - Table event handler |
655 | * Context - Value passed to the handler on each event | 462 | * context - Value passed to the handler on each event |
656 | * | 463 | * |
657 | * RETURN: Status | 464 | * RETURN: Status |
658 | * | 465 | * |
@@ -698,7 +505,7 @@ ACPI_EXPORT_SYMBOL(acpi_install_table_handler) | |||
698 | * | 505 | * |
699 | * FUNCTION: acpi_remove_table_handler | 506 | * FUNCTION: acpi_remove_table_handler |
700 | * | 507 | * |
701 | * PARAMETERS: Handler - Table event handler that was installed | 508 | * PARAMETERS: handler - Table event handler that was installed |
702 | * previously. | 509 | * previously. |
703 | * | 510 | * |
704 | * RETURN: Status | 511 | * RETURN: Status |
@@ -734,15 +541,3 @@ acpi_status acpi_remove_table_handler(acpi_tbl_handler handler) | |||
734 | } | 541 | } |
735 | 542 | ||
736 | ACPI_EXPORT_SYMBOL(acpi_remove_table_handler) | 543 | ACPI_EXPORT_SYMBOL(acpi_remove_table_handler) |
737 | |||
738 | |||
739 | static int __init acpi_no_auto_ssdt_setup(char *s) { | ||
740 | |||
741 | printk(KERN_NOTICE "ACPI: SSDT auto-load disabled\n"); | ||
742 | |||
743 | no_auto_ssdt = 1; | ||
744 | |||
745 | return 1; | ||
746 | } | ||
747 | |||
748 | __setup("acpi_no_auto_ssdt", acpi_no_auto_ssdt_setup); | ||
diff --git a/drivers/acpi/acpica/tbxfload.c b/drivers/acpi/acpica/tbxfload.c new file mode 100644 index 000000000000..f87cc63e69a1 --- /dev/null +++ b/drivers/acpi/acpica/tbxfload.c | |||
@@ -0,0 +1,389 @@ | |||
1 | /****************************************************************************** | ||
2 | * | ||
3 | * Module Name: tbxfload - Table load/unload external interfaces | ||
4 | * | ||
5 | *****************************************************************************/ | ||
6 | |||
7 | /* | ||
8 | * Copyright (C) 2000 - 2012, Intel Corp. | ||
9 | * All rights reserved. | ||
10 | * | ||
11 | * Redistribution and use in source and binary forms, with or without | ||
12 | * modification, are permitted provided that the following conditions | ||
13 | * are met: | ||
14 | * 1. Redistributions of source code must retain the above copyright | ||
15 | * notice, this list of conditions, and the following disclaimer, | ||
16 | * without modification. | ||
17 | * 2. Redistributions in binary form must reproduce at minimum a disclaimer | ||
18 | * substantially similar to the "NO WARRANTY" disclaimer below | ||
19 | * ("Disclaimer") and any redistribution must be conditioned upon | ||
20 | * including a substantially similar Disclaimer requirement for further | ||
21 | * binary redistribution. | ||
22 | * 3. Neither the names of the above-listed copyright holders nor the names | ||
23 | * of any contributors may be used to endorse or promote products derived | ||
24 | * from this software without specific prior written permission. | ||
25 | * | ||
26 | * Alternatively, this software may be distributed under the terms of the | ||
27 | * GNU General Public License ("GPL") version 2 as published by the Free | ||
28 | * Software Foundation. | ||
29 | * | ||
30 | * NO WARRANTY | ||
31 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
32 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
33 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR | ||
34 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
35 | * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
36 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
37 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
38 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
39 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
40 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
41 | * POSSIBILITY OF SUCH DAMAGES. | ||
42 | */ | ||
43 | |||
44 | #include <linux/export.h> | ||
45 | #include <acpi/acpi.h> | ||
46 | #include "accommon.h" | ||
47 | #include "acnamesp.h" | ||
48 | #include "actables.h" | ||
49 | |||
50 | #define _COMPONENT ACPI_TABLES | ||
51 | ACPI_MODULE_NAME("tbxfload") | ||
52 | |||
53 | /* Local prototypes */ | ||
54 | static acpi_status acpi_tb_load_namespace(void); | ||
55 | |||
56 | static int no_auto_ssdt; | ||
57 | |||
58 | /******************************************************************************* | ||
59 | * | ||
60 | * FUNCTION: acpi_load_tables | ||
61 | * | ||
62 | * PARAMETERS: None | ||
63 | * | ||
64 | * RETURN: Status | ||
65 | * | ||
66 | * DESCRIPTION: Load the ACPI tables from the RSDT/XSDT | ||
67 | * | ||
68 | ******************************************************************************/ | ||
69 | |||
70 | acpi_status acpi_load_tables(void) | ||
71 | { | ||
72 | acpi_status status; | ||
73 | |||
74 | ACPI_FUNCTION_TRACE(acpi_load_tables); | ||
75 | |||
76 | /* Load the namespace from the tables */ | ||
77 | |||
78 | status = acpi_tb_load_namespace(); | ||
79 | if (ACPI_FAILURE(status)) { | ||
80 | ACPI_EXCEPTION((AE_INFO, status, | ||
81 | "While loading namespace from ACPI tables")); | ||
82 | } | ||
83 | |||
84 | return_ACPI_STATUS(status); | ||
85 | } | ||
86 | |||
87 | ACPI_EXPORT_SYMBOL(acpi_load_tables) | ||
88 | |||
89 | /******************************************************************************* | ||
90 | * | ||
91 | * FUNCTION: acpi_tb_load_namespace | ||
92 | * | ||
93 | * PARAMETERS: None | ||
94 | * | ||
95 | * RETURN: Status | ||
96 | * | ||
97 | * DESCRIPTION: Load the namespace from the DSDT and all SSDTs/PSDTs found in | ||
98 | * the RSDT/XSDT. | ||
99 | * | ||
100 | ******************************************************************************/ | ||
101 | static acpi_status acpi_tb_load_namespace(void) | ||
102 | { | ||
103 | acpi_status status; | ||
104 | u32 i; | ||
105 | struct acpi_table_header *new_dsdt; | ||
106 | |||
107 | ACPI_FUNCTION_TRACE(tb_load_namespace); | ||
108 | |||
109 | (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES); | ||
110 | |||
111 | /* | ||
112 | * Load the namespace. The DSDT is required, but any SSDT and | ||
113 | * PSDT tables are optional. Verify the DSDT. | ||
114 | */ | ||
115 | if (!acpi_gbl_root_table_list.current_table_count || | ||
116 | !ACPI_COMPARE_NAME(& | ||
117 | (acpi_gbl_root_table_list. | ||
118 | tables[ACPI_TABLE_INDEX_DSDT].signature), | ||
119 | ACPI_SIG_DSDT) | ||
120 | || | ||
121 | ACPI_FAILURE(acpi_tb_verify_table | ||
122 | (&acpi_gbl_root_table_list. | ||
123 | tables[ACPI_TABLE_INDEX_DSDT]))) { | ||
124 | status = AE_NO_ACPI_TABLES; | ||
125 | goto unlock_and_exit; | ||
126 | } | ||
127 | |||
128 | /* | ||
129 | * Save the DSDT pointer for simple access. This is the mapped memory | ||
130 | * address. We must take care here because the address of the .Tables | ||
131 | * array can change dynamically as tables are loaded at run-time. Note: | ||
132 | * .Pointer field is not validated until after call to acpi_tb_verify_table. | ||
133 | */ | ||
134 | acpi_gbl_DSDT = | ||
135 | acpi_gbl_root_table_list.tables[ACPI_TABLE_INDEX_DSDT].pointer; | ||
136 | |||
137 | /* | ||
138 | * Optionally copy the entire DSDT to local memory (instead of simply | ||
139 | * mapping it.) There are some BIOSs that corrupt or replace the original | ||
140 | * DSDT, creating the need for this option. Default is FALSE, do not copy | ||
141 | * the DSDT. | ||
142 | */ | ||
143 | if (acpi_gbl_copy_dsdt_locally) { | ||
144 | new_dsdt = acpi_tb_copy_dsdt(ACPI_TABLE_INDEX_DSDT); | ||
145 | if (new_dsdt) { | ||
146 | acpi_gbl_DSDT = new_dsdt; | ||
147 | } | ||
148 | } | ||
149 | |||
150 | /* | ||
151 | * Save the original DSDT header for detection of table corruption | ||
152 | * and/or replacement of the DSDT from outside the OS. | ||
153 | */ | ||
154 | ACPI_MEMCPY(&acpi_gbl_original_dsdt_header, acpi_gbl_DSDT, | ||
155 | sizeof(struct acpi_table_header)); | ||
156 | |||
157 | (void)acpi_ut_release_mutex(ACPI_MTX_TABLES); | ||
158 | |||
159 | /* Load and parse tables */ | ||
160 | |||
161 | status = acpi_ns_load_table(ACPI_TABLE_INDEX_DSDT, acpi_gbl_root_node); | ||
162 | if (ACPI_FAILURE(status)) { | ||
163 | return_ACPI_STATUS(status); | ||
164 | } | ||
165 | |||
166 | /* Load any SSDT or PSDT tables. Note: Loop leaves tables locked */ | ||
167 | |||
168 | (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES); | ||
169 | for (i = 0; i < acpi_gbl_root_table_list.current_table_count; ++i) { | ||
170 | if ((!ACPI_COMPARE_NAME | ||
171 | (&(acpi_gbl_root_table_list.tables[i].signature), | ||
172 | ACPI_SIG_SSDT) | ||
173 | && | ||
174 | !ACPI_COMPARE_NAME(& | ||
175 | (acpi_gbl_root_table_list.tables[i]. | ||
176 | signature), ACPI_SIG_PSDT)) | ||
177 | || | ||
178 | ACPI_FAILURE(acpi_tb_verify_table | ||
179 | (&acpi_gbl_root_table_list.tables[i]))) { | ||
180 | continue; | ||
181 | } | ||
182 | |||
183 | if (no_auto_ssdt) { | ||
184 | printk(KERN_WARNING "ACPI: SSDT ignored due to \"acpi_no_auto_ssdt\"\n"); | ||
185 | continue; | ||
186 | } | ||
187 | |||
188 | /* Ignore errors while loading tables, get as many as possible */ | ||
189 | |||
190 | (void)acpi_ut_release_mutex(ACPI_MTX_TABLES); | ||
191 | (void)acpi_ns_load_table(i, acpi_gbl_root_node); | ||
192 | (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES); | ||
193 | } | ||
194 | |||
195 | ACPI_DEBUG_PRINT((ACPI_DB_INIT, "ACPI Tables successfully acquired\n")); | ||
196 | |||
197 | unlock_and_exit: | ||
198 | (void)acpi_ut_release_mutex(ACPI_MTX_TABLES); | ||
199 | return_ACPI_STATUS(status); | ||
200 | } | ||
201 | |||
202 | /******************************************************************************* | ||
203 | * | ||
204 | * FUNCTION: acpi_load_table | ||
205 | * | ||
206 | * PARAMETERS: table - Pointer to a buffer containing the ACPI | ||
207 | * table to be loaded. | ||
208 | * | ||
209 | * RETURN: Status | ||
210 | * | ||
211 | * DESCRIPTION: Dynamically load an ACPI table from the caller's buffer. Must | ||
212 | * be a valid ACPI table with a valid ACPI table header. | ||
213 | * Note1: Mainly intended to support hotplug addition of SSDTs. | ||
214 | * Note2: Does not copy the incoming table. User is reponsible | ||
215 | * to ensure that the table is not deleted or unmapped. | ||
216 | * | ||
217 | ******************************************************************************/ | ||
218 | |||
219 | acpi_status acpi_load_table(struct acpi_table_header *table) | ||
220 | { | ||
221 | acpi_status status; | ||
222 | struct acpi_table_desc table_desc; | ||
223 | u32 table_index; | ||
224 | |||
225 | ACPI_FUNCTION_TRACE(acpi_load_table); | ||
226 | |||
227 | /* Parameter validation */ | ||
228 | |||
229 | if (!table) { | ||
230 | return_ACPI_STATUS(AE_BAD_PARAMETER); | ||
231 | } | ||
232 | |||
233 | /* Init local table descriptor */ | ||
234 | |||
235 | ACPI_MEMSET(&table_desc, 0, sizeof(struct acpi_table_desc)); | ||
236 | table_desc.address = ACPI_PTR_TO_PHYSADDR(table); | ||
237 | table_desc.pointer = table; | ||
238 | table_desc.length = table->length; | ||
239 | table_desc.flags = ACPI_TABLE_ORIGIN_UNKNOWN; | ||
240 | |||
241 | /* Must acquire the interpreter lock during this operation */ | ||
242 | |||
243 | status = acpi_ut_acquire_mutex(ACPI_MTX_INTERPRETER); | ||
244 | if (ACPI_FAILURE(status)) { | ||
245 | return_ACPI_STATUS(status); | ||
246 | } | ||
247 | |||
248 | /* Install the table and load it into the namespace */ | ||
249 | |||
250 | ACPI_INFO((AE_INFO, "Host-directed Dynamic ACPI Table Load:")); | ||
251 | status = acpi_tb_add_table(&table_desc, &table_index); | ||
252 | if (ACPI_FAILURE(status)) { | ||
253 | goto unlock_and_exit; | ||
254 | } | ||
255 | |||
256 | status = acpi_ns_load_table(table_index, acpi_gbl_root_node); | ||
257 | |||
258 | /* Invoke table handler if present */ | ||
259 | |||
260 | if (acpi_gbl_table_handler) { | ||
261 | (void)acpi_gbl_table_handler(ACPI_TABLE_EVENT_LOAD, table, | ||
262 | acpi_gbl_table_handler_context); | ||
263 | } | ||
264 | |||
265 | unlock_and_exit: | ||
266 | (void)acpi_ut_release_mutex(ACPI_MTX_INTERPRETER); | ||
267 | return_ACPI_STATUS(status); | ||
268 | } | ||
269 | |||
270 | ACPI_EXPORT_SYMBOL(acpi_load_table) | ||
271 | |||
272 | /******************************************************************************* | ||
273 | * | ||
274 | * FUNCTION: acpi_unload_parent_table | ||
275 | * | ||
276 | * PARAMETERS: object - Handle to any namespace object owned by | ||
277 | * the table to be unloaded | ||
278 | * | ||
279 | * RETURN: Status | ||
280 | * | ||
281 | * DESCRIPTION: Via any namespace object within an SSDT or OEMx table, unloads | ||
282 | * the table and deletes all namespace objects associated with | ||
283 | * that table. Unloading of the DSDT is not allowed. | ||
284 | * Note: Mainly intended to support hotplug removal of SSDTs. | ||
285 | * | ||
286 | ******************************************************************************/ | ||
287 | acpi_status acpi_unload_parent_table(acpi_handle object) | ||
288 | { | ||
289 | struct acpi_namespace_node *node = | ||
290 | ACPI_CAST_PTR(struct acpi_namespace_node, object); | ||
291 | acpi_status status = AE_NOT_EXIST; | ||
292 | acpi_owner_id owner_id; | ||
293 | u32 i; | ||
294 | |||
295 | ACPI_FUNCTION_TRACE(acpi_unload_parent_table); | ||
296 | |||
297 | /* Parameter validation */ | ||
298 | |||
299 | if (!object) { | ||
300 | return_ACPI_STATUS(AE_BAD_PARAMETER); | ||
301 | } | ||
302 | |||
303 | /* | ||
304 | * The node owner_id is currently the same as the parent table ID. | ||
305 | * However, this could change in the future. | ||
306 | */ | ||
307 | owner_id = node->owner_id; | ||
308 | if (!owner_id) { | ||
309 | |||
310 | /* owner_id==0 means DSDT is the owner. DSDT cannot be unloaded */ | ||
311 | |||
312 | return_ACPI_STATUS(AE_TYPE); | ||
313 | } | ||
314 | |||
315 | /* Must acquire the interpreter lock during this operation */ | ||
316 | |||
317 | status = acpi_ut_acquire_mutex(ACPI_MTX_INTERPRETER); | ||
318 | if (ACPI_FAILURE(status)) { | ||
319 | return_ACPI_STATUS(status); | ||
320 | } | ||
321 | |||
322 | /* Find the table in the global table list */ | ||
323 | |||
324 | for (i = 0; i < acpi_gbl_root_table_list.current_table_count; i++) { | ||
325 | if (owner_id != acpi_gbl_root_table_list.tables[i].owner_id) { | ||
326 | continue; | ||
327 | } | ||
328 | |||
329 | /* | ||
330 | * Allow unload of SSDT and OEMx tables only. Do not allow unload | ||
331 | * of the DSDT. No other types of tables should get here, since | ||
332 | * only these types can contain AML and thus are the only types | ||
333 | * that can create namespace objects. | ||
334 | */ | ||
335 | if (ACPI_COMPARE_NAME | ||
336 | (acpi_gbl_root_table_list.tables[i].signature.ascii, | ||
337 | ACPI_SIG_DSDT)) { | ||
338 | status = AE_TYPE; | ||
339 | break; | ||
340 | } | ||
341 | |||
342 | /* Ensure the table is actually loaded */ | ||
343 | |||
344 | if (!acpi_tb_is_table_loaded(i)) { | ||
345 | status = AE_NOT_EXIST; | ||
346 | break; | ||
347 | } | ||
348 | |||
349 | /* Invoke table handler if present */ | ||
350 | |||
351 | if (acpi_gbl_table_handler) { | ||
352 | (void)acpi_gbl_table_handler(ACPI_TABLE_EVENT_UNLOAD, | ||
353 | acpi_gbl_root_table_list. | ||
354 | tables[i].pointer, | ||
355 | acpi_gbl_table_handler_context); | ||
356 | } | ||
357 | |||
358 | /* | ||
359 | * Delete all namespace objects owned by this table. Note that | ||
360 | * these objects can appear anywhere in the namespace by virtue | ||
361 | * of the AML "Scope" operator. Thus, we need to track ownership | ||
362 | * by an ID, not simply a position within the hierarchy. | ||
363 | */ | ||
364 | status = acpi_tb_delete_namespace_by_owner(i); | ||
365 | if (ACPI_FAILURE(status)) { | ||
366 | break; | ||
367 | } | ||
368 | |||
369 | status = acpi_tb_release_owner_id(i); | ||
370 | acpi_tb_set_table_loaded_flag(i, FALSE); | ||
371 | break; | ||
372 | } | ||
373 | |||
374 | (void)acpi_ut_release_mutex(ACPI_MTX_INTERPRETER); | ||
375 | return_ACPI_STATUS(status); | ||
376 | } | ||
377 | |||
378 | ACPI_EXPORT_SYMBOL(acpi_unload_parent_table) | ||
379 | |||
380 | static int __init acpi_no_auto_ssdt_setup(char *s) { | ||
381 | |||
382 | printk(KERN_NOTICE "ACPI: SSDT auto-load disabled\n"); | ||
383 | |||
384 | no_auto_ssdt = 1; | ||
385 | |||
386 | return 1; | ||
387 | } | ||
388 | |||
389 | __setup("acpi_no_auto_ssdt", acpi_no_auto_ssdt_setup); | ||
diff --git a/drivers/acpi/acpica/tbxfroot.c b/drivers/acpi/acpica/tbxfroot.c index 4258f647ca3d..74e720800037 100644 --- a/drivers/acpi/acpica/tbxfroot.c +++ b/drivers/acpi/acpica/tbxfroot.c | |||
@@ -57,7 +57,7 @@ static acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp *rsdp); | |||
57 | * | 57 | * |
58 | * FUNCTION: acpi_tb_validate_rsdp | 58 | * FUNCTION: acpi_tb_validate_rsdp |
59 | * | 59 | * |
60 | * PARAMETERS: Rsdp - Pointer to unvalidated RSDP | 60 | * PARAMETERS: rsdp - Pointer to unvalidated RSDP |
61 | * | 61 | * |
62 | * RETURN: Status | 62 | * RETURN: Status |
63 | * | 63 | * |
@@ -107,10 +107,10 @@ static acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp *rsdp) | |||
107 | * | 107 | * |
108 | * RETURN: Status, RSDP physical address | 108 | * RETURN: Status, RSDP physical address |
109 | * | 109 | * |
110 | * DESCRIPTION: Search lower 1_mbyte of memory for the root system descriptor | 110 | * DESCRIPTION: Search lower 1Mbyte of memory for the root system descriptor |
111 | * pointer structure. If it is found, set *RSDP to point to it. | 111 | * pointer structure. If it is found, set *RSDP to point to it. |
112 | * | 112 | * |
113 | * NOTE1: The RSDP must be either in the first 1_k of the Extended | 113 | * NOTE1: The RSDP must be either in the first 1K of the Extended |
114 | * BIOS Data Area or between E0000 and FFFFF (From ACPI Spec.) | 114 | * BIOS Data Area or between E0000 and FFFFF (From ACPI Spec.) |
115 | * Only a 32-bit physical address is necessary. | 115 | * Only a 32-bit physical address is necessary. |
116 | * | 116 | * |
@@ -152,7 +152,7 @@ acpi_status acpi_find_root_pointer(acpi_size *table_address) | |||
152 | if (physical_address > 0x400) { | 152 | if (physical_address > 0x400) { |
153 | /* | 153 | /* |
154 | * 1b) Search EBDA paragraphs (EBDA is required to be a | 154 | * 1b) Search EBDA paragraphs (EBDA is required to be a |
155 | * minimum of 1_k length) | 155 | * minimum of 1K length) |
156 | */ | 156 | */ |
157 | table_ptr = acpi_os_map_memory((acpi_physical_address) | 157 | table_ptr = acpi_os_map_memory((acpi_physical_address) |
158 | physical_address, | 158 | physical_address, |
@@ -216,7 +216,7 @@ acpi_status acpi_find_root_pointer(acpi_size *table_address) | |||
216 | 216 | ||
217 | /* A valid RSDP was not found */ | 217 | /* A valid RSDP was not found */ |
218 | 218 | ||
219 | ACPI_ERROR((AE_INFO, "A valid RSDP was not found")); | 219 | ACPI_BIOS_ERROR((AE_INFO, "A valid RSDP was not found")); |
220 | return_ACPI_STATUS(AE_NOT_FOUND); | 220 | return_ACPI_STATUS(AE_NOT_FOUND); |
221 | } | 221 | } |
222 | 222 | ||
@@ -225,7 +225,7 @@ acpi_status acpi_find_root_pointer(acpi_size *table_address) | |||
225 | * FUNCTION: acpi_tb_scan_memory_for_rsdp | 225 | * FUNCTION: acpi_tb_scan_memory_for_rsdp |
226 | * | 226 | * |
227 | * PARAMETERS: start_address - Starting pointer for search | 227 | * PARAMETERS: start_address - Starting pointer for search |
228 | * Length - Maximum length to search | 228 | * length - Maximum length to search |
229 | * | 229 | * |
230 | * RETURN: Pointer to the RSDP if found, otherwise NULL. | 230 | * RETURN: Pointer to the RSDP if found, otherwise NULL. |
231 | * | 231 | * |
diff --git a/drivers/acpi/acpica/utaddress.c b/drivers/acpi/acpica/utaddress.c index 67932aebe6dd..64880306133d 100644 --- a/drivers/acpi/acpica/utaddress.c +++ b/drivers/acpi/acpica/utaddress.c | |||
@@ -53,8 +53,8 @@ ACPI_MODULE_NAME("utaddress") | |||
53 | * FUNCTION: acpi_ut_add_address_range | 53 | * FUNCTION: acpi_ut_add_address_range |
54 | * | 54 | * |
55 | * PARAMETERS: space_id - Address space ID | 55 | * PARAMETERS: space_id - Address space ID |
56 | * Address - op_region start address | 56 | * address - op_region start address |
57 | * Length - op_region length | 57 | * length - op_region length |
58 | * region_node - op_region namespace node | 58 | * region_node - op_region namespace node |
59 | * | 59 | * |
60 | * RETURN: Status | 60 | * RETURN: Status |
@@ -186,9 +186,9 @@ acpi_ut_remove_address_range(acpi_adr_space_type space_id, | |||
186 | * FUNCTION: acpi_ut_check_address_range | 186 | * FUNCTION: acpi_ut_check_address_range |
187 | * | 187 | * |
188 | * PARAMETERS: space_id - Address space ID | 188 | * PARAMETERS: space_id - Address space ID |
189 | * Address - Start address | 189 | * address - Start address |
190 | * Length - Length of address range | 190 | * length - Length of address range |
191 | * Warn - TRUE if warning on overlap desired | 191 | * warn - TRUE if warning on overlap desired |
192 | * | 192 | * |
193 | * RETURN: Count of the number of conflicts detected. Zero is always | 193 | * RETURN: Count of the number of conflicts detected. Zero is always |
194 | * returned for Space IDs other than Memory or I/O. | 194 | * returned for Space IDs other than Memory or I/O. |
diff --git a/drivers/acpi/acpica/utalloc.c b/drivers/acpi/acpica/utalloc.c index 9982d2ea66fb..ed29d474095e 100644 --- a/drivers/acpi/acpica/utalloc.c +++ b/drivers/acpi/acpica/utalloc.c | |||
@@ -189,7 +189,7 @@ acpi_status acpi_ut_delete_caches(void) | |||
189 | * | 189 | * |
190 | * FUNCTION: acpi_ut_validate_buffer | 190 | * FUNCTION: acpi_ut_validate_buffer |
191 | * | 191 | * |
192 | * PARAMETERS: Buffer - Buffer descriptor to be validated | 192 | * PARAMETERS: buffer - Buffer descriptor to be validated |
193 | * | 193 | * |
194 | * RETURN: Status | 194 | * RETURN: Status |
195 | * | 195 | * |
@@ -227,7 +227,7 @@ acpi_status acpi_ut_validate_buffer(struct acpi_buffer * buffer) | |||
227 | * | 227 | * |
228 | * FUNCTION: acpi_ut_initialize_buffer | 228 | * FUNCTION: acpi_ut_initialize_buffer |
229 | * | 229 | * |
230 | * PARAMETERS: Buffer - Buffer to be validated | 230 | * PARAMETERS: buffer - Buffer to be validated |
231 | * required_length - Length needed | 231 | * required_length - Length needed |
232 | * | 232 | * |
233 | * RETURN: Status | 233 | * RETURN: Status |
@@ -308,10 +308,10 @@ acpi_ut_initialize_buffer(struct acpi_buffer * buffer, | |||
308 | * | 308 | * |
309 | * FUNCTION: acpi_ut_allocate | 309 | * FUNCTION: acpi_ut_allocate |
310 | * | 310 | * |
311 | * PARAMETERS: Size - Size of the allocation | 311 | * PARAMETERS: size - Size of the allocation |
312 | * Component - Component type of caller | 312 | * component - Component type of caller |
313 | * Module - Source file name of caller | 313 | * module - Source file name of caller |
314 | * Line - Line number of caller | 314 | * line - Line number of caller |
315 | * | 315 | * |
316 | * RETURN: Address of the allocated memory on success, NULL on failure. | 316 | * RETURN: Address of the allocated memory on success, NULL on failure. |
317 | * | 317 | * |
@@ -352,10 +352,10 @@ void *acpi_ut_allocate(acpi_size size, | |||
352 | * | 352 | * |
353 | * FUNCTION: acpi_ut_allocate_zeroed | 353 | * FUNCTION: acpi_ut_allocate_zeroed |
354 | * | 354 | * |
355 | * PARAMETERS: Size - Size of the allocation | 355 | * PARAMETERS: size - Size of the allocation |
356 | * Component - Component type of caller | 356 | * component - Component type of caller |
357 | * Module - Source file name of caller | 357 | * module - Source file name of caller |
358 | * Line - Line number of caller | 358 | * line - Line number of caller |
359 | * | 359 | * |
360 | * RETURN: Address of the allocated memory on success, NULL on failure. | 360 | * RETURN: Address of the allocated memory on success, NULL on failure. |
361 | * | 361 | * |
diff --git a/drivers/acpi/acpica/utcopy.c b/drivers/acpi/acpica/utcopy.c index 3317c0a406ee..294692ae76e9 100644 --- a/drivers/acpi/acpica/utcopy.c +++ b/drivers/acpi/acpica/utcopy.c | |||
@@ -317,7 +317,7 @@ acpi_ut_copy_ielement_to_eelement(u8 object_type, | |||
317 | * FUNCTION: acpi_ut_copy_ipackage_to_epackage | 317 | * FUNCTION: acpi_ut_copy_ipackage_to_epackage |
318 | * | 318 | * |
319 | * PARAMETERS: internal_object - Pointer to the object we are returning | 319 | * PARAMETERS: internal_object - Pointer to the object we are returning |
320 | * Buffer - Where the object is returned | 320 | * buffer - Where the object is returned |
321 | * space_used - Where the object length is returned | 321 | * space_used - Where the object length is returned |
322 | * | 322 | * |
323 | * RETURN: Status | 323 | * RETURN: Status |
diff --git a/drivers/acpi/acpica/utdebug.c b/drivers/acpi/acpica/utdebug.c index a0998a886318..e810894149ae 100644 --- a/drivers/acpi/acpica/utdebug.c +++ b/drivers/acpi/acpica/utdebug.c | |||
@@ -145,7 +145,7 @@ static const char *acpi_ut_trim_function_name(const char *function_name) | |||
145 | * function_name - Caller's procedure name | 145 | * function_name - Caller's procedure name |
146 | * module_name - Caller's module name | 146 | * module_name - Caller's module name |
147 | * component_id - Caller's component ID | 147 | * component_id - Caller's component ID |
148 | * Format - Printf format field | 148 | * format - Printf format field |
149 | * ... - Optional printf arguments | 149 | * ... - Optional printf arguments |
150 | * | 150 | * |
151 | * RETURN: None | 151 | * RETURN: None |
@@ -217,7 +217,7 @@ ACPI_EXPORT_SYMBOL(acpi_debug_print) | |||
217 | * function_name - Caller's procedure name | 217 | * function_name - Caller's procedure name |
218 | * module_name - Caller's module name | 218 | * module_name - Caller's module name |
219 | * component_id - Caller's component ID | 219 | * component_id - Caller's component ID |
220 | * Format - Printf format field | 220 | * format - Printf format field |
221 | * ... - Optional printf arguments | 221 | * ... - Optional printf arguments |
222 | * | 222 | * |
223 | * RETURN: None | 223 | * RETURN: None |
@@ -286,7 +286,7 @@ ACPI_EXPORT_SYMBOL(acpi_ut_trace) | |||
286 | * function_name - Caller's procedure name | 286 | * function_name - Caller's procedure name |
287 | * module_name - Caller's module name | 287 | * module_name - Caller's module name |
288 | * component_id - Caller's component ID | 288 | * component_id - Caller's component ID |
289 | * Pointer - Pointer to display | 289 | * pointer - Pointer to display |
290 | * | 290 | * |
291 | * RETURN: None | 291 | * RETURN: None |
292 | * | 292 | * |
@@ -315,7 +315,7 @@ acpi_ut_trace_ptr(u32 line_number, | |||
315 | * function_name - Caller's procedure name | 315 | * function_name - Caller's procedure name |
316 | * module_name - Caller's module name | 316 | * module_name - Caller's module name |
317 | * component_id - Caller's component ID | 317 | * component_id - Caller's component ID |
318 | * String - Additional string to display | 318 | * string - Additional string to display |
319 | * | 319 | * |
320 | * RETURN: None | 320 | * RETURN: None |
321 | * | 321 | * |
@@ -346,7 +346,7 @@ acpi_ut_trace_str(u32 line_number, | |||
346 | * function_name - Caller's procedure name | 346 | * function_name - Caller's procedure name |
347 | * module_name - Caller's module name | 347 | * module_name - Caller's module name |
348 | * component_id - Caller's component ID | 348 | * component_id - Caller's component ID |
349 | * Integer - Integer to display | 349 | * integer - Integer to display |
350 | * | 350 | * |
351 | * RETURN: None | 351 | * RETURN: None |
352 | * | 352 | * |
@@ -408,7 +408,7 @@ ACPI_EXPORT_SYMBOL(acpi_ut_exit) | |||
408 | * function_name - Caller's procedure name | 408 | * function_name - Caller's procedure name |
409 | * module_name - Caller's module name | 409 | * module_name - Caller's module name |
410 | * component_id - Caller's component ID | 410 | * component_id - Caller's component ID |
411 | * Status - Exit status code | 411 | * status - Exit status code |
412 | * | 412 | * |
413 | * RETURN: None | 413 | * RETURN: None |
414 | * | 414 | * |
@@ -449,7 +449,7 @@ ACPI_EXPORT_SYMBOL(acpi_ut_status_exit) | |||
449 | * function_name - Caller's procedure name | 449 | * function_name - Caller's procedure name |
450 | * module_name - Caller's module name | 450 | * module_name - Caller's module name |
451 | * component_id - Caller's component ID | 451 | * component_id - Caller's component ID |
452 | * Value - Value to be printed with exit msg | 452 | * value - Value to be printed with exit msg |
453 | * | 453 | * |
454 | * RETURN: None | 454 | * RETURN: None |
455 | * | 455 | * |
@@ -481,7 +481,7 @@ ACPI_EXPORT_SYMBOL(acpi_ut_value_exit) | |||
481 | * function_name - Caller's procedure name | 481 | * function_name - Caller's procedure name |
482 | * module_name - Caller's module name | 482 | * module_name - Caller's module name |
483 | * component_id - Caller's component ID | 483 | * component_id - Caller's component ID |
484 | * Ptr - Pointer to display | 484 | * ptr - Pointer to display |
485 | * | 485 | * |
486 | * RETURN: None | 486 | * RETURN: None |
487 | * | 487 | * |
@@ -508,10 +508,10 @@ acpi_ut_ptr_exit(u32 line_number, | |||
508 | * | 508 | * |
509 | * FUNCTION: acpi_ut_dump_buffer | 509 | * FUNCTION: acpi_ut_dump_buffer |
510 | * | 510 | * |
511 | * PARAMETERS: Buffer - Buffer to dump | 511 | * PARAMETERS: buffer - Buffer to dump |
512 | * Count - Amount to dump, in bytes | 512 | * count - Amount to dump, in bytes |
513 | * Display - BYTE, WORD, DWORD, or QWORD display | 513 | * display - BYTE, WORD, DWORD, or QWORD display |
514 | * component_iD - Caller's component ID | 514 | * component_ID - Caller's component ID |
515 | * | 515 | * |
516 | * RETURN: None | 516 | * RETURN: None |
517 | * | 517 | * |
@@ -625,10 +625,10 @@ void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display) | |||
625 | * | 625 | * |
626 | * FUNCTION: acpi_ut_dump_buffer | 626 | * FUNCTION: acpi_ut_dump_buffer |
627 | * | 627 | * |
628 | * PARAMETERS: Buffer - Buffer to dump | 628 | * PARAMETERS: buffer - Buffer to dump |
629 | * Count - Amount to dump, in bytes | 629 | * count - Amount to dump, in bytes |
630 | * Display - BYTE, WORD, DWORD, or QWORD display | 630 | * display - BYTE, WORD, DWORD, or QWORD display |
631 | * component_iD - Caller's component ID | 631 | * component_ID - Caller's component ID |
632 | * | 632 | * |
633 | * RETURN: None | 633 | * RETURN: None |
634 | * | 634 | * |
diff --git a/drivers/acpi/acpica/utdecode.c b/drivers/acpi/acpica/utdecode.c index 684849949bf3..60a158472d82 100644 --- a/drivers/acpi/acpica/utdecode.c +++ b/drivers/acpi/acpica/utdecode.c | |||
@@ -49,41 +49,6 @@ | |||
49 | #define _COMPONENT ACPI_UTILITIES | 49 | #define _COMPONENT ACPI_UTILITIES |
50 | ACPI_MODULE_NAME("utdecode") | 50 | ACPI_MODULE_NAME("utdecode") |
51 | 51 | ||
52 | /******************************************************************************* | ||
53 | * | ||
54 | * FUNCTION: acpi_format_exception | ||
55 | * | ||
56 | * PARAMETERS: Status - The acpi_status code to be formatted | ||
57 | * | ||
58 | * RETURN: A string containing the exception text. A valid pointer is | ||
59 | * always returned. | ||
60 | * | ||
61 | * DESCRIPTION: This function translates an ACPI exception into an ASCII string | ||
62 | * It is here instead of utxface.c so it is always present. | ||
63 | * | ||
64 | ******************************************************************************/ | ||
65 | const char *acpi_format_exception(acpi_status status) | ||
66 | { | ||
67 | const char *exception = NULL; | ||
68 | |||
69 | ACPI_FUNCTION_ENTRY(); | ||
70 | |||
71 | exception = acpi_ut_validate_exception(status); | ||
72 | if (!exception) { | ||
73 | |||
74 | /* Exception code was not recognized */ | ||
75 | |||
76 | ACPI_ERROR((AE_INFO, | ||
77 | "Unknown exception code: 0x%8.8X", status)); | ||
78 | |||
79 | exception = "UNKNOWN_STATUS_CODE"; | ||
80 | } | ||
81 | |||
82 | return (ACPI_CAST_PTR(const char, exception)); | ||
83 | } | ||
84 | |||
85 | ACPI_EXPORT_SYMBOL(acpi_format_exception) | ||
86 | |||
87 | /* | 52 | /* |
88 | * Properties of the ACPI Object Types, both internal and external. | 53 | * Properties of the ACPI Object Types, both internal and external. |
89 | * The table is indexed by values of acpi_object_type | 54 | * The table is indexed by values of acpi_object_type |
@@ -126,8 +91,8 @@ const u8 acpi_gbl_ns_properties[ACPI_NUM_NS_TYPES] = { | |||
126 | * | 91 | * |
127 | * FUNCTION: acpi_ut_hex_to_ascii_char | 92 | * FUNCTION: acpi_ut_hex_to_ascii_char |
128 | * | 93 | * |
129 | * PARAMETERS: Integer - Contains the hex digit | 94 | * PARAMETERS: integer - Contains the hex digit |
130 | * Position - bit position of the digit within the | 95 | * position - bit position of the digit within the |
131 | * integer (multiple of 4) | 96 | * integer (multiple of 4) |
132 | * | 97 | * |
133 | * RETURN: The converted Ascii character | 98 | * RETURN: The converted Ascii character |
@@ -164,16 +129,17 @@ char acpi_ut_hex_to_ascii_char(u64 integer, u32 position) | |||
164 | /* Region type decoding */ | 129 | /* Region type decoding */ |
165 | 130 | ||
166 | const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS] = { | 131 | const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS] = { |
167 | "SystemMemory", | 132 | "SystemMemory", /* 0x00 */ |
168 | "SystemIO", | 133 | "SystemIO", /* 0x01 */ |
169 | "PCI_Config", | 134 | "PCI_Config", /* 0x02 */ |
170 | "EmbeddedControl", | 135 | "EmbeddedControl", /* 0x03 */ |
171 | "SMBus", | 136 | "SMBus", /* 0x04 */ |
172 | "SystemCMOS", | 137 | "SystemCMOS", /* 0x05 */ |
173 | "PCIBARTarget", | 138 | "PCIBARTarget", /* 0x06 */ |
174 | "IPMI", | 139 | "IPMI", /* 0x07 */ |
175 | "GeneralPurposeIo", | 140 | "GeneralPurposeIo", /* 0x08 */ |
176 | "GenericSerialBus" | 141 | "GenericSerialBus", /* 0x09 */ |
142 | "PCC" /* 0x0A */ | ||
177 | }; | 143 | }; |
178 | 144 | ||
179 | char *acpi_ut_get_region_name(u8 space_id) | 145 | char *acpi_ut_get_region_name(u8 space_id) |
@@ -228,7 +194,7 @@ char *acpi_ut_get_event_name(u32 event_id) | |||
228 | * | 194 | * |
229 | * FUNCTION: acpi_ut_get_type_name | 195 | * FUNCTION: acpi_ut_get_type_name |
230 | * | 196 | * |
231 | * PARAMETERS: Type - An ACPI object type | 197 | * PARAMETERS: type - An ACPI object type |
232 | * | 198 | * |
233 | * RETURN: Decoded ACPI object type name | 199 | * RETURN: Decoded ACPI object type name |
234 | * | 200 | * |
@@ -306,7 +272,7 @@ char *acpi_ut_get_object_type_name(union acpi_operand_object *obj_desc) | |||
306 | * | 272 | * |
307 | * FUNCTION: acpi_ut_get_node_name | 273 | * FUNCTION: acpi_ut_get_node_name |
308 | * | 274 | * |
309 | * PARAMETERS: Object - A namespace node | 275 | * PARAMETERS: object - A namespace node |
310 | * | 276 | * |
311 | * RETURN: ASCII name of the node | 277 | * RETURN: ASCII name of the node |
312 | * | 278 | * |
@@ -351,7 +317,7 @@ char *acpi_ut_get_node_name(void *object) | |||
351 | * | 317 | * |
352 | * FUNCTION: acpi_ut_get_descriptor_name | 318 | * FUNCTION: acpi_ut_get_descriptor_name |
353 | * | 319 | * |
354 | * PARAMETERS: Object - An ACPI object | 320 | * PARAMETERS: object - An ACPI object |
355 | * | 321 | * |
356 | * RETURN: Decoded name of the descriptor type | 322 | * RETURN: Decoded name of the descriptor type |
357 | * | 323 | * |
@@ -401,7 +367,7 @@ char *acpi_ut_get_descriptor_name(void *object) | |||
401 | * | 367 | * |
402 | * FUNCTION: acpi_ut_get_reference_name | 368 | * FUNCTION: acpi_ut_get_reference_name |
403 | * | 369 | * |
404 | * PARAMETERS: Object - An ACPI reference object | 370 | * PARAMETERS: object - An ACPI reference object |
405 | * | 371 | * |
406 | * RETURN: Decoded name of the type of reference | 372 | * RETURN: Decoded name of the type of reference |
407 | * | 373 | * |
@@ -532,7 +498,7 @@ const char *acpi_ut_get_notify_name(u32 notify_value) | |||
532 | * | 498 | * |
533 | * FUNCTION: acpi_ut_valid_object_type | 499 | * FUNCTION: acpi_ut_valid_object_type |
534 | * | 500 | * |
535 | * PARAMETERS: Type - Object type to be validated | 501 | * PARAMETERS: type - Object type to be validated |
536 | * | 502 | * |
537 | * RETURN: TRUE if valid object type, FALSE otherwise | 503 | * RETURN: TRUE if valid object type, FALSE otherwise |
538 | * | 504 | * |
diff --git a/drivers/acpi/acpica/utdelete.c b/drivers/acpi/acpica/utdelete.c index 2a6c3e183697..798105443d0f 100644 --- a/drivers/acpi/acpica/utdelete.c +++ b/drivers/acpi/acpica/utdelete.c | |||
@@ -60,7 +60,7 @@ acpi_ut_update_ref_count(union acpi_operand_object *object, u32 action); | |||
60 | * | 60 | * |
61 | * FUNCTION: acpi_ut_delete_internal_obj | 61 | * FUNCTION: acpi_ut_delete_internal_obj |
62 | * | 62 | * |
63 | * PARAMETERS: Object - Object to be deleted | 63 | * PARAMETERS: object - Object to be deleted |
64 | * | 64 | * |
65 | * RETURN: None | 65 | * RETURN: None |
66 | * | 66 | * |
@@ -152,7 +152,7 @@ static void acpi_ut_delete_internal_obj(union acpi_operand_object *object) | |||
152 | case ACPI_TYPE_PROCESSOR: | 152 | case ACPI_TYPE_PROCESSOR: |
153 | case ACPI_TYPE_THERMAL: | 153 | case ACPI_TYPE_THERMAL: |
154 | 154 | ||
155 | /* Walk the notify handler list for this object */ | 155 | /* Walk the address handler list for this object */ |
156 | 156 | ||
157 | handler_desc = object->common_notify.handler; | 157 | handler_desc = object->common_notify.handler; |
158 | while (handler_desc) { | 158 | while (handler_desc) { |
@@ -358,8 +358,8 @@ void acpi_ut_delete_internal_object_list(union acpi_operand_object **obj_list) | |||
358 | * | 358 | * |
359 | * FUNCTION: acpi_ut_update_ref_count | 359 | * FUNCTION: acpi_ut_update_ref_count |
360 | * | 360 | * |
361 | * PARAMETERS: Object - Object whose ref count is to be updated | 361 | * PARAMETERS: object - Object whose ref count is to be updated |
362 | * Action - What to do | 362 | * action - What to do |
363 | * | 363 | * |
364 | * RETURN: New ref count | 364 | * RETURN: New ref count |
365 | * | 365 | * |
@@ -456,9 +456,9 @@ acpi_ut_update_ref_count(union acpi_operand_object *object, u32 action) | |||
456 | * | 456 | * |
457 | * FUNCTION: acpi_ut_update_object_reference | 457 | * FUNCTION: acpi_ut_update_object_reference |
458 | * | 458 | * |
459 | * PARAMETERS: Object - Increment ref count for this object | 459 | * PARAMETERS: object - Increment ref count for this object |
460 | * and all sub-objects | 460 | * and all sub-objects |
461 | * Action - Either REF_INCREMENT or REF_DECREMENT or | 461 | * action - Either REF_INCREMENT or REF_DECREMENT or |
462 | * REF_FORCE_DELETE | 462 | * REF_FORCE_DELETE |
463 | * | 463 | * |
464 | * RETURN: Status | 464 | * RETURN: Status |
@@ -480,6 +480,7 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action) | |||
480 | acpi_status status = AE_OK; | 480 | acpi_status status = AE_OK; |
481 | union acpi_generic_state *state_list = NULL; | 481 | union acpi_generic_state *state_list = NULL; |
482 | union acpi_operand_object *next_object = NULL; | 482 | union acpi_operand_object *next_object = NULL; |
483 | union acpi_operand_object *prev_object; | ||
483 | union acpi_generic_state *state; | 484 | union acpi_generic_state *state; |
484 | u32 i; | 485 | u32 i; |
485 | 486 | ||
@@ -505,12 +506,21 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action) | |||
505 | case ACPI_TYPE_POWER: | 506 | case ACPI_TYPE_POWER: |
506 | case ACPI_TYPE_THERMAL: | 507 | case ACPI_TYPE_THERMAL: |
507 | 508 | ||
508 | /* Update the notify objects for these types (if present) */ | 509 | /* |
509 | 510 | * Update the notify objects for these types (if present) | |
510 | acpi_ut_update_ref_count(object->common_notify. | 511 | * Two lists, system and device notify handlers. |
511 | system_notify, action); | 512 | */ |
512 | acpi_ut_update_ref_count(object->common_notify. | 513 | for (i = 0; i < ACPI_NUM_NOTIFY_TYPES; i++) { |
513 | device_notify, action); | 514 | prev_object = |
515 | object->common_notify.notify_list[i]; | ||
516 | while (prev_object) { | ||
517 | next_object = | ||
518 | prev_object->notify.next[i]; | ||
519 | acpi_ut_update_ref_count(prev_object, | ||
520 | action); | ||
521 | prev_object = next_object; | ||
522 | } | ||
523 | } | ||
514 | break; | 524 | break; |
515 | 525 | ||
516 | case ACPI_TYPE_PACKAGE: | 526 | case ACPI_TYPE_PACKAGE: |
@@ -630,7 +640,7 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action) | |||
630 | * | 640 | * |
631 | * FUNCTION: acpi_ut_add_reference | 641 | * FUNCTION: acpi_ut_add_reference |
632 | * | 642 | * |
633 | * PARAMETERS: Object - Object whose reference count is to be | 643 | * PARAMETERS: object - Object whose reference count is to be |
634 | * incremented | 644 | * incremented |
635 | * | 645 | * |
636 | * RETURN: None | 646 | * RETURN: None |
@@ -664,7 +674,7 @@ void acpi_ut_add_reference(union acpi_operand_object *object) | |||
664 | * | 674 | * |
665 | * FUNCTION: acpi_ut_remove_reference | 675 | * FUNCTION: acpi_ut_remove_reference |
666 | * | 676 | * |
667 | * PARAMETERS: Object - Object whose ref count will be decremented | 677 | * PARAMETERS: object - Object whose ref count will be decremented |
668 | * | 678 | * |
669 | * RETURN: None | 679 | * RETURN: None |
670 | * | 680 | * |
diff --git a/drivers/acpi/acpica/uteval.c b/drivers/acpi/acpica/uteval.c index 479f32b33415..a9c65fbea5f4 100644 --- a/drivers/acpi/acpica/uteval.c +++ b/drivers/acpi/acpica/uteval.c | |||
@@ -53,7 +53,7 @@ ACPI_MODULE_NAME("uteval") | |||
53 | * FUNCTION: acpi_ut_evaluate_object | 53 | * FUNCTION: acpi_ut_evaluate_object |
54 | * | 54 | * |
55 | * PARAMETERS: prefix_node - Starting node | 55 | * PARAMETERS: prefix_node - Starting node |
56 | * Path - Path to object from starting node | 56 | * path - Path to object from starting node |
57 | * expected_return_types - Bitmap of allowed return types | 57 | * expected_return_types - Bitmap of allowed return types |
58 | * return_desc - Where a return value is stored | 58 | * return_desc - Where a return value is stored |
59 | * | 59 | * |
@@ -187,7 +187,7 @@ acpi_ut_evaluate_object(struct acpi_namespace_node *prefix_node, | |||
187 | * | 187 | * |
188 | * PARAMETERS: object_name - Object name to be evaluated | 188 | * PARAMETERS: object_name - Object name to be evaluated |
189 | * device_node - Node for the device | 189 | * device_node - Node for the device |
190 | * Value - Where the value is returned | 190 | * value - Where the value is returned |
191 | * | 191 | * |
192 | * RETURN: Status | 192 | * RETURN: Status |
193 | * | 193 | * |
@@ -229,7 +229,7 @@ acpi_ut_evaluate_numeric_object(char *object_name, | |||
229 | * FUNCTION: acpi_ut_execute_STA | 229 | * FUNCTION: acpi_ut_execute_STA |
230 | * | 230 | * |
231 | * PARAMETERS: device_node - Node for the device | 231 | * PARAMETERS: device_node - Node for the device |
232 | * Flags - Where the status flags are returned | 232 | * flags - Where the status flags are returned |
233 | * | 233 | * |
234 | * RETURN: Status | 234 | * RETURN: Status |
235 | * | 235 | * |
diff --git a/drivers/acpi/acpica/utexcep.c b/drivers/acpi/acpica/utexcep.c new file mode 100644 index 000000000000..23b98945f6b7 --- /dev/null +++ b/drivers/acpi/acpica/utexcep.c | |||
@@ -0,0 +1,153 @@ | |||
1 | /******************************************************************************* | ||
2 | * | ||
3 | * Module Name: utexcep - Exception code support | ||
4 | * | ||
5 | ******************************************************************************/ | ||
6 | |||
7 | /* | ||
8 | * Copyright (C) 2000 - 2012, Intel Corp. | ||
9 | * All rights reserved. | ||
10 | * | ||
11 | * Redistribution and use in source and binary forms, with or without | ||
12 | * modification, are permitted provided that the following conditions | ||
13 | * are met: | ||
14 | * 1. Redistributions of source code must retain the above copyright | ||
15 | * notice, this list of conditions, and the following disclaimer, | ||
16 | * without modification. | ||
17 | * 2. Redistributions in binary form must reproduce at minimum a disclaimer | ||
18 | * substantially similar to the "NO WARRANTY" disclaimer below | ||
19 | * ("Disclaimer") and any redistribution must be conditioned upon | ||
20 | * including a substantially similar Disclaimer requirement for further | ||
21 | * binary redistribution. | ||
22 | * 3. Neither the names of the above-listed copyright holders nor the names | ||
23 | * of any contributors may be used to endorse or promote products derived | ||
24 | * from this software without specific prior written permission. | ||
25 | * | ||
26 | * Alternatively, this software may be distributed under the terms of the | ||
27 | * GNU General Public License ("GPL") version 2 as published by the Free | ||
28 | * Software Foundation. | ||
29 | * | ||
30 | * NO WARRANTY | ||
31 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
32 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
33 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR | ||
34 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
35 | * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
36 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
37 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
38 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
39 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
40 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
41 | * POSSIBILITY OF SUCH DAMAGES. | ||
42 | */ | ||
43 | |||
44 | #define ACPI_DEFINE_EXCEPTION_TABLE | ||
45 | #include <linux/export.h> | ||
46 | #include <acpi/acpi.h> | ||
47 | #include "accommon.h" | ||
48 | |||
49 | #define _COMPONENT ACPI_UTILITIES | ||
50 | ACPI_MODULE_NAME("utexcep") | ||
51 | |||
52 | /******************************************************************************* | ||
53 | * | ||
54 | * FUNCTION: acpi_format_exception | ||
55 | * | ||
56 | * PARAMETERS: status - The acpi_status code to be formatted | ||
57 | * | ||
58 | * RETURN: A string containing the exception text. A valid pointer is | ||
59 | * always returned. | ||
60 | * | ||
61 | * DESCRIPTION: This function translates an ACPI exception into an ASCII | ||
62 | * string. Returns "unknown status" string for invalid codes. | ||
63 | * | ||
64 | ******************************************************************************/ | ||
65 | const char *acpi_format_exception(acpi_status status) | ||
66 | { | ||
67 | const char *exception = NULL; | ||
68 | |||
69 | ACPI_FUNCTION_ENTRY(); | ||
70 | |||
71 | exception = acpi_ut_validate_exception(status); | ||
72 | if (!exception) { | ||
73 | |||
74 | /* Exception code was not recognized */ | ||
75 | |||
76 | ACPI_ERROR((AE_INFO, | ||
77 | "Unknown exception code: 0x%8.8X", status)); | ||
78 | |||
79 | exception = "UNKNOWN_STATUS_CODE"; | ||
80 | } | ||
81 | |||
82 | return (ACPI_CAST_PTR(const char, exception)); | ||
83 | } | ||
84 | |||
85 | ACPI_EXPORT_SYMBOL(acpi_format_exception) | ||
86 | |||
87 | /******************************************************************************* | ||
88 | * | ||
89 | * FUNCTION: acpi_ut_validate_exception | ||
90 | * | ||
91 | * PARAMETERS: status - The acpi_status code to be formatted | ||
92 | * | ||
93 | * RETURN: A string containing the exception text. NULL if exception is | ||
94 | * not valid. | ||
95 | * | ||
96 | * DESCRIPTION: This function validates and translates an ACPI exception into | ||
97 | * an ASCII string. | ||
98 | * | ||
99 | ******************************************************************************/ | ||
100 | const char *acpi_ut_validate_exception(acpi_status status) | ||
101 | { | ||
102 | u32 sub_status; | ||
103 | const char *exception = NULL; | ||
104 | |||
105 | ACPI_FUNCTION_ENTRY(); | ||
106 | |||
107 | /* | ||
108 | * Status is composed of two parts, a "type" and an actual code | ||
109 | */ | ||
110 | sub_status = (status & ~AE_CODE_MASK); | ||
111 | |||
112 | switch (status & AE_CODE_MASK) { | ||
113 | case AE_CODE_ENVIRONMENTAL: | ||
114 | |||
115 | if (sub_status <= AE_CODE_ENV_MAX) { | ||
116 | exception = acpi_gbl_exception_names_env[sub_status]; | ||
117 | } | ||
118 | break; | ||
119 | |||
120 | case AE_CODE_PROGRAMMER: | ||
121 | |||
122 | if (sub_status <= AE_CODE_PGM_MAX) { | ||
123 | exception = acpi_gbl_exception_names_pgm[sub_status]; | ||
124 | } | ||
125 | break; | ||
126 | |||
127 | case AE_CODE_ACPI_TABLES: | ||
128 | |||
129 | if (sub_status <= AE_CODE_TBL_MAX) { | ||
130 | exception = acpi_gbl_exception_names_tbl[sub_status]; | ||
131 | } | ||
132 | break; | ||
133 | |||
134 | case AE_CODE_AML: | ||
135 | |||
136 | if (sub_status <= AE_CODE_AML_MAX) { | ||
137 | exception = acpi_gbl_exception_names_aml[sub_status]; | ||
138 | } | ||
139 | break; | ||
140 | |||
141 | case AE_CODE_CONTROL: | ||
142 | |||
143 | if (sub_status <= AE_CODE_CTRL_MAX) { | ||
144 | exception = acpi_gbl_exception_names_ctrl[sub_status]; | ||
145 | } | ||
146 | break; | ||
147 | |||
148 | default: | ||
149 | break; | ||
150 | } | ||
151 | |||
152 | return (ACPI_CAST_PTR(const char, exception)); | ||
153 | } | ||
diff --git a/drivers/acpi/acpica/utglobal.c b/drivers/acpi/acpica/utglobal.c index 90f53b42eca9..ed1893155f8b 100644 --- a/drivers/acpi/acpica/utglobal.c +++ b/drivers/acpi/acpica/utglobal.c | |||
@@ -247,8 +247,9 @@ struct acpi_fixed_event_info acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVENTS] = | |||
247 | * | 247 | * |
248 | * RETURN: Status | 248 | * RETURN: Status |
249 | * | 249 | * |
250 | * DESCRIPTION: Init library globals. All globals that require specific | 250 | * DESCRIPTION: Initialize ACPICA globals. All globals that require specific |
251 | * initialization should be initialized here! | 251 | * initialization should be initialized here. This allows for |
252 | * a warm restart. | ||
252 | * | 253 | * |
253 | ******************************************************************************/ | 254 | ******************************************************************************/ |
254 | 255 | ||
@@ -284,7 +285,7 @@ acpi_status acpi_ut_init_globals(void) | |||
284 | acpi_gbl_owner_id_mask[i] = 0; | 285 | acpi_gbl_owner_id_mask[i] = 0; |
285 | } | 286 | } |
286 | 287 | ||
287 | /* Last owner_iD is never valid */ | 288 | /* Last owner_ID is never valid */ |
288 | 289 | ||
289 | acpi_gbl_owner_id_mask[ACPI_NUM_OWNERID_MASKS - 1] = 0x80000000; | 290 | acpi_gbl_owner_id_mask[ACPI_NUM_OWNERID_MASKS - 1] = 0x80000000; |
290 | 291 | ||
@@ -304,8 +305,8 @@ acpi_status acpi_ut_init_globals(void) | |||
304 | 305 | ||
305 | /* Global handlers */ | 306 | /* Global handlers */ |
306 | 307 | ||
307 | acpi_gbl_system_notify.handler = NULL; | 308 | acpi_gbl_global_notify[0].handler = NULL; |
308 | acpi_gbl_device_notify.handler = NULL; | 309 | acpi_gbl_global_notify[1].handler = NULL; |
309 | acpi_gbl_exception_handler = NULL; | 310 | acpi_gbl_exception_handler = NULL; |
310 | acpi_gbl_init_handler = NULL; | 311 | acpi_gbl_init_handler = NULL; |
311 | acpi_gbl_table_handler = NULL; | 312 | acpi_gbl_table_handler = NULL; |
diff --git a/drivers/acpi/acpica/utids.c b/drivers/acpi/acpica/utids.c index c92eb1d93785..5d84e1954575 100644 --- a/drivers/acpi/acpica/utids.c +++ b/drivers/acpi/acpica/utids.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /****************************************************************************** | 1 | /****************************************************************************** |
2 | * | 2 | * |
3 | * Module Name: utids - support for device IDs - HID, UID, CID | 3 | * Module Name: utids - support for device Ids - HID, UID, CID |
4 | * | 4 | * |
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
diff --git a/drivers/acpi/acpica/utlock.c b/drivers/acpi/acpica/utlock.c index 155fd786d0f2..b1eb7f17e110 100644 --- a/drivers/acpi/acpica/utlock.c +++ b/drivers/acpi/acpica/utlock.c | |||
@@ -52,7 +52,7 @@ ACPI_MODULE_NAME("utlock") | |||
52 | * FUNCTION: acpi_ut_create_rw_lock | 52 | * FUNCTION: acpi_ut_create_rw_lock |
53 | * acpi_ut_delete_rw_lock | 53 | * acpi_ut_delete_rw_lock |
54 | * | 54 | * |
55 | * PARAMETERS: Lock - Pointer to a valid RW lock | 55 | * PARAMETERS: lock - Pointer to a valid RW lock |
56 | * | 56 | * |
57 | * RETURN: Status | 57 | * RETURN: Status |
58 | * | 58 | * |
@@ -89,7 +89,7 @@ void acpi_ut_delete_rw_lock(struct acpi_rw_lock *lock) | |||
89 | * FUNCTION: acpi_ut_acquire_read_lock | 89 | * FUNCTION: acpi_ut_acquire_read_lock |
90 | * acpi_ut_release_read_lock | 90 | * acpi_ut_release_read_lock |
91 | * | 91 | * |
92 | * PARAMETERS: Lock - Pointer to a valid RW lock | 92 | * PARAMETERS: lock - Pointer to a valid RW lock |
93 | * | 93 | * |
94 | * RETURN: Status | 94 | * RETURN: Status |
95 | * | 95 | * |
@@ -149,7 +149,7 @@ acpi_status acpi_ut_release_read_lock(struct acpi_rw_lock *lock) | |||
149 | * FUNCTION: acpi_ut_acquire_write_lock | 149 | * FUNCTION: acpi_ut_acquire_write_lock |
150 | * acpi_ut_release_write_lock | 150 | * acpi_ut_release_write_lock |
151 | * | 151 | * |
152 | * PARAMETERS: Lock - Pointer to a valid RW lock | 152 | * PARAMETERS: lock - Pointer to a valid RW lock |
153 | * | 153 | * |
154 | * RETURN: Status | 154 | * RETURN: Status |
155 | * | 155 | * |
diff --git a/drivers/acpi/acpica/utmath.c b/drivers/acpi/acpica/utmath.c index 2491a552b0e6..d88a8aaab2a6 100644 --- a/drivers/acpi/acpica/utmath.c +++ b/drivers/acpi/acpica/utmath.c | |||
@@ -73,8 +73,8 @@ typedef union uint64_overlay { | |||
73 | * | 73 | * |
74 | * FUNCTION: acpi_ut_short_divide | 74 | * FUNCTION: acpi_ut_short_divide |
75 | * | 75 | * |
76 | * PARAMETERS: Dividend - 64-bit dividend | 76 | * PARAMETERS: dividend - 64-bit dividend |
77 | * Divisor - 32-bit divisor | 77 | * divisor - 32-bit divisor |
78 | * out_quotient - Pointer to where the quotient is returned | 78 | * out_quotient - Pointer to where the quotient is returned |
79 | * out_remainder - Pointer to where the remainder is returned | 79 | * out_remainder - Pointer to where the remainder is returned |
80 | * | 80 | * |
diff --git a/drivers/acpi/acpica/utmisc.c b/drivers/acpi/acpica/utmisc.c index 86f19db74e05..33c6cf7ff467 100644 --- a/drivers/acpi/acpica/utmisc.c +++ b/drivers/acpi/acpica/utmisc.c | |||
@@ -50,79 +50,41 @@ | |||
50 | #define _COMPONENT ACPI_UTILITIES | 50 | #define _COMPONENT ACPI_UTILITIES |
51 | ACPI_MODULE_NAME("utmisc") | 51 | ACPI_MODULE_NAME("utmisc") |
52 | 52 | ||
53 | #if defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP | ||
53 | /******************************************************************************* | 54 | /******************************************************************************* |
54 | * | 55 | * |
55 | * FUNCTION: acpi_ut_validate_exception | 56 | * FUNCTION: ut_convert_backslashes |
56 | * | 57 | * |
57 | * PARAMETERS: Status - The acpi_status code to be formatted | 58 | * PARAMETERS: pathname - File pathname string to be converted |
58 | * | 59 | * |
59 | * RETURN: A string containing the exception text. NULL if exception is | 60 | * RETURN: Modifies the input Pathname |
60 | * not valid. | ||
61 | * | 61 | * |
62 | * DESCRIPTION: This function validates and translates an ACPI exception into | 62 | * DESCRIPTION: Convert all backslashes (0x5C) to forward slashes (0x2F) within |
63 | * an ASCII string. | 63 | * the entire input file pathname string. |
64 | * | 64 | * |
65 | ******************************************************************************/ | 65 | ******************************************************************************/ |
66 | const char *acpi_ut_validate_exception(acpi_status status) | 66 | void ut_convert_backslashes(char *pathname) |
67 | { | 67 | { |
68 | u32 sub_status; | ||
69 | const char *exception = NULL; | ||
70 | 68 | ||
71 | ACPI_FUNCTION_ENTRY(); | 69 | if (!pathname) { |
72 | 70 | return; | |
73 | /* | 71 | } |
74 | * Status is composed of two parts, a "type" and an actual code | ||
75 | */ | ||
76 | sub_status = (status & ~AE_CODE_MASK); | ||
77 | |||
78 | switch (status & AE_CODE_MASK) { | ||
79 | case AE_CODE_ENVIRONMENTAL: | ||
80 | |||
81 | if (sub_status <= AE_CODE_ENV_MAX) { | ||
82 | exception = acpi_gbl_exception_names_env[sub_status]; | ||
83 | } | ||
84 | break; | ||
85 | |||
86 | case AE_CODE_PROGRAMMER: | ||
87 | |||
88 | if (sub_status <= AE_CODE_PGM_MAX) { | ||
89 | exception = acpi_gbl_exception_names_pgm[sub_status]; | ||
90 | } | ||
91 | break; | ||
92 | |||
93 | case AE_CODE_ACPI_TABLES: | ||
94 | |||
95 | if (sub_status <= AE_CODE_TBL_MAX) { | ||
96 | exception = acpi_gbl_exception_names_tbl[sub_status]; | ||
97 | } | ||
98 | break; | ||
99 | |||
100 | case AE_CODE_AML: | ||
101 | |||
102 | if (sub_status <= AE_CODE_AML_MAX) { | ||
103 | exception = acpi_gbl_exception_names_aml[sub_status]; | ||
104 | } | ||
105 | break; | ||
106 | |||
107 | case AE_CODE_CONTROL: | ||
108 | 72 | ||
109 | if (sub_status <= AE_CODE_CTRL_MAX) { | 73 | while (*pathname) { |
110 | exception = acpi_gbl_exception_names_ctrl[sub_status]; | 74 | if (*pathname == '\\') { |
75 | *pathname = '/'; | ||
111 | } | 76 | } |
112 | break; | ||
113 | 77 | ||
114 | default: | 78 | pathname++; |
115 | break; | ||
116 | } | 79 | } |
117 | |||
118 | return (ACPI_CAST_PTR(const char, exception)); | ||
119 | } | 80 | } |
81 | #endif | ||
120 | 82 | ||
121 | /******************************************************************************* | 83 | /******************************************************************************* |
122 | * | 84 | * |
123 | * FUNCTION: acpi_ut_is_pci_root_bridge | 85 | * FUNCTION: acpi_ut_is_pci_root_bridge |
124 | * | 86 | * |
125 | * PARAMETERS: Id - The HID/CID in string format | 87 | * PARAMETERS: id - The HID/CID in string format |
126 | * | 88 | * |
127 | * RETURN: TRUE if the Id is a match for a PCI/PCI-Express Root Bridge | 89 | * RETURN: TRUE if the Id is a match for a PCI/PCI-Express Root Bridge |
128 | * | 90 | * |
@@ -150,7 +112,7 @@ u8 acpi_ut_is_pci_root_bridge(char *id) | |||
150 | * | 112 | * |
151 | * FUNCTION: acpi_ut_is_aml_table | 113 | * FUNCTION: acpi_ut_is_aml_table |
152 | * | 114 | * |
153 | * PARAMETERS: Table - An ACPI table | 115 | * PARAMETERS: table - An ACPI table |
154 | * | 116 | * |
155 | * RETURN: TRUE if table contains executable AML; FALSE otherwise | 117 | * RETURN: TRUE if table contains executable AML; FALSE otherwise |
156 | * | 118 | * |
@@ -284,7 +246,7 @@ acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id) | |||
284 | * | 246 | * |
285 | * FUNCTION: acpi_ut_release_owner_id | 247 | * FUNCTION: acpi_ut_release_owner_id |
286 | * | 248 | * |
287 | * PARAMETERS: owner_id_ptr - Pointer to a previously allocated owner_iD | 249 | * PARAMETERS: owner_id_ptr - Pointer to a previously allocated owner_ID |
288 | * | 250 | * |
289 | * RETURN: None. No error is returned because we are either exiting a | 251 | * RETURN: None. No error is returned because we are either exiting a |
290 | * control method or unloading a table. Either way, we would | 252 | * control method or unloading a table. Either way, we would |
@@ -307,7 +269,7 @@ void acpi_ut_release_owner_id(acpi_owner_id * owner_id_ptr) | |||
307 | 269 | ||
308 | *owner_id_ptr = 0; | 270 | *owner_id_ptr = 0; |
309 | 271 | ||
310 | /* Zero is not a valid owner_iD */ | 272 | /* Zero is not a valid owner_ID */ |
311 | 273 | ||
312 | if (owner_id == 0) { | 274 | if (owner_id == 0) { |
313 | ACPI_ERROR((AE_INFO, "Invalid OwnerId: 0x%2.2X", owner_id)); | 275 | ACPI_ERROR((AE_INFO, "Invalid OwnerId: 0x%2.2X", owner_id)); |
@@ -381,7 +343,7 @@ void acpi_ut_strupr(char *src_string) | |||
381 | * | 343 | * |
382 | * FUNCTION: acpi_ut_print_string | 344 | * FUNCTION: acpi_ut_print_string |
383 | * | 345 | * |
384 | * PARAMETERS: String - Null terminated ASCII string | 346 | * PARAMETERS: string - Null terminated ASCII string |
385 | * max_length - Maximum output length | 347 | * max_length - Maximum output length |
386 | * | 348 | * |
387 | * RETURN: None | 349 | * RETURN: None |
@@ -467,7 +429,7 @@ void acpi_ut_print_string(char *string, u8 max_length) | |||
467 | * | 429 | * |
468 | * FUNCTION: acpi_ut_dword_byte_swap | 430 | * FUNCTION: acpi_ut_dword_byte_swap |
469 | * | 431 | * |
470 | * PARAMETERS: Value - Value to be converted | 432 | * PARAMETERS: value - Value to be converted |
471 | * | 433 | * |
472 | * RETURN: u32 integer with bytes swapped | 434 | * RETURN: u32 integer with bytes swapped |
473 | * | 435 | * |
@@ -537,9 +499,9 @@ void acpi_ut_set_integer_width(u8 revision) | |||
537 | * | 499 | * |
538 | * FUNCTION: acpi_ut_display_init_pathname | 500 | * FUNCTION: acpi_ut_display_init_pathname |
539 | * | 501 | * |
540 | * PARAMETERS: Type - Object type of the node | 502 | * PARAMETERS: type - Object type of the node |
541 | * obj_handle - Handle whose pathname will be displayed | 503 | * obj_handle - Handle whose pathname will be displayed |
542 | * Path - Additional path string to be appended. | 504 | * path - Additional path string to be appended. |
543 | * (NULL if no extra path) | 505 | * (NULL if no extra path) |
544 | * | 506 | * |
545 | * RETURN: acpi_status | 507 | * RETURN: acpi_status |
@@ -604,8 +566,8 @@ acpi_ut_display_init_pathname(u8 type, | |||
604 | * | 566 | * |
605 | * FUNCTION: acpi_ut_valid_acpi_char | 567 | * FUNCTION: acpi_ut_valid_acpi_char |
606 | * | 568 | * |
607 | * PARAMETERS: Char - The character to be examined | 569 | * PARAMETERS: char - The character to be examined |
608 | * Position - Byte position (0-3) | 570 | * position - Byte position (0-3) |
609 | * | 571 | * |
610 | * RETURN: TRUE if the character is valid, FALSE otherwise | 572 | * RETURN: TRUE if the character is valid, FALSE otherwise |
611 | * | 573 | * |
@@ -640,7 +602,7 @@ u8 acpi_ut_valid_acpi_char(char character, u32 position) | |||
640 | * | 602 | * |
641 | * FUNCTION: acpi_ut_valid_acpi_name | 603 | * FUNCTION: acpi_ut_valid_acpi_name |
642 | * | 604 | * |
643 | * PARAMETERS: Name - The name to be examined | 605 | * PARAMETERS: name - The name to be examined |
644 | * | 606 | * |
645 | * RETURN: TRUE if the name is valid, FALSE otherwise | 607 | * RETURN: TRUE if the name is valid, FALSE otherwise |
646 | * | 608 | * |
@@ -671,7 +633,7 @@ u8 acpi_ut_valid_acpi_name(u32 name) | |||
671 | * | 633 | * |
672 | * FUNCTION: acpi_ut_repair_name | 634 | * FUNCTION: acpi_ut_repair_name |
673 | * | 635 | * |
674 | * PARAMETERS: Name - The ACPI name to be repaired | 636 | * PARAMETERS: name - The ACPI name to be repaired |
675 | * | 637 | * |
676 | * RETURN: Repaired version of the name | 638 | * RETURN: Repaired version of the name |
677 | * | 639 | * |
@@ -705,8 +667,8 @@ acpi_name acpi_ut_repair_name(char *name) | |||
705 | * | 667 | * |
706 | * FUNCTION: acpi_ut_strtoul64 | 668 | * FUNCTION: acpi_ut_strtoul64 |
707 | * | 669 | * |
708 | * PARAMETERS: String - Null terminated string | 670 | * PARAMETERS: string - Null terminated string |
709 | * Base - Radix of the string: 16 or ACPI_ANY_BASE; | 671 | * base - Radix of the string: 16 or ACPI_ANY_BASE; |
710 | * ACPI_ANY_BASE means 'in behalf of to_integer' | 672 | * ACPI_ANY_BASE means 'in behalf of to_integer' |
711 | * ret_integer - Where the converted integer is returned | 673 | * ret_integer - Where the converted integer is returned |
712 | * | 674 | * |
@@ -755,7 +717,7 @@ acpi_status acpi_ut_strtoul64(char *string, u32 base, u64 * ret_integer) | |||
755 | 717 | ||
756 | if (to_integer_op) { | 718 | if (to_integer_op) { |
757 | /* | 719 | /* |
758 | * Base equal to ACPI_ANY_BASE means 'to_integer operation case'. | 720 | * Base equal to ACPI_ANY_BASE means 'ToInteger operation case'. |
759 | * We need to determine if it is decimal or hexadecimal. | 721 | * We need to determine if it is decimal or hexadecimal. |
760 | */ | 722 | */ |
761 | if ((*string == '0') && (ACPI_TOLOWER(*(string + 1)) == 'x')) { | 723 | if ((*string == '0') && (ACPI_TOLOWER(*(string + 1)) == 'x')) { |
@@ -878,8 +840,8 @@ acpi_status acpi_ut_strtoul64(char *string, u32 base, u64 * ret_integer) | |||
878 | * | 840 | * |
879 | * FUNCTION: acpi_ut_create_update_state_and_push | 841 | * FUNCTION: acpi_ut_create_update_state_and_push |
880 | * | 842 | * |
881 | * PARAMETERS: Object - Object to be added to the new state | 843 | * PARAMETERS: object - Object to be added to the new state |
882 | * Action - Increment/Decrement | 844 | * action - Increment/Decrement |
883 | * state_list - List the state will be added to | 845 | * state_list - List the state will be added to |
884 | * | 846 | * |
885 | * RETURN: Status | 847 | * RETURN: Status |
@@ -919,7 +881,7 @@ acpi_ut_create_update_state_and_push(union acpi_operand_object *object, | |||
919 | * PARAMETERS: source_object - The package to walk | 881 | * PARAMETERS: source_object - The package to walk |
920 | * target_object - Target object (if package is being copied) | 882 | * target_object - Target object (if package is being copied) |
921 | * walk_callback - Called once for each package element | 883 | * walk_callback - Called once for each package element |
922 | * Context - Passed to the callback function | 884 | * context - Passed to the callback function |
923 | * | 885 | * |
924 | * RETURN: Status | 886 | * RETURN: Status |
925 | * | 887 | * |
diff --git a/drivers/acpi/acpica/utmutex.c b/drivers/acpi/acpica/utmutex.c index 43174df33121..296baa676bc5 100644 --- a/drivers/acpi/acpica/utmutex.c +++ b/drivers/acpi/acpica/utmutex.c | |||
@@ -147,7 +147,7 @@ void acpi_ut_mutex_terminate(void) | |||
147 | * | 147 | * |
148 | * FUNCTION: acpi_ut_create_mutex | 148 | * FUNCTION: acpi_ut_create_mutex |
149 | * | 149 | * |
150 | * PARAMETERS: mutex_iD - ID of the mutex to be created | 150 | * PARAMETERS: mutex_ID - ID of the mutex to be created |
151 | * | 151 | * |
152 | * RETURN: Status | 152 | * RETURN: Status |
153 | * | 153 | * |
@@ -176,7 +176,7 @@ static acpi_status acpi_ut_create_mutex(acpi_mutex_handle mutex_id) | |||
176 | * | 176 | * |
177 | * FUNCTION: acpi_ut_delete_mutex | 177 | * FUNCTION: acpi_ut_delete_mutex |
178 | * | 178 | * |
179 | * PARAMETERS: mutex_iD - ID of the mutex to be deleted | 179 | * PARAMETERS: mutex_ID - ID of the mutex to be deleted |
180 | * | 180 | * |
181 | * RETURN: Status | 181 | * RETURN: Status |
182 | * | 182 | * |
@@ -199,7 +199,7 @@ static void acpi_ut_delete_mutex(acpi_mutex_handle mutex_id) | |||
199 | * | 199 | * |
200 | * FUNCTION: acpi_ut_acquire_mutex | 200 | * FUNCTION: acpi_ut_acquire_mutex |
201 | * | 201 | * |
202 | * PARAMETERS: mutex_iD - ID of the mutex to be acquired | 202 | * PARAMETERS: mutex_ID - ID of the mutex to be acquired |
203 | * | 203 | * |
204 | * RETURN: Status | 204 | * RETURN: Status |
205 | * | 205 | * |
@@ -283,7 +283,7 @@ acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id) | |||
283 | * | 283 | * |
284 | * FUNCTION: acpi_ut_release_mutex | 284 | * FUNCTION: acpi_ut_release_mutex |
285 | * | 285 | * |
286 | * PARAMETERS: mutex_iD - ID of the mutex to be released | 286 | * PARAMETERS: mutex_ID - ID of the mutex to be released |
287 | * | 287 | * |
288 | * RETURN: Status | 288 | * RETURN: Status |
289 | * | 289 | * |
diff --git a/drivers/acpi/acpica/utobject.c b/drivers/acpi/acpica/utobject.c index b112744fc9ae..655f0799a391 100644 --- a/drivers/acpi/acpica/utobject.c +++ b/drivers/acpi/acpica/utobject.c | |||
@@ -69,7 +69,7 @@ acpi_ut_get_element_length(u8 object_type, | |||
69 | * PARAMETERS: module_name - Source file name of caller | 69 | * PARAMETERS: module_name - Source file name of caller |
70 | * line_number - Line number of caller | 70 | * line_number - Line number of caller |
71 | * component_id - Component type of caller | 71 | * component_id - Component type of caller |
72 | * Type - ACPI Type of the new object | 72 | * type - ACPI Type of the new object |
73 | * | 73 | * |
74 | * RETURN: A new internal object, null on failure | 74 | * RETURN: A new internal object, null on failure |
75 | * | 75 | * |
@@ -150,7 +150,7 @@ union acpi_operand_object *acpi_ut_create_internal_object_dbg(const char | |||
150 | * | 150 | * |
151 | * FUNCTION: acpi_ut_create_package_object | 151 | * FUNCTION: acpi_ut_create_package_object |
152 | * | 152 | * |
153 | * PARAMETERS: Count - Number of package elements | 153 | * PARAMETERS: count - Number of package elements |
154 | * | 154 | * |
155 | * RETURN: Pointer to a new Package object, null on failure | 155 | * RETURN: Pointer to a new Package object, null on failure |
156 | * | 156 | * |
@@ -323,11 +323,11 @@ union acpi_operand_object *acpi_ut_create_string_object(acpi_size string_size) | |||
323 | * | 323 | * |
324 | * FUNCTION: acpi_ut_valid_internal_object | 324 | * FUNCTION: acpi_ut_valid_internal_object |
325 | * | 325 | * |
326 | * PARAMETERS: Object - Object to be validated | 326 | * PARAMETERS: object - Object to be validated |
327 | * | 327 | * |
328 | * RETURN: TRUE if object is valid, FALSE otherwise | 328 | * RETURN: TRUE if object is valid, FALSE otherwise |
329 | * | 329 | * |
330 | * DESCRIPTION: Validate a pointer to be a union acpi_operand_object | 330 | * DESCRIPTION: Validate a pointer to be of type union acpi_operand_object |
331 | * | 331 | * |
332 | ******************************************************************************/ | 332 | ******************************************************************************/ |
333 | 333 | ||
@@ -348,7 +348,7 @@ u8 acpi_ut_valid_internal_object(void *object) | |||
348 | switch (ACPI_GET_DESCRIPTOR_TYPE(object)) { | 348 | switch (ACPI_GET_DESCRIPTOR_TYPE(object)) { |
349 | case ACPI_DESC_TYPE_OPERAND: | 349 | case ACPI_DESC_TYPE_OPERAND: |
350 | 350 | ||
351 | /* The object appears to be a valid union acpi_operand_object */ | 351 | /* The object appears to be a valid union acpi_operand_object */ |
352 | 352 | ||
353 | return (TRUE); | 353 | return (TRUE); |
354 | 354 | ||
@@ -407,7 +407,7 @@ void *acpi_ut_allocate_object_desc_dbg(const char *module_name, | |||
407 | * | 407 | * |
408 | * FUNCTION: acpi_ut_delete_object_desc | 408 | * FUNCTION: acpi_ut_delete_object_desc |
409 | * | 409 | * |
410 | * PARAMETERS: Object - An Acpi internal object to be deleted | 410 | * PARAMETERS: object - An Acpi internal object to be deleted |
411 | * | 411 | * |
412 | * RETURN: None. | 412 | * RETURN: None. |
413 | * | 413 | * |
@@ -419,7 +419,7 @@ void acpi_ut_delete_object_desc(union acpi_operand_object *object) | |||
419 | { | 419 | { |
420 | ACPI_FUNCTION_TRACE_PTR(ut_delete_object_desc, object); | 420 | ACPI_FUNCTION_TRACE_PTR(ut_delete_object_desc, object); |
421 | 421 | ||
422 | /* Object must be a union acpi_operand_object */ | 422 | /* Object must be a union acpi_operand_object */ |
423 | 423 | ||
424 | if (ACPI_GET_DESCRIPTOR_TYPE(object) != ACPI_DESC_TYPE_OPERAND) { | 424 | if (ACPI_GET_DESCRIPTOR_TYPE(object) != ACPI_DESC_TYPE_OPERAND) { |
425 | ACPI_ERROR((AE_INFO, | 425 | ACPI_ERROR((AE_INFO, |
diff --git a/drivers/acpi/acpica/utosi.c b/drivers/acpi/acpica/utosi.c index 2360cf70c18c..34ef0bd7e4b4 100644 --- a/drivers/acpi/acpica/utosi.c +++ b/drivers/acpi/acpica/utosi.c | |||
@@ -68,7 +68,7 @@ static struct acpi_interface_info acpi_default_supported_interfaces[] = { | |||
68 | {"Windows 2001.1", NULL, 0, ACPI_OSI_WINSRV_2003}, /* Windows Server 2003 */ | 68 | {"Windows 2001.1", NULL, 0, ACPI_OSI_WINSRV_2003}, /* Windows Server 2003 */ |
69 | {"Windows 2001 SP2", NULL, 0, ACPI_OSI_WIN_XP_SP2}, /* Windows XP SP2 */ | 69 | {"Windows 2001 SP2", NULL, 0, ACPI_OSI_WIN_XP_SP2}, /* Windows XP SP2 */ |
70 | {"Windows 2001.1 SP1", NULL, 0, ACPI_OSI_WINSRV_2003_SP1}, /* Windows Server 2003 SP1 - Added 03/2006 */ | 70 | {"Windows 2001.1 SP1", NULL, 0, ACPI_OSI_WINSRV_2003_SP1}, /* Windows Server 2003 SP1 - Added 03/2006 */ |
71 | {"Windows 2006", NULL, 0, ACPI_OSI_WIN_VISTA}, /* Windows Vista - Added 03/2006 */ | 71 | {"Windows 2006", NULL, 0, ACPI_OSI_WIN_VISTA}, /* Windows vista - Added 03/2006 */ |
72 | {"Windows 2006.1", NULL, 0, ACPI_OSI_WINSRV_2008}, /* Windows Server 2008 - Added 09/2009 */ | 72 | {"Windows 2006.1", NULL, 0, ACPI_OSI_WINSRV_2008}, /* Windows Server 2008 - Added 09/2009 */ |
73 | {"Windows 2006 SP1", NULL, 0, ACPI_OSI_WIN_VISTA_SP1}, /* Windows Vista SP1 - Added 09/2009 */ | 73 | {"Windows 2006 SP1", NULL, 0, ACPI_OSI_WIN_VISTA_SP1}, /* Windows Vista SP1 - Added 09/2009 */ |
74 | {"Windows 2006 SP2", NULL, 0, ACPI_OSI_WIN_VISTA_SP2}, /* Windows Vista SP2 - Added 09/2010 */ | 74 | {"Windows 2006 SP2", NULL, 0, ACPI_OSI_WIN_VISTA_SP2}, /* Windows Vista SP2 - Added 09/2010 */ |
diff --git a/drivers/acpi/acpica/utresrc.c b/drivers/acpi/acpica/utresrc.c index 9d441ea70305..e38bef4980bc 100644 --- a/drivers/acpi/acpica/utresrc.c +++ b/drivers/acpi/acpica/utresrc.c | |||
@@ -356,13 +356,13 @@ static const u8 acpi_gbl_resource_types[] = { | |||
356 | ACPI_SMALL_VARIABLE_LENGTH, /* 06 start_dependent_functions */ | 356 | ACPI_SMALL_VARIABLE_LENGTH, /* 06 start_dependent_functions */ |
357 | ACPI_FIXED_LENGTH, /* 07 end_dependent_functions */ | 357 | ACPI_FIXED_LENGTH, /* 07 end_dependent_functions */ |
358 | ACPI_FIXED_LENGTH, /* 08 IO */ | 358 | ACPI_FIXED_LENGTH, /* 08 IO */ |
359 | ACPI_FIXED_LENGTH, /* 09 fixed_iO */ | 359 | ACPI_FIXED_LENGTH, /* 09 fixed_IO */ |
360 | ACPI_FIXED_LENGTH, /* 0_a fixed_dMA */ | 360 | ACPI_FIXED_LENGTH, /* 0A fixed_DMA */ |
361 | 0, | 361 | 0, |
362 | 0, | 362 | 0, |
363 | 0, | 363 | 0, |
364 | ACPI_VARIABLE_LENGTH, /* 0_e vendor_short */ | 364 | ACPI_VARIABLE_LENGTH, /* 0E vendor_short */ |
365 | ACPI_FIXED_LENGTH, /* 0_f end_tag */ | 365 | ACPI_FIXED_LENGTH, /* 0F end_tag */ |
366 | 366 | ||
367 | /* Large descriptors */ | 367 | /* Large descriptors */ |
368 | 368 | ||
@@ -375,16 +375,16 @@ static const u8 acpi_gbl_resource_types[] = { | |||
375 | ACPI_FIXED_LENGTH, /* 06 memory32_fixed */ | 375 | ACPI_FIXED_LENGTH, /* 06 memory32_fixed */ |
376 | ACPI_VARIABLE_LENGTH, /* 07 Dword* address */ | 376 | ACPI_VARIABLE_LENGTH, /* 07 Dword* address */ |
377 | ACPI_VARIABLE_LENGTH, /* 08 Word* address */ | 377 | ACPI_VARIABLE_LENGTH, /* 08 Word* address */ |
378 | ACPI_VARIABLE_LENGTH, /* 09 extended_iRQ */ | 378 | ACPI_VARIABLE_LENGTH, /* 09 extended_IRQ */ |
379 | ACPI_VARIABLE_LENGTH, /* 0_a Qword* address */ | 379 | ACPI_VARIABLE_LENGTH, /* 0A Qword* address */ |
380 | ACPI_FIXED_LENGTH, /* 0_b Extended* address */ | 380 | ACPI_FIXED_LENGTH, /* 0B Extended* address */ |
381 | ACPI_VARIABLE_LENGTH, /* 0_c Gpio* */ | 381 | ACPI_VARIABLE_LENGTH, /* 0C Gpio* */ |
382 | 0, | 382 | 0, |
383 | ACPI_VARIABLE_LENGTH /* 0_e *serial_bus */ | 383 | ACPI_VARIABLE_LENGTH /* 0E *serial_bus */ |
384 | }; | 384 | }; |
385 | 385 | ||
386 | /* | 386 | /* |
387 | * For the i_aSL compiler/disassembler, we don't want any error messages | 387 | * For the iASL compiler/disassembler, we don't want any error messages |
388 | * because the disassembler uses the resource validation code to determine | 388 | * because the disassembler uses the resource validation code to determine |
389 | * if Buffer objects are actually Resource Templates. | 389 | * if Buffer objects are actually Resource Templates. |
390 | */ | 390 | */ |
@@ -398,11 +398,11 @@ static const u8 acpi_gbl_resource_types[] = { | |||
398 | * | 398 | * |
399 | * FUNCTION: acpi_ut_walk_aml_resources | 399 | * FUNCTION: acpi_ut_walk_aml_resources |
400 | * | 400 | * |
401 | * PARAMETERS: Aml - Pointer to the raw AML resource template | 401 | * PARAMETERS: aml - Pointer to the raw AML resource template |
402 | * aml_length - Length of the entire template | 402 | * aml_length - Length of the entire template |
403 | * user_function - Called once for each descriptor found. If | 403 | * user_function - Called once for each descriptor found. If |
404 | * NULL, a pointer to the end_tag is returned | 404 | * NULL, a pointer to the end_tag is returned |
405 | * Context - Passed to user_function | 405 | * context - Passed to user_function |
406 | * | 406 | * |
407 | * RETURN: Status | 407 | * RETURN: Status |
408 | * | 408 | * |
@@ -513,7 +513,7 @@ acpi_ut_walk_aml_resources(u8 * aml, | |||
513 | * | 513 | * |
514 | * FUNCTION: acpi_ut_validate_resource | 514 | * FUNCTION: acpi_ut_validate_resource |
515 | * | 515 | * |
516 | * PARAMETERS: Aml - Pointer to the raw AML resource descriptor | 516 | * PARAMETERS: aml - Pointer to the raw AML resource descriptor |
517 | * return_index - Where the resource index is returned. NULL | 517 | * return_index - Where the resource index is returned. NULL |
518 | * if the index is not required. | 518 | * if the index is not required. |
519 | * | 519 | * |
@@ -664,7 +664,7 @@ acpi_status acpi_ut_validate_resource(void *aml, u8 * return_index) | |||
664 | * | 664 | * |
665 | * FUNCTION: acpi_ut_get_resource_type | 665 | * FUNCTION: acpi_ut_get_resource_type |
666 | * | 666 | * |
667 | * PARAMETERS: Aml - Pointer to the raw AML resource descriptor | 667 | * PARAMETERS: aml - Pointer to the raw AML resource descriptor |
668 | * | 668 | * |
669 | * RETURN: The Resource Type with no extraneous bits (except the | 669 | * RETURN: The Resource Type with no extraneous bits (except the |
670 | * Large/Small descriptor bit -- this is left alone) | 670 | * Large/Small descriptor bit -- this is left alone) |
@@ -698,7 +698,7 @@ u8 acpi_ut_get_resource_type(void *aml) | |||
698 | * | 698 | * |
699 | * FUNCTION: acpi_ut_get_resource_length | 699 | * FUNCTION: acpi_ut_get_resource_length |
700 | * | 700 | * |
701 | * PARAMETERS: Aml - Pointer to the raw AML resource descriptor | 701 | * PARAMETERS: aml - Pointer to the raw AML resource descriptor |
702 | * | 702 | * |
703 | * RETURN: Byte Length | 703 | * RETURN: Byte Length |
704 | * | 704 | * |
@@ -738,7 +738,7 @@ u16 acpi_ut_get_resource_length(void *aml) | |||
738 | * | 738 | * |
739 | * FUNCTION: acpi_ut_get_resource_header_length | 739 | * FUNCTION: acpi_ut_get_resource_header_length |
740 | * | 740 | * |
741 | * PARAMETERS: Aml - Pointer to the raw AML resource descriptor | 741 | * PARAMETERS: aml - Pointer to the raw AML resource descriptor |
742 | * | 742 | * |
743 | * RETURN: Length of the AML header (depends on large/small descriptor) | 743 | * RETURN: Length of the AML header (depends on large/small descriptor) |
744 | * | 744 | * |
@@ -763,7 +763,7 @@ u8 acpi_ut_get_resource_header_length(void *aml) | |||
763 | * | 763 | * |
764 | * FUNCTION: acpi_ut_get_descriptor_length | 764 | * FUNCTION: acpi_ut_get_descriptor_length |
765 | * | 765 | * |
766 | * PARAMETERS: Aml - Pointer to the raw AML resource descriptor | 766 | * PARAMETERS: aml - Pointer to the raw AML resource descriptor |
767 | * | 767 | * |
768 | * RETURN: Byte length | 768 | * RETURN: Byte length |
769 | * | 769 | * |
diff --git a/drivers/acpi/acpica/utstate.c b/drivers/acpi/acpica/utstate.c index 4267477c2797..a1c988260073 100644 --- a/drivers/acpi/acpica/utstate.c +++ b/drivers/acpi/acpica/utstate.c | |||
@@ -51,8 +51,8 @@ ACPI_MODULE_NAME("utstate") | |||
51 | * | 51 | * |
52 | * FUNCTION: acpi_ut_create_pkg_state_and_push | 52 | * FUNCTION: acpi_ut_create_pkg_state_and_push |
53 | * | 53 | * |
54 | * PARAMETERS: Object - Object to be added to the new state | 54 | * PARAMETERS: object - Object to be added to the new state |
55 | * Action - Increment/Decrement | 55 | * action - Increment/Decrement |
56 | * state_list - List the state will be added to | 56 | * state_list - List the state will be added to |
57 | * | 57 | * |
58 | * RETURN: Status | 58 | * RETURN: Status |
@@ -85,7 +85,7 @@ acpi_ut_create_pkg_state_and_push(void *internal_object, | |||
85 | * FUNCTION: acpi_ut_push_generic_state | 85 | * FUNCTION: acpi_ut_push_generic_state |
86 | * | 86 | * |
87 | * PARAMETERS: list_head - Head of the state stack | 87 | * PARAMETERS: list_head - Head of the state stack |
88 | * State - State object to push | 88 | * state - State object to push |
89 | * | 89 | * |
90 | * RETURN: None | 90 | * RETURN: None |
91 | * | 91 | * |
@@ -214,8 +214,8 @@ struct acpi_thread_state *acpi_ut_create_thread_state(void) | |||
214 | * | 214 | * |
215 | * FUNCTION: acpi_ut_create_update_state | 215 | * FUNCTION: acpi_ut_create_update_state |
216 | * | 216 | * |
217 | * PARAMETERS: Object - Initial Object to be installed in the state | 217 | * PARAMETERS: object - Initial Object to be installed in the state |
218 | * Action - Update action to be performed | 218 | * action - Update action to be performed |
219 | * | 219 | * |
220 | * RETURN: New state object, null on failure | 220 | * RETURN: New state object, null on failure |
221 | * | 221 | * |
@@ -252,8 +252,8 @@ union acpi_generic_state *acpi_ut_create_update_state(union acpi_operand_object | |||
252 | * | 252 | * |
253 | * FUNCTION: acpi_ut_create_pkg_state | 253 | * FUNCTION: acpi_ut_create_pkg_state |
254 | * | 254 | * |
255 | * PARAMETERS: Object - Initial Object to be installed in the state | 255 | * PARAMETERS: object - Initial Object to be installed in the state |
256 | * Action - Update action to be performed | 256 | * action - Update action to be performed |
257 | * | 257 | * |
258 | * RETURN: New state object, null on failure | 258 | * RETURN: New state object, null on failure |
259 | * | 259 | * |
@@ -325,7 +325,7 @@ union acpi_generic_state *acpi_ut_create_control_state(void) | |||
325 | * | 325 | * |
326 | * FUNCTION: acpi_ut_delete_generic_state | 326 | * FUNCTION: acpi_ut_delete_generic_state |
327 | * | 327 | * |
328 | * PARAMETERS: State - The state object to be deleted | 328 | * PARAMETERS: state - The state object to be deleted |
329 | * | 329 | * |
330 | * RETURN: None | 330 | * RETURN: None |
331 | * | 331 | * |
diff --git a/drivers/acpi/acpica/utxface.c b/drivers/acpi/acpica/utxface.c index afa94f51ff0b..534179f1177b 100644 --- a/drivers/acpi/acpica/utxface.c +++ b/drivers/acpi/acpica/utxface.c | |||
@@ -131,7 +131,7 @@ acpi_status __init acpi_initialize_subsystem(void) | |||
131 | * | 131 | * |
132 | * FUNCTION: acpi_enable_subsystem | 132 | * FUNCTION: acpi_enable_subsystem |
133 | * | 133 | * |
134 | * PARAMETERS: Flags - Init/enable Options | 134 | * PARAMETERS: flags - Init/enable Options |
135 | * | 135 | * |
136 | * RETURN: Status | 136 | * RETURN: Status |
137 | * | 137 | * |
@@ -234,7 +234,7 @@ ACPI_EXPORT_SYMBOL(acpi_enable_subsystem) | |||
234 | * | 234 | * |
235 | * FUNCTION: acpi_initialize_objects | 235 | * FUNCTION: acpi_initialize_objects |
236 | * | 236 | * |
237 | * PARAMETERS: Flags - Init/enable Options | 237 | * PARAMETERS: flags - Init/enable Options |
238 | * | 238 | * |
239 | * RETURN: Status | 239 | * RETURN: Status |
240 | * | 240 | * |
@@ -409,7 +409,7 @@ ACPI_EXPORT_SYMBOL(acpi_subsystem_status) | |||
409 | * PARAMETERS: out_buffer - A buffer to receive the resources for the | 409 | * PARAMETERS: out_buffer - A buffer to receive the resources for the |
410 | * device | 410 | * device |
411 | * | 411 | * |
412 | * RETURN: Status - the status of the call | 412 | * RETURN: status - the status of the call |
413 | * | 413 | * |
414 | * DESCRIPTION: This function is called to get information about the current | 414 | * DESCRIPTION: This function is called to get information about the current |
415 | * state of the ACPI subsystem. It will return system information | 415 | * state of the ACPI subsystem. It will return system information |
@@ -480,8 +480,8 @@ ACPI_EXPORT_SYMBOL(acpi_get_system_info) | |||
480 | * | 480 | * |
481 | * FUNCTION: acpi_install_initialization_handler | 481 | * FUNCTION: acpi_install_initialization_handler |
482 | * | 482 | * |
483 | * PARAMETERS: Handler - Callback procedure | 483 | * PARAMETERS: handler - Callback procedure |
484 | * Function - Not (currently) used, see below | 484 | * function - Not (currently) used, see below |
485 | * | 485 | * |
486 | * RETURN: Status | 486 | * RETURN: Status |
487 | * | 487 | * |
@@ -618,7 +618,7 @@ ACPI_EXPORT_SYMBOL(acpi_remove_interface) | |||
618 | * | 618 | * |
619 | * FUNCTION: acpi_install_interface_handler | 619 | * FUNCTION: acpi_install_interface_handler |
620 | * | 620 | * |
621 | * PARAMETERS: Handler - The _OSI interface handler to install | 621 | * PARAMETERS: handler - The _OSI interface handler to install |
622 | * NULL means "remove existing handler" | 622 | * NULL means "remove existing handler" |
623 | * | 623 | * |
624 | * RETURN: Status | 624 | * RETURN: Status |
@@ -651,9 +651,9 @@ ACPI_EXPORT_SYMBOL(acpi_install_interface_handler) | |||
651 | * FUNCTION: acpi_check_address_range | 651 | * FUNCTION: acpi_check_address_range |
652 | * | 652 | * |
653 | * PARAMETERS: space_id - Address space ID | 653 | * PARAMETERS: space_id - Address space ID |
654 | * Address - Start address | 654 | * address - Start address |
655 | * Length - Length | 655 | * length - Length |
656 | * Warn - TRUE if warning on overlap desired | 656 | * warn - TRUE if warning on overlap desired |
657 | * | 657 | * |
658 | * RETURN: Count of the number of conflicts detected. | 658 | * RETURN: Count of the number of conflicts detected. |
659 | * | 659 | * |
diff --git a/drivers/acpi/acpica/utxferror.c b/drivers/acpi/acpica/utxferror.c index 52b568af1819..6d63cc39b9ae 100644 --- a/drivers/acpi/acpica/utxferror.c +++ b/drivers/acpi/acpica/utxferror.c | |||
@@ -53,7 +53,7 @@ ACPI_MODULE_NAME("utxferror") | |||
53 | * This module is used for the in-kernel ACPICA as well as the ACPICA | 53 | * This module is used for the in-kernel ACPICA as well as the ACPICA |
54 | * tools/applications. | 54 | * tools/applications. |
55 | * | 55 | * |
56 | * For the i_aSL compiler case, the output is redirected to stderr so that | 56 | * For the iASL compiler case, the output is redirected to stderr so that |
57 | * any of the various ACPI errors and warnings do not appear in the output | 57 | * any of the various ACPI errors and warnings do not appear in the output |
58 | * files, for either the compiler or disassembler portions of the tool. | 58 | * files, for either the compiler or disassembler portions of the tool. |
59 | */ | 59 | */ |
@@ -70,7 +70,7 @@ extern FILE *acpi_gbl_output_file; | |||
70 | 70 | ||
71 | #else | 71 | #else |
72 | /* | 72 | /* |
73 | * non-i_aSL case - no redirection, nothing to do | 73 | * non-iASL case - no redirection, nothing to do |
74 | */ | 74 | */ |
75 | #define ACPI_MSG_REDIRECT_BEGIN | 75 | #define ACPI_MSG_REDIRECT_BEGIN |
76 | #define ACPI_MSG_REDIRECT_END | 76 | #define ACPI_MSG_REDIRECT_END |
@@ -82,6 +82,8 @@ extern FILE *acpi_gbl_output_file; | |||
82 | #define ACPI_MSG_EXCEPTION "ACPI Exception: " | 82 | #define ACPI_MSG_EXCEPTION "ACPI Exception: " |
83 | #define ACPI_MSG_WARNING "ACPI Warning: " | 83 | #define ACPI_MSG_WARNING "ACPI Warning: " |
84 | #define ACPI_MSG_INFO "ACPI: " | 84 | #define ACPI_MSG_INFO "ACPI: " |
85 | #define ACPI_MSG_BIOS_ERROR "ACPI BIOS Bug: Error: " | ||
86 | #define ACPI_MSG_BIOS_WARNING "ACPI BIOS Bug: Warning: " | ||
85 | /* | 87 | /* |
86 | * Common message suffix | 88 | * Common message suffix |
87 | */ | 89 | */ |
@@ -93,7 +95,7 @@ extern FILE *acpi_gbl_output_file; | |||
93 | * | 95 | * |
94 | * PARAMETERS: module_name - Caller's module name (for error output) | 96 | * PARAMETERS: module_name - Caller's module name (for error output) |
95 | * line_number - Caller's line number (for error output) | 97 | * line_number - Caller's line number (for error output) |
96 | * Format - Printf format string + additional args | 98 | * format - Printf format string + additional args |
97 | * | 99 | * |
98 | * RETURN: None | 100 | * RETURN: None |
99 | * | 101 | * |
@@ -124,8 +126,8 @@ ACPI_EXPORT_SYMBOL(acpi_error) | |||
124 | * | 126 | * |
125 | * PARAMETERS: module_name - Caller's module name (for error output) | 127 | * PARAMETERS: module_name - Caller's module name (for error output) |
126 | * line_number - Caller's line number (for error output) | 128 | * line_number - Caller's line number (for error output) |
127 | * Status - Status to be formatted | 129 | * status - Status to be formatted |
128 | * Format - Printf format string + additional args | 130 | * format - Printf format string + additional args |
129 | * | 131 | * |
130 | * RETURN: None | 132 | * RETURN: None |
131 | * | 133 | * |
@@ -159,7 +161,7 @@ ACPI_EXPORT_SYMBOL(acpi_exception) | |||
159 | * | 161 | * |
160 | * PARAMETERS: module_name - Caller's module name (for error output) | 162 | * PARAMETERS: module_name - Caller's module name (for error output) |
161 | * line_number - Caller's line number (for error output) | 163 | * line_number - Caller's line number (for error output) |
162 | * Format - Printf format string + additional args | 164 | * format - Printf format string + additional args |
163 | * | 165 | * |
164 | * RETURN: None | 166 | * RETURN: None |
165 | * | 167 | * |
@@ -190,7 +192,7 @@ ACPI_EXPORT_SYMBOL(acpi_warning) | |||
190 | * | 192 | * |
191 | * PARAMETERS: module_name - Caller's module name (for error output) | 193 | * PARAMETERS: module_name - Caller's module name (for error output) |
192 | * line_number - Caller's line number (for error output) | 194 | * line_number - Caller's line number (for error output) |
193 | * Format - Printf format string + additional args | 195 | * format - Printf format string + additional args |
194 | * | 196 | * |
195 | * RETURN: None | 197 | * RETURN: None |
196 | * | 198 | * |
@@ -218,6 +220,72 @@ acpi_info(const char *module_name, u32 line_number, const char *format, ...) | |||
218 | 220 | ||
219 | ACPI_EXPORT_SYMBOL(acpi_info) | 221 | ACPI_EXPORT_SYMBOL(acpi_info) |
220 | 222 | ||
223 | /******************************************************************************* | ||
224 | * | ||
225 | * FUNCTION: acpi_bios_error | ||
226 | * | ||
227 | * PARAMETERS: module_name - Caller's module name (for error output) | ||
228 | * line_number - Caller's line number (for error output) | ||
229 | * format - Printf format string + additional args | ||
230 | * | ||
231 | * RETURN: None | ||
232 | * | ||
233 | * DESCRIPTION: Print "ACPI Firmware Error" message with module/line/version | ||
234 | * info | ||
235 | * | ||
236 | ******************************************************************************/ | ||
237 | void ACPI_INTERNAL_VAR_XFACE | ||
238 | acpi_bios_error(const char *module_name, | ||
239 | u32 line_number, const char *format, ...) | ||
240 | { | ||
241 | va_list arg_list; | ||
242 | |||
243 | ACPI_MSG_REDIRECT_BEGIN; | ||
244 | acpi_os_printf(ACPI_MSG_BIOS_ERROR); | ||
245 | |||
246 | va_start(arg_list, format); | ||
247 | acpi_os_vprintf(format, arg_list); | ||
248 | ACPI_MSG_SUFFIX; | ||
249 | va_end(arg_list); | ||
250 | |||
251 | ACPI_MSG_REDIRECT_END; | ||
252 | } | ||
253 | |||
254 | ACPI_EXPORT_SYMBOL(acpi_bios_error) | ||
255 | |||
256 | /******************************************************************************* | ||
257 | * | ||
258 | * FUNCTION: acpi_bios_warning | ||
259 | * | ||
260 | * PARAMETERS: module_name - Caller's module name (for error output) | ||
261 | * line_number - Caller's line number (for error output) | ||
262 | * format - Printf format string + additional args | ||
263 | * | ||
264 | * RETURN: None | ||
265 | * | ||
266 | * DESCRIPTION: Print "ACPI Firmware Warning" message with module/line/version | ||
267 | * info | ||
268 | * | ||
269 | ******************************************************************************/ | ||
270 | void ACPI_INTERNAL_VAR_XFACE | ||
271 | acpi_bios_warning(const char *module_name, | ||
272 | u32 line_number, const char *format, ...) | ||
273 | { | ||
274 | va_list arg_list; | ||
275 | |||
276 | ACPI_MSG_REDIRECT_BEGIN; | ||
277 | acpi_os_printf(ACPI_MSG_BIOS_WARNING); | ||
278 | |||
279 | va_start(arg_list, format); | ||
280 | acpi_os_vprintf(format, arg_list); | ||
281 | ACPI_MSG_SUFFIX; | ||
282 | va_end(arg_list); | ||
283 | |||
284 | ACPI_MSG_REDIRECT_END; | ||
285 | } | ||
286 | |||
287 | ACPI_EXPORT_SYMBOL(acpi_bios_warning) | ||
288 | |||
221 | /* | 289 | /* |
222 | * The remainder of this module contains internal error functions that may | 290 | * The remainder of this module contains internal error functions that may |
223 | * be configured out. | 291 | * be configured out. |
@@ -271,9 +339,9 @@ acpi_ut_predefined_warning(const char *module_name, | |||
271 | * | 339 | * |
272 | * PARAMETERS: module_name - Caller's module name (for error output) | 340 | * PARAMETERS: module_name - Caller's module name (for error output) |
273 | * line_number - Caller's line number (for error output) | 341 | * line_number - Caller's line number (for error output) |
274 | * Pathname - Full pathname to the node | 342 | * pathname - Full pathname to the node |
275 | * node_flags - From Namespace node for the method/object | 343 | * node_flags - From Namespace node for the method/object |
276 | * Format - Printf format string + additional args | 344 | * format - Printf format string + additional args |
277 | * | 345 | * |
278 | * RETURN: None | 346 | * RETURN: None |
279 | * | 347 | * |
@@ -373,9 +441,9 @@ acpi_ut_namespace_error(const char *module_name, | |||
373 | * | 441 | * |
374 | * PARAMETERS: module_name - Caller's module name (for error output) | 442 | * PARAMETERS: module_name - Caller's module name (for error output) |
375 | * line_number - Caller's line number (for error output) | 443 | * line_number - Caller's line number (for error output) |
376 | * Message - Error message to use on failure | 444 | * message - Error message to use on failure |
377 | * prefix_node - Prefix relative to the path | 445 | * prefix_node - Prefix relative to the path |
378 | * Path - Path to the node (optional) | 446 | * path - Path to the node (optional) |
379 | * method_status - Execution status | 447 | * method_status - Execution status |
380 | * | 448 | * |
381 | * RETURN: None | 449 | * RETURN: None |
diff --git a/drivers/acpi/acpica/utxfmutex.c b/drivers/acpi/acpica/utxfmutex.c index 1427d191d15a..0a40a851b354 100644 --- a/drivers/acpi/acpica/utxfmutex.c +++ b/drivers/acpi/acpica/utxfmutex.c | |||
@@ -58,8 +58,8 @@ acpi_ut_get_mutex_object(acpi_handle handle, | |||
58 | * | 58 | * |
59 | * FUNCTION: acpi_ut_get_mutex_object | 59 | * FUNCTION: acpi_ut_get_mutex_object |
60 | * | 60 | * |
61 | * PARAMETERS: Handle - Mutex or prefix handle (optional) | 61 | * PARAMETERS: handle - Mutex or prefix handle (optional) |
62 | * Pathname - Mutex pathname (optional) | 62 | * pathname - Mutex pathname (optional) |
63 | * ret_obj - Where the mutex object is returned | 63 | * ret_obj - Where the mutex object is returned |
64 | * | 64 | * |
65 | * RETURN: Status | 65 | * RETURN: Status |
@@ -118,9 +118,9 @@ acpi_ut_get_mutex_object(acpi_handle handle, | |||
118 | * | 118 | * |
119 | * FUNCTION: acpi_acquire_mutex | 119 | * FUNCTION: acpi_acquire_mutex |
120 | * | 120 | * |
121 | * PARAMETERS: Handle - Mutex or prefix handle (optional) | 121 | * PARAMETERS: handle - Mutex or prefix handle (optional) |
122 | * Pathname - Mutex pathname (optional) | 122 | * pathname - Mutex pathname (optional) |
123 | * Timeout - Max time to wait for the lock (millisec) | 123 | * timeout - Max time to wait for the lock (millisec) |
124 | * | 124 | * |
125 | * RETURN: Status | 125 | * RETURN: Status |
126 | * | 126 | * |
@@ -155,8 +155,8 @@ acpi_acquire_mutex(acpi_handle handle, acpi_string pathname, u16 timeout) | |||
155 | * | 155 | * |
156 | * FUNCTION: acpi_release_mutex | 156 | * FUNCTION: acpi_release_mutex |
157 | * | 157 | * |
158 | * PARAMETERS: Handle - Mutex or prefix handle (optional) | 158 | * PARAMETERS: handle - Mutex or prefix handle (optional) |
159 | * Pathname - Mutex pathname (optional) | 159 | * pathname - Mutex pathname (optional) |
160 | * | 160 | * |
161 | * RETURN: Status | 161 | * RETURN: Status |
162 | * | 162 | * |
diff --git a/drivers/acpi/apei/apei-base.c b/drivers/acpi/apei/apei-base.c index 6686b1eaf13e..00a783661d0b 100644 --- a/drivers/acpi/apei/apei-base.c +++ b/drivers/acpi/apei/apei-base.c | |||
@@ -586,6 +586,11 @@ static int apei_check_gar(struct acpi_generic_address *reg, u64 *paddr, | |||
586 | } | 586 | } |
587 | *access_bit_width = 1UL << (access_size_code + 2); | 587 | *access_bit_width = 1UL << (access_size_code + 2); |
588 | 588 | ||
589 | /* Fixup common BIOS bug */ | ||
590 | if (bit_width == 32 && bit_offset == 0 && (*paddr & 0x03) == 0 && | ||
591 | *access_bit_width < 32) | ||
592 | *access_bit_width = 32; | ||
593 | |||
589 | if ((bit_width + bit_offset) > *access_bit_width) { | 594 | if ((bit_width + bit_offset) > *access_bit_width) { |
590 | pr_warning(FW_BUG APEI_PFX | 595 | pr_warning(FW_BUG APEI_PFX |
591 | "Invalid bit width + offset in GAR [0x%llx/%u/%u/%u/%u]\n", | 596 | "Invalid bit width + offset in GAR [0x%llx/%u/%u/%u/%u]\n", |
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index 023f9c8534d0..ff2c876ec412 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c | |||
@@ -250,6 +250,13 @@ static int acpi_battery_get_property(struct power_supply *psy, | |||
250 | else | 250 | else |
251 | val->intval = battery->capacity_now * 1000; | 251 | val->intval = battery->capacity_now * 1000; |
252 | break; | 252 | break; |
253 | case POWER_SUPPLY_PROP_CAPACITY: | ||
254 | if (battery->capacity_now && battery->full_charge_capacity) | ||
255 | val->intval = battery->capacity_now * 100/ | ||
256 | battery->full_charge_capacity; | ||
257 | else | ||
258 | val->intval = 0; | ||
259 | break; | ||
253 | case POWER_SUPPLY_PROP_MODEL_NAME: | 260 | case POWER_SUPPLY_PROP_MODEL_NAME: |
254 | val->strval = battery->model_number; | 261 | val->strval = battery->model_number; |
255 | break; | 262 | break; |
@@ -276,6 +283,7 @@ static enum power_supply_property charge_battery_props[] = { | |||
276 | POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN, | 283 | POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN, |
277 | POWER_SUPPLY_PROP_CHARGE_FULL, | 284 | POWER_SUPPLY_PROP_CHARGE_FULL, |
278 | POWER_SUPPLY_PROP_CHARGE_NOW, | 285 | POWER_SUPPLY_PROP_CHARGE_NOW, |
286 | POWER_SUPPLY_PROP_CAPACITY, | ||
279 | POWER_SUPPLY_PROP_MODEL_NAME, | 287 | POWER_SUPPLY_PROP_MODEL_NAME, |
280 | POWER_SUPPLY_PROP_MANUFACTURER, | 288 | POWER_SUPPLY_PROP_MANUFACTURER, |
281 | POWER_SUPPLY_PROP_SERIAL_NUMBER, | 289 | POWER_SUPPLY_PROP_SERIAL_NUMBER, |
@@ -292,6 +300,7 @@ static enum power_supply_property energy_battery_props[] = { | |||
292 | POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN, | 300 | POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN, |
293 | POWER_SUPPLY_PROP_ENERGY_FULL, | 301 | POWER_SUPPLY_PROP_ENERGY_FULL, |
294 | POWER_SUPPLY_PROP_ENERGY_NOW, | 302 | POWER_SUPPLY_PROP_ENERGY_NOW, |
303 | POWER_SUPPLY_PROP_CAPACITY, | ||
295 | POWER_SUPPLY_PROP_MODEL_NAME, | 304 | POWER_SUPPLY_PROP_MODEL_NAME, |
296 | POWER_SUPPLY_PROP_MANUFACTURER, | 305 | POWER_SUPPLY_PROP_MANUFACTURER, |
297 | POWER_SUPPLY_PROP_SERIAL_NUMBER, | 306 | POWER_SUPPLY_PROP_SERIAL_NUMBER, |
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index adceafda9c17..9628652e080c 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c | |||
@@ -574,6 +574,10 @@ static void acpi_bus_osc_support(void) | |||
574 | capbuf[OSC_SUPPORT_TYPE] |= OSC_SB_PPC_OST_SUPPORT; | 574 | capbuf[OSC_SUPPORT_TYPE] |= OSC_SB_PPC_OST_SUPPORT; |
575 | #endif | 575 | #endif |
576 | 576 | ||
577 | #ifdef ACPI_HOTPLUG_OST | ||
578 | capbuf[OSC_SUPPORT_TYPE] |= OSC_SB_HOTPLUG_OST_SUPPORT; | ||
579 | #endif | ||
580 | |||
577 | if (!ghes_disable) | 581 | if (!ghes_disable) |
578 | capbuf[OSC_SUPPORT_TYPE] |= OSC_SB_APEI_SUPPORT; | 582 | capbuf[OSC_SUPPORT_TYPE] |= OSC_SB_APEI_SUPPORT; |
579 | if (ACPI_FAILURE(acpi_get_handle(NULL, "\\_SB", &handle))) | 583 | if (ACPI_FAILURE(acpi_get_handle(NULL, "\\_SB", &handle))) |
diff --git a/drivers/acpi/container.c b/drivers/acpi/container.c index 45cd03b4630e..1f9f7d7d7bc5 100644 --- a/drivers/acpi/container.c +++ b/drivers/acpi/container.c | |||
@@ -158,9 +158,7 @@ static void container_notify_cb(acpi_handle handle, u32 type, void *context) | |||
158 | int result; | 158 | int result; |
159 | int present; | 159 | int present; |
160 | acpi_status status; | 160 | acpi_status status; |
161 | 161 | u32 ost_code = ACPI_OST_SC_NON_SPECIFIC_FAILURE; /* default */ | |
162 | |||
163 | present = is_device_present(handle); | ||
164 | 162 | ||
165 | switch (type) { | 163 | switch (type) { |
166 | case ACPI_NOTIFY_BUS_CHECK: | 164 | case ACPI_NOTIFY_BUS_CHECK: |
@@ -169,32 +167,47 @@ static void container_notify_cb(acpi_handle handle, u32 type, void *context) | |||
169 | printk(KERN_WARNING "Container driver received %s event\n", | 167 | printk(KERN_WARNING "Container driver received %s event\n", |
170 | (type == ACPI_NOTIFY_BUS_CHECK) ? | 168 | (type == ACPI_NOTIFY_BUS_CHECK) ? |
171 | "ACPI_NOTIFY_BUS_CHECK" : "ACPI_NOTIFY_DEVICE_CHECK"); | 169 | "ACPI_NOTIFY_BUS_CHECK" : "ACPI_NOTIFY_DEVICE_CHECK"); |
170 | |||
171 | present = is_device_present(handle); | ||
172 | status = acpi_bus_get_device(handle, &device); | 172 | status = acpi_bus_get_device(handle, &device); |
173 | if (present) { | 173 | if (!present) { |
174 | if (ACPI_FAILURE(status) || !device) { | ||
175 | result = container_device_add(&device, handle); | ||
176 | if (!result) | ||
177 | kobject_uevent(&device->dev.kobj, | ||
178 | KOBJ_ONLINE); | ||
179 | else | ||
180 | printk(KERN_WARNING | ||
181 | "Failed to add container\n"); | ||
182 | } | ||
183 | } else { | ||
184 | if (ACPI_SUCCESS(status)) { | 174 | if (ACPI_SUCCESS(status)) { |
185 | /* device exist and this is a remove request */ | 175 | /* device exist and this is a remove request */ |
176 | device->flags.eject_pending = 1; | ||
186 | kobject_uevent(&device->dev.kobj, KOBJ_OFFLINE); | 177 | kobject_uevent(&device->dev.kobj, KOBJ_OFFLINE); |
178 | return; | ||
187 | } | 179 | } |
180 | break; | ||
181 | } | ||
182 | |||
183 | if (!ACPI_FAILURE(status) || device) | ||
184 | break; | ||
185 | |||
186 | result = container_device_add(&device, handle); | ||
187 | if (result) { | ||
188 | printk(KERN_WARNING "Failed to add container\n"); | ||
189 | break; | ||
188 | } | 190 | } |
191 | |||
192 | kobject_uevent(&device->dev.kobj, KOBJ_ONLINE); | ||
193 | ost_code = ACPI_OST_SC_SUCCESS; | ||
189 | break; | 194 | break; |
195 | |||
190 | case ACPI_NOTIFY_EJECT_REQUEST: | 196 | case ACPI_NOTIFY_EJECT_REQUEST: |
191 | if (!acpi_bus_get_device(handle, &device) && device) { | 197 | if (!acpi_bus_get_device(handle, &device) && device) { |
198 | device->flags.eject_pending = 1; | ||
192 | kobject_uevent(&device->dev.kobj, KOBJ_OFFLINE); | 199 | kobject_uevent(&device->dev.kobj, KOBJ_OFFLINE); |
200 | return; | ||
193 | } | 201 | } |
194 | break; | 202 | break; |
203 | |||
195 | default: | 204 | default: |
196 | break; | 205 | /* non-hotplug event; possibly handled by other handler */ |
206 | return; | ||
197 | } | 207 | } |
208 | |||
209 | /* Inform firmware that the hotplug operation has completed */ | ||
210 | (void) acpi_evaluate_hotplug_ost(handle, type, ost_code, NULL); | ||
198 | return; | 211 | return; |
199 | } | 212 | } |
200 | 213 | ||
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index c3881b2eb8b2..9eaf708f5885 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c | |||
@@ -891,7 +891,7 @@ static void acpi_os_execute_deferred(struct work_struct *work) | |||
891 | struct acpi_os_dpc *dpc = container_of(work, struct acpi_os_dpc, work); | 891 | struct acpi_os_dpc *dpc = container_of(work, struct acpi_os_dpc, work); |
892 | 892 | ||
893 | if (dpc->wait) | 893 | if (dpc->wait) |
894 | acpi_os_wait_events_complete(NULL); | 894 | acpi_os_wait_events_complete(); |
895 | 895 | ||
896 | dpc->function(dpc->context); | 896 | dpc->function(dpc->context); |
897 | kfree(dpc); | 897 | kfree(dpc); |
@@ -987,7 +987,7 @@ acpi_status acpi_os_hotplug_execute(acpi_osd_exec_callback function, | |||
987 | return __acpi_os_execute(0, function, context, 1); | 987 | return __acpi_os_execute(0, function, context, 1); |
988 | } | 988 | } |
989 | 989 | ||
990 | void acpi_os_wait_events_complete(void *context) | 990 | void acpi_os_wait_events_complete(void) |
991 | { | 991 | { |
992 | flush_workqueue(kacpid_wq); | 992 | flush_workqueue(kacpid_wq); |
993 | flush_workqueue(kacpi_notify_wq); | 993 | flush_workqueue(kacpi_notify_wq); |
diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c index 7048b97853e0..ff8e04f2fab4 100644 --- a/drivers/acpi/processor_driver.c +++ b/drivers/acpi/processor_driver.c | |||
@@ -696,9 +696,9 @@ static void acpi_processor_hotplug_notify(acpi_handle handle, | |||
696 | { | 696 | { |
697 | struct acpi_processor *pr; | 697 | struct acpi_processor *pr; |
698 | struct acpi_device *device = NULL; | 698 | struct acpi_device *device = NULL; |
699 | u32 ost_code = ACPI_OST_SC_NON_SPECIFIC_FAILURE; /* default */ | ||
699 | int result; | 700 | int result; |
700 | 701 | ||
701 | |||
702 | switch (event) { | 702 | switch (event) { |
703 | case ACPI_NOTIFY_BUS_CHECK: | 703 | case ACPI_NOTIFY_BUS_CHECK: |
704 | case ACPI_NOTIFY_DEVICE_CHECK: | 704 | case ACPI_NOTIFY_DEVICE_CHECK: |
@@ -710,14 +710,18 @@ static void acpi_processor_hotplug_notify(acpi_handle handle, | |||
710 | if (!is_processor_present(handle)) | 710 | if (!is_processor_present(handle)) |
711 | break; | 711 | break; |
712 | 712 | ||
713 | if (acpi_bus_get_device(handle, &device)) { | 713 | if (!acpi_bus_get_device(handle, &device)) |
714 | result = acpi_processor_device_add(handle, &device); | 714 | break; |
715 | if (result) | 715 | |
716 | printk(KERN_ERR PREFIX | 716 | result = acpi_processor_device_add(handle, &device); |
717 | "Unable to add the device\n"); | 717 | if (result) { |
718 | printk(KERN_ERR PREFIX "Unable to add the device\n"); | ||
718 | break; | 719 | break; |
719 | } | 720 | } |
721 | |||
722 | ost_code = ACPI_OST_SC_SUCCESS; | ||
720 | break; | 723 | break; |
724 | |||
721 | case ACPI_NOTIFY_EJECT_REQUEST: | 725 | case ACPI_NOTIFY_EJECT_REQUEST: |
722 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 726 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
723 | "received ACPI_NOTIFY_EJECT_REQUEST\n")); | 727 | "received ACPI_NOTIFY_EJECT_REQUEST\n")); |
@@ -731,15 +735,23 @@ static void acpi_processor_hotplug_notify(acpi_handle handle, | |||
731 | if (!pr) { | 735 | if (!pr) { |
732 | printk(KERN_ERR PREFIX | 736 | printk(KERN_ERR PREFIX |
733 | "Driver data is NULL, dropping EJECT\n"); | 737 | "Driver data is NULL, dropping EJECT\n"); |
734 | return; | 738 | break; |
735 | } | 739 | } |
740 | |||
741 | /* REVISIT: update when eject is supported */ | ||
742 | ost_code = ACPI_OST_SC_EJECT_NOT_SUPPORTED; | ||
736 | break; | 743 | break; |
744 | |||
737 | default: | 745 | default: |
738 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 746 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
739 | "Unsupported event [0x%x]\n", event)); | 747 | "Unsupported event [0x%x]\n", event)); |
740 | break; | 748 | |
749 | /* non-hotplug event; possibly handled by other handler */ | ||
750 | return; | ||
741 | } | 751 | } |
742 | 752 | ||
753 | /* Inform firmware that the hotplug operation has completed */ | ||
754 | (void) acpi_evaluate_hotplug_ost(handle, event, ost_code, NULL); | ||
743 | return; | 755 | return; |
744 | } | 756 | } |
745 | 757 | ||
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index e589c1985248..ad3730b4038b 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
@@ -301,16 +301,16 @@ static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr) | |||
301 | pr->power.states[ACPI_STATE_C3].address = pr->pblk + 5; | 301 | pr->power.states[ACPI_STATE_C3].address = pr->pblk + 5; |
302 | 302 | ||
303 | /* determine latencies from FADT */ | 303 | /* determine latencies from FADT */ |
304 | pr->power.states[ACPI_STATE_C2].latency = acpi_gbl_FADT.C2latency; | 304 | pr->power.states[ACPI_STATE_C2].latency = acpi_gbl_FADT.c2_latency; |
305 | pr->power.states[ACPI_STATE_C3].latency = acpi_gbl_FADT.C3latency; | 305 | pr->power.states[ACPI_STATE_C3].latency = acpi_gbl_FADT.c3_latency; |
306 | 306 | ||
307 | /* | 307 | /* |
308 | * FADT specified C2 latency must be less than or equal to | 308 | * FADT specified C2 latency must be less than or equal to |
309 | * 100 microseconds. | 309 | * 100 microseconds. |
310 | */ | 310 | */ |
311 | if (acpi_gbl_FADT.C2latency > ACPI_PROCESSOR_MAX_C2_LATENCY) { | 311 | if (acpi_gbl_FADT.c2_latency > ACPI_PROCESSOR_MAX_C2_LATENCY) { |
312 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 312 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
313 | "C2 latency too large [%d]\n", acpi_gbl_FADT.C2latency)); | 313 | "C2 latency too large [%d]\n", acpi_gbl_FADT.c2_latency)); |
314 | /* invalidate C2 */ | 314 | /* invalidate C2 */ |
315 | pr->power.states[ACPI_STATE_C2].address = 0; | 315 | pr->power.states[ACPI_STATE_C2].address = 0; |
316 | } | 316 | } |
@@ -319,9 +319,9 @@ static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr) | |||
319 | * FADT supplied C3 latency must be less than or equal to | 319 | * FADT supplied C3 latency must be less than or equal to |
320 | * 1000 microseconds. | 320 | * 1000 microseconds. |
321 | */ | 321 | */ |
322 | if (acpi_gbl_FADT.C3latency > ACPI_PROCESSOR_MAX_C3_LATENCY) { | 322 | if (acpi_gbl_FADT.c3_latency > ACPI_PROCESSOR_MAX_C3_LATENCY) { |
323 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 323 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
324 | "C3 latency too large [%d]\n", acpi_gbl_FADT.C3latency)); | 324 | "C3 latency too large [%d]\n", acpi_gbl_FADT.c3_latency)); |
325 | /* invalidate C3 */ | 325 | /* invalidate C3 */ |
326 | pr->power.states[ACPI_STATE_C3].address = 0; | 326 | pr->power.states[ACPI_STATE_C3].address = 0; |
327 | } | 327 | } |
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index fdda49336560..d1ecca2b641a 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c | |||
@@ -83,19 +83,29 @@ acpi_device_modalias_show(struct device *dev, struct device_attribute *attr, cha | |||
83 | } | 83 | } |
84 | static DEVICE_ATTR(modalias, 0444, acpi_device_modalias_show, NULL); | 84 | static DEVICE_ATTR(modalias, 0444, acpi_device_modalias_show, NULL); |
85 | 85 | ||
86 | static void acpi_bus_hot_remove_device(void *context) | 86 | /** |
87 | * acpi_bus_hot_remove_device: hot-remove a device and its children | ||
88 | * @context: struct acpi_eject_event pointer (freed in this func) | ||
89 | * | ||
90 | * Hot-remove a device and its children. This function frees up the | ||
91 | * memory space passed by arg context, so that the caller may call | ||
92 | * this function asynchronously through acpi_os_hotplug_execute(). | ||
93 | */ | ||
94 | void acpi_bus_hot_remove_device(void *context) | ||
87 | { | 95 | { |
96 | struct acpi_eject_event *ej_event = (struct acpi_eject_event *) context; | ||
88 | struct acpi_device *device; | 97 | struct acpi_device *device; |
89 | acpi_handle handle = context; | 98 | acpi_handle handle = ej_event->handle; |
90 | struct acpi_object_list arg_list; | 99 | struct acpi_object_list arg_list; |
91 | union acpi_object arg; | 100 | union acpi_object arg; |
92 | acpi_status status = AE_OK; | 101 | acpi_status status = AE_OK; |
102 | u32 ost_code = ACPI_OST_SC_NON_SPECIFIC_FAILURE; /* default */ | ||
93 | 103 | ||
94 | if (acpi_bus_get_device(handle, &device)) | 104 | if (acpi_bus_get_device(handle, &device)) |
95 | return; | 105 | goto err_out; |
96 | 106 | ||
97 | if (!device) | 107 | if (!device) |
98 | return; | 108 | goto err_out; |
99 | 109 | ||
100 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 110 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
101 | "Hot-removing device %s...\n", dev_name(&device->dev))); | 111 | "Hot-removing device %s...\n", dev_name(&device->dev))); |
@@ -103,7 +113,7 @@ static void acpi_bus_hot_remove_device(void *context) | |||
103 | if (acpi_bus_trim(device, 1)) { | 113 | if (acpi_bus_trim(device, 1)) { |
104 | printk(KERN_ERR PREFIX | 114 | printk(KERN_ERR PREFIX |
105 | "Removing device failed\n"); | 115 | "Removing device failed\n"); |
106 | return; | 116 | goto err_out; |
107 | } | 117 | } |
108 | 118 | ||
109 | /* power off device */ | 119 | /* power off device */ |
@@ -129,10 +139,21 @@ static void acpi_bus_hot_remove_device(void *context) | |||
129 | * TBD: _EJD support. | 139 | * TBD: _EJD support. |
130 | */ | 140 | */ |
131 | status = acpi_evaluate_object(handle, "_EJ0", &arg_list, NULL); | 141 | status = acpi_evaluate_object(handle, "_EJ0", &arg_list, NULL); |
132 | if (ACPI_FAILURE(status)) | 142 | if (ACPI_FAILURE(status)) { |
133 | printk(KERN_WARNING PREFIX | 143 | if (status != AE_NOT_FOUND) |
134 | "Eject device failed\n"); | 144 | printk(KERN_WARNING PREFIX |
145 | "Eject device failed\n"); | ||
146 | goto err_out; | ||
147 | } | ||
148 | |||
149 | kfree(context); | ||
150 | return; | ||
135 | 151 | ||
152 | err_out: | ||
153 | /* Inform firmware the hot-remove operation has completed w/ error */ | ||
154 | (void) acpi_evaluate_hotplug_ost(handle, | ||
155 | ej_event->event, ost_code, NULL); | ||
156 | kfree(context); | ||
136 | return; | 157 | return; |
137 | } | 158 | } |
138 | 159 | ||
@@ -144,6 +165,7 @@ acpi_eject_store(struct device *d, struct device_attribute *attr, | |||
144 | acpi_status status; | 165 | acpi_status status; |
145 | acpi_object_type type = 0; | 166 | acpi_object_type type = 0; |
146 | struct acpi_device *acpi_device = to_acpi_device(d); | 167 | struct acpi_device *acpi_device = to_acpi_device(d); |
168 | struct acpi_eject_event *ej_event; | ||
147 | 169 | ||
148 | if ((!count) || (buf[0] != '1')) { | 170 | if ((!count) || (buf[0] != '1')) { |
149 | return -EINVAL; | 171 | return -EINVAL; |
@@ -160,7 +182,25 @@ acpi_eject_store(struct device *d, struct device_attribute *attr, | |||
160 | goto err; | 182 | goto err; |
161 | } | 183 | } |
162 | 184 | ||
163 | acpi_os_hotplug_execute(acpi_bus_hot_remove_device, acpi_device->handle); | 185 | ej_event = kmalloc(sizeof(*ej_event), GFP_KERNEL); |
186 | if (!ej_event) { | ||
187 | ret = -ENOMEM; | ||
188 | goto err; | ||
189 | } | ||
190 | |||
191 | ej_event->handle = acpi_device->handle; | ||
192 | if (acpi_device->flags.eject_pending) { | ||
193 | /* event originated from ACPI eject notification */ | ||
194 | ej_event->event = ACPI_NOTIFY_EJECT_REQUEST; | ||
195 | acpi_device->flags.eject_pending = 0; | ||
196 | } else { | ||
197 | /* event originated from user */ | ||
198 | ej_event->event = ACPI_OST_EC_OSPM_EJECT; | ||
199 | (void) acpi_evaluate_hotplug_ost(ej_event->handle, | ||
200 | ej_event->event, ACPI_OST_SC_EJECT_IN_PROGRESS, NULL); | ||
201 | } | ||
202 | |||
203 | acpi_os_hotplug_execute(acpi_bus_hot_remove_device, (void *)ej_event); | ||
164 | err: | 204 | err: |
165 | return ret; | 205 | return ret; |
166 | } | 206 | } |
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index 028dd425702c..7a7a9c929247 100644 --- a/drivers/acpi/sleep.c +++ b/drivers/acpi/sleep.c | |||
@@ -143,7 +143,7 @@ void __init acpi_old_suspend_ordering(void) | |||
143 | static int acpi_pm_freeze(void) | 143 | static int acpi_pm_freeze(void) |
144 | { | 144 | { |
145 | acpi_disable_all_gpes(); | 145 | acpi_disable_all_gpes(); |
146 | acpi_os_wait_events_complete(NULL); | 146 | acpi_os_wait_events_complete(); |
147 | acpi_ec_block_transactions(); | 147 | acpi_ec_block_transactions(); |
148 | return 0; | 148 | return 0; |
149 | } | 149 | } |
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 21dd4c268aef..9fe90e9fecb5 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c | |||
@@ -552,8 +552,6 @@ static int thermal_get_temp(struct thermal_zone_device *thermal, | |||
552 | return 0; | 552 | return 0; |
553 | } | 553 | } |
554 | 554 | ||
555 | static const char enabled[] = "kernel"; | ||
556 | static const char disabled[] = "user"; | ||
557 | static int thermal_get_mode(struct thermal_zone_device *thermal, | 555 | static int thermal_get_mode(struct thermal_zone_device *thermal, |
558 | enum thermal_device_mode *mode) | 556 | enum thermal_device_mode *mode) |
559 | { | 557 | { |
@@ -590,8 +588,8 @@ static int thermal_set_mode(struct thermal_zone_device *thermal, | |||
590 | if (enable != tz->tz_enabled) { | 588 | if (enable != tz->tz_enabled) { |
591 | tz->tz_enabled = enable; | 589 | tz->tz_enabled = enable; |
592 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 590 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
593 | "%s ACPI thermal control\n", | 591 | "%s kernel ACPI thermal control\n", |
594 | tz->tz_enabled ? enabled : disabled)); | 592 | tz->tz_enabled ? "Enable" : "Disable")); |
595 | acpi_thermal_check(tz); | 593 | acpi_thermal_check(tz); |
596 | } | 594 | } |
597 | return 0; | 595 | return 0; |
@@ -847,7 +845,7 @@ static int acpi_thermal_register_thermal_zone(struct acpi_thermal *tz) | |||
847 | 845 | ||
848 | if (tz->trips.passive.flags.valid) | 846 | if (tz->trips.passive.flags.valid) |
849 | tz->thermal_zone = | 847 | tz->thermal_zone = |
850 | thermal_zone_device_register("acpitz", trips, tz, | 848 | thermal_zone_device_register("acpitz", trips, 0, tz, |
851 | &acpi_thermal_zone_ops, | 849 | &acpi_thermal_zone_ops, |
852 | tz->trips.passive.tc1, | 850 | tz->trips.passive.tc1, |
853 | tz->trips.passive.tc2, | 851 | tz->trips.passive.tc2, |
@@ -855,7 +853,7 @@ static int acpi_thermal_register_thermal_zone(struct acpi_thermal *tz) | |||
855 | tz->polling_frequency*100); | 853 | tz->polling_frequency*100); |
856 | else | 854 | else |
857 | tz->thermal_zone = | 855 | tz->thermal_zone = |
858 | thermal_zone_device_register("acpitz", trips, tz, | 856 | thermal_zone_device_register("acpitz", trips, 0, tz, |
859 | &acpi_thermal_zone_ops, | 857 | &acpi_thermal_zone_ops, |
860 | 0, 0, 0, | 858 | 0, 0, 0, |
861 | tz->polling_frequency*100); | 859 | tz->polling_frequency*100); |
diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c index adbbc1c80a26..3e87c9c538aa 100644 --- a/drivers/acpi/utils.c +++ b/drivers/acpi/utils.c | |||
@@ -412,3 +412,45 @@ out: | |||
412 | return status; | 412 | return status; |
413 | } | 413 | } |
414 | EXPORT_SYMBOL(acpi_get_physical_device_location); | 414 | EXPORT_SYMBOL(acpi_get_physical_device_location); |
415 | |||
416 | /** | ||
417 | * acpi_evaluate_hotplug_ost: Evaluate _OST for hotplug operations | ||
418 | * @handle: ACPI device handle | ||
419 | * @source_event: source event code | ||
420 | * @status_code: status code | ||
421 | * @status_buf: optional detailed information (NULL if none) | ||
422 | * | ||
423 | * Evaluate _OST for hotplug operations. All ACPI hotplug handlers | ||
424 | * must call this function when evaluating _OST for hotplug operations. | ||
425 | * When the platform does not support _OST, this function has no effect. | ||
426 | */ | ||
427 | acpi_status | ||
428 | acpi_evaluate_hotplug_ost(acpi_handle handle, u32 source_event, | ||
429 | u32 status_code, struct acpi_buffer *status_buf) | ||
430 | { | ||
431 | #ifdef ACPI_HOTPLUG_OST | ||
432 | union acpi_object params[3] = { | ||
433 | {.type = ACPI_TYPE_INTEGER,}, | ||
434 | {.type = ACPI_TYPE_INTEGER,}, | ||
435 | {.type = ACPI_TYPE_BUFFER,} | ||
436 | }; | ||
437 | struct acpi_object_list arg_list = {3, params}; | ||
438 | acpi_status status; | ||
439 | |||
440 | params[0].integer.value = source_event; | ||
441 | params[1].integer.value = status_code; | ||
442 | if (status_buf != NULL) { | ||
443 | params[2].buffer.pointer = status_buf->pointer; | ||
444 | params[2].buffer.length = status_buf->length; | ||
445 | } else { | ||
446 | params[2].buffer.pointer = NULL; | ||
447 | params[2].buffer.length = 0; | ||
448 | } | ||
449 | |||
450 | status = acpi_evaluate_object(handle, "_OST", &arg_list, NULL); | ||
451 | return status; | ||
452 | #else | ||
453 | return AE_OK; | ||
454 | #endif | ||
455 | } | ||
456 | EXPORT_SYMBOL(acpi_evaluate_hotplug_ost); | ||