Lines Matching defs:hdr
57 static int __init viot_check_bounds(const struct acpi_viot_header *hdr)
64 hdr_end = ACPI_ADD_PTR(struct acpi_viot_header, hdr, sizeof(*hdr));
66 if (hdr < start || hdr_end > end) {
70 if (hdr->length < sizeof(*hdr)) {
131 struct acpi_viot_header *hdr = ACPI_ADD_PTR(struct acpi_viot_header,
136 } *node = (void *)hdr;
142 if (viot_check_bounds(hdr))
150 switch (hdr->type) {
152 if (hdr->length < sizeof(node->pci))
159 if (hdr->length < sizeof(node->mmio))
179 static int __init viot_parse_node(const struct acpi_viot_header *hdr)
187 } *node = (void *)hdr;
189 if (viot_check_bounds(hdr))
192 if (hdr->type == ACPI_VIOT_NODE_VIRTIO_IOMMU_PCI ||
193 hdr->type == ACPI_VIOT_NODE_VIRTIO_IOMMU_MMIO)
200 switch (hdr->type) {
202 if (hdr->length < sizeof(node->pci)) {
216 if (hdr->length < sizeof(node->mmio)) {
227 pr_warn("Unsupported node %x\n", hdr->type);
260 struct acpi_table_header *hdr;
262 status = acpi_get_table(ACPI_SIG_VIOT, 0, &hdr);
266 acpi_put_table(hdr);
280 struct acpi_table_header *hdr;
283 status = acpi_get_table(ACPI_SIG_VIOT, 0, &hdr);
293 viot = (void *)hdr;
304 acpi_put_table(hdr);