diff options
author | Krishna Reddy <vdumpa@nvidia.com> | 2011-12-12 11:58:06 -0800 |
---|---|---|
committer | Varun Wadekar <vwadekar@nvidia.com> | 2011-12-15 12:10:26 +0530 |
commit | 9179102b25cd838afb91093f99d8111986704a9b (patch) | |
tree | a3d99c50f8e266af92336c643b953edc02aceeb6 /arch/arm/mm | |
parent | 5ca29dcf3a0d121c7aa74fd2d3488f1a83cb760f (diff) |
arm: mm: convert cpa_lock to mutex.
convert cpa lock to mutex from spin lock.
This is needed as page allocs, which can sleep, are happening
inside the spinlock.
Bug 913652
Change-Id: I8a31e31c2ca8f7631ec626a82a74509494f47219
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/69517
Reviewed-by: Automatic_Commit_Validation_User
Diffstat (limited to 'arch/arm/mm')
-rw-r--r-- | arch/arm/mm/pageattr.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/arm/mm/pageattr.c b/arch/arm/mm/pageattr.c index 414a8460ca2c..098b957454f6 100644 --- a/arch/arm/mm/pageattr.c +++ b/arch/arm/mm/pageattr.c @@ -14,6 +14,7 @@ #include <linux/percpu.h> #include <linux/gfp.h> #include <linux/vmalloc.h> +#include <linux/mutex.h> #include <asm/processor.h> #include <asm/tlbflush.h> @@ -49,7 +50,7 @@ struct cpa_data { * entries change the page attribute in parallel to some other cpu * splitting a large page entry along with changing the attribute. */ -static DEFINE_SPINLOCK(cpa_lock); +static DEFINE_MUTEX(cpa_lock); #define CPA_FLUSHTLB 1 #define CPA_ARRAY 2 @@ -694,10 +695,10 @@ static int __change_page_attr_set_clr(struct cpa_data *cpa, int checkalias) cpa->numpages = 1; if (!debug_pagealloc) - spin_lock(&cpa_lock); + mutex_lock(&cpa_lock); ret = __change_page_attr(cpa, checkalias); if (!debug_pagealloc) - spin_unlock(&cpa_lock); + mutex_unlock(&cpa_lock); if (ret) return ret; |