Home
last modified time | relevance | path

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

12

/linux/mm/
H A Dcma.c15 #define pr_fmt(fmt) "cma: " fmt
28 #include <linux/cma.h>
32 #include <trace/events/cma.h>
35 #include "cma.h"
38 struct cma cma_areas[MAX_CMA_AREAS];
41 phys_addr_t cma_get_base(const struct cma *cma) in cma_get_base() argument
43 WARN_ON_ONCE(cma->nranges != 1); in cma_get_base()
44 return PFN_PHYS(cma->ranges[0].base_pfn); in cma_get_base()
47 unsigned long cma_get_size(const struct cma *cm argument
52 cma_get_name(const struct cma * cma) cma_get_name() argument
58 cma_bitmap_aligned_mask(const struct cma * cma,unsigned int align_order) cma_bitmap_aligned_mask() argument
70 cma_bitmap_aligned_offset(const struct cma * cma,const struct cma_memrange * cmr,unsigned int align_order) cma_bitmap_aligned_offset() argument
78 cma_bitmap_pages_to_bits(const struct cma * cma,unsigned long pages) cma_bitmap_pages_to_bits() argument
84 cma_clear_bitmap(struct cma * cma,const struct cma_memrange * cmr,unsigned long pfn,unsigned long count) cma_clear_bitmap() argument
104 cma_validate_zones(struct cma * cma) cma_validate_zones() argument
141 cma_activate_area(struct cma * cma) cma_activate_area() argument
219 cma_reserve_pages_on_error(struct cma * cma) cma_reserve_pages_on_error() argument
228 struct cma *cma; cma_new_area() local
255 cma_drop_area(struct cma * cma) cma_drop_area() argument
278 struct cma *cma; cma_init_reserved_mem() local
547 struct cma *cma; cma_declare_contiguous_multi() local
759 cma_debug_show_areas(struct cma * cma) cma_debug_show_areas() argument
786 cma_range_alloc(struct cma * cma,struct cma_memrange * cmr,unsigned long count,unsigned int align,struct page ** pagep,gfp_t gfp) cma_range_alloc() argument
866 __cma_alloc_frozen(struct cma * cma,unsigned long count,unsigned int align,gfp_t gfp) __cma_alloc_frozen() argument
924 cma_alloc_frozen(struct cma * cma,unsigned long count,unsigned int align,bool no_warn) cma_alloc_frozen() argument
932 cma_alloc_frozen_compound(struct cma * cma,unsigned int order) cma_alloc_frozen_compound() argument
949 cma_alloc(struct cma * cma,unsigned long count,unsigned int align,bool no_warn) cma_alloc() argument
962 find_cma_memrange(struct cma * cma,const struct page * pages,unsigned long count) find_cma_memrange() argument
996 __cma_release_frozen(struct cma * cma,struct cma_memrange * cmr,const struct page * pages,unsigned long count) __cma_release_frozen() argument
1019 cma_release(struct cma * cma,const struct page * pages,unsigned long count) cma_release() argument
1042 cma_release_frozen(struct cma * cma,const struct page * pages,unsigned long count) cma_release_frozen() argument
1056 cma_for_each_area(int (* it)(struct cma * cma,void * data),void * data) cma_for_each_area() argument
1070 cma_intersects(struct cma * cma,unsigned long start,unsigned long end) cma_intersects() argument
1113 cma_reserve_early(struct cma * cma,unsigned long size) cma_reserve_early() argument
[all...]
H A Dcma_debug.c36 struct cma *cma = data; in cma_used_get() local
38 spin_lock_irq(&cma->lock); in cma_used_get()
39 *val = cma->count - cma->available_count; in cma_used_get()
40 spin_unlock_irq(&cma->lock); in cma_used_get()
48 struct cma *cma = data; in cma_maxchunk_get() local
55 spin_lock_irq(&cma->lock); in cma_maxchunk_get()
56 for (r = 0; r < cma->nranges; r++) { in cma_maxchunk_get()
57 cmr = &cma->ranges[r]; in cma_maxchunk_get()
58 bitmap_maxno = cma_bitmap_maxno(cma, cmr); in cma_maxchunk_get()
62 spin_unlock_irq(&cma->lock); in cma_maxchunk_get()
[all …]
H A Dcma.h6 #include <linux/cma.h>
20 struct cma *cma;
50 struct cma {
85 extern struct cma cma_areas[MAX_CMA_AREAS];
88 static inline unsigned long cma_bitmap_maxno(struct cma *cma,
91 return cmr->count >> cma->order_per_bit; in cma_sysfs_account_fail_pages() argument
95 void cma_sysfs_account_success_pages(struct cma *cma, unsigne in cma_sysfs_account_release_pages()
11 struct cma *cma; global() member
40 struct cma { global() struct
52 rangescma global() argument
61 cma_kobjcma global() argument
75 nidcma global() argument
78 cma_bitmap_maxno(struct cma * cma,struct cma_memrange * cmr) cma_bitmap_maxno() argument
89 cma_sysfs_account_success_pages(struct cma * cma,unsigned long nr_pages) cma_sysfs_account_success_pages() argument
93 cma_sysfs_account_release_pages(struct cma * cma,unsigned long nr_pages) cma_sysfs_account_release_pages() argument
[all...]
H A Dhugetlb_cma.c20 static struct cma *hugetlb_cma[MAX_NUMNODES] __ro_after_init;
101 struct cma *cma; in hugetlb_cma_alloc_bootmem() local
105 cma = hugetlb_cma[nid]; in hugetlb_cma_alloc_bootmem()
106 m = cma_reserve_early(cma, huge_page_size(h)); in hugetlb_cma_alloc_bootmem()
111 cma = hugetlb_cma[node]; in hugetlb_cma_alloc_bootmem()
112 if (!cma || node == nid) in hugetlb_cma_alloc_bootmem()
114 m = cma_reserve_early(cma, huge_page_size(h)); in hugetlb_cma_alloc_bootmem()
H A Dinternal.h918 struct cma;
921 bool cma_validate_zones(struct cma *cma);
922 void *cma_reserve_early(struct cma *cma, unsigned long size);
924 static inline bool cma_validate_zones(struct cma *cma)
928 static inline void *cma_reserve_early(struct cma *cma, unsigned long size)
895 cma_validate_zones(struct cma * cma) cma_validate_zones() argument
899 cma_reserve_early(struct cma * cma,unsigned long size) cma_reserve_early() argument
/linux/kernel/dma/
H A Dcontiguous.c38 #define pr_fmt(fmt) "cma: " fmt
46 #include <linux/cma.h>
55 static struct cma *dma_contiguous_areas[MAX_CMA_AREAS];
58 static int dma_contiguous_insert_area(struct cma *cma) in dma_contiguous_insert_area() argument
63 dma_contiguous_areas[dma_contiguous_areas_num++] = cma; in dma_contiguous_insert_area()
77 struct cma *dma_contiguous_get_area_by_idx(unsigned int idx) in dma_contiguous_get_area_by_idx()
86 static struct cma *dma_contiguous_default_area;
96 * should use cma= kernel parameter.
122 early_param("cma", early_cm in early_cma()
213 struct cma **cma; dma_numa_cma_reserve() local
393 cma_alloc_aligned(struct cma * cma,size_t size,gfp_t gfp) cma_alloc_aligned() argument
431 struct cma *cma = dma_contiguous_numa_area[nid]; dma_alloc_contiguous() local
548 struct cma *cma; rmem_cma_setup() local
[all...]
H A Dpool.c6 #include <linux/cma.h>
66 struct cma *cma; in cma_in_zone() local
68 cma = dev_get_cma_area(NULL); in cma_in_zone()
69 if (!cma) in cma_in_zone()
72 size = cma_get_size(cma); in cma_in_zone()
77 end = cma_get_base(cma) + size - 1; in cma_in_zone()
H A DKconfig187 You can disable CMA by specifying "cma=0" on the kernel's command
228 default, but it can be enabled by passing cma=size[MG] to the kernel.
240 enabled by passing cma=size[MG] to the kernel.
/linux/include/linux/
H A Ddma-map-ops.h13 struct cma;
94 struct cma *dev_get_cma_area(struct device *dev);
95 struct cma *dma_contiguous_get_area_by_idx(unsigned int idx);
99 phys_addr_t limit, struct cma **res_cma, bool fixed);
110 static inline struct cma *dev_get_cma_area(struct device *dev) in dev_get_cma_area()
114 static inline struct cma *dma_contiguous_get_area_by_idx(unsigned int idx) in dma_contiguous_get_area_by_idx()
122 phys_addr_t base, phys_addr_t limit, struct cma **res_cma, in dma_contiguous_reserve_area()
/linux/arch/xtensa/boot/dts/
H A Dkc705.dts22 linux,cma {
28 linux,cma-default;
/linux/Documentation/userspace-api/
H A Ddma-buf-heaps.rst29 through the ``cma`` parameter, a memory region Device-Tree node with
30 the ``linux,cma-default`` property set, or through the
33 ``reserved``, ``linux,cma``, or ``default-pool``, depending on the
74 ``cma-video`` wouldn't.
/linux/arch/s390/mm/
H A Dinit.c236 static int s390_cma_check_range(struct cma *cma, void *data) in s390_cma_check_range() argument
242 if (cma_intersects(cma, mem_data->start, mem_data->end)) in s390_cma_check_range()
/linux/arch/loongarch/boot/dts/
H A Dloongson-2k2000-ref.dts33 linux,cma {
37 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/freescale/
H A Dtqma8xx.dtsi37 linux,cma {
42 linux,cma-default;
H A Dimx93-tqma9352.dtsi25 linux,cma {
30 linux,cma-default;
H A Dimx8mq-tqma8mq.dtsi52 linux,cma {
59 linux,cma-default;
H A Dimx95-phycore-fpsc.dtsi55 linux,cma {
60 linux,cma-default;
/linux/arch/arm/boot/dts/broadcom/
H A Dbcm283x.dtsi38 cma: linux,cma { label
42 linux,cma-default;
/linux/include/trace/events/
H A Dcma.h3 #define TRACE_SYSTEM cma
/linux/drivers/gpu/drm/nouveau/nvkm/subdev/pci/
H A Dagp.c135 pci->agp.cma = info.cant_use_aperture; in nvkm_agp_ctor()
/linux/arch/powerpc/kvm/
H A Dbook3s_64_mmu_hv.c78 int cma = 0; in kvmppc_allocate_hpt()
90 cma = 1; in kvmppc_allocate_hpt()
106 if (cma) in kvmppc_allocate_hpt()
115 info->cma = cma; in kvmppc_allocate_hpt()
188 if (info->cma) in kvmppc_free_hpt()
75 int cma = 0; kvmppc_allocate_hpt() local
/linux/drivers/s390/char/
H A Dvmcp.c41 static struct cma *vmcp_cma;
/linux/arch/arm64/boot/dts/amlogic/
H A Dmeson-gxl-s905w-jethome-jethub-j80.dts23 linux,cma {
/linux/arch/arm64/boot/dts/hisilicon/
H A Dhi6220-hikey.dts63 linux,cma {
67 linux,cma-default;

12