lkml.org 
[lkml]   [2021]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] Enable ACPI_ADR_SPACE_PCI_CONFIG in acpi_gbl_default_address_spaces only when ACPI_PCI_CONFIGURED is defined
Date
Signed-off-by: Weidong Cui <weidongcui@gmail.com>
Signed-off-by: Xinyang Ge <aegiryy@gmail.com>
---
drivers/acpi/acpica/evhandler.c | 2 ++
include/acpi/acconfig.h | 4 ++++
2 files changed, 6 insertions(+)

diff --git a/drivers/acpi/acpica/evhandler.c b/drivers/acpi/acpica/evhandler.c
index 5884eba04..4c25ad433 100644
--- a/drivers/acpi/acpica/evhandler.c
+++ b/drivers/acpi/acpica/evhandler.c
@@ -26,7 +26,9 @@ acpi_ev_install_handler(acpi_handle obj_handle,
u8 acpi_gbl_default_address_spaces[ACPI_NUM_DEFAULT_SPACES] = {
ACPI_ADR_SPACE_SYSTEM_MEMORY,
ACPI_ADR_SPACE_SYSTEM_IO,
+#ifdef ACPI_PCI_CONFIGURED
ACPI_ADR_SPACE_PCI_CONFIG,
+#endif
ACPI_ADR_SPACE_DATA_TABLE
};

diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h
index a225eff49..790999028 100644
--- a/include/acpi/acconfig.h
+++ b/include/acpi/acconfig.h
@@ -162,7 +162,11 @@
/* Maximum space_ids for Operation Regions */

#define ACPI_MAX_ADDRESS_SPACE 255
+#ifdef ACPI_PCI_CONFIGURED
#define ACPI_NUM_DEFAULT_SPACES 4
+#else
+#define ACPI_NUM_DEFAULT_SPACES 3
+#endif

/* Array sizes. Used for range checking also */

--
2.24.3 (Apple Git-128)
\
 
 \ /
  Last update: 2021-02-09 04:29    [W:0.083 / U:1.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site