From: Nadav Amit <namit-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org>
To: joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
Nadav Amit <namit-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org>
Subject: [PATCH] iommu/vt-d: Remove unnecassary qi clflushes
Date: Fri, 24 Jun 2016 06:13:14 -0700 [thread overview]
Message-ID: <1466773994-242872-1-git-send-email-namit@vmware.com> (raw)
According to the manual: "Hardware access to ... invalidation queue ...
are always coherent."
Remove unnecassary clflushes accordingly.
Signed-off-by: Nadav Amit <namit-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org>
---
Build-tested since I do not have an IOMMU that does not support
coherency.
---
drivers/iommu/dmar.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c
index 6a86b5d..ca56ec3 100644
--- a/drivers/iommu/dmar.c
+++ b/drivers/iommu/dmar.c
@@ -1155,8 +1155,6 @@ static int qi_check_fault(struct intel_iommu *iommu, int index)
(unsigned long long)qi->desc[index].high);
memcpy(&qi->desc[index], &qi->desc[wait_index],
sizeof(struct qi_desc));
- __iommu_flush_cache(iommu, &qi->desc[index],
- sizeof(struct qi_desc));
writel(DMA_FSTS_IQE, iommu->reg + DMAR_FSTS_REG);
return -EINVAL;
}
@@ -1231,9 +1229,6 @@ restart:
hw[wait_index] = wait_desc;
- __iommu_flush_cache(iommu, &hw[index], sizeof(struct qi_desc));
- __iommu_flush_cache(iommu, &hw[wait_index], sizeof(struct qi_desc));
-
qi->free_head = (qi->free_head + 2) % QI_LENGTH;
qi->free_cnt -= 2;
--
2.7.4
next reply other threads:[~2016-06-24 13:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-24 13:13 Nadav Amit [this message]
[not found] ` <1466773994-242872-1-git-send-email-namit-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org>
2016-06-27 11:30 ` [PATCH] iommu/vt-d: Remove unnecassary qi clflushes Joerg Roedel
[not found] ` <20160627113014.GL11432-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2016-06-27 16:17 ` Nadav Amit
[not found] ` <C78095BC-3BED-48DE-90CE-601DE40AA613-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-07-05 16:27 ` Nadav Amit
[not found] ` <926A8CFB-D22D-4DC6-9EE0-D912451365BB-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-07-05 16:40 ` Paolo Bonzini
[not found] ` <ac3ff8d4-e47b-e4d8-40ed-02811732526a-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-07-05 16:50 ` Nadav Amit
[not found] ` <5F48A3E6-99EE-4DC5-BF38-4F0338E9E8D0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-07-05 16:57 ` Paolo Bonzini
2016-07-13 10:07 ` Joerg Roedel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1466773994-242872-1-git-send-email-namit@vmware.com \
--to=namit-pghwnbhtmq7qt0dzr+alfa@public.gmane.org \
--cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.