Re: [PATCH v12 10/12] iommu/arm-smmu-v3: Retain CR0_SMMUEN during kdump device reset
From: Nicolin Chen
Date: Mon Nov 16 2026 - 14:13:05 EST
On Mon, Nov 16, 2026 at 12:19:32PM +0000, John Garry wrote:
> On 11/2/26 05:19, Nicolin Chen wrote:
> > + if (smmu->options & ARM_SMMU_OPT_KDUMP_ADOPT) {
> > + dev_info(smmu->dev,
> > + "kdump: retaining SMMUEN for in-flight DMA\n");
> > + enables = reg & ~(CR0_CMDQEN | CR0_EVTQEN | CR0_PRIQEN);
> > + /*
> > + * Disable queues since arm_smmu_device_disable() is skipped.
> > + * CR0 fields are independent per spec, so the queue enable bits
> > + * can be cleared while retaining SMMUEN=1.
> > + */
> > + ret = arm_smmu_write_reg_sync(smmu, enables, ARM_SMMU_CR0,
> > + ARM_SMMU_CR0ACK);
> > + if (ret) {
> > + dev_err(smmu->dev, "failed to disable queues\n");
>
> "kdump: failed to disable queues\n"?
>
> And it would be nice to say or hint what happens next.
OK.
> > + return ret;
> > + }
> > + goto reset_queues;
>
> nit: goto could be avoided, but that is a taste thing
It's neater by skipping a number of inits here. I'd keep it.
Nicolin