All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Jason Gunthorpe <jgg@ziepe.ca>, "Peng Fan (OSS)" <peng.fan@oss.nxp.com>
Cc: Will Deacon <will@kernel.org>,
	Robin Murphy <robin.murphy@arm.com>,
	Joerg Roedel <joro@8bytes.org>, Marc Zyngier <maz@kernel.org>,
	Bixuan Cui <cuibixuan@huawei.com>,
	linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev,
	linux-kernel@vger.kernel.org, Peng Fan <peng.fan@nxp.com>
Subject: Re: [PATCH 3/3] iommu/arm-smmu-v3: support suspend/resume
Date: Mon, 25 Mar 2024 18:29:03 +0100	[thread overview]
Message-ID: <87bk72fcf4.ffs@tglx> (raw)
In-Reply-To: <20240325134848.GA8419@ziepe.ca>

On Mon, Mar 25 2024 at 10:48, Jason Gunthorpe wrote:
> On Sun, Mar 24, 2024 at 08:29:00PM +0800, Peng Fan (OSS) wrote:
>> +static void arm_smmu_resume_unique_irqs(struct arm_smmu_device *smmu)
>> +{
>> +	struct device *dev = smmu->dev;
>> +	struct msi_desc *desc;
>> +	struct msi_msg msg;
>> +
>> +	if (!dev->msi.domain)
>> +		return;
>> +
>> +	desc = irq_get_msi_desc(smmu->evtq.q.irq);
>> +	if (desc) {
>> +		get_cached_msi_msg(smmu->evtq.q.irq, &msg);
>> +		arm_smmu_write_msi_msg(desc, &msg);
>> +	}
>> +
>> +	desc = irq_get_msi_desc(smmu->gerr_irq);
>> +	if (desc) {
>> +		get_cached_msi_msg(smmu->gerr_irq, &msg);
>> +		arm_smmu_write_msi_msg(desc, &msg);
>> +	}
>> +
>> +	if (smmu->features & ARM_SMMU_FEAT_PRI) {
>> +		desc = irq_get_msi_desc(smmu->priq.q.irq);
>> +		if (desc) {
>> +			get_cached_msi_msg(smmu->priq.q.irq, &msg);
>> +			arm_smmu_write_msi_msg(desc, &msg);
>> +		}
>> +	}
>> +}
>
> I wonder if this should be done instead by converting the driver away
> from platform MSI to the new MSI mechanism?

There is work in progress for that. Should come around in the next
weeks.

WARNING: multiple messages have this Message-ID (diff)
From: Thomas Gleixner <tglx@linutronix.de>
To: Jason Gunthorpe <jgg@ziepe.ca>, "Peng Fan (OSS)" <peng.fan@oss.nxp.com>
Cc: Will Deacon <will@kernel.org>,
	Robin Murphy <robin.murphy@arm.com>,
	Joerg Roedel <joro@8bytes.org>, Marc Zyngier <maz@kernel.org>,
	Bixuan Cui <cuibixuan@huawei.com>,
	linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev,
	linux-kernel@vger.kernel.org, Peng Fan <peng.fan@nxp.com>
Subject: Re: [PATCH 3/3] iommu/arm-smmu-v3: support suspend/resume
Date: Mon, 25 Mar 2024 18:29:03 +0100	[thread overview]
Message-ID: <87bk72fcf4.ffs@tglx> (raw)
In-Reply-To: <20240325134848.GA8419@ziepe.ca>

On Mon, Mar 25 2024 at 10:48, Jason Gunthorpe wrote:
> On Sun, Mar 24, 2024 at 08:29:00PM +0800, Peng Fan (OSS) wrote:
>> +static void arm_smmu_resume_unique_irqs(struct arm_smmu_device *smmu)
>> +{
>> +	struct device *dev = smmu->dev;
>> +	struct msi_desc *desc;
>> +	struct msi_msg msg;
>> +
>> +	if (!dev->msi.domain)
>> +		return;
>> +
>> +	desc = irq_get_msi_desc(smmu->evtq.q.irq);
>> +	if (desc) {
>> +		get_cached_msi_msg(smmu->evtq.q.irq, &msg);
>> +		arm_smmu_write_msi_msg(desc, &msg);
>> +	}
>> +
>> +	desc = irq_get_msi_desc(smmu->gerr_irq);
>> +	if (desc) {
>> +		get_cached_msi_msg(smmu->gerr_irq, &msg);
>> +		arm_smmu_write_msi_msg(desc, &msg);
>> +	}
>> +
>> +	if (smmu->features & ARM_SMMU_FEAT_PRI) {
>> +		desc = irq_get_msi_desc(smmu->priq.q.irq);
>> +		if (desc) {
>> +			get_cached_msi_msg(smmu->priq.q.irq, &msg);
>> +			arm_smmu_write_msi_msg(desc, &msg);
>> +		}
>> +	}
>> +}
>
> I wonder if this should be done instead by converting the driver away
> from platform MSI to the new MSI mechanism?

There is work in progress for that. Should come around in the next
weeks.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2024-03-25 17:29 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-24 12:28 [PATCH 0/3] iommu/smmu-v3: support suspend/resume Peng Fan (OSS)
2024-03-24 12:28 ` Peng Fan (OSS)
2024-03-24 12:28 ` [PATCH 1/3] iommu/arm-smmu-v3: save bypass in smmu device structure Peng Fan (OSS)
2024-03-24 12:28   ` Peng Fan (OSS)
2024-03-24 12:28 ` [PATCH 2/3] genirq/msi: cache the last msi msg Peng Fan (OSS)
2024-03-24 12:28   ` Peng Fan (OSS)
2024-03-25 17:40   ` Thomas Gleixner
2024-03-25 17:40     ` Thomas Gleixner
2024-03-26  1:02     ` Peng Fan
2024-03-26  1:02       ` Peng Fan
2024-03-24 12:29 ` [PATCH 3/3] iommu/arm-smmu-v3: support suspend/resume Peng Fan (OSS)
2024-03-24 12:29   ` Peng Fan (OSS)
2024-03-25 13:48   ` Jason Gunthorpe
2024-03-25 13:48     ` Jason Gunthorpe
2024-03-25 17:29     ` Thomas Gleixner [this message]
2024-03-25 17:29       ` Thomas Gleixner
2024-03-26  1:26       ` Peng Fan
2024-03-26  1:26         ` Peng Fan
2024-03-26 20:11       ` Thomas Gleixner
2024-03-26 20:11         ` Thomas Gleixner

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=87bk72fcf4.ffs@tglx \
    --to=tglx@linutronix.de \
    --cc=cuibixuan@huawei.com \
    --cc=iommu@lists.linux.dev \
    --cc=jgg@ziepe.ca \
    --cc=joro@8bytes.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=peng.fan@nxp.com \
    --cc=peng.fan@oss.nxp.com \
    --cc=robin.murphy@arm.com \
    --cc=will@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.