Home
last modified time | relevance | path

Searched refs:cma (Results 1 – 25 of 80) sorted by relevance

1234

/linux/mm/
H A Dcma.c15 #define pr_fmt(fmt) "cma: " fmt
25 #include <linux/cma.h>
29 #include <trace/events/cma.h>
32 #include "cma.h"
34 struct cma cma_areas[MAX_CMA_AREAS];
38 phys_addr_t cma_get_base(const struct cma *cma) in cma_get_base() argument
40 return PFN_PHYS(cma->base_pfn); in cma_get_base()
43 unsigned long cma_get_size(const struct cma *cma) in cma_get_size() argument
48 cma_get_name(const struct cma * cma) cma_get_name() argument
53 cma_bitmap_aligned_mask(const struct cma * cma,unsigned int align_order) cma_bitmap_aligned_mask() argument
65 cma_bitmap_aligned_offset(const struct cma * cma,unsigned int align_order) cma_bitmap_aligned_offset() argument
72 cma_bitmap_pages_to_bits(const struct cma * cma,unsigned long pages) cma_bitmap_pages_to_bits() argument
78 cma_clear_bitmap(struct cma * cma,unsigned long pfn,unsigned long count) cma_clear_bitmap() argument
92 cma_activate_area(struct cma * cma) cma_activate_area() argument
152 cma_reserve_pages_on_error(struct cma * cma) cma_reserve_pages_on_error() argument
174 struct cma *cma; cma_init_reserved_mem() local
381 cma_debug_show_areas(struct cma * cma) cma_debug_show_areas() argument
406 __cma_alloc(struct cma * cma,unsigned long count,unsigned int align,gfp_t gfp) __cma_alloc() argument
515 cma_alloc(struct cma * cma,unsigned long count,unsigned int align,bool no_warn) cma_alloc() argument
521 cma_alloc_folio(struct cma * cma,int order,gfp_t gfp) cma_alloc_folio() argument
533 cma_pages_valid(struct cma * cma,const struct page * pages,unsigned long count) cma_pages_valid() argument
562 cma_release(struct cma * cma,const struct page * pages,unsigned long count) cma_release() argument
584 cma_free_folio(struct cma * cma,const struct folio * folio) cma_free_folio() argument
592 cma_for_each_area(int (* it)(struct cma * cma,void * data),void * data) cma_for_each_area() argument
[all...]
H A Dcma_debug.c36 struct cma *cma = data; in cma_used_get() local
39 spin_lock_irq(&cma->lock); in cma_used_get()
41 used = bitmap_weight(cma->bitmap, (int)cma_bitmap_maxno(cma)); in cma_used_get()
42 spin_unlock_irq(&cma->lock); in cma_used_get()
43 *val = (u64)used << cma->order_per_bit; in cma_used_get()
51 struct cma *cma = data; in cma_maxchunk_get() local
54 unsigned long bitmap_maxno = cma_bitmap_maxno(cma); in cma_maxchunk_get()
56 spin_lock_irq(&cma->lock); in cma_maxchunk_get()
58 start = find_next_zero_bit(cma->bitmap, bitmap_maxno, end); in cma_maxchunk_get()
61 end = find_next_bit(cma->bitmap, bitmap_maxno, start); in cma_maxchunk_get()
[all …]
H A Dcma_sysfs.c17 void cma_sysfs_account_success_pages(struct cma *cma, unsigned long nr_pages) in cma_sysfs_account_success_pages() argument
19 atomic64_add(nr_pages, &cma->nr_pages_succeeded); in cma_sysfs_account_success_pages()
22 void cma_sysfs_account_fail_pages(struct cma *cma, unsigned long nr_pages) in cma_sysfs_account_fail_pages() argument
24 atomic64_add(nr_pages, &cma->nr_pages_failed); in cma_sysfs_account_fail_pages()
27 void cma_sysfs_account_release_pages(struct cma *cma, unsigned long nr_pages) in cma_sysfs_account_release_pages() argument
29 atomic64_add(nr_pages, &cma->nr_pages_released); in cma_sysfs_account_release_pages()
32 static inline struct cma *cma_from_kobj(struct kobject *kobj) in cma_from_kobj()
34 return container_of(kobj, struct cma_kobject, kobj)->cma; in cma_from_kobj()
40 struct cma *cma = cma_from_kobj(kobj); in alloc_pages_success_show() local
43 atomic64_read(&cma->nr_pages_succeeded)); in alloc_pages_success_show()
[all …]
H A Dcma.h10 struct cma *cma; member
13 struct cma { struct
38 extern struct cma cma_areas[MAX_CMA_AREAS]; argument
41 static inline unsigned long cma_bitmap_maxno(struct cma *cma) in cma_bitmap_maxno() argument
43 return cma->count >> cma->order_per_bit; in cma_bitmap_maxno()
47 void cma_sysfs_account_success_pages(struct cma *cma, unsigned long nr_pages);
48 void cma_sysfs_account_fail_pages(struct cma *cma, unsigned long nr_pages);
49 void cma_sysfs_account_release_pages(struct cma *cma, unsigned long nr_pages);
51 static inline void cma_sysfs_account_success_pages(struct cma *cma, in cma_sysfs_account_success_pages() argument
53 static inline void cma_sysfs_account_fail_pages(struct cma *cma, in cma_sysfs_account_fail_pages() argument
[all …]
/linux/include/linux/
H A Dcma.h23 struct cma;
26 extern phys_addr_t cma_get_base(const struct cma *cma);
27 extern unsigned long cma_get_size(const struct cma *cma);
28 extern const char *cma_get_name(const struct cma *cma);
33 bool fixed, const char *name, struct cma **res_cma,
38 bool fixed, const char *name, struct cma **res_cma) in cma_declare_contiguous()
46 struct cma **res_cma);
47 extern struct page *cma_alloc(struct cma *cma, unsigned long count, unsigned int align,
49 extern bool cma_pages_valid(struct cma *cma, const struct page *pages, unsigned long count);
50 extern bool cma_release(struct cma *cma, const struct page *pages, unsigned long count);
[all …]
H A Ddma-map-ops.h13 struct cma;
100 extern struct cma *dma_contiguous_default_area;
102 static inline struct cma *dev_get_cma_area(struct device *dev) in dev_get_cma_area()
111 phys_addr_t limit, struct cma **res_cma, bool fixed);
122 static inline struct cma *dev_get_cma_area(struct device *dev) in dev_get_cma_area()
130 phys_addr_t base, phys_addr_t limit, struct cma **res_cma, in dma_contiguous_reserve_area()
/linux/kernel/dma/
H A Dcontiguous.c55 struct cma *dma_contiguous_default_area;
96 static struct cma *dma_contiguous_numa_area[MAX_NUMNODES];
98 static struct cma *dma_contiguous_pernuma_area[MAX_NUMNODES];
166 struct cma **cma; in dma_numa_cma_reserve() local
176 cma = &dma_contiguous_pernuma_area[nid]; in dma_numa_cma_reserve()
179 0, false, name, cma, nid); in dma_numa_cma_reserve()
187 cma = &dma_contiguous_numa_area[nid]; in dma_numa_cma_reserve()
190 name, cma, nid); in dma_numa_cma_reserve()
275 phys_addr_t limit, struct cma **res_cma, in dma_contiguous_reserve_area()
329 static struct page *cma_alloc_aligned(struct cma *cma, size_t size, gfp_t gfp) in cma_alloc_aligned() argument
[all …]
H A Dpool.c60 struct cma *cma; in cma_in_zone() local
62 cma = dev_get_cma_area(NULL); in cma_in_zone()
63 if (!cma) in cma_in_zone()
66 size = cma_get_size(cma); in cma_in_zone()
71 end = cma_get_base(cma) + size - 1; in cma_in_zone()
H A DKconfig168 You can disable CMA by specifying "cma=0" on the kernel's command
197 default, but it can be enabled by passing cma=size[MG] to the kernel.
209 enabled by passing cma=size[MG] to the kernel.
/linux/Documentation/ABI/testing/
H A Dsysfs-kernel-mm-cma1 What: /sys/kernel/mm/cma/
5 /sys/kernel/mm/cma/ contains a subdirectory for each CMA
9 /sys/kernel/mm/cma/<cma-heap-name> directory) contains the
15 What: /sys/kernel/mm/cma/<cma-heap-name>/alloc_pages_success
21 What: /sys/kernel/mm/cma/<cma-heap-name>/alloc_pages_fail
27 What: /sys/kernel/mm/cma/<cma-heap-name>/release_pages_success
/linux/drivers/dma-buf/heaps/
H A Dcma_heap.c28 struct cma *cma; member
258 cma_release(cma_heap->cma, buffer->cma_pages, buffer->pagecount); in cma_heap_dma_buf_release()
302 cma_pages = cma_alloc(cma_heap->cma, pagecount, align, false); in cma_heap_allocate()
358 cma_release(cma_heap->cma, cma_pages, pagecount); in cma_heap_allocate()
369 static int __init __add_cma_heap(struct cma *cma, void *data) in __add_cma_heap() argument
377 cma_heap->cma = cma; in __add_cma_heap()
379 exp_info.name = cma_get_name(cma); in __add_cma_heap()
396 struct cma *default_cma = dev_get_cma_area(NULL); in add_default_cma_heap()
/linux/Documentation/admin-guide/mm/
H A Dcma_debugfs.rst8 Each CMA area represents a directory under <debugfs>/cma/, represented by
11 <debugfs>/cma/<cma_name>
21 echo 5 > <debugfs>/cma/<cma_name>/alloc
/linux/arch/s390/mm/
H A Dinit.c230 static int s390_cma_check_range(struct cma *cma, void *data) in s390_cma_check_range() argument
236 start = cma_get_base(cma); in s390_cma_check_range()
237 end = start + cma_get_size(cma); in s390_cma_check_range()
/linux/arch/xtensa/boot/dts/
H A Dkc705.dts22 linux,cma {
28 linux,cma-default;
/linux/arch/loongarch/boot/dts/
H A Dloongson-2k2000-ref.dts33 linux,cma {
37 linux,cma-default;
H A Dloongson-2k1000-ref.dts34 linux,cma {
38 linux,cma-default;
/linux/arch/arm64/boot/dts/freescale/
H A Dimx93-phycore-som.dtsi24 linux,cma {
29 linux,cma-default;
H A Dtqma8xx.dtsi37 linux,cma {
42 linux,cma-default;
H A Dimx93-tqma9352.dtsi19 linux,cma {
24 linux,cma-default;
/linux/arch/arm64/boot/dts/ti/
H A Dk3-am62a-phycore-som.dtsi52 /* global cma region */
53 linux,cma {
58 linux,cma-default;
/linux/arch/arm/boot/dts/nxp/imx/
H A Dimx6ul-ccimx6ulsom.dtsi20 linux,cma {
24 linux,cma-default;
/linux/arch/arm64/boot/dts/broadcom/
H A Dbcm2712.dtsi180 cma: linux,cma { label
184 linux,cma-default;
/linux/drivers/gpu/drm/nouveau/include/nvkm/subdev/
H A Dpci.h23 bool cma; member
/linux/drivers/infiniband/core/
H A DMakefile25 rdma_cm-y := cma.o cma_trace.o
/linux/arch/arm/boot/dts/broadcom/
H A Dbcm283x.dtsi38 cma: linux,cma { label
42 linux,cma-default;

1234