tools headers UAPI: Sync linux/prctl.h with the kernel sources
[linux-2.6-microblaze.git] / mm / cma_debug.c
index d5bf8aa..2e77049 100644 (file)
@@ -36,10 +36,10 @@ static int cma_used_get(void *data, u64 *val)
        struct cma *cma = data;
        unsigned long used;
 
-       mutex_lock(&cma->lock);
+       spin_lock_irq(&cma->lock);
        /* pages counter is smaller than sizeof(int) */
        used = bitmap_weight(cma->bitmap, (int)cma_bitmap_maxno(cma));
-       mutex_unlock(&cma->lock);
+       spin_unlock_irq(&cma->lock);
        *val = (u64)used << cma->order_per_bit;
 
        return 0;
@@ -53,7 +53,7 @@ static int cma_maxchunk_get(void *data, u64 *val)
        unsigned long start, end = 0;
        unsigned long bitmap_maxno = cma_bitmap_maxno(cma);
 
-       mutex_lock(&cma->lock);
+       spin_lock_irq(&cma->lock);
        for (;;) {
                start = find_next_zero_bit(cma->bitmap, bitmap_maxno, end);
                if (start >= bitmap_maxno)
@@ -61,7 +61,7 @@ static int cma_maxchunk_get(void *data, u64 *val)
                end = find_next_bit(cma->bitmap, bitmap_maxno, start);
                maxchunk = max(end - start, maxchunk);
        }
-       mutex_unlock(&cma->lock);
+       spin_unlock_irq(&cma->lock);
        *val = (u64)maxchunk << cma->order_per_bit;
 
        return 0;