| .. | .. |
|---|
| 3 | 3 | * |
|---|
| 4 | 4 | * Module Name: evhandler - Support for Address Space handlers |
|---|
| 5 | 5 | * |
|---|
| 6 | | - * Copyright (C) 2000 - 2018, Intel Corp. |
|---|
| 6 | + * Copyright (C) 2000 - 2020, Intel Corp. |
|---|
| 7 | 7 | * |
|---|
| 8 | 8 | *****************************************************************************/ |
|---|
| 9 | 9 | |
|---|
| .. | .. |
|---|
| 364 | 364 | handler = acpi_ex_system_io_space_handler; |
|---|
| 365 | 365 | setup = acpi_ev_io_space_region_setup; |
|---|
| 366 | 366 | break; |
|---|
| 367 | | - |
|---|
| 367 | +#ifdef ACPI_PCI_CONFIGURED |
|---|
| 368 | 368 | case ACPI_ADR_SPACE_PCI_CONFIG: |
|---|
| 369 | 369 | |
|---|
| 370 | 370 | handler = acpi_ex_pci_config_space_handler; |
|---|
| 371 | 371 | setup = acpi_ev_pci_config_region_setup; |
|---|
| 372 | 372 | break; |
|---|
| 373 | | - |
|---|
| 373 | +#endif |
|---|
| 374 | 374 | case ACPI_ADR_SPACE_CMOS: |
|---|
| 375 | 375 | |
|---|
| 376 | 376 | handler = acpi_ex_cmos_space_handler; |
|---|
| 377 | 377 | setup = acpi_ev_cmos_region_setup; |
|---|
| 378 | 378 | break; |
|---|
| 379 | | - |
|---|
| 379 | +#ifdef ACPI_PCI_CONFIGURED |
|---|
| 380 | 380 | case ACPI_ADR_SPACE_PCI_BAR_TARGET: |
|---|
| 381 | 381 | |
|---|
| 382 | 382 | handler = acpi_ex_pci_bar_space_handler; |
|---|
| 383 | 383 | setup = acpi_ev_pci_bar_region_setup; |
|---|
| 384 | 384 | break; |
|---|
| 385 | | - |
|---|
| 385 | +#endif |
|---|
| 386 | 386 | case ACPI_ADR_SPACE_DATA_TABLE: |
|---|
| 387 | 387 | |
|---|
| 388 | 388 | handler = acpi_ex_data_table_space_handler; |
|---|
| .. | .. |
|---|
| 489 | 489 | |
|---|
| 490 | 490 | /* Init handler obj */ |
|---|
| 491 | 491 | |
|---|
| 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 | + |
|---|
| 492 | 499 | handler_obj->address_space.space_id = (u8)space_id; |
|---|
| 493 | 500 | handler_obj->address_space.handler_flags = flags; |
|---|
| 494 | 501 | handler_obj->address_space.region_list = NULL; |
|---|