Message ID | 20220221154344.2126-2-shameerali.kolothum.thodi@huawei.com (mailing list archive) |
---|---|
State | Handled Elsewhere, archived |
Headers | show |
Series | ACPI/IORT: Support for IORT RMR node | expand |
On 2022-02-21 15:43, Shameer Kolothum via iommu wrote: > IORT rev E.d introduces more details into the RMR node Flags > field. Add temporary definitions to describe and access these > Flags field until ACPICA header is updated to support E.d. > > This patch can be reverted once the include/acpi/actbl2.h has > all the relevant definitions. > > Signed-off-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com> > --- > Please find the ACPICA E.d related changes pull request here, > https://github.com/acpica/acpica/pull/752 > > --- > drivers/acpi/arm64/iort.c | 24 ++++++++++++++++++++++++ > 1 file changed, 24 insertions(+) > > diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c > index f2f8f05662de..0730c4dbb700 100644 > --- a/drivers/acpi/arm64/iort.c > +++ b/drivers/acpi/arm64/iort.c > @@ -25,6 +25,30 @@ > #define IORT_IOMMU_TYPE ((1 << ACPI_IORT_NODE_SMMU) | \ > (1 << ACPI_IORT_NODE_SMMU_V3)) > > +/* > + * The following RMR related definitions are temporary and > + * can be removed once ACPICA headers support IORT rev E.d > + */ > +#ifndef ACPI_IORT_RMR_REMAP_PERMITTED > +#define ACPI_IORT_RMR_REMAP_PERMITTED (1) > +#endif > + > +#ifndef ACPI_IORT_RMR_ACCESS_PRIVILEGE > +#define ACPI_IORT_RMR_ACCESS_PRIVILEGE (1 << 1) > +#endif > + > +#ifndef ACPI_IORT_RMR_ACCESS_ATTRIBUTES > +#define ACPI_IORT_RMR_ACCESS_ATTRIBUTES(flags) (((flags) >> 2) & 0xFF) > +#endif > + > +#ifndef ACPI_IORT_RMR_ATTR_DEVICE_GRE > +#define ACPI_IORT_RMR_ATTR_DEVICE_GRE 0x03 > +#endif > + > +#ifndef ACPI_IORT_RMR_ATTR_NORMAL > +#define ACPI_IORT_RMR_ATTR_NORMAL 0x05 For the record, I've commented directly on the ACPICA pull request that I think this should be more clearly named to indicate that it means Normal Write-Back Cacheable, rather than being potentially ambiguous about cacheability. Robin. > +#endif > + > struct iort_its_msi_chip { > struct list_head list; > struct fwnode_handle *fw_node;
diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c index f2f8f05662de..0730c4dbb700 100644 --- a/drivers/acpi/arm64/iort.c +++ b/drivers/acpi/arm64/iort.c @@ -25,6 +25,30 @@ #define IORT_IOMMU_TYPE ((1 << ACPI_IORT_NODE_SMMU) | \ (1 << ACPI_IORT_NODE_SMMU_V3)) +/* + * The following RMR related definitions are temporary and + * can be removed once ACPICA headers support IORT rev E.d + */ +#ifndef ACPI_IORT_RMR_REMAP_PERMITTED +#define ACPI_IORT_RMR_REMAP_PERMITTED (1) +#endif + +#ifndef ACPI_IORT_RMR_ACCESS_PRIVILEGE +#define ACPI_IORT_RMR_ACCESS_PRIVILEGE (1 << 1) +#endif + +#ifndef ACPI_IORT_RMR_ACCESS_ATTRIBUTES +#define ACPI_IORT_RMR_ACCESS_ATTRIBUTES(flags) (((flags) >> 2) & 0xFF) +#endif + +#ifndef ACPI_IORT_RMR_ATTR_DEVICE_GRE +#define ACPI_IORT_RMR_ATTR_DEVICE_GRE 0x03 +#endif + +#ifndef ACPI_IORT_RMR_ATTR_NORMAL +#define ACPI_IORT_RMR_ATTR_NORMAL 0x05 +#endif + struct iort_its_msi_chip { struct list_head list; struct fwnode_handle *fw_node;
IORT rev E.d introduces more details into the RMR node Flags field. Add temporary definitions to describe and access these Flags field until ACPICA header is updated to support E.d. This patch can be reverted once the include/acpi/actbl2.h has all the relevant definitions. Signed-off-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com> --- Please find the ACPICA E.d related changes pull request here, https://github.com/acpica/acpica/pull/752 --- drivers/acpi/arm64/iort.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)