[PATCH 2/8] ACPI: LoongArch: Add ACPI_IOVT option
Bibo Mao <[email protected]> Wed, 17 Jun 2026 15:48:23 +0800
| Newsgroups | dev.linux.lists.acpica-devel,dev.linux.lists.loongarch,org.kernel.vger.linux-acpi,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
ACPI_IOVT is acpi table with IOMMU device on LoongArch system, here option ACPI_IOVT is added. And empty function acpi_iovt_init() is added and called in acpi_arch_init(). Signed-off-by: Bibo Mao <[email protected]> --- arch/loongarch/Kconfig | 1 + drivers/acpi/Kconfig | 4 ++++ drivers/acpi/loongarch/Kconfig | 7 +++++++ drivers/acpi/loongarch/Makefile | 1 + drivers/acpi/loongarch/init.c | 3 +++ drivers/acpi/loongarch/init.h | 4 ++++ drivers/acpi/loongarch/iovt.c | 7 +++++++ 7 files changed, 27 insertions(+) create mode 100644 drivers/acpi/loongarch/Kconfig create mode 100644 drivers/acpi/loongarch/init.h create mode 100644 drivers/acpi/loongarch/iovt.c diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig index 3f69c5d7e48e..6f0b6b539c0b 100644 --- a/arch/loongarch/Kconfig +++ b/arch/loongarch/Kconfig @@ -6,6 +6,7 @@ config LOONGARCH select ACPI_GENERIC_GSI if ACPI select ACPI_MCFG if ACPI select ACPI_HOTPLUG_CPU if ACPI_PROCESSOR && HOTPLUG_CPU + select ACPI_IOVT if ACPI select ACPI_PPTT if ACPI select ACPI_SYSTEM_POWER_STATES_SUPPORT if ACPI select ARCH_BINFMT_ELF_STATE diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index f165d14cf61a..192e6f18eda1 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig @@ -550,6 +550,10 @@ if ARM64 source "drivers/acpi/arm64/Kconfig" endif +if LOONGARCH +source "drivers/acpi/loongarch/Kconfig" +endif + if RISCV source "drivers/acpi/riscv/Kconfig" endif diff --git a/drivers/acpi/loongarch/Kconfig b/drivers/acpi/loongarch/Kconfig new file mode 100644 index 000000000000..91ba3c35b9bf --- /dev/null +++ b/drivers/acpi/loongarch/Kconfig @@ -0,0 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only +# +# ACPI Configuration for LOONGARCH +# + +config ACPI_IOVT + bool diff --git a/drivers/acpi/loongarch/Makefile b/drivers/acpi/loongarch/Makefile index d3764139dfaf..c338d3102fc1 100644 --- a/drivers/acpi/loongarch/Makefile +++ b/drivers/acpi/loongarch/Makefile @@ -1,2 +1,3 @@ # SPDX-License-Identifier: GPL-2.0-only obj-y += init.o +obj-$(CONFIG_ACPI_IOVT) += iovt.o diff --git a/drivers/acpi/loongarch/init.c b/drivers/acpi/loongarch/init.c index 7008e50b3e9d..9233f6c1cb55 100644 --- a/drivers/acpi/loongarch/init.c +++ b/drivers/acpi/loongarch/init.c @@ -1,7 +1,10 @@ // SPDX-License-Identifier: GPL-2.0-only #include <linux/acpi.h> +#include "init.h" void __init acpi_arch_init(void) { + if (IS_ENABLED(CONFIG_ACPI_IOVT)) + acpi_iovt_init(); } diff --git a/drivers/acpi/loongarch/init.h b/drivers/acpi/loongarch/init.h new file mode 100644 index 000000000000..070ea187bfae --- /dev/null +++ b/drivers/acpi/loongarch/init.h @@ -0,0 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#include <linux/init.h> + +void __init acpi_iovt_init(void); diff --git a/drivers/acpi/loongarch/iovt.c b/drivers/acpi/loongarch/iovt.c new file mode 100644 index 000000000000..793ed13a2cef --- /dev/null +++ b/drivers/acpi/loongarch/iovt.c @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0-only + +#include "init.h" + +void __init acpi_iovt_init(void) +{ +} -- 2.39.3