[PATCH v4 3/6] ACPI: Add driver for the VIOT table
Jean-Philippe Brucker
jean-philippe at linaro.org
Fri Jun 18 00:43:47 PDT 2021
On Wed, Jun 16, 2021 at 03:26:08PM +0200, Eric Auger wrote:
> > + default:
> > + pr_warn("Unsupported node %x\n", hdr->type);
> > + ret = 0;
> > + goto err_free;
> > + }
> > +
> > + /*
> > + * To be compatible with future versions of the table which may include
> > + * other node types, keep parsing.
> > + */
> nit: doesn't this comment rather apply to the default clause in the
> switch.
Yes, the comment doesn't accurately explain the code below, I'll tweak it.
/*
* A future version of the table may use the node for other purposes.
* Keep parsing.
*/
> In case the PCI range node or the single MMIO endoint node does
> not refer to any translation element, isn't it simply an error case?
It is permissible in my opinion. If a future version of the spec appends
new fields to the MMIO endpoint describing some PV property (I can't think
of a useful example), then the table can contain the vIOMMU topology as
usual plus one MMIO node that's only here to describe that property, and
doesn't have a translation element. If we encounter that I think we should
keep parsing.
> > + if (!ep->viommu) {
> > + pr_warn("No IOMMU node found\n");
> > + ret = 0;
> > + goto err_free;
> > + }
> Besides
> Reviewed-by: Eric Auger <eric.auger at redhat.com>
Thanks!
Jean
More information about the linux-arm-kernel
mailing list