mm: cma: debugfs interface
[firefly-linux-kernel-4.4.55.git] / mm / cma.c
index 68ecb7a42983a589fe4c057f109e327b352c8a0b..2655b8191656b1b87bd20373eaac0e85110e3079 100644 (file)
--- a/mm/cma.c
+++ b/mm/cma.c
 #include <linux/highmem.h>
 #include <linux/io.h>
 
-struct cma {
-       unsigned long   base_pfn;
-       unsigned long   count;
-       unsigned long   *bitmap;
-       unsigned int order_per_bit; /* Order of pages represented by one bit */
-       struct mutex    lock;
-};
-
-static struct cma cma_areas[MAX_CMA_AREAS];
-static unsigned cma_area_count;
+#include "cma.h"
+
+struct cma cma_areas[MAX_CMA_AREAS];
+unsigned cma_area_count;
 static DEFINE_MUTEX(cma_mutex);
 
 phys_addr_t cma_get_base(struct cma *cma)
@@ -77,11 +71,6 @@ static unsigned long cma_bitmap_aligned_offset(struct cma *cma, int align_order)
                - cma->base_pfn) >> cma->order_per_bit;
 }
 
-static unsigned long cma_bitmap_maxno(struct cma *cma)
-{
-       return cma->count >> cma->order_per_bit;
-}
-
 static unsigned long cma_bitmap_pages_to_bits(struct cma *cma,
                                                unsigned long pages)
 {