From: David Woodhouse <dwmw2@infradead.org>
To: Joerg Roedel <joro@8bytes.org>, iommu@lists.linux-foundation.org
Cc: linux-kernel@vger.kernel.org, Huang Rui <ray.huang@amd.com>,
Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
Alex Deucher <alexander.deucher@amd.com>,
Xiaojian Du <xiaojian.du@amd.com>, Joerg Roedel <jroedel@suse.de>,
stable@vger.kernel.org
Subject: Re: [PATCH 2/3] iommu/amd: Don't call early_amd_iommu_init() when AMD IOMMU is disabled
Date: Wed, 17 Mar 2021 11:47:11 +0000 [thread overview]
Message-ID: <449d4a2d192d23eb504e43b13c35c326f2d0309a.camel@infradead.org> (raw)
In-Reply-To: <20210317091037.31374-3-joro@8bytes.org>
[-- Attachment #1: Type: text/plain, Size: 1310 bytes --]
On Wed, 2021-03-17 at 10:10 +0100, Joerg Roedel wrote:
> diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c
> index 3280e6f5b720..61dae1800b7f 100644
> --- a/drivers/iommu/amd/init.c
> +++ b/drivers/iommu/amd/init.c
> @@ -2919,12 +2919,12 @@ static int __init state_next(void)
> }
> break;
> case IOMMU_IVRS_DETECTED:
> - ret = early_amd_iommu_init();
> - init_state = ret ? IOMMU_INIT_ERROR : IOMMU_ACPI_FINISHED;
> - if (init_state == IOMMU_ACPI_FINISHED && amd_iommu_disabled) {
> - pr_info("AMD IOMMU disabled\n");
> + if (amd_iommu_disabled) {
> init_state = IOMMU_CMDLINE_DISABLED;
> ret = -EINVAL;
> + } else {
> + ret = early_amd_iommu_init();
> + init_state = ret ? IOMMU_INIT_ERROR : IOMMU_ACPI_FINISHED;
> }
> break;
> case IOMMU_ACPI_FINISHED:
> --
If you've already moved the Stoney Ridge check out of the way, there's
no real reason why you can't just set init_state=IOMMU_CMDLINE_DISABLED
directly from parse_amd_iommu_options(), is there? Then you don't need
the condition here at all?
[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5174 bytes --]
next prev parent reply other threads:[~2021-03-17 11:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-17 9:10 [PATCH 0/3] iommu/amd: Fix booting with amd_iommu=off Joerg Roedel
2021-03-17 9:10 ` [PATCH 1/3] iommu/amd: Move Stoney Ridge check to detect_ivrs() Joerg Roedel
2021-03-17 9:10 ` [PATCH 2/3] iommu/amd: Don't call early_amd_iommu_init() when AMD IOMMU is disabled Joerg Roedel
2021-03-17 11:47 ` David Woodhouse [this message]
2021-03-17 13:32 ` Joerg Roedel
2021-03-17 13:37 ` David Woodhouse
2021-03-17 14:24 ` Joerg Roedel
2021-03-17 9:10 ` [PATCH 3/3] iommu/amd: Keep track of amd_iommu_irq_remap state Joerg Roedel
2021-03-17 10:48 ` [PATCH 0/3] iommu/amd: Fix booting with amd_iommu=off Huang Rui
2021-03-18 9:47 ` 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=449d4a2d192d23eb504e43b13c35c326f2d0309a.camel@infradead.org \
--to=dwmw2@infradead.org \
--cc=alexander.deucher@amd.com \
--cc=iommu@lists.linux-foundation.org \
--cc=joro@8bytes.org \
--cc=jroedel@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=ray.huang@amd.com \
--cc=stable@vger.kernel.org \
--cc=suravee.suthikulpanit@amd.com \
--cc=xiaojian.du@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
all inboxes | Powered by JetHome®