/* dmar_parse_one_drhd - parses exactly one DMA remapping hardware definition structure which uniquely represent one DMA remapping hardware unit present in the platform  */
static int __init dmar_parse_one_drhd(struct acpi_dmar_header *header)
/* dmar_parse_one_drhd - parses exactly one DMA remapping hardware definition structure which uniquely represent one DMA remapping hardware unit present in the platform  */
static int __init dmar_parse_one_drhd(struct acpi_dmar_header *header)
{
	struct acpi_dmar_hardware_unit *drhd;
	struct dmar_drhd_unit *dmaru;
	int ret = 0;
	drhd = (struct acpi_dmar_hardware_unit *)header;
	dmaru = kzalloc(sizeof(*dmaru), GFP_KERNEL);
	if (!dmaru)
		return -ENOMEM;
	dmaru->hdr = header;
	dmaru->reg_base_addr = drhd->address;
	dmaru->segment = drhd->segment;
	dmaru->include_all = drhd->flags & 0x1;
	ret = alloc_iommu(dmaru);
	if (ret) {
		kfree(dmaru);
		return ret;
	}
	dmar_register_drhd_unit(dmaru);
	return 0;
}