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

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'acpi-5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI updates from Rafael Wysocki:
"These include an ACPICA update (to upstream revision 20190816),
improvements of support for memory hot-add in the HMAT handling code
and some assorted fixes and cleanups.

Specifics:

- Update the ACPICA code in the kernel to upstream revision 20190816
including:
* Internal limits change to support larger systems (Bob Moore).
* Macros clean up (Bob Moore).
* printf format string fixes (Bob Moore).
* Full deployment of the ACPI_PRINTF_LIKE macro (Bob Moore).
* Tools improvements (Bob Moore, Colin Ian King).
* Windows _OSI support fixes (Jung-uk Kim).

- Improve memory hot-add support in the ACPI HMAT handling code (Dan
Williams, Keith Busch).

- Fix the ACPI LPSS (Low-Power Subsystem) driver for Intel SoCs to
save and restore private registers during system-wide suspend and
resume on systems with the Lynxpoint PCH (Jarkko Nikula).

- Convert the ACPI documentation related to LEDs to ReST (Sakari
Ailus).

- Fix assorted issues and make assorted minor improvements in the
ACPI-related code (Al Stone, Andy Shevchenko, Jiri Slaby, Kelsey
Skunberg, Krzysztof Wilczynski, Liguang Zhang, Wenwen Wang,
YueHaibing)"

* tag 'acpi-5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (23 commits)
ACPI / PCI: fix acpi_pci_irq_enable() memory leak
ACPI: custom_method: fix memory leaks
ACPI: thermal: Remove redundant acpi_has_method() calls
ACPI / CPPC: do not require the _PSD method
ACPI: SBS: remove unused const variable 'SMBUS_PEC'
ACPI / LPSS: Save/restore LPSS private registers also on Lynxpoint
ACPI/PCI: Remove surplus parentheses from a return statement
ACPICA: Update version to 20190816.
ACPICA: Add "Windows 2019" string to _OSI support.
ACPICA: Differentiate Windows 8.1 from Windows 8.
ACPICA: Fully deploy ACPI_PRINTF_LIKE macro
ACPICA: iASL,acpi_dump: Improve y/n query
ACPICA: Fix issues with arg types within printf format strings
ACPICA: Macros: remove pointer math on a null pointer
ACPICA: Increase total number of possible Owner IDs
ACPICA: Debugger: remove redundant assignment on obj_desc
Documentation: ACPI: DSD: Convert LED documentation to ReST
ACPI / APEI: Release resources if gen_pool_add() fails
HMAT: Skip publishing target info for nodes with no online memory
HMAT: Register attributes for memory hot add
...

+287 -154
+16 -4
Documentation/acpi/dsd/leds.txt Documentation/firmware-guide/acpi/dsd/leds.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0 2 + .. include:: <isonum.txt> 3 + 4 + ======================================== 1 5 Describing and referring to LEDs in ACPI 6 + ======================================== 2 7 3 8 Individual LEDs are described by hierarchical data extension [6] nodes under the 4 9 device node, the LED driver chip. The "reg" property in the LED specific nodes ··· 30 25 followed by the referred object name. That object shall be named "LED" followed 31 26 by the number of the LED. 32 27 33 - An ASL example of a camera sensor device and a LED driver device for two LEDs. 34 - Objects not relevant for LEDs or the references to them have been omitted. 28 + Example 29 + ======= 30 + 31 + An ASL example of a camera sensor device and a LED driver device for two LEDs is 32 + show below. Objects not relevant for LEDs or the references to them have been 33 + omitted. :: 35 34 36 35 Device (LED) 37 36 { ··· 80 71 } 81 72 82 73 where 74 + :: 83 75 84 76 LED LED driver device 85 77 LED0 First LED 86 78 LED1 Second LED 87 - SEN Camera sensor device (or another device the LED is 88 - related to) 79 + SEN Camera sensor device (or another device the LED is related to) 80 + 81 + References 82 + ========== 89 83 90 84 [1] Device tree. <URL:http://www.devicetree.org>, referenced 2019-02-21. 91 85
+1
Documentation/firmware-guide/acpi/index.rst
··· 10 10 namespace 11 11 dsd/graph 12 12 dsd/data-node-references 13 + dsd/leds 13 14 enumeration 14 15 osi 15 16 method-customizing
+5 -3
drivers/acpi/acpi_lpss.c
··· 219 219 } 220 220 221 221 static const struct lpss_device_desc lpt_dev_desc = { 222 - .flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_CLK_DIVIDER | LPSS_LTR, 222 + .flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_CLK_DIVIDER | LPSS_LTR 223 + | LPSS_SAVE_CTX, 223 224 .prv_offset = 0x800, 224 225 }; 225 226 226 227 static const struct lpss_device_desc lpt_i2c_dev_desc = { 227 - .flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_LTR, 228 + .flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_LTR | LPSS_SAVE_CTX, 228 229 .prv_offset = 0x800, 229 230 }; 230 231 ··· 237 236 }; 238 237 239 238 static const struct lpss_device_desc lpt_uart_dev_desc = { 240 - .flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_CLK_DIVIDER | LPSS_LTR, 239 + .flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_CLK_DIVIDER | LPSS_LTR 240 + | LPSS_SAVE_CTX, 241 241 .clk_con_id = "baudclk", 242 242 .prv_offset = 0x800, 243 243 .setup = lpss_uart_setup,
+7 -3
drivers/acpi/acpi_processor.c
··· 279 279 } 280 280 281 281 if (acpi_duplicate_processor_id(pr->acpi_id)) { 282 - dev_err(&device->dev, 283 - "Failed to get unique processor _UID (0x%x)\n", 284 - pr->acpi_id); 282 + if (pr->acpi_id == 0xff) 283 + dev_info_once(&device->dev, 284 + "Entry not well-defined, consider updating BIOS\n"); 285 + else 286 + dev_err(&device->dev, 287 + "Failed to get unique processor _UID (0x%x)\n", 288 + pr->acpi_id); 285 289 return -ENODEV; 286 290 } 287 291
+2 -2
drivers/acpi/acpica/aclocal.h
··· 134 134 union acpi_operand_object *object; /* Interpreter object */ 135 135 u8 descriptor_type; /* Differentiate object descriptor types */ 136 136 u8 type; /* ACPI Type associated with this name */ 137 - u8 flags; /* Miscellaneous flags */ 138 - acpi_owner_id owner_id; /* Node creator */ 137 + u16 flags; /* Miscellaneous flags */ 139 138 union acpi_name_union name; /* ACPI Name, always 4 chars per ACPI spec */ 140 139 struct acpi_namespace_node *parent; /* Parent node */ 141 140 struct acpi_namespace_node *child; /* First child */ 142 141 struct acpi_namespace_node *peer; /* First peer */ 142 + acpi_owner_id owner_id; /* Node creator */ 143 143 144 144 /* 145 145 * The following fields are used by the ASL compiler and disassembler only
+1 -1
drivers/acpi/acpica/acobject.h
··· 153 153 } dispatch; 154 154 155 155 u32 aml_length; 156 - u8 thread_count; 157 156 acpi_owner_id owner_id; 157 + u8 thread_count; 158 158 }; 159 159 160 160 /* Flags for info_flags field above */
+1 -1
drivers/acpi/acpica/acstruct.h
··· 167 167 u32 return_flags; /* Used for return value analysis */ 168 168 u32 return_btype; /* Bitmapped type of the returned object */ 169 169 u16 param_count; /* Count of the input argument list */ 170 + u16 node_flags; /* Same as Node->Flags */ 170 171 u8 pass_number; /* Parser pass number */ 171 172 u8 return_object_type; /* Object type of the returned object */ 172 - u8 node_flags; /* Same as Node->Flags */ 173 173 u8 flags; /* General flags */ 174 174 }; 175 175
+7 -3
drivers/acpi/acpica/acutils.h
··· 686 686 /* 687 687 * utxferror - various error/warning output functions 688 688 */ 689 + ACPI_PRINTF_LIKE(5) 689 690 void ACPI_INTERNAL_VAR_XFACE 690 691 acpi_ut_predefined_warning(const char *module_name, 691 692 u32 line_number, 692 693 char *pathname, 693 - u8 node_flags, const char *format, ...); 694 + u16 node_flags, const char *format, ...); 694 695 696 + ACPI_PRINTF_LIKE(5) 695 697 void ACPI_INTERNAL_VAR_XFACE 696 698 acpi_ut_predefined_info(const char *module_name, 697 699 u32 line_number, 698 - char *pathname, u8 node_flags, const char *format, ...); 700 + char *pathname, 701 + u16 node_flags, const char *format, ...); 699 702 703 + ACPI_PRINTF_LIKE(5) 700 704 void ACPI_INTERNAL_VAR_XFACE 701 705 acpi_ut_predefined_bios_error(const char *module_name, 702 706 u32 line_number, 703 707 char *pathname, 704 - u8 node_flags, const char *format, ...); 708 + u16 node_flags, const char *format, ...); 705 709 706 710 void 707 711 acpi_ut_prefixed_namespace_error(const char *module_name,
+1 -1
drivers/acpi/acpica/dbhistry.c
··· 121 121 122 122 for (i = 0; i < acpi_gbl_num_history; i++) { 123 123 if (acpi_gbl_history_buffer[history_index].command) { 124 - acpi_os_printf("%3ld %s\n", 124 + acpi_os_printf("%3u %s\n", 125 125 acpi_gbl_history_buffer[history_index]. 126 126 cmd_num, 127 127 acpi_gbl_history_buffer[history_index].
+5 -5
drivers/acpi/acpica/dbinput.c
··· 593 593 input_buffer)) { 594 594 acpi_os_printf 595 595 ("Buffer overflow while parsing input line (max %u characters)\n", 596 - sizeof(acpi_gbl_db_parsed_buf)); 596 + (u32)sizeof(acpi_gbl_db_parsed_buf)); 597 597 return (0); 598 598 } 599 599 ··· 853 853 854 854 if (param_count == 0) { 855 855 acpi_os_printf 856 - ("Current debug level for file output is: %8.8lX\n", 856 + ("Current debug level for file output is: %8.8X\n", 857 857 acpi_gbl_db_debug_level); 858 858 acpi_os_printf 859 - ("Current debug level for console output is: %8.8lX\n", 859 + ("Current debug level for console output is: %8.8X\n", 860 860 acpi_gbl_db_console_debug_level); 861 861 } else if (param_count == 2) { 862 862 temp = acpi_gbl_db_console_debug_level; 863 863 acpi_gbl_db_console_debug_level = 864 864 strtoul(acpi_gbl_db_args[1], NULL, 16); 865 865 acpi_os_printf 866 - ("Debug Level for console output was %8.8lX, now %8.8lX\n", 866 + ("Debug Level for console output was %8.8X, now %8.8X\n", 867 867 temp, acpi_gbl_db_console_debug_level); 868 868 } else { 869 869 temp = acpi_gbl_db_debug_level; 870 870 acpi_gbl_db_debug_level = 871 871 strtoul(acpi_gbl_db_args[1], NULL, 16); 872 872 acpi_os_printf 873 - ("Debug Level for file output was %8.8lX, now %8.8lX\n", 873 + ("Debug Level for file output was %8.8X, now %8.8X\n", 874 874 temp, acpi_gbl_db_debug_level); 875 875 } 876 876 break;
+4
drivers/acpi/acpica/dbmethod.c
··· 302 302 } 303 303 304 304 status = acpi_ut_allocate_owner_id(&obj_desc->method.owner_id); 305 + if (ACPI_FAILURE(status)) { 306 + return (status); 307 + } 308 + 305 309 walk_state->owner_id = obj_desc->method.owner_id; 306 310 307 311 /* Push start scope on scope stack and make it current */
-1
drivers/acpi/acpica/dbobject.c
··· 394 394 u8 display_locals = FALSE; 395 395 396 396 node = walk_state->method_node; 397 - obj_desc = walk_state->method_desc; 398 397 399 398 /* There are no locals for the module-level code case */ 400 399
+45 -47
drivers/acpi/acpica/dbstats.c
··· 341 341 "ACPI_TYPE", "NODES", "OBJECTS"); 342 342 343 343 for (i = 0; i < ACPI_TYPE_NS_NODE_MAX; i++) { 344 - acpi_os_printf("%16.16s % 10ld% 10ld\n", 344 + acpi_os_printf("%16.16s %10u %10u\n", 345 345 acpi_ut_get_type_name(i), 346 346 acpi_gbl_node_type_count[i], 347 347 acpi_gbl_obj_type_count[i]); 348 348 } 349 349 350 - acpi_os_printf("%16.16s % 10ld% 10ld\n", "Misc/Unknown", 350 + acpi_os_printf("%16.16s %10u %10u\n", "Misc/Unknown", 351 351 acpi_gbl_node_type_count_misc, 352 352 acpi_gbl_obj_type_count_misc); 353 353 354 - acpi_os_printf("%16.16s % 10ld% 10ld\n", "TOTALS:", 354 + acpi_os_printf("%16.16s %10u %10u\n", "TOTALS:", 355 355 acpi_gbl_num_nodes, acpi_gbl_num_objects); 356 356 break; 357 357 ··· 379 379 case CMD_STAT_MISC: 380 380 381 381 acpi_os_printf("\nMiscellaneous Statistics:\n\n"); 382 - acpi_os_printf("Calls to AcpiPsFind:.. ........% 7ld\n", 382 + acpi_os_printf("%-28s: %7u\n", "Calls to AcpiPsFind", 383 383 acpi_gbl_ps_find_count); 384 - acpi_os_printf("Calls to AcpiNsLookup:..........% 7ld\n", 384 + acpi_os_printf("%-28s: %7u\n", "Calls to AcpiNsLookup", 385 385 acpi_gbl_ns_lookup_count); 386 386 387 - acpi_os_printf("\n"); 388 - 389 - acpi_os_printf("Mutex usage:\n\n"); 387 + acpi_os_printf("\nMutex usage:\n\n"); 390 388 for (i = 0; i < ACPI_NUM_MUTEX; i++) { 391 - acpi_os_printf("%-28s: % 7ld\n", 389 + acpi_os_printf("%-28s: %7u\n", 392 390 acpi_ut_get_mutex_name(i), 393 391 acpi_gbl_mutex_info[i].use_count); 394 392 } ··· 397 399 acpi_os_printf("\nInternal object sizes:\n\n"); 398 400 399 401 acpi_os_printf("Common %3d\n", 400 - sizeof(struct acpi_object_common)); 402 + (u32)sizeof(struct acpi_object_common)); 401 403 acpi_os_printf("Number %3d\n", 402 - sizeof(struct acpi_object_integer)); 404 + (u32)sizeof(struct acpi_object_integer)); 403 405 acpi_os_printf("String %3d\n", 404 - sizeof(struct acpi_object_string)); 406 + (u32)sizeof(struct acpi_object_string)); 405 407 acpi_os_printf("Buffer %3d\n", 406 - sizeof(struct acpi_object_buffer)); 408 + (u32)sizeof(struct acpi_object_buffer)); 407 409 acpi_os_printf("Package %3d\n", 408 - sizeof(struct acpi_object_package)); 410 + (u32)sizeof(struct acpi_object_package)); 409 411 acpi_os_printf("BufferField %3d\n", 410 - sizeof(struct acpi_object_buffer_field)); 412 + (u32)sizeof(struct acpi_object_buffer_field)); 411 413 acpi_os_printf("Device %3d\n", 412 - sizeof(struct acpi_object_device)); 414 + (u32)sizeof(struct acpi_object_device)); 413 415 acpi_os_printf("Event %3d\n", 414 - sizeof(struct acpi_object_event)); 416 + (u32)sizeof(struct acpi_object_event)); 415 417 acpi_os_printf("Method %3d\n", 416 - sizeof(struct acpi_object_method)); 418 + (u32)sizeof(struct acpi_object_method)); 417 419 acpi_os_printf("Mutex %3d\n", 418 - sizeof(struct acpi_object_mutex)); 420 + (u32)sizeof(struct acpi_object_mutex)); 419 421 acpi_os_printf("Region %3d\n", 420 - sizeof(struct acpi_object_region)); 422 + (u32)sizeof(struct acpi_object_region)); 421 423 acpi_os_printf("PowerResource %3d\n", 422 - sizeof(struct acpi_object_power_resource)); 424 + (u32)sizeof(struct acpi_object_power_resource)); 423 425 acpi_os_printf("Processor %3d\n", 424 - sizeof(struct acpi_object_processor)); 426 + (u32)sizeof(struct acpi_object_processor)); 425 427 acpi_os_printf("ThermalZone %3d\n", 426 - sizeof(struct acpi_object_thermal_zone)); 428 + (u32)sizeof(struct acpi_object_thermal_zone)); 427 429 acpi_os_printf("RegionField %3d\n", 428 - sizeof(struct acpi_object_region_field)); 430 + (u32)sizeof(struct acpi_object_region_field)); 429 431 acpi_os_printf("BankField %3d\n", 430 - sizeof(struct acpi_object_bank_field)); 432 + (u32)sizeof(struct acpi_object_bank_field)); 431 433 acpi_os_printf("IndexField %3d\n", 432 - sizeof(struct acpi_object_index_field)); 434 + (u32)sizeof(struct acpi_object_index_field)); 433 435 acpi_os_printf("Reference %3d\n", 434 - sizeof(struct acpi_object_reference)); 436 + (u32)sizeof(struct acpi_object_reference)); 435 437 acpi_os_printf("Notify %3d\n", 436 - sizeof(struct acpi_object_notify_handler)); 438 + (u32)sizeof(struct acpi_object_notify_handler)); 437 439 acpi_os_printf("AddressSpace %3d\n", 438 - sizeof(struct acpi_object_addr_handler)); 440 + (u32)sizeof(struct acpi_object_addr_handler)); 439 441 acpi_os_printf("Extra %3d\n", 440 - sizeof(struct acpi_object_extra)); 442 + (u32)sizeof(struct acpi_object_extra)); 441 443 acpi_os_printf("Data %3d\n", 442 - sizeof(struct acpi_object_data)); 444 + (u32)sizeof(struct acpi_object_data)); 443 445 444 446 acpi_os_printf("\n"); 445 447 446 448 acpi_os_printf("ParseObject %3d\n", 447 - sizeof(struct acpi_parse_obj_common)); 449 + (u32)sizeof(struct acpi_parse_obj_common)); 448 450 acpi_os_printf("ParseObjectNamed %3d\n", 449 - sizeof(struct acpi_parse_obj_named)); 451 + (u32)sizeof(struct acpi_parse_obj_named)); 450 452 acpi_os_printf("ParseObjectAsl %3d\n", 451 - sizeof(struct acpi_parse_obj_asl)); 453 + (u32)sizeof(struct acpi_parse_obj_asl)); 452 454 acpi_os_printf("OperandObject %3d\n", 453 - sizeof(union acpi_operand_object)); 455 + (u32)sizeof(union acpi_operand_object)); 454 456 acpi_os_printf("NamespaceNode %3d\n", 455 - sizeof(struct acpi_namespace_node)); 457 + (u32)sizeof(struct acpi_namespace_node)); 456 458 acpi_os_printf("AcpiObject %3d\n", 457 - sizeof(union acpi_object)); 459 + (u32)sizeof(union acpi_object)); 458 460 459 461 acpi_os_printf("\n"); 460 462 461 463 acpi_os_printf("Generic State %3d\n", 462 - sizeof(union acpi_generic_state)); 464 + (u32)sizeof(union acpi_generic_state)); 463 465 acpi_os_printf("Common State %3d\n", 464 - sizeof(struct acpi_common_state)); 466 + (u32)sizeof(struct acpi_common_state)); 465 467 acpi_os_printf("Control State %3d\n", 466 - sizeof(struct acpi_control_state)); 468 + (u32)sizeof(struct acpi_control_state)); 467 469 acpi_os_printf("Update State %3d\n", 468 - sizeof(struct acpi_update_state)); 470 + (u32)sizeof(struct acpi_update_state)); 469 471 acpi_os_printf("Scope State %3d\n", 470 - sizeof(struct acpi_scope_state)); 472 + (u32)sizeof(struct acpi_scope_state)); 471 473 acpi_os_printf("Parse Scope %3d\n", 472 - sizeof(struct acpi_pscope_state)); 474 + (u32)sizeof(struct acpi_pscope_state)); 473 475 acpi_os_printf("Package State %3d\n", 474 - sizeof(struct acpi_pkg_state)); 476 + (u32)sizeof(struct acpi_pkg_state)); 475 477 acpi_os_printf("Thread State %3d\n", 476 - sizeof(struct acpi_thread_state)); 478 + (u32)sizeof(struct acpi_thread_state)); 477 479 acpi_os_printf("Result Values %3d\n", 478 - sizeof(struct acpi_result_values)); 480 + (u32)sizeof(struct acpi_result_values)); 479 481 acpi_os_printf("Notify Info %3d\n", 480 - sizeof(struct acpi_notify_info)); 482 + (u32)sizeof(struct acpi_notify_info)); 481 483 break; 482 484 483 485 case CMD_STAT_STACK:
+3 -3
drivers/acpi/acpica/exdump.c
··· 94 94 "Parameter Count"}, 95 95 {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.sync_level), "Sync Level"}, 96 96 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(method.mutex), "Mutex"}, 97 - {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.owner_id), "Owner Id"}, 97 + {ACPI_EXD_UINT16, ACPI_EXD_OFFSET(method.owner_id), "Owner Id"}, 98 98 {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.thread_count), "Thread Count"}, 99 99 {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(method.aml_length), "Aml Length"}, 100 100 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(method.aml_start), "Aml Start"} ··· 269 269 270 270 static struct acpi_exdump_info acpi_ex_dump_node[7] = { 271 271 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_node), NULL}, 272 - {ACPI_EXD_UINT8, ACPI_EXD_NSOFFSET(flags), "Flags"}, 273 - {ACPI_EXD_UINT8, ACPI_EXD_NSOFFSET(owner_id), "Owner Id"}, 272 + {ACPI_EXD_UINT16, ACPI_EXD_NSOFFSET(flags), "Flags"}, 273 + {ACPI_EXD_UINT16, ACPI_EXD_NSOFFSET(owner_id), "Owner Id"}, 274 274 {ACPI_EXD_LIST, ACPI_EXD_NSOFFSET(object), "Object List"}, 275 275 {ACPI_EXD_NODE, ACPI_EXD_NSOFFSET(parent), "Parent"}, 276 276 {ACPI_EXD_NODE, ACPI_EXD_NSOFFSET(child), "Child"},
+1 -1
drivers/acpi/acpica/nsaccess.c
··· 598 598 if (flags & ACPI_NS_PREFIX_MUST_EXIST) { 599 599 acpi_os_printf(ACPI_MSG_BIOS_ERROR 600 600 "Object does not exist: %4.4s\n", 601 - &simple_name); 601 + (char *)&simple_name); 602 602 } 603 603 #endif 604 604 /* Name not found in ACPI namespace */
+1 -1
drivers/acpi/acpica/nsalloc.c
··· 241 241 node->type = (u8) type; 242 242 243 243 ACPI_DEBUG_PRINT((ACPI_DB_NAMES, 244 - "%4.4s (%s) [Node %p Owner %X] added to %4.4s (%s) [Node %p]\n", 244 + "%4.4s (%s) [Node %p Owner %3.3X] added to %4.4s (%s) [Node %p]\n", 245 245 acpi_ut_get_node_name(node), 246 246 acpi_ut_get_type_name(node->type), node, owner_id, 247 247 acpi_ut_get_node_name(parent_node),
+1 -1
drivers/acpi/acpica/nsdump.c
··· 197 197 198 198 /* Now we can print out the pertinent information */ 199 199 200 - acpi_os_printf(" %-12s %p %2.2X ", 200 + acpi_os_printf(" %-12s %p %3.3X ", 201 201 acpi_ut_get_type_name(type), this_node, 202 202 this_node->owner_id); 203 203
+1 -1
drivers/acpi/acpica/nsrepair2.c
··· 126 126 127 127 #define ACPI_FDE_FIELD_COUNT 5 128 128 #define ACPI_FDE_BYTE_BUFFER_SIZE 5 129 - #define ACPI_FDE_DWORD_BUFFER_SIZE (ACPI_FDE_FIELD_COUNT * sizeof (u32)) 129 + #define ACPI_FDE_DWORD_BUFFER_SIZE (ACPI_FDE_FIELD_COUNT * (u32) sizeof (u32)) 130 130 131 131 /****************************************************************************** 132 132 *
+1
drivers/acpi/acpica/tbdata.c
··· 750 750 if (ACPI_FAILURE(status)) { 751 751 return_ACPI_STATUS(status); 752 752 } 753 + 753 754 acpi_ns_delete_namespace_by_owner(owner_id); 754 755 acpi_ut_release_write_lock(&acpi_gbl_namespace_rw_lock); 755 756 return_ACPI_STATUS(status);
+2 -2
drivers/acpi/acpica/utdebug.c
··· 158 158 * Display the module name, current line number, thread ID (if requested), 159 159 * current procedure nesting level, and the current procedure name 160 160 */ 161 - acpi_os_printf("%9s-%04ld ", module_name, line_number); 161 + acpi_os_printf("%9s-%04d ", module_name, line_number); 162 162 163 163 #ifdef ACPI_APPLICATION 164 164 /* ··· 177 177 fill_count = 0; 178 178 } 179 179 180 - acpi_os_printf("[%02ld] %*s", 180 + acpi_os_printf("[%02d] %*s", 181 181 acpi_gbl_nesting_level, acpi_gbl_nesting_level + 1, " "); 182 182 acpi_os_printf("%s%*s: ", 183 183 acpi_ut_trim_function_name(function_name), fill_count,
+3 -3
drivers/acpi/acpica/uterror.c
··· 39 39 acpi_ut_predefined_warning(const char *module_name, 40 40 u32 line_number, 41 41 char *pathname, 42 - u8 node_flags, const char *format, ...) 42 + u16 node_flags, const char *format, ...) 43 43 { 44 44 va_list arg_list; 45 45 ··· 81 81 void ACPI_INTERNAL_VAR_XFACE 82 82 acpi_ut_predefined_info(const char *module_name, 83 83 u32 line_number, 84 - char *pathname, u8 node_flags, const char *format, ...) 84 + char *pathname, u16 node_flags, const char *format, ...) 85 85 { 86 86 va_list arg_list; 87 87 ··· 124 124 acpi_ut_predefined_bios_error(const char *module_name, 125 125 u32 line_number, 126 126 char *pathname, 127 - u8 node_flags, const char *format, ...) 127 + u16 node_flags, const char *format, ...) 128 128 { 129 129 va_list arg_list; 130 130
+2 -1
drivers/acpi/acpica/utosi.c
··· 65 65 {"Windows 2006 SP2", NULL, 0, ACPI_OSI_WIN_VISTA_SP2}, /* Windows Vista SP2 - Added 09/2010 */ 66 66 {"Windows 2009", NULL, 0, ACPI_OSI_WIN_7}, /* Windows 7 and Server 2008 R2 - Added 09/2009 */ 67 67 {"Windows 2012", NULL, 0, ACPI_OSI_WIN_8}, /* Windows 8 and Server 2012 - Added 08/2012 */ 68 - {"Windows 2013", NULL, 0, ACPI_OSI_WIN_8}, /* Windows 8.1 and Server 2012 R2 - Added 01/2014 */ 68 + {"Windows 2013", NULL, 0, ACPI_OSI_WIN_8_1}, /* Windows 8.1 and Server 2012 R2 - Added 01/2014 */ 69 69 {"Windows 2015", NULL, 0, ACPI_OSI_WIN_10}, /* Windows 10 - Added 03/2015 */ 70 70 {"Windows 2016", NULL, 0, ACPI_OSI_WIN_10_RS1}, /* Windows 10 version 1607 - Added 12/2017 */ 71 71 {"Windows 2017", NULL, 0, ACPI_OSI_WIN_10_RS2}, /* Windows 10 version 1703 - Added 12/2017 */ 72 72 {"Windows 2017.2", NULL, 0, ACPI_OSI_WIN_10_RS3}, /* Windows 10 version 1709 - Added 02/2018 */ 73 73 {"Windows 2018", NULL, 0, ACPI_OSI_WIN_10_RS4}, /* Windows 10 version 1803 - Added 11/2018 */ 74 74 {"Windows 2018.2", NULL, 0, ACPI_OSI_WIN_10_RS5}, /* Windows 10 version 1809 - Added 11/2018 */ 75 + {"Windows 2019", NULL, 0, ACPI_OSI_WIN_10_19H1}, /* Windows 10 version 1903 - Added 08/2019 */ 75 76 76 77 /* Feature Group Strings */ 77 78
+6 -6
drivers/acpi/acpica/utownerid.c
··· 38 38 39 39 if (*owner_id) { 40 40 ACPI_ERROR((AE_INFO, 41 - "Owner ID [0x%2.2X] already exists", *owner_id)); 41 + "Owner ID [0x%3.3X] already exists", *owner_id)); 42 42 return_ACPI_STATUS(AE_ALREADY_EXISTS); 43 43 } 44 44 ··· 88 88 /* 89 89 * Construct encoded ID from the index and bit position 90 90 * 91 - * Note: Last [j].k (bit 255) is never used and is marked 91 + * Note: Last [j].k (bit 4095) is never used and is marked 92 92 * permanently allocated (prevents +1 overflow) 93 93 */ 94 94 *owner_id = 95 95 (acpi_owner_id)((k + 1) + ACPI_MUL_32(j)); 96 96 97 97 ACPI_DEBUG_PRINT((ACPI_DB_VALUES, 98 - "Allocated OwnerId: %2.2X\n", 98 + "Allocated OwnerId: 0x%3.3X\n", 99 99 (unsigned int)*owner_id)); 100 100 goto exit; 101 101 } ··· 116 116 */ 117 117 status = AE_OWNER_ID_LIMIT; 118 118 ACPI_ERROR((AE_INFO, 119 - "Could not allocate new OwnerId (255 max), AE_OWNER_ID_LIMIT")); 119 + "Could not allocate new OwnerId (4095 max), AE_OWNER_ID_LIMIT")); 120 120 121 121 exit: 122 122 (void)acpi_ut_release_mutex(ACPI_MTX_CACHES); ··· 153 153 /* Zero is not a valid owner_ID */ 154 154 155 155 if (owner_id == 0) { 156 - ACPI_ERROR((AE_INFO, "Invalid OwnerId: 0x%2.2X", owner_id)); 156 + ACPI_ERROR((AE_INFO, "Invalid OwnerId: 0x%3.3X", owner_id)); 157 157 return_VOID; 158 158 } 159 159 ··· 179 179 acpi_gbl_owner_id_mask[index] ^= bit; 180 180 } else { 181 181 ACPI_ERROR((AE_INFO, 182 - "Release of non-allocated OwnerId: 0x%2.2X", 182 + "Attempted release of non-allocated OwnerId: 0x%3.3X", 183 183 owner_id + 1)); 184 184 } 185 185
+16 -3
drivers/acpi/apei/ghes.c
··· 153 153 int ghes_estatus_pool_init(int num_ghes) 154 154 { 155 155 unsigned long addr, len; 156 + int rc; 156 157 157 158 ghes_estatus_pool = gen_pool_create(GHES_ESTATUS_POOL_MIN_ALLOC_ORDER, -1); 158 159 if (!ghes_estatus_pool) ··· 165 164 ghes_estatus_pool_size_request = PAGE_ALIGN(len); 166 165 addr = (unsigned long)vmalloc(PAGE_ALIGN(len)); 167 166 if (!addr) 168 - return -ENOMEM; 167 + goto err_pool_alloc; 169 168 170 169 /* 171 170 * New allocation must be visible in all pgd before it can be found by ··· 173 172 */ 174 173 vmalloc_sync_all(); 175 174 176 - return gen_pool_add(ghes_estatus_pool, addr, PAGE_ALIGN(len), -1); 175 + rc = gen_pool_add(ghes_estatus_pool, addr, PAGE_ALIGN(len), -1); 176 + if (rc) 177 + goto err_pool_add; 178 + 179 + return 0; 180 + 181 + err_pool_add: 182 + vfree((void *)addr); 183 + 184 + err_pool_alloc: 185 + gen_pool_destroy(ghes_estatus_pool); 186 + 187 + return -ENOMEM; 177 188 } 178 189 179 190 static int map_gen_v2(struct ghes *ghes) ··· 496 483 int sev, sec_sev; 497 484 struct acpi_hest_generic_data *gdata; 498 485 guid_t *sec_type; 499 - guid_t *fru_id = &NULL_UUID_LE; 486 + const guid_t *fru_id = &guid_null; 500 487 char *fru_text = ""; 501 488 502 489 sev = ghes_severity(estatus->error_severity);
+4 -2
drivers/acpi/cppc_acpi.c
··· 365 365 union acpi_object *psd = NULL; 366 366 struct acpi_psd_package *pdomain; 367 367 368 - status = acpi_evaluate_object_typed(handle, "_PSD", NULL, &buffer, 369 - ACPI_TYPE_PACKAGE); 368 + status = acpi_evaluate_object_typed(handle, "_PSD", NULL, 369 + &buffer, ACPI_TYPE_PACKAGE); 370 + if (status == AE_NOT_FOUND) /* _PSD is optional */ 371 + return 0; 370 372 if (ACPI_FAILURE(status)) 371 373 return -ENODEV; 372 374
+4 -1
drivers/acpi/custom_method.c
··· 49 49 if ((*ppos > max_size) || 50 50 (*ppos + count > max_size) || 51 51 (*ppos + count < count) || 52 - (count > uncopied_bytes)) 52 + (count > uncopied_bytes)) { 53 + kfree(buf); 53 54 return -EINVAL; 55 + } 54 56 55 57 if (copy_from_user(buf + (*ppos), user_buf, count)) { 56 58 kfree(buf); ··· 72 70 add_taint(TAINT_OVERRIDDEN_ACPI_TABLE, LOCKDEP_NOW_UNRELIABLE); 73 71 } 74 72 73 + kfree(buf); 75 74 return count; 76 75 } 77 76
+116 -31
drivers/acpi/hmat/hmat.c
··· 14 14 #include <linux/init.h> 15 15 #include <linux/list.h> 16 16 #include <linux/list_sort.h> 17 + #include <linux/memory.h> 18 + #include <linux/mutex.h> 17 19 #include <linux/node.h> 18 20 #include <linux/sysfs.h> 19 21 20 - static __initdata u8 hmat_revision; 22 + static u8 hmat_revision; 21 23 22 - static __initdata LIST_HEAD(targets); 23 - static __initdata LIST_HEAD(initiators); 24 - static __initdata LIST_HEAD(localities); 24 + static LIST_HEAD(targets); 25 + static LIST_HEAD(initiators); 26 + static LIST_HEAD(localities); 27 + 28 + static DEFINE_MUTEX(target_lock); 25 29 26 30 /* 27 31 * The defined enum order is used to prioritize attributes to break ties when ··· 40 36 41 37 static struct memory_locality *localities_types[4]; 42 38 39 + struct target_cache { 40 + struct list_head node; 41 + struct node_cache_attrs cache_attrs; 42 + }; 43 + 43 44 struct memory_target { 44 45 struct list_head node; 45 46 unsigned int memory_pxm; 46 47 unsigned int processor_pxm; 47 48 struct node_hmem_attrs hmem_attrs; 49 + struct list_head caches; 50 + struct node_cache_attrs cache_attrs; 51 + bool registered; 48 52 }; 49 53 50 54 struct memory_initiator { ··· 65 53 struct acpi_hmat_locality *hmat_loc; 66 54 }; 67 55 68 - static __init struct memory_initiator *find_mem_initiator(unsigned int cpu_pxm) 56 + static struct memory_initiator *find_mem_initiator(unsigned int cpu_pxm) 69 57 { 70 58 struct memory_initiator *initiator; 71 59 ··· 75 63 return NULL; 76 64 } 77 65 78 - static __init struct memory_target *find_mem_target(unsigned int mem_pxm) 66 + static struct memory_target *find_mem_target(unsigned int mem_pxm) 79 67 { 80 68 struct memory_target *target; 81 69 ··· 108 96 { 109 97 struct memory_target *target; 110 98 111 - if (pxm_to_node(mem_pxm) == NUMA_NO_NODE) 112 - return; 113 - 114 99 target = find_mem_target(mem_pxm); 115 100 if (target) 116 101 return; ··· 119 110 target->memory_pxm = mem_pxm; 120 111 target->processor_pxm = PXM_INVAL; 121 112 list_add_tail(&target->node, &targets); 113 + INIT_LIST_HEAD(&target->caches); 122 114 } 123 115 124 116 static __init const char *hmat_data_type(u8 type) ··· 158 148 } 159 149 } 160 150 161 - static __init u32 hmat_normalize(u16 entry, u64 base, u8 type) 151 + static u32 hmat_normalize(u16 entry, u64 base, u8 type) 162 152 { 163 153 u32 value; 164 154 ··· 193 183 return value; 194 184 } 195 185 196 - static __init void hmat_update_target_access(struct memory_target *target, 186 + static void hmat_update_target_access(struct memory_target *target, 197 187 u8 type, u32 value) 198 188 { 199 189 switch (type) { ··· 324 314 const unsigned long end) 325 315 { 326 316 struct acpi_hmat_cache *cache = (void *)header; 327 - struct node_cache_attrs cache_attrs; 317 + struct memory_target *target; 318 + struct target_cache *tcache; 328 319 u32 attrs; 329 320 330 321 if (cache->header.length < sizeof(*cache)) { ··· 339 328 cache->memory_PD, cache->cache_size, attrs, 340 329 cache->number_of_SMBIOShandles); 341 330 342 - cache_attrs.size = cache->cache_size; 343 - cache_attrs.level = (attrs & ACPI_HMAT_CACHE_LEVEL) >> 4; 344 - cache_attrs.line_size = (attrs & ACPI_HMAT_CACHE_LINE_SIZE) >> 16; 331 + target = find_mem_target(cache->memory_PD); 332 + if (!target) 333 + return 0; 334 + 335 + tcache = kzalloc(sizeof(*tcache), GFP_KERNEL); 336 + if (!tcache) { 337 + pr_notice_once("Failed to allocate HMAT cache info\n"); 338 + return 0; 339 + } 340 + 341 + tcache->cache_attrs.size = cache->cache_size; 342 + tcache->cache_attrs.level = (attrs & ACPI_HMAT_CACHE_LEVEL) >> 4; 343 + tcache->cache_attrs.line_size = (attrs & ACPI_HMAT_CACHE_LINE_SIZE) >> 16; 345 344 346 345 switch ((attrs & ACPI_HMAT_CACHE_ASSOCIATIVITY) >> 8) { 347 346 case ACPI_HMAT_CA_DIRECT_MAPPED: 348 - cache_attrs.indexing = NODE_CACHE_DIRECT_MAP; 347 + tcache->cache_attrs.indexing = NODE_CACHE_DIRECT_MAP; 349 348 break; 350 349 case ACPI_HMAT_CA_COMPLEX_CACHE_INDEXING: 351 - cache_attrs.indexing = NODE_CACHE_INDEXED; 350 + tcache->cache_attrs.indexing = NODE_CACHE_INDEXED; 352 351 break; 353 352 case ACPI_HMAT_CA_NONE: 354 353 default: 355 - cache_attrs.indexing = NODE_CACHE_OTHER; 354 + tcache->cache_attrs.indexing = NODE_CACHE_OTHER; 356 355 break; 357 356 } 358 357 359 358 switch ((attrs & ACPI_HMAT_WRITE_POLICY) >> 12) { 360 359 case ACPI_HMAT_CP_WB: 361 - cache_attrs.write_policy = NODE_CACHE_WRITE_BACK; 360 + tcache->cache_attrs.write_policy = NODE_CACHE_WRITE_BACK; 362 361 break; 363 362 case ACPI_HMAT_CP_WT: 364 - cache_attrs.write_policy = NODE_CACHE_WRITE_THROUGH; 363 + tcache->cache_attrs.write_policy = NODE_CACHE_WRITE_THROUGH; 365 364 break; 366 365 case ACPI_HMAT_CP_NONE: 367 366 default: 368 - cache_attrs.write_policy = NODE_CACHE_WRITE_OTHER; 367 + tcache->cache_attrs.write_policy = NODE_CACHE_WRITE_OTHER; 369 368 break; 370 369 } 370 + list_add_tail(&tcache->node, &target->caches); 371 371 372 - node_add_cache(pxm_to_node(cache->memory_PD), &cache_attrs); 373 372 return 0; 374 373 } 375 374 ··· 456 435 return 0; 457 436 } 458 437 459 - static __init u32 hmat_initiator_perf(struct memory_target *target, 438 + static u32 hmat_initiator_perf(struct memory_target *target, 460 439 struct memory_initiator *initiator, 461 440 struct acpi_hmat_locality *hmat_loc) 462 441 { ··· 494 473 hmat_loc->data_type); 495 474 } 496 475 497 - static __init bool hmat_update_best(u8 type, u32 value, u32 *best) 476 + static bool hmat_update_best(u8 type, u32 value, u32 *best) 498 477 { 499 478 bool updated = false; 500 479 ··· 538 517 return ia->processor_pxm - ib->processor_pxm; 539 518 } 540 519 541 - static __init void hmat_register_target_initiators(struct memory_target *target) 520 + static void hmat_register_target_initiators(struct memory_target *target) 542 521 { 543 522 static DECLARE_BITMAP(p_nodes, MAX_NUMNODES); 544 523 struct memory_initiator *initiator; ··· 598 577 } 599 578 } 600 579 601 - static __init void hmat_register_target_perf(struct memory_target *target) 580 + static void hmat_register_target_cache(struct memory_target *target) 581 + { 582 + unsigned mem_nid = pxm_to_node(target->memory_pxm); 583 + struct target_cache *tcache; 584 + 585 + list_for_each_entry(tcache, &target->caches, node) 586 + node_add_cache(mem_nid, &tcache->cache_attrs); 587 + } 588 + 589 + static void hmat_register_target_perf(struct memory_target *target) 602 590 { 603 591 unsigned mem_nid = pxm_to_node(target->memory_pxm); 604 592 node_set_perf_attrs(mem_nid, &target->hmem_attrs, 0); 605 593 } 606 594 607 - static __init void hmat_register_targets(void) 595 + static void hmat_register_target(struct memory_target *target) 596 + { 597 + int nid = pxm_to_node(target->memory_pxm); 598 + 599 + /* 600 + * Skip offline nodes. This can happen when memory 601 + * marked EFI_MEMORY_SP, "specific purpose", is applied 602 + * to all the memory in a promixity domain leading to 603 + * the node being marked offline / unplugged, or if 604 + * memory-only "hotplug" node is offline. 605 + */ 606 + if (nid == NUMA_NO_NODE || !node_online(nid)) 607 + return; 608 + 609 + mutex_lock(&target_lock); 610 + if (!target->registered) { 611 + hmat_register_target_initiators(target); 612 + hmat_register_target_cache(target); 613 + hmat_register_target_perf(target); 614 + target->registered = true; 615 + } 616 + mutex_unlock(&target_lock); 617 + } 618 + 619 + static void hmat_register_targets(void) 608 620 { 609 621 struct memory_target *target; 610 622 611 - list_for_each_entry(target, &targets, node) { 612 - hmat_register_target_initiators(target); 613 - hmat_register_target_perf(target); 614 - } 623 + list_for_each_entry(target, &targets, node) 624 + hmat_register_target(target); 615 625 } 626 + 627 + static int hmat_callback(struct notifier_block *self, 628 + unsigned long action, void *arg) 629 + { 630 + struct memory_target *target; 631 + struct memory_notify *mnb = arg; 632 + int pxm, nid = mnb->status_change_nid; 633 + 634 + if (nid == NUMA_NO_NODE || action != MEM_ONLINE) 635 + return NOTIFY_OK; 636 + 637 + pxm = node_to_pxm(nid); 638 + target = find_mem_target(pxm); 639 + if (!target) 640 + return NOTIFY_OK; 641 + 642 + hmat_register_target(target); 643 + return NOTIFY_OK; 644 + } 645 + 646 + static struct notifier_block hmat_callback_nb = { 647 + .notifier_call = hmat_callback, 648 + .priority = 2, 649 + }; 616 650 617 651 static __init void hmat_free_structures(void) 618 652 { 619 653 struct memory_target *target, *tnext; 620 654 struct memory_locality *loc, *lnext; 621 655 struct memory_initiator *initiator, *inext; 656 + struct target_cache *tcache, *cnext; 622 657 623 658 list_for_each_entry_safe(target, tnext, &targets, node) { 659 + list_for_each_entry_safe(tcache, cnext, &target->caches, node) { 660 + list_del(&tcache->node); 661 + kfree(tcache); 662 + } 624 663 list_del(&target->node); 625 664 kfree(target); 626 665 } ··· 739 658 } 740 659 } 741 660 hmat_register_targets(); 661 + 662 + /* Keep the table and structures if the notifier may use them */ 663 + if (!register_hotmemory_notifier(&hmat_callback_nb)) 664 + return 0; 742 665 out_put: 743 666 hmat_free_structures(); 744 667 acpi_put_table(tbl);
+3 -1
drivers/acpi/pci_irq.c
··· 449 449 * No IRQ known to the ACPI subsystem - maybe the BIOS / 450 450 * driver reported one, then use it. Exit in any case. 451 451 */ 452 - if (!acpi_pci_irq_valid(dev, pin)) 452 + if (!acpi_pci_irq_valid(dev, pin)) { 453 + kfree(entry); 453 454 return 0; 455 + } 454 456 455 457 if (acpi_isa_register_gsi(dev)) 456 458 dev_warn(&dev->dev, "PCI INT %c: no GSI\n",
+2 -2
drivers/acpi/pci_link.c
··· 661 661 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 662 662 "Link %s is referenced\n", 663 663 acpi_device_bid(link->device))); 664 - return (link->irq.active); 664 + return link->irq.active; 665 665 } 666 666 667 667 /* ··· 712 712 acpi_evaluate_object(link->device->handle, "_DIS", NULL, NULL); 713 713 714 714 mutex_unlock(&acpi_link_lock); 715 - return (link->irq.active); 715 + return link->irq.active; 716 716 } 717 717 718 718 /* --------------------------------------------------------------------------
-2
drivers/acpi/sbshc.h
··· 15 15 SMBUS_BLOCK_PROCESS_CALL = 0xd, 16 16 }; 17 17 18 - static const u8 SMBUS_PEC = 0x80; 19 - 20 18 enum acpi_sbs_device_addr { 21 19 ACPI_SBS_CHARGER = 0x9, 22 20 ACPI_SBS_MANAGER = 0xa,
+3 -8
drivers/acpi/thermal.c
··· 225 225 if (!tz) 226 226 return -EINVAL; 227 227 228 - if (!acpi_has_method(tz->device->handle, "_SCP")) { 229 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "_SCP not present\n")); 228 + if (ACPI_FAILURE(acpi_execute_simple_method(tz->device->handle, 229 + "_SCP", mode))) 230 230 return -ENODEV; 231 - } else if (ACPI_FAILURE(acpi_execute_simple_method(tz->device->handle, 232 - "_SCP", mode))) { 233 - return -ENODEV; 234 - } 235 231 236 232 return 0; 237 233 } ··· 459 463 break; 460 464 } 461 465 462 - if ((flag & ACPI_TRIPS_DEVICES) 463 - && acpi_has_method(tz->device->handle, "_TZD")) { 466 + if (flag & ACPI_TRIPS_DEVICES) { 464 467 memset(&devices, 0, sizeof(devices)); 465 468 status = acpi_evaluate_reference(tz->device->handle, "_TZD", 466 469 NULL, &devices);
+2 -2
include/acpi/acconfig.h
··· 95 95 96 96 #define ACPI_DEFAULT_PAGE_SIZE 4096 /* Must be power of 2 */ 97 97 98 - /* owner_id tracking. 8 entries allows for 255 owner_ids */ 98 + /* owner_id tracking. 128 entries allows for 4095 owner_ids */ 99 99 100 - #define ACPI_NUM_OWNERID_MASKS 8 100 + #define ACPI_NUM_OWNERID_MASKS 128 101 101 102 102 /* Size of the root table array is increased by this increment */ 103 103
+1
include/acpi/acpiosxf.h
··· 330 330 * Debug print routines 331 331 */ 332 332 #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_printf 333 + ACPI_PRINTF_LIKE(1) 333 334 void ACPI_INTERNAL_VAR_XFACE acpi_os_printf(const char *format, ...); 334 335 #endif 335 336
+1 -1
include/acpi/acpixf.h
··· 12 12 13 13 /* Current ACPICA subsystem version in YYYYMMDD format */ 14 14 15 - #define ACPI_CA_VERSION 0x20190703 15 + #define ACPI_CA_VERSION 0x20190816 16 16 17 17 #include <acpi/acconfig.h> 18 18 #include <acpi/actypes.h>
+11 -9
include/acpi/actypes.h
··· 442 442 443 443 /* Owner IDs are used to track namespace nodes for selective deletion */ 444 444 445 - typedef u8 acpi_owner_id; 446 - #define ACPI_OWNER_ID_MAX 0xFF 445 + typedef u16 acpi_owner_id; 446 + #define ACPI_OWNER_ID_MAX 0xFFF /* 4095 possible owner IDs */ 447 447 448 448 #define ACPI_INTEGER_BIT_SIZE 64 449 449 #define ACPI_MAX_DECIMAL_DIGITS 20 /* 2^64 = 18,446,744,073,709,551,616 */ ··· 506 506 507 507 /* Pointer/Integer type conversions */ 508 508 509 - #define ACPI_TO_POINTER(i) ACPI_ADD_PTR (void, (void *) 0, (acpi_size) (i)) 509 + #define ACPI_TO_POINTER(i) ACPI_CAST_PTR (void, (acpi_size) (i)) 510 510 #define ACPI_TO_INTEGER(p) ACPI_PTR_DIFF (p, (void *) 0) 511 511 #define ACPI_OFFSET(d, f) ACPI_PTR_DIFF (&(((d *) 0)->f), (void *) 0) 512 512 #define ACPI_PHYSADDR_TO_PTR(i) ACPI_TO_POINTER(i) ··· 1265 1265 #define ACPI_OSI_WIN_VISTA_SP2 0x0A 1266 1266 #define ACPI_OSI_WIN_7 0x0B 1267 1267 #define ACPI_OSI_WIN_8 0x0C 1268 - #define ACPI_OSI_WIN_10 0x0D 1269 - #define ACPI_OSI_WIN_10_RS1 0x0E 1270 - #define ACPI_OSI_WIN_10_RS2 0x0F 1271 - #define ACPI_OSI_WIN_10_RS3 0x10 1272 - #define ACPI_OSI_WIN_10_RS4 0x11 1273 - #define ACPI_OSI_WIN_10_RS5 0x12 1268 + #define ACPI_OSI_WIN_8_1 0x0D 1269 + #define ACPI_OSI_WIN_10 0x0E 1270 + #define ACPI_OSI_WIN_10_RS1 0x0F 1271 + #define ACPI_OSI_WIN_10_RS2 0x10 1272 + #define ACPI_OSI_WIN_10_RS3 0x11 1273 + #define ACPI_OSI_WIN_10_RS4 0x12 1274 + #define ACPI_OSI_WIN_10_RS5 0x13 1275 + #define ACPI_OSI_WIN_10_19H1 0x14 1274 1276 1275 1277 /* Definitions of getopt */ 1276 1278
+8 -2
tools/power/acpi/tools/acpidump/apfiles.c
··· 29 29 { 30 30 #if !defined(_GNU_EFI) && !defined(_EDK2_EFI) 31 31 struct stat stat_info; 32 + int in_char; 32 33 33 34 if (!stat(pathname, &stat_info)) { 34 35 fprintf(stderr, 35 36 "Target path already exists, overwrite? [y|n] "); 36 37 37 - if (getchar() != 'y') { 38 + in_char = fgetc(stdin); 39 + if (in_char == '\n') { 40 + in_char = fgetc(stdin); 41 + } 42 + 43 + if (in_char != 'y' && in_char != 'Y') { 38 44 return (-1); 39 45 } 40 46 } 41 47 #endif 42 48 43 - return 0; 49 + return (0); 44 50 } 45 51 46 52 /******************************************************************************