From: Nate Watterson <nwatters@codeaurora.org>
To: Will Deacon <will.deacon@arm.com>,
Robin Murphy <robin.murphy@arm.com>,
Joerg Roedel <joro@8bytes.org>,
linux-arm-kernel@lists.infradead.org,
iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] iommu/arm-smmu-v3: Implement shutdown method
Date: Thu, 29 Jun 2017 18:34:05 -0400 [thread overview]
Message-ID: <f341a982-9ef3-d907-7254-f1e39ae3b1da@codeaurora.org> (raw)
In-Reply-To: <1498774696-16037-1-git-send-email-nwatters@codeaurora.org>
I should have removed the '-v3' since this revision of the patch adds
shutdown to arm-smmu.c as well. I'll fix that in a subsequent version
after waiting to see if there are additional changes that need to be
made.
On 6/29/2017 6:18 PM, Nate Watterson wrote:
> The shutdown method disables the SMMU to avoid corrupting a new kernel
> started with kexec.
>
> Signed-off-by: Nate Watterson <nwatters@codeaurora.org>
> ---
> drivers/iommu/arm-smmu-v3.c | 7 +++++++
> drivers/iommu/arm-smmu.c | 6 ++++++
> 2 files changed, 13 insertions(+)
>
> diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c
> index 380969a..3d8ac29 100644
> --- a/drivers/iommu/arm-smmu-v3.c
> +++ b/drivers/iommu/arm-smmu-v3.c
> @@ -2765,9 +2765,15 @@ static int arm_smmu_device_remove(struct platform_device *pdev)
> struct arm_smmu_device *smmu = platform_get_drvdata(pdev);
>
> arm_smmu_device_disable(smmu);
> +
> return 0;
> }
>
> +static void arm_smmu_device_shutdown(struct platform_device *pdev)
> +{
> + arm_smmu_device_remove(pdev);
> +}
> +
> static struct of_device_id arm_smmu_of_match[] = {
> { .compatible = "arm,smmu-v3", },
> { },
> @@ -2781,6 +2787,7 @@ static int arm_smmu_device_remove(struct platform_device *pdev)
> },
> .probe = arm_smmu_device_probe,
> .remove = arm_smmu_device_remove,
> + .shutdown = arm_smmu_device_shutdown,
> };
> module_platform_driver(arm_smmu_driver);
>
> diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
> index 7ec30b0..af50bab 100644
> --- a/drivers/iommu/arm-smmu.c
> +++ b/drivers/iommu/arm-smmu.c
> @@ -2319,6 +2319,11 @@ static int arm_smmu_device_remove(struct platform_device *pdev)
> return 0;
> }
>
> +static void arm_smmu_device_shutdown(struct platform_device *pdev)
> +{
> + arm_smmu_device_remove(pdev);
> +}
> +
> static struct platform_driver arm_smmu_driver = {
> .driver = {
> .name = "arm-smmu",
> @@ -2326,6 +2331,7 @@ static int arm_smmu_device_remove(struct platform_device *pdev)
> },
> .probe = arm_smmu_device_probe,
> .remove = arm_smmu_device_remove,
> + .shutdown = arm_smmu_device_shutdown,
> };
> module_platform_driver(arm_smmu_driver);
>
>
--
Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
next prev parent reply other threads:[~2017-06-29 22:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-29 22:18 Nate Watterson
2017-06-29 22:34 ` Nate Watterson [this message]
2017-06-30 17:11 ` Will Deacon
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=f341a982-9ef3-d907-7254-f1e39ae3b1da@codeaurora.org \
--to=nwatters@codeaurora.org \
--cc=iommu@lists.linux-foundation.org \
--cc=joro@8bytes.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robin.murphy@arm.com \
--cc=will.deacon@arm.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®