diff options
author | Chuanxiao Dong <chuanxiao.dong@intel.com> | 2012-06-04 10:25:47 +0800 |
---|---|---|
committer | buildbot <buildbot@intel.com> | 2012-06-06 07:06:28 -0700 |
commit | e2596c166fdb7d915610b660d9667387b54030b3 (patch) | |
tree | b40286da15b797d5ae040a259b0a7a1ee30b3c44 /include/linux | |
parent | 7945a16e5966acc85512da296efee2e66741a077 (diff) | |
download | kernel-mfld-blackbay-e2596c166fdb7d915610b660d9667387b54030b3.tar.gz kernel-mfld-blackbay-e2596c166fdb7d915610b660d9667387b54030b3.tar.bz2 kernel-mfld-blackbay-e2596c166fdb7d915610b660d9667387b54030b3.zip |
mmc: sdhci: add spinlock when acquire/release eMMC mutex
BZ: 39815
If sdhci driver really has multiple threads acquiring eMMC mutex,
there is a race condition within acquiring and release mutex. This
patch will add a spinlock to avoid such race condition.
Change-Id: I2b9f84a1c0dc7010606853352bbd31c238c1b353
Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
Reviewed-on: http://android.intel.com:8080/51148
Reviewed-by: Koskinen, Ilkka <ilkka.koskinen@intel.com>
Tested-by: Sun, Jianhua <jianhua.sun@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/mmc/sdhci.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h index 4a0d6edb680..27cdb01e766 100644 --- a/include/linux/mmc/sdhci.h +++ b/include/linux/mmc/sdhci.h @@ -117,7 +117,7 @@ struct sdhci_host { #define DEKKER_EMMC_CHIP_ACTIVE 0 #define DEKKER_EMMC_CHIP_SUSPENDED 1 - atomic_t usage_cnt; /* eMMC mutex usage count */ + unsigned int usage_cnt; /* eMMC mutex usage count */ const struct sdhci_ops *ops; /* Low level hw interface */ @@ -133,6 +133,7 @@ struct sdhci_host { #endif spinlock_t lock; /* Mutex */ + spinlock_t dekker_lock; /* eMMC Dekker Mutex lock */ int flags; /* Host attributes */ #define SDHCI_USE_SDMA (1<<0) /* Host is SDMA capable */ |