Blame view

mm/cma.h 671 Bytes
b24413180   Greg Kroah-Hartman   License cleanup: ...
1
  /* SPDX-License-Identifier: GPL-2.0 */
28b24c1fc   Sasha Levin   mm: cma: debugfs ...
2
3
  #ifndef __MM_CMA_H__
  #define __MM_CMA_H__
a2b992c82   Jakub Kicinski   debugfs: make sur...
4
  #include <linux/debugfs.h>
18e98e56f   Barry Song   mm: cma: fix the ...
5
  #define CMA_MAX_NAME 64
28b24c1fc   Sasha Levin   mm: cma: debugfs ...
6
7
8
9
10
11
  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;
26b02a1f9   Sasha Levin   mm: cma: allocati...
12
13
14
  #ifdef CONFIG_CMA_DEBUGFS
  	struct hlist_head mem_head;
  	spinlock_t mem_head_lock;
a2b992c82   Jakub Kicinski   debugfs: make sur...
15
  	struct debugfs_u32_array dfs_bitmap;
26b02a1f9   Sasha Levin   mm: cma: allocati...
16
  #endif
18e98e56f   Barry Song   mm: cma: fix the ...
17
  	char name[CMA_MAX_NAME];
28b24c1fc   Sasha Levin   mm: cma: debugfs ...
18
19
20
21
  };
  
  extern struct cma cma_areas[MAX_CMA_AREAS];
  extern unsigned cma_area_count;
f21838e05   Gregory Fong   mm: cma: mark cma...
22
  static inline unsigned long cma_bitmap_maxno(struct cma *cma)
28b24c1fc   Sasha Levin   mm: cma: debugfs ...
23
24
25
26
27
  {
  	return cma->count >> cma->order_per_bit;
  }
  
  #endif