summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorMohamad Ayyash <mkayyash@google.com>2016-08-25 00:59:21 +0000
committerMohamad Ayyash <mkayyash@google.com>2016-08-25 00:59:21 +0000
commit1c6df5fdcb19a03fb6b652090b4b968a6377fb14 (patch)
treea8de826477d0c56dd83615f2c23eccb95754cc36 /drivers/mmc
parent8d525c512280bb7d8218fd59c04de985b1886eca (diff)
Revert "Android: MMC/UFS IO Latency Histograms."
This reverts commit 8d525c512280bb7d8218fd59c04de985b1886eca. Change-Id: I69350b98d9de9b1c9f591e03a90f133e328ba72a
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/core/core.c66
-rw-r--r--drivers/mmc/core/host.c6
-rw-r--r--drivers/mmc/core/host.h5
3 files changed, 3 insertions, 74 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index b503249950df..9fab52559a8c 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -183,17 +183,6 @@ void mmc_request_done(struct mmc_host *host, struct mmc_request *mrq)
pr_debug("%s: %d bytes transferred: %d\n",
mmc_hostname(host),
mrq->data->bytes_xfered, mrq->data->error);
- if (mrq->lat_hist_enabled) {
- ktime_t completion;
- u_int64_t delta_us;
-
- completion = ktime_get();
- delta_us = ktime_us_delta(completion,
- mrq->io_start);
- blk_update_latency_hist(&host->io_lat_s,
- (mrq->data->flags & MMC_DATA_READ),
- delta_us);
- }
trace_mmc_blk_rw_end(cmd->opcode, cmd->arg, mrq->data);
}
@@ -638,11 +627,6 @@ struct mmc_async_req *mmc_start_req(struct mmc_host *host,
}
if (!err && areq) {
- if (host->latency_hist_enabled) {
- areq->mrq->io_start = ktime_get();
- areq->mrq->lat_hist_enabled = 1;
- } else
- areq->mrq->lat_hist_enabled = 0;
trace_mmc_blk_rw_start(areq->mrq->cmd->opcode,
areq->mrq->cmd->arg,
areq->mrq->data);
@@ -1980,7 +1964,7 @@ void mmc_init_erase(struct mmc_card *card)
}
static unsigned int mmc_mmc_erase_timeout(struct mmc_card *card,
- unsigned int arg, unsigned int qty)
+ unsigned int arg, unsigned int qty)
{
unsigned int erase_timeout;
@@ -2923,54 +2907,6 @@ static void __exit mmc_exit(void)
destroy_workqueue(workqueue);
}
-static ssize_t
-latency_hist_show(struct device *dev, struct device_attribute *attr, char *buf)
-{
- struct mmc_host *host = cls_dev_to_mmc_host(dev);
-
- return blk_latency_hist_show(&host->io_lat_s, buf);
-}
-
-/*
- * Values permitted 0, 1, 2.
- * 0 -> Disable IO latency histograms (default)
- * 1 -> Enable IO latency histograms
- * 2 -> Zero out IO latency histograms
- */
-static ssize_t
-latency_hist_store(struct device *dev, struct device_attribute *attr,
- const char *buf, size_t count)
-{
- struct mmc_host *host = cls_dev_to_mmc_host(dev);
- long value;
-
- if (kstrtol(buf, 0, &value))
- return -EINVAL;
- if (value == BLK_IO_LAT_HIST_ZERO)
- blk_zero_latency_hist(&host->io_lat_s);
- else if (value == BLK_IO_LAT_HIST_ENABLE ||
- value == BLK_IO_LAT_HIST_DISABLE)
- host->latency_hist_enabled = value;
- return count;
-}
-
-static DEVICE_ATTR(latency_hist, S_IRUGO | S_IWUSR,
- latency_hist_show, latency_hist_store);
-
-void
-mmc_latency_hist_sysfs_init(struct mmc_host *host)
-{
- if (device_create_file(&host->class_dev, &dev_attr_latency_hist))
- dev_err(&host->class_dev,
- "Failed to create latency_hist sysfs entry\n");
-}
-
-void
-mmc_latency_hist_sysfs_exit(struct mmc_host *host)
-{
- device_remove_file(&host->class_dev, &dev_attr_latency_hist);
-}
-
subsys_initcall(mmc_init);
module_exit(mmc_exit);
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
index 17068839c74b..fcf7829c759e 100644
--- a/drivers/mmc/core/host.c
+++ b/drivers/mmc/core/host.c
@@ -32,6 +32,8 @@
#include "slot-gpio.h"
#include "pwrseq.h"
+#define cls_dev_to_mmc_host(d) container_of(d, struct mmc_host, class_dev)
+
static DEFINE_IDR(mmc_host_idr);
static DEFINE_SPINLOCK(mmc_host_lock);
@@ -392,8 +394,6 @@ int mmc_add_host(struct mmc_host *host)
mmc_add_host_debugfs(host);
#endif
- mmc_latency_hist_sysfs_init(host);
-
mmc_start_host(host);
if (!(host->pm_flags & MMC_PM_IGNORE_PM_NOTIFY))
register_pm_notifier(&host->pm_notify);
@@ -422,8 +422,6 @@ void mmc_remove_host(struct mmc_host *host)
mmc_remove_host_debugfs(host);
#endif
- mmc_latency_hist_sysfs_exit(host);
-
device_del(&host->class_dev);
led_trigger_unregister_simple(host->led);
diff --git a/drivers/mmc/core/host.h b/drivers/mmc/core/host.h
index bf38533406fd..992bf5397633 100644
--- a/drivers/mmc/core/host.h
+++ b/drivers/mmc/core/host.h
@@ -12,8 +12,6 @@
#define _MMC_CORE_HOST_H
#include <linux/mmc/host.h>
-#define cls_dev_to_mmc_host(d) container_of(d, struct mmc_host, class_dev)
-
int mmc_register_host_class(void);
void mmc_unregister_host_class(void);
@@ -23,8 +21,5 @@ void mmc_retune_hold(struct mmc_host *host);
void mmc_retune_release(struct mmc_host *host);
int mmc_retune(struct mmc_host *host);
-void mmc_latency_hist_sysfs_init(struct mmc_host *host);
-void mmc_latency_hist_sysfs_exit(struct mmc_host *host);
-
#endif