Re: [PATCH 2/3] tmio_mmc / PM: Use PM QoS latency constraint

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday, March 08, 2012, Adrian Hunter wrote:
> On 08/03/12 01:29, Rafael J. Wysocki wrote:
> > From: Rafael J. Wysocki <rjw@xxxxxxx>
> > 
> > Make tmio_mmc call dev_pm_qos_expose_latency_limit() to expose
> > the PM QoS latency limit to user space and specify the initial
> > value of it as 100 microseconds.
> > 
> > Signed-off-by: Rafael J. Wysocki <rjw@xxxxxxx>
> > ---
> >  drivers/mmc/host/tmio_mmc_pio.c |    5 +++++
> >  1 file changed, 5 insertions(+)
> > 
> > Index: linux/drivers/mmc/host/tmio_mmc_pio.c
> > ===================================================================
> > --- linux.orig/drivers/mmc/host/tmio_mmc_pio.c
> > +++ linux/drivers/mmc/host/tmio_mmc_pio.c
> > @@ -39,6 +39,7 @@
> >  #include <linux/module.h>
> >  #include <linux/pagemap.h>
> >  #include <linux/platform_device.h>
> > +#include <linux/pm_qos.h>
> >  #include <linux/pm_runtime.h>
> >  #include <linux/scatterlist.h>
> >  #include <linux/spinlock.h>
> > @@ -955,6 +956,8 @@ int __devinit tmio_mmc_host_probe(struct
> >  
> >  	mmc_add_host(mmc);
> >  
> > +	dev_pm_qos_expose_latency_limit(&pdev->dev, 100);
> > +
> >  	/* Unmask the IRQs we want to know about */
> >  	if (!_host->chan_rx)
> >  		irq_mask |= TMIO_MASK_READOP;
> > @@ -993,6 +996,8 @@ void tmio_mmc_host_remove(struct tmio_mm
> >  		|| host->mmc->caps & MMC_CAP_NONREMOVABLE)
> >  		pm_runtime_get_sync(&pdev->dev);
> >  
> > +	dev_pm_qos_hide_latency_limit(&pdev->dev);
> 
> Is it really necessary to hide the latency limit before destroying the
> device?  Presumably QoS code could (or does) take care of it.

Yes, it can do that.  I'll modify patch [1/3] this way.

Thanks,
Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux