Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1678055

Re: [PATCH] iommu/arm-smmu-v3: Implement shutdown method

From Will Deacon <will.deacon@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH] iommu/arm-smmu-v3: Implement shutdown method
Date 2017-06-29 20:40 +0200
Message-ID <tXMwb-2FO-31@gated-at.bofh.it> (permalink)
References <tXLJL-28r-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Jun 29, 2017 at 01:40:15PM -0400, Nate Watterson wrote:
> The shutdown method disables the SMMU and its interrupts to avoid
> potentially corrupting a new kernel started with kexec.
> 
> Signed-off-by: Nate Watterson <nwatters@codeaurora.org>
> ---
>  drivers/iommu/arm-smmu-v3.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)

We should update arm-smmu.c as well.

> diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c
> index 380969a..907d576 100644
> --- a/drivers/iommu/arm-smmu-v3.c
> +++ b/drivers/iommu/arm-smmu-v3.c
> @@ -2765,9 +2765,19 @@ static int arm_smmu_device_remove(struct platform_device *pdev)
>  	struct arm_smmu_device *smmu = platform_get_drvdata(pdev);
>  
>  	arm_smmu_device_disable(smmu);
> +
> +	/* Disable IRQs */
> +	arm_smmu_write_reg_sync(smmu, 0, ARM_SMMU_IRQ_CTRL,
> +				ARM_SMMU_IRQ_CTRLACK);
> +

Can you justify the need for this? If we actually need to disable
interrupts, then I'd like to understand why so that we can make sure we
get the ordering right with respect to disabling the device. Also, do we
need to clear the MSI registers too?

My understanding is that kexec will mask irqs at the GIC, so there's not
actually an issue here.

Will

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] iommu/arm-smmu-v3: Implement shutdown method Nate Watterson <nwatters@codeaurora.org> - 2017-06-29 19:50 +0200
  Re: [PATCH] iommu/arm-smmu-v3: Implement shutdown method Will Deacon <will.deacon@arm.com> - 2017-06-29 20:40 +0200
    Re: [PATCH] iommu/arm-smmu-v3: Implement shutdown method Nate Watterson <nwatters@codeaurora.org> - 2017-06-30 00:30 +0200
      Re: [PATCH] iommu/arm-smmu-v3: Implement shutdown method Will Deacon <will.deacon@arm.com> - 2017-06-30 19:20 +0200

csiph-web