Home
last modified time | relevance | path

Searched full:cma (Results 1 – 25 of 130) sorted by relevance

123456

/linux/mm/
H A Dcma.c15 #define pr_fmt(fmt) "cma: " fmt
27 #include <linux/cma.h>
31 #include <trace/events/cma.h>
34 #include "cma.h"
36 struct cma cma_areas[MAX_CMA_AREAS];
39 phys_addr_t cma_get_base(const struct cma *cma) in cma_get_base() argument
41 WARN_ON_ONCE(cma->nranges != 1); in cma_get_base()
42 return PFN_PHYS(cma->ranges[0].base_pfn); in cma_get_base()
45 unsigned long cma_get_size(const struct cma *cma) in cma_get_size() argument
47 return cma->count << PAGE_SHIFT; in cma_get_size()
[all …]
H A Dcma.h10 struct cma *cma; member
39 struct cma { struct
53 /* the number of CMA page successful allocations */
55 /* the number of CMA page allocation failures */
57 /* the number of CMA page released */
74 extern struct cma cma_areas[MAX_CMA_AREAS]; argument
77 static inline unsigned long cma_bitmap_maxno(struct cma *cma, in cma_bitmap_maxno() argument
80 return cmr->count >> cma->order_per_bit; in cma_bitmap_maxno()
84 void cma_sysfs_account_success_pages(struct cma *cma, unsigned long nr_pages);
85 void cma_sysfs_account_fail_pages(struct cma *cma, unsigned long nr_pages);
[all …]
H A Dhugetlb_cma.c4 #include <linux/cma.h>
16 static struct cma *hugetlb_cma[MAX_NUMNODES];
58 struct cma *cma; in hugetlb_cma_alloc_bootmem() local
62 cma = hugetlb_cma[*nid]; in hugetlb_cma_alloc_bootmem()
63 m = cma_reserve_early(cma, huge_page_size(h)); in hugetlb_cma_alloc_bootmem()
69 cma = hugetlb_cma[node]; in hugetlb_cma_alloc_bootmem()
70 if (!cma || node == *nid) in hugetlb_cma_alloc_bootmem()
72 m = cma_reserve_early(cma, huge_page_size(h)); in hugetlb_cma_alloc_bootmem()
82 m->cma = cma; in hugetlb_cma_alloc_bootmem()
144 * HugeTLB CMA reservation is required for gigantic in hugetlb_cma_reserve()
[all …]
H A DKconfig653 depends on (NUMA || ARCH_ENABLE_MEMORY_HOTREMOVE || COMPACTION || CMA) && MMU
682 def_bool (MEMORY_ISOLATION && COMPACTION) || CMA
951 config CMA config
959 CMA reserves a region of memory and allows only movable pages to
967 bool "CMA debugfs interface"
968 depends on CMA && DEBUG_FS
970 Turns on the DebugFS interface for CMA.
973 bool "CMA information through sysfs interface"
974 depends on CMA && SYSFS
977 from CMA.
[all …]
/linux/kernel/dma/
H A Dcontiguous.c11 * The Contiguous Memory Allocator (CMA) makes it possible to
32 * CMA tries to solve this issue by operating on memory regions
38 #define pr_fmt(fmt) "cma: " fmt
46 #include <linux/cma.h>
55 struct cma *dma_contiguous_default_area;
58 * Default global CMA area size can be defined in kernel's .config.
64 * Users, who want to set the size of global CMA area for their system
65 * should use cma= kernel parameter.
91 early_param("cma", early_cma);
95 static struct cma *dma_contiguous_numa_area[MAX_NUMNODES];
[all …]
H A DKconfig162 depends on HAVE_DMA_CONTIGUOUS && CMA
168 You can disable CMA by specifying "cma=0" on the kernel's command
180 Enable this option to get numa CMA areas so that NUMA devices
183 You can set the size of pernuma CMA by specifying "cma_pernuma=size"
184 or set the node id and its size of CMA by specifying "numa_cma=
196 Memory Allocator. If the size of 0 is selected, CMA is disabled by
197 default, but it can be enabled by passing cma=size[MG] to the kernel.
208 If 0 percent is selected, CMA is disabled by default, but it can be
209 enabled by passing cma=size[MG] to the kernel.
H A Dpool.c6 #include <linux/cma.h>
60 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()
70 /* CMA can't cross zone boundaries, see cma_activate_area() */ in cma_in_zone()
71 end = cma_get_base(cma) + size - 1; in cma_in_zone()
/linux/Documentation/driver-api/cxl/allocation/
H A Dhugepages.rst9 CXL Memory onlined as SystemRAM during early boot is eligible for use by CMA,
10 as the NUMA node hosting that capacity will be `Online` at the time CMA
14 capacity allocated by CMA - as the NUMA node hosting the capacity is `Offline`
15 at :code:`__init` time - when CMA carves out contiguous capacity.
/linux/kernel/
H A Dcrash_reserve.c17 #include <linux/cma.h>
182 [SUFFIX_CMA] = ",cma",
189 * crashkernel=size,[high|low|cma]
342 * optional CMA reservation in parse_crashkernel()
488 struct cma *res; in reserve_crashkernel_cma()
509 pr_warn("crashkernel CMA reservation failed: %lld MB requested, %lld MB reserved in %d ranges\n", in reserve_crashkernel_cma()
512 pr_info("crashkernel CMA reserved: %lld MB in %d ranges\n", in reserve_crashkernel_cma()
520 pr_warn("crashkernel CMA reservation not supported\n"); in reserve_crashkernel_cma()
H A Dkexec_core.c561 struct page *cma = image->segment_cma[i]; in kimage_free_cma() local
564 if (!cma) in kimage_free_cma()
567 arch_kexec_pre_free_pages(page_address(cma), nr_pages); in kimage_free_cma()
568 dma_release_from_contiguous(NULL, cma, nr_pages); in kimage_free_cma()
612 /* Free CMA allocations */ in kimage_free()
743 struct page *cma = image->segment_cma[idx]; in kimage_load_cma_segment() local
744 char *ptr = page_address(cma); in kimage_load_cma_segment()
759 /* Then copy from source buffer to the CMA one */ in kimage_load_cma_segment()
/linux/arch/s390/mm/
H A Dinit.c32 #include <linux/cma.h>
215 /* Prevent memory blocks which contain cma regions from going offline */
222 static int s390_cma_check_range(struct cma *cma, void *data) in s390_cma_check_range() argument
228 if (cma_intersects(cma, mem_data->start, mem_data->end)) in s390_cma_check_range()
/linux/Documentation/driver-api/cxl/linux/
H A Dearly-boot.rst124 The contiguous memory allocator (CMA) enables reservation of contiguous memory
125 regions on NUMA nodes during early boot. However, CMA cannot reserve memory
133 This means if users intend to defer management of CXL memory to the driver, CMA
135 SystemRAM in `ZONE_NORMAL` during early boot, CMA reservations per-node can be
/linux/Documentation/core-api/kho/
H A Dconcepts.rst46 The scratch regions are declared as CMA when page allocator is initialized so
47 that their memory can be used during system lifetime. CMA gives us the
49 must be at a static physical memory location and CMA enforces that only
/linux/arch/arm64/boot/dts/cix/
H A Dsky1-orion-o6.dts27 linux,cma {
31 linux,cma-default;
/linux/arch/xtensa/boot/dts/
H A Dkc705.dts22 linux,cma {
28 linux,cma-default;
/linux/include/linux/
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()
H A Dkexec.h181 * @cma: CMA page if the buffer is backed by CMA.
194 struct page *cma; member
/linux/arch/loongarch/boot/dts/
H A Dloongson-2k0500-ref.dts35 linux,cma {
39 linux,cma-default;
H A Dloongson-2k2000-ref.dts33 linux,cma {
37 linux,cma-default;
H A Dloongson-2k1000-ref.dts35 linux,cma {
39 linux,cma-default;
/linux/Documentation/devicetree/bindings/media/
H A Dnuvoton,npcm-vcd.yaml46 CMA pool to use for buffers allocation instead of the default CMA pool.
H A Dallwinner,sun4i-a10-video-engine.yaml63 CMA pool to use for buffers allocation instead of the default
64 CMA pool.
/linux/arch/powerpc/kernel/
H A Dfadump.c25 #include <linux/cma.h>
67 static struct cma *fadump_cma;
70 * fadump_cma_init() - Initialize CMA area from a fadump reserved memory
72 * This function initializes CMA area from fadump reserved memory.
75 * Initialize only the area equivalent to boot memory size for CMA use.
77 * to CMA and pages for those will stay reserved. boot memory size is
78 * aligned per CMA requirement to satisy cma_init_reserved_mem() call.
91 * Do not use CMA if user has provided fadump=nocma kernel parameter. in fadump_cma_init()
100 * Here we give the aligned chunk of this reserved memory to CMA. in fadump_cma_init()
111 pr_warn("%s: Too less memory to give to CMA\n", __func__); in fadump_cma_init()
[all …]
/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;

123456