iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Suravee Suthikulpanit via iommu <iommu@lists.linux-foundation.org>
To: linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org
Cc: Jon.Grimm@amd.com, wei.huang2@amd.com
Subject: [PATCH 3/3] iommu/amd: Remove iommu_init_ga()
Date: Fri, 20 Aug 2021 15:29:57 -0500	[thread overview]
Message-ID: <20210820202957.187572-4-suravee.suthikulpanit@amd.com> (raw)
In-Reply-To: <20210820202957.187572-1-suravee.suthikulpanit@amd.com>

Since the function has been simplified and only call iommu_init_ga_log(),
remove the function and replace with iommu_init_ga_log() instead.

Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
---
 drivers/iommu/amd/init.c | 17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)

diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c
index ea3330ed545d..5ec683675ff0 100644
--- a/drivers/iommu/amd/init.c
+++ b/drivers/iommu/amd/init.c
@@ -827,9 +827,9 @@ static int iommu_ga_log_enable(struct amd_iommu *iommu)
 	return 0;
 }
 
-#ifdef CONFIG_IRQ_REMAP
 static int iommu_init_ga_log(struct amd_iommu *iommu)
 {
+#ifdef CONFIG_IRQ_REMAP
 	u64 entry;
 
 	if (!AMD_IOMMU_GUEST_IR_VAPIC(amd_iommu_guest_ir))
@@ -859,18 +859,9 @@ static int iommu_init_ga_log(struct amd_iommu *iommu)
 err_out:
 	free_ga_log(iommu);
 	return -EINVAL;
-}
-#endif /* CONFIG_IRQ_REMAP */
-
-static int iommu_init_ga(struct amd_iommu *iommu)
-{
-	int ret = 0;
-
-#ifdef CONFIG_IRQ_REMAP
-	ret = iommu_init_ga_log(iommu);
+#else
+	return 0;
 #endif /* CONFIG_IRQ_REMAP */
-
-	return ret;
 }
 
 static int __init alloc_cwwb_sem(struct amd_iommu *iommu)
@@ -1852,7 +1843,7 @@ static int __init iommu_init_pci(struct amd_iommu *iommu)
 	if (iommu_feature(iommu, FEATURE_PPR) && alloc_ppr_log(iommu))
 		return -ENOMEM;
 
-	ret = iommu_init_ga(iommu);
+	ret = iommu_init_ga_log(iommu);
 	if (ret)
 		return ret;
 
-- 
2.17.1

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

  parent reply	other threads:[~2021-08-20 20:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-20 20:29 [PATCH 0/3] iommu/amd: Fix unable to handle page fault due to AVIC Suravee Suthikulpanit via iommu
2021-08-20 20:29 ` [PATCH 1/3] iommu/amd: Introduce helper function to check feature bit on all IOMMUs Suravee Suthikulpanit via iommu
2021-08-20 20:29 ` [PATCH 2/3] iommu/amd: Relocate GAMSup check to early_enable_iommus Suravee Suthikulpanit via iommu
2021-08-20 20:29 ` Suravee Suthikulpanit via iommu [this message]
2021-08-31 17:10 ` [PATCH 0/3] iommu/amd: Fix unable to handle page fault due to AVIC Suthikulpanit, Suravee via iommu
2021-09-02  7:38   ` Joerg Roedel
2021-09-02 16:13     ` Suthikulpanit, Suravee via iommu
2021-09-09  9:36       ` Joerg Roedel
2021-09-09 11:17       ` Joerg Roedel
2021-09-10 18:01         ` Wei Huang via iommu

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=20210820202957.187572-4-suravee.suthikulpanit@amd.com \
    --to=iommu@lists.linux-foundation.org \
    --cc=Jon.Grimm@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=wei.huang2@amd.com \
    /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 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).