cma.h 419 B

1234567891011121314151617181920
  1. #ifndef __MM_CMA_H__
  2. #define __MM_CMA_H__
  3. struct cma {
  4. unsigned long base_pfn;
  5. unsigned long count;
  6. unsigned long *bitmap;
  7. unsigned int order_per_bit; /* Order of pages represented by one bit */
  8. struct mutex lock;
  9. };
  10. extern struct cma cma_areas[MAX_CMA_AREAS];
  11. extern unsigned cma_area_count;
  12. static unsigned long cma_bitmap_maxno(struct cma *cma)
  13. {
  14. return cma->count >> cma->order_per_bit;
  15. }
  16. #endif