Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bb9b69fe authored by Mitchel Humpherys's avatar Mitchel Humpherys
Browse files

iommu/iommu-debug: Add COHERENT_HTW_DISABLE to attach info



It can be useful to check whether or not coherent hardware table walking
has been explicitly disabled on attached domains.  Add this to the
attach info debugfs file.

Change-Id: I432303ecb734d32eaa02038694daad0d8c4d8aba
Signed-off-by: default avatarMitchel Humpherys <mitchelh@codeaurora.org>
parent 33e7cf89
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -41,6 +41,7 @@ static int iommu_debug_attachment_info_show(struct seq_file *s, void *ignored)
{
{
	struct iommu_debug_attachment *attach = s->private;
	struct iommu_debug_attachment *attach = s->private;
	phys_addr_t pt_phys;
	phys_addr_t pt_phys;
	int coherent_htw_disable;


	seq_printf(s, "Domain: 0x%p\n", attach->domain);
	seq_printf(s, "Domain: 0x%p\n", attach->domain);
	if (iommu_domain_get_attr(attach->domain, DOMAIN_ATTR_PT_BASE_ADDR,
	if (iommu_domain_get_attr(attach->domain, DOMAIN_ATTR_PT_BASE_ADDR,
@@ -53,6 +54,14 @@ static int iommu_debug_attachment_info_show(struct seq_file *s, void *ignored)
			   pt_virt, &pt_phys);
			   pt_virt, &pt_phys);
	}
	}


	seq_puts(s, "COHERENT_HTW_DISABLE: ");
	if (iommu_domain_get_attr(attach->domain,
				  DOMAIN_ATTR_COHERENT_HTW_DISABLE,
				  &coherent_htw_disable))
		seq_puts(s, "(Unknown)\n");
	else
		seq_printf(s, "%d\n", coherent_htw_disable);

	return 0;
	return 0;
}
}