mmc: sdhci: Vote for new IRQ specific QoS request

The current vote applies to all CPUs and hence may have power
impact, especially when there are more number of CPUs. The new
IRQ specific QoS request shall update the vote only for one
CPU to which the IRQ's smp_affinity attribute is set to.

Change-Id: I55298f729949c39ebfa3eecd4746d77e40cb2e5c
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
This commit is contained in:
Sahitya Tummala 2014-06-26 15:41:36 +05:30 committed by Subhash Jadavani
parent 2e08a5f0a4
commit 9ecd592125

View file

@ -3204,6 +3204,27 @@ struct sdhci_host *sdhci_alloc_host(struct device *dev,
EXPORT_SYMBOL_GPL(sdhci_alloc_host);
#ifdef CONFIG_SMP
static void sdhci_set_pmqos_req_type(struct sdhci_host *host)
{
/*
* The default request type PM_QOS_REQ_ALL_CORES is
* applicable to all CPU cores that are online and
* this would have a power impact when there are more
* number of CPUs. This new PM_QOS_REQ_AFFINE_IRQ request
* type shall update/apply the vote only to that CPU to
* which this IRQ's affinity is set to.
*/
host->pm_qos_req_dma.type = PM_QOS_REQ_AFFINE_IRQ;
host->pm_qos_req_dma.irq = host->irq;
}
#else
static void sdhci_set_pmqos_req_type(struct sdhci_host *host)
{
}
#endif
int sdhci_add_host(struct sdhci_host *host)
{
struct mmc_host *mmc;
@ -3739,6 +3760,7 @@ int sdhci_add_host(struct sdhci_host *host)
if (host->cpu_dma_latency_us) {
host->pm_qos_timeout_us = 10000; /* default value */
sdhci_set_pmqos_req_type(host);
pm_qos_add_request(&host->pm_qos_req_dma,
PM_QOS_CPU_DMA_LATENCY, PM_QOS_DEFAULT_VALUE);