hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/acpi/acpica/evhandler.c
....@@ -3,7 +3,7 @@
33 *
44 * Module Name: evhandler - Support for Address Space handlers
55 *
6
- * Copyright (C) 2000 - 2018, Intel Corp.
6
+ * Copyright (C) 2000 - 2020, Intel Corp.
77 *
88 *****************************************************************************/
99
....@@ -364,25 +364,25 @@
364364 handler = acpi_ex_system_io_space_handler;
365365 setup = acpi_ev_io_space_region_setup;
366366 break;
367
-
367
+#ifdef ACPI_PCI_CONFIGURED
368368 case ACPI_ADR_SPACE_PCI_CONFIG:
369369
370370 handler = acpi_ex_pci_config_space_handler;
371371 setup = acpi_ev_pci_config_region_setup;
372372 break;
373
-
373
+#endif
374374 case ACPI_ADR_SPACE_CMOS:
375375
376376 handler = acpi_ex_cmos_space_handler;
377377 setup = acpi_ev_cmos_region_setup;
378378 break;
379
-
379
+#ifdef ACPI_PCI_CONFIGURED
380380 case ACPI_ADR_SPACE_PCI_BAR_TARGET:
381381
382382 handler = acpi_ex_pci_bar_space_handler;
383383 setup = acpi_ev_pci_bar_region_setup;
384384 break;
385
-
385
+#endif
386386 case ACPI_ADR_SPACE_DATA_TABLE:
387387
388388 handler = acpi_ex_data_table_space_handler;
....@@ -489,6 +489,13 @@
489489
490490 /* Init handler obj */
491491
492
+ status =
493
+ acpi_os_create_mutex(&handler_obj->address_space.context_mutex);
494
+ if (ACPI_FAILURE(status)) {
495
+ acpi_ut_remove_reference(handler_obj);
496
+ goto unlock_and_exit;
497
+ }
498
+
492499 handler_obj->address_space.space_id = (u8)space_id;
493500 handler_obj->address_space.handler_flags = flags;
494501 handler_obj->address_space.region_list = NULL;