All of lore.kernel.org
 help / color / mirror / Atom feed
From: Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>
To: Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org>
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH 2/2] iommu/arm-smmu: Add system PM support
Date: Tue, 8 Aug 2017 12:18:17 +0100	[thread overview]
Message-ID: <20170808111816.GD13355@arm.com> (raw)
In-Reply-To: <d8d6f3b606ed05d53b47d36e1c6a7f4b74eb3afc.1500381551.git.robin.murphy-5wv7dgnIgG8@public.gmane.org>

On Tue, Jul 18, 2017 at 01:44:42PM +0100, Robin Murphy wrote:
> With all our hardware state tracked in such a way that we can naturally
> restore it as part of the necessary reset, resuming is trivial, and
> there's nothing to do on suspend at all.
> 
> Signed-off-by: Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org>
> ---
>  drivers/iommu/arm-smmu.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
> index 86897b7b81d8..0f5f06e9abfa 100644
> --- a/drivers/iommu/arm-smmu.c
> +++ b/drivers/iommu/arm-smmu.c
> @@ -2356,10 +2356,22 @@ static int arm_smmu_device_remove(struct platform_device *pdev)
>  	return 0;
>  }
>  
> +static int __maybe_unused arm_smmu_pm_resume(struct device *dev)
> +{

Did you actually get a warning here without the __maybe_unused annotation?
It looks like some other drivers just guard the thing with CONFIG_PM_SLEEP.

> +	struct arm_smmu_device *smmu = dev_get_drvdata(dev);
> +
> +	arm_smmu_device_reset(smmu);
> +	return 0;
> +}
> +
> +
> +static SIMPLE_DEV_PM_OPS(arm_smmu_pm_ops, NULL, arm_smmu_pm_resume);
> +
>  static struct platform_driver arm_smmu_driver = {
>  	.driver	= {
>  		.name		= "arm-smmu",
>  		.of_match_table	= of_match_ptr(arm_smmu_of_match),
> +		.pm = &arm_smmu_pm_ops,

Cosmetic: can you tab-align this assignment please?

Will

WARNING: multiple messages have this Message-ID (diff)
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] iommu/arm-smmu: Add system PM support
Date: Tue, 8 Aug 2017 12:18:17 +0100	[thread overview]
Message-ID: <20170808111816.GD13355@arm.com> (raw)
In-Reply-To: <d8d6f3b606ed05d53b47d36e1c6a7f4b74eb3afc.1500381551.git.robin.murphy@arm.com>

On Tue, Jul 18, 2017 at 01:44:42PM +0100, Robin Murphy wrote:
> With all our hardware state tracked in such a way that we can naturally
> restore it as part of the necessary reset, resuming is trivial, and
> there's nothing to do on suspend at all.
> 
> Signed-off-by: Robin Murphy <robin.murphy@arm.com>
> ---
>  drivers/iommu/arm-smmu.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
> index 86897b7b81d8..0f5f06e9abfa 100644
> --- a/drivers/iommu/arm-smmu.c
> +++ b/drivers/iommu/arm-smmu.c
> @@ -2356,10 +2356,22 @@ static int arm_smmu_device_remove(struct platform_device *pdev)
>  	return 0;
>  }
>  
> +static int __maybe_unused arm_smmu_pm_resume(struct device *dev)
> +{

Did you actually get a warning here without the __maybe_unused annotation?
It looks like some other drivers just guard the thing with CONFIG_PM_SLEEP.

> +	struct arm_smmu_device *smmu = dev_get_drvdata(dev);
> +
> +	arm_smmu_device_reset(smmu);
> +	return 0;
> +}
> +
> +
> +static SIMPLE_DEV_PM_OPS(arm_smmu_pm_ops, NULL, arm_smmu_pm_resume);
> +
>  static struct platform_driver arm_smmu_driver = {
>  	.driver	= {
>  		.name		= "arm-smmu",
>  		.of_match_table	= of_match_ptr(arm_smmu_of_match),
> +		.pm = &arm_smmu_pm_ops,

Cosmetic: can you tab-align this assignment please?

Will

  parent reply	other threads:[~2017-08-08 11:18 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-18 12:44 [PATCH 1/2] iommu/arm-smmu: Track context bank state Robin Murphy
2017-07-18 12:44 ` Robin Murphy
     [not found] ` <71247263f4d88e7776f483fb1cc1139b516c0835.1500381551.git.robin.murphy-5wv7dgnIgG8@public.gmane.org>
2017-07-18 12:44   ` [PATCH 2/2] iommu/arm-smmu: Add system PM support Robin Murphy
2017-07-18 12:44     ` Robin Murphy
     [not found]     ` <d8d6f3b606ed05d53b47d36e1c6a7f4b74eb3afc.1500381551.git.robin.murphy-5wv7dgnIgG8@public.gmane.org>
2017-08-08 11:18       ` Will Deacon [this message]
2017-08-08 11:18         ` Will Deacon
2017-08-08 12:14         ` Robin Murphy
2017-08-08 12:14           ` Robin Murphy
     [not found]           ` <7d0d846b-8ada-6514-ec27-22f4d8487014-5wv7dgnIgG8@public.gmane.org>
2017-08-11 10:04             ` Jonathan Cameron
2017-08-11 10:04               ` Jonathan Cameron
2017-07-19  2:40   ` [PATCH 1/2] iommu/arm-smmu: Track context bank state Sricharan R
2017-07-19  2:40     ` Sricharan R
     [not found]     ` <22b7eea9-d194-d768-a10f-fc3c6fec9e4c-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2017-07-19 10:17       ` Robin Murphy
2017-07-19 10:17         ` Robin Murphy
2017-08-08 11:11   ` Will Deacon
2017-08-08 11:11     ` Will Deacon
     [not found]     ` <20170808111151.GC13355-5wv7dgnIgG8@public.gmane.org>
2017-08-08 12:06       ` Robin Murphy
2017-08-08 12:06         ` Robin Murphy

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=20170808111816.GD13355@arm.com \
    --to=will.deacon-5wv7dgnigg8@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=robin.murphy-5wv7dgnIgG8@public.gmane.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.