* [PATCH 0/2] iommu/amd: Optimization and cleanup for unused variables
@ 2020-01-09 3:02 Adrian Huang
2020-01-09 3:02 ` [PATCH 1/2] iommu/amd: Replace two consecutive readl calls with one readq Adrian Huang
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Adrian Huang @ 2020-01-09 3:02 UTC (permalink / raw)
To: Joerg Roedel; +Cc: iommu, Adrian Huang
This series optimizes the register reading by using readq instead of
readl and cleans up the unused variables.
Adrian Huang (2):
iommu/amd: Replace two consecutive readl calls with one readq
iommu/amd: Remove unused struct member
drivers/iommu/amd_iommu_init.c | 6 +-----
drivers/iommu/amd_iommu_types.h | 1 -
2 files changed, 1 insertion(+), 6 deletions(-)
--
2.17.1
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] iommu/amd: Replace two consecutive readl calls with one readq
2020-01-09 3:02 [PATCH 0/2] iommu/amd: Optimization and cleanup for unused variables Adrian Huang
@ 2020-01-09 3:02 ` Adrian Huang
2020-01-09 3:02 ` [PATCH 2/2] iommu/amd: Remove unused struct member Adrian Huang
2020-01-17 10:06 ` [PATCH 0/2] iommu/amd: Optimization and cleanup for unused variables Joerg Roedel
2 siblings, 0 replies; 4+ messages in thread
From: Adrian Huang @ 2020-01-09 3:02 UTC (permalink / raw)
To: Joerg Roedel; +Cc: iommu, Adrian Huang
From: Adrian Huang <ahuang12@lenovo.com>
Optimize the reigster reading by using readq instead of the two
consecutive readl calls.
Signed-off-by: Adrian Huang <ahuang12@lenovo.com>
---
drivers/iommu/amd_iommu_init.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c
index c5167fe0bd5f..cfdc4b60ccbe 100644
--- a/drivers/iommu/amd_iommu_init.c
+++ b/drivers/iommu/amd_iommu_init.c
@@ -1718,7 +1718,6 @@ static const struct attribute_group *amd_iommu_groups[] = {
static int __init iommu_init_pci(struct amd_iommu *iommu)
{
int cap_ptr = iommu->cap_ptr;
- u32 low, high;
int ret;
iommu->dev = pci_get_domain_bus_and_slot(0, PCI_BUS_NUM(iommu->devid),
@@ -1736,10 +1735,7 @@ static int __init iommu_init_pci(struct amd_iommu *iommu)
amd_iommu_iotlb_sup = false;
/* read extended feature bits */
- low = readl(iommu->mmio_base + MMIO_EXT_FEATURES);
- high = readl(iommu->mmio_base + MMIO_EXT_FEATURES + 4);
-
- iommu->features = ((u64)high << 32) | low;
+ iommu->features = readq(iommu->mmio_base + MMIO_EXT_FEATURES);
if (iommu_feature(iommu, FEATURE_GT)) {
int glxval;
--
2.17.1
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] iommu/amd: Remove unused struct member
2020-01-09 3:02 [PATCH 0/2] iommu/amd: Optimization and cleanup for unused variables Adrian Huang
2020-01-09 3:02 ` [PATCH 1/2] iommu/amd: Replace two consecutive readl calls with one readq Adrian Huang
@ 2020-01-09 3:02 ` Adrian Huang
2020-01-17 10:06 ` [PATCH 0/2] iommu/amd: Optimization and cleanup for unused variables Joerg Roedel
2 siblings, 0 replies; 4+ messages in thread
From: Adrian Huang @ 2020-01-09 3:02 UTC (permalink / raw)
To: Joerg Roedel; +Cc: iommu, Adrian Huang
From: Adrian Huang <ahuang12@lenovo.com>
Commit c805b428f206 ("iommu/amd: Remove amd_iommu_pd_list") removes
the global list for the allocated protection domains. The
corresponding member 'list' of the protection_domain struct is
not used anymore, so it can be removed.
Signed-off-by: Adrian Huang <ahuang12@lenovo.com>
---
drivers/iommu/amd_iommu_types.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/iommu/amd_iommu_types.h b/drivers/iommu/amd_iommu_types.h
index 500f0b78879d..f8d01d6b00da 100644
--- a/drivers/iommu/amd_iommu_types.h
+++ b/drivers/iommu/amd_iommu_types.h
@@ -463,7 +463,6 @@ struct amd_irte_ops;
* independent of their use.
*/
struct protection_domain {
- struct list_head list; /* for list of all protection domains */
struct list_head dev_list; /* List of all devices in this domain */
struct iommu_domain domain; /* generic domain handle used by
iommu core code */
--
2.17.1
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] iommu/amd: Optimization and cleanup for unused variables
2020-01-09 3:02 [PATCH 0/2] iommu/amd: Optimization and cleanup for unused variables Adrian Huang
2020-01-09 3:02 ` [PATCH 1/2] iommu/amd: Replace two consecutive readl calls with one readq Adrian Huang
2020-01-09 3:02 ` [PATCH 2/2] iommu/amd: Remove unused struct member Adrian Huang
@ 2020-01-17 10:06 ` Joerg Roedel
2 siblings, 0 replies; 4+ messages in thread
From: Joerg Roedel @ 2020-01-17 10:06 UTC (permalink / raw)
To: Adrian Huang; +Cc: iommu, Adrian Huang
On Thu, Jan 09, 2020 at 11:02:49AM +0800, Adrian Huang wrote:
> This series optimizes the register reading by using readq instead of
> readl and cleans up the unused variables.
>
> Adrian Huang (2):
> iommu/amd: Replace two consecutive readl calls with one readq
> iommu/amd: Remove unused struct member
Applied, thanks Adrian.
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-01-17 10:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-09 3:02 [PATCH 0/2] iommu/amd: Optimization and cleanup for unused variables Adrian Huang
2020-01-09 3:02 ` [PATCH 1/2] iommu/amd: Replace two consecutive readl calls with one readq Adrian Huang
2020-01-09 3:02 ` [PATCH 2/2] iommu/amd: Remove unused struct member Adrian Huang
2020-01-17 10:06 ` [PATCH 0/2] iommu/amd: Optimization and cleanup for unused variables Joerg Roedel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).