diff options
| author | Sunil V L <sunilvl@ventanamicro.com> | 2025-08-18 07:58:05 +0300 |
|---|---|---|
| committer | Joerg Roedel <joerg.roedel@amd.com> | 2025-09-05 16:06:03 +0300 |
| commit | 8f77295525825086cb43675cd1a4f3716b119d7f (patch) | |
| tree | b1508a7375e83ce3837fbc228375eabbaf1161a4 /include/linux | |
| parent | 8f5ae30d69d7543eee0d70083daf4de8fe15d585 (diff) | |
| download | linux-8f77295525825086cb43675cd1a4f3716b119d7f.tar.xz | |
ACPI: RISC-V: Add support for RIMT
RISC-V IO Mapping Table (RIMT) is a static ACPI table to communicate
IOMMU information to the OS. The spec is available at [1].
The changes at high level are,
a) Initialize data structures required for IOMMU/device
configuration using the data from RIMT. Provide APIs required
for device configuration.
b) Provide an API for IOMMU drivers to register the
fwnode with RIMT data structures. This API will create a
fwnode for PCIe IOMMU.
[1] - https://github.com/riscv-non-isa/riscv-acpi-rimt
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20250818045807.763922-2-sunilvl@ventanamicro.com
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/acpi_rimt.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/include/linux/acpi_rimt.h b/include/linux/acpi_rimt.h new file mode 100644 index 000000000000..fad3adc4d899 --- /dev/null +++ b/include/linux/acpi_rimt.h @@ -0,0 +1,28 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright (C) 2024-2025, Ventana Micro Systems Inc. + * Author: Sunil V L <sunilvl@ventanamicro.com> + */ + +#ifndef _ACPI_RIMT_H +#define _ACPI_RIMT_H + +#ifdef CONFIG_ACPI_RIMT +int rimt_iommu_register(struct device *dev); +#else +static inline int rimt_iommu_register(struct device *dev) +{ + return -ENODEV; +} +#endif + +#if defined(CONFIG_IOMMU_API) && defined(CONFIG_ACPI_RIMT) +int rimt_iommu_configure_id(struct device *dev, const u32 *id_in); +#else +static inline int rimt_iommu_configure_id(struct device *dev, const u32 *id_in) +{ + return -ENODEV; +} +#endif + +#endif /* _ACPI_RIMT_H */ |
