Back to home page

LXR

 
 

    


0001 #ifndef __MM_CMA_H__
0002 #define __MM_CMA_H__
0003 
0004 struct cma {
0005     unsigned long   base_pfn;
0006     unsigned long   count;
0007     unsigned long   *bitmap;
0008     unsigned int order_per_bit; /* Order of pages represented by one bit */
0009     struct mutex    lock;
0010 #ifdef CONFIG_CMA_DEBUGFS
0011     struct hlist_head mem_head;
0012     spinlock_t mem_head_lock;
0013 #endif
0014 };
0015 
0016 extern struct cma cma_areas[MAX_CMA_AREAS];
0017 extern unsigned cma_area_count;
0018 
0019 static inline unsigned long cma_bitmap_maxno(struct cma *cma)
0020 {
0021     return cma->count >> cma->order_per_bit;
0022 }
0023 
0024 #endif