Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ACPICA: Clarify METHOD_NAME* defines for full-pathname cases

Changed the METHOD_NAME* defines that define a full pathname to
the method to METHOD_PATHNAME* in order to make it clear that
it is not a simple 4-character ACPI name. Used for the various
sleep/wake methods.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>

authored by

Bob Moore and committed by
Len Brown
4efeeecd dd0228e9

+28 -27
+11 -11
drivers/acpi/acpica/hwesleep.c
··· 59 59 * 60 60 * FUNCTION: acpi_hw_execute_sleep_method 61 61 * 62 - * PARAMETERS: method_name - Pathname of method to execute 62 + * PARAMETERS: method_pathname - Pathname of method to execute 63 63 * integer_argument - Argument to pass to the method 64 64 * 65 65 * RETURN: None ··· 68 68 * and no return value. 69 69 * 70 70 ******************************************************************************/ 71 - void acpi_hw_execute_sleep_method(char *method_name, u32 integer_argument) 71 + void acpi_hw_execute_sleep_method(char *method_pathname, u32 integer_argument) 72 72 { 73 73 struct acpi_object_list arg_list; 74 74 union acpi_object arg; ··· 76 76 77 77 ACPI_FUNCTION_TRACE(hw_execute_sleep_method); 78 78 79 - if (!ACPI_STRCMP(METHOD_NAME__GTS, method_name) && !gts) 79 + if (!ACPI_STRCMP(METHOD_PATHNAME__GTS, method_pathname) && !gts) 80 80 return_VOID; 81 81 82 - if (!ACPI_STRCMP(METHOD_NAME__BFS, method_name) && !bfs) 82 + if (!ACPI_STRCMP(METHOD_PATHNAME__BFS, method_pathname) && !bfs) 83 83 return_VOID; 84 84 85 85 /* One argument, integer_argument; No return value expected */ ··· 89 89 arg.type = ACPI_TYPE_INTEGER; 90 90 arg.integer.value = (u64)integer_argument; 91 91 92 - status = acpi_evaluate_object(NULL, method_name, &arg_list, NULL); 92 + status = acpi_evaluate_object(NULL, method_pathname, &arg_list, NULL); 93 93 if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { 94 94 ACPI_EXCEPTION((AE_INFO, status, "While executing method %s", 95 - method_name)); 95 + method_pathname)); 96 96 } 97 97 98 98 return_VOID; ··· 138 138 139 139 /* Execute the _GTS method (Going To Sleep) */ 140 140 141 - acpi_hw_execute_sleep_method(METHOD_NAME__GTS, sleep_state); 141 + acpi_hw_execute_sleep_method(METHOD_PATHNAME__GTS, sleep_state); 142 142 143 143 /* Flush caches, as per ACPI specification */ 144 144 ··· 208 208 &acpi_gbl_FADT.sleep_control); 209 209 } 210 210 211 - acpi_hw_execute_sleep_method(METHOD_NAME__BFS, sleep_state); 211 + acpi_hw_execute_sleep_method(METHOD_PATHNAME__BFS, sleep_state); 212 212 return_ACPI_STATUS(AE_OK); 213 213 } 214 214 ··· 235 235 236 236 /* Execute the wake methods */ 237 237 238 - acpi_hw_execute_sleep_method(METHOD_NAME__SST, ACPI_SST_WAKING); 239 - acpi_hw_execute_sleep_method(METHOD_NAME__WAK, sleep_state); 238 + acpi_hw_execute_sleep_method(METHOD_PATHNAME__SST, ACPI_SST_WAKING); 239 + acpi_hw_execute_sleep_method(METHOD_PATHNAME__WAK, sleep_state); 240 240 241 241 /* 242 242 * Some BIOS code assumes that WAK_STS will be cleared on resume ··· 246 246 (void)acpi_write(ACPI_X_WAKE_STATUS, &acpi_gbl_FADT.sleep_status); 247 247 acpi_gbl_system_awake_and_running = TRUE; 248 248 249 - acpi_hw_execute_sleep_method(METHOD_NAME__SST, ACPI_SST_WORKING); 249 + acpi_hw_execute_sleep_method(METHOD_PATHNAME__SST, ACPI_SST_WORKING); 250 250 return_ACPI_STATUS(AE_OK); 251 251 }
+5 -5
drivers/acpi/acpica/hwsleep.c
··· 123 123 124 124 /* Execute the _GTS method (Going To Sleep) */ 125 125 126 - acpi_hw_execute_sleep_method(METHOD_NAME__GTS, sleep_state); 126 + acpi_hw_execute_sleep_method(METHOD_PATHNAME__GTS, sleep_state); 127 127 128 128 /* Get current value of PM1A control */ 129 129 ··· 279 279 } 280 280 } 281 281 282 - acpi_hw_execute_sleep_method(METHOD_NAME__BFS, sleep_state); 282 + acpi_hw_execute_sleep_method(METHOD_PATHNAME__BFS, sleep_state); 283 283 return_ACPI_STATUS(status); 284 284 } 285 285 ··· 305 305 /* Ensure enter_sleep_state_prep -> enter_sleep_state ordering */ 306 306 307 307 acpi_gbl_sleep_type_a = ACPI_SLEEP_TYPE_INVALID; 308 - acpi_hw_execute_sleep_method(METHOD_NAME__SST, ACPI_SST_WAKING); 308 + acpi_hw_execute_sleep_method(METHOD_PATHNAME__SST, ACPI_SST_WAKING); 309 309 310 310 /* 311 311 * GPEs must be enabled before _WAK is called as GPEs ··· 329 329 * Now we can execute _WAK, etc. Some machines require that the GPEs 330 330 * are enabled before the wake methods are executed. 331 331 */ 332 - acpi_hw_execute_sleep_method(METHOD_NAME__WAK, sleep_state); 332 + acpi_hw_execute_sleep_method(METHOD_PATHNAME__WAK, sleep_state); 333 333 334 334 /* 335 335 * Some BIOS code assumes that WAK_STS will be cleared on resume ··· 361 361 return_ACPI_STATUS(status); 362 362 } 363 363 364 - acpi_hw_execute_sleep_method(METHOD_NAME__SST, ACPI_SST_WORKING); 364 + acpi_hw_execute_sleep_method(METHOD_PATHNAME__SST, ACPI_SST_WORKING); 365 365 return_ACPI_STATUS(status); 366 366 } 367 367
+3 -2
drivers/acpi/acpica/hwxfsleep.c
··· 306 306 arg.type = ACPI_TYPE_INTEGER; 307 307 arg.integer.value = sleep_state; 308 308 309 - status = acpi_evaluate_object(NULL, METHOD_NAME__PTS, &arg_list, NULL); 309 + status = 310 + acpi_evaluate_object(NULL, METHOD_PATHNAME__PTS, &arg_list, NULL); 310 311 if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { 311 312 return_ACPI_STATUS(status); 312 313 } ··· 338 337 * Set the system indicators to show the desired sleep state. 339 338 * _SST is an optional method (return no error if not found) 340 339 */ 341 - acpi_hw_execute_sleep_method(METHOD_NAME__SST, sst_value); 340 + acpi_hw_execute_sleep_method(METHOD_PATHNAME__SST, sst_value); 342 341 return_ACPI_STATUS(AE_OK); 343 342 } 344 343
+1 -1
drivers/acpi/acpica/nsdumpdv.c
··· 121 121 return; 122 122 } 123 123 124 - status = acpi_get_handle(NULL, ACPI_NS_SYSTEM_BUS, &sys_bus_handle); 124 + status = acpi_get_handle(NULL, METHOD_NAME__SB_, &sys_bus_handle); 125 125 if (ACPI_FAILURE(status)) { 126 126 return; 127 127 }
+2 -2
drivers/acpi/sleep.c
··· 788 788 { 789 789 acpi_handle dummy; 790 790 791 - if (ACPI_SUCCESS(acpi_get_handle(ACPI_ROOT_OBJECT, METHOD_NAME__GTS, &dummy))) 791 + if (ACPI_SUCCESS(acpi_get_handle(ACPI_ROOT_OBJECT, METHOD_PATHNAME__GTS, &dummy))) 792 792 { 793 793 printk(KERN_NOTICE PREFIX "BIOS offers _GTS\n"); 794 794 printk(KERN_NOTICE PREFIX "If \"acpi.gts=1\" improves suspend, " 795 795 "please notify linux-acpi@vger.kernel.org\n"); 796 796 } 797 - if (ACPI_SUCCESS(acpi_get_handle(ACPI_ROOT_OBJECT, METHOD_NAME__BFS, &dummy))) 797 + if (ACPI_SUCCESS(acpi_get_handle(ACPI_ROOT_OBJECT, METHOD_PATHNAME__BFS, &dummy))) 798 798 { 799 799 printk(KERN_NOTICE PREFIX "BIOS offers _BFS\n"); 800 800 printk(KERN_NOTICE PREFIX "If \"acpi.bfs=1\" improves resume, "
+6 -6
include/acpi/acnames.h
··· 46 46 47 47 /* Method names - these methods can appear anywhere in the namespace */ 48 48 49 + #define METHOD_NAME__SB_ "_SB_" 49 50 #define METHOD_NAME__HID "_HID" 50 51 #define METHOD_NAME__CID "_CID" 51 52 #define METHOD_NAME__UID "_UID" ··· 65 64 66 65 /* Method names - these methods must appear at the namespace root */ 67 66 68 - #define METHOD_NAME__BFS "\\_BFS" 69 - #define METHOD_NAME__GTS "\\_GTS" 70 - #define METHOD_NAME__PTS "\\_PTS" 71 - #define METHOD_NAME__SST "\\_SI._SST" 72 - #define METHOD_NAME__WAK "\\_WAK" 67 + #define METHOD_PATHNAME__BFS "\\_BFS" 68 + #define METHOD_PATHNAME__GTS "\\_GTS" 69 + #define METHOD_PATHNAME__PTS "\\_PTS" 70 + #define METHOD_PATHNAME__SST "\\_SI._SST" 71 + #define METHOD_PATHNAME__WAK "\\_WAK" 73 72 74 73 /* Definitions of the predefined namespace names */ 75 74 ··· 80 79 #define ACPI_PREFIX_LOWER (u32) 0x69706361 /* "acpi" */ 81 80 82 81 #define ACPI_NS_ROOT_PATH "\\" 83 - #define ACPI_NS_SYSTEM_BUS "_SB_" 84 82 85 83 #endif /* __ACNAMES_H__ */