[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <449d4a2d192d23eb504e43b13c35c326f2d0309a.camel@infradead.org>
Date: Wed, 17 Mar 2021 11:47:11 +0000
From: David Woodhouse <dwmw2@...radead.org>
To: Joerg Roedel <joro@...tes.org>, iommu@...ts.linux-foundation.org
Cc: linux-kernel@...r.kernel.org, Huang Rui <ray.huang@....com>,
Suravee Suthikulpanit <suravee.suthikulpanit@....com>,
Alex Deucher <alexander.deucher@....com>,
Xiaojian Du <xiaojian.du@....com>,
Joerg Roedel <jroedel@...e.de>, stable@...r.kernel.org
Subject: Re: [PATCH 2/3] iommu/amd: Don't call early_amd_iommu_init() when
AMD IOMMU is disabled
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?
Download attachment "smime.p7s" of type "application/x-pkcs7-signature" (5174 bytes)
Powered by blists - more mailing lists