| /linux/mm/ |
| H A D | cma_debug.c | 3 * CMA DebugFS Interface 10 #include <linux/cma.h> 16 #include "cma.h" 36 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() [all …]
|
| H A D | cma.c | 15 #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 *cma) in cma_get_size() argument 49 return cma->count << PAGE_SHIFT; in cma_get_size() [all …]
|
| H A D | cma.h | 6 #include <linux/cma.h> 20 struct cma *cma; 50 struct cma { 64 /* the number of CMA page successful allocations */ 66 /* the number of CMA page allocation failures */ 68 /* the number of CMA page released */ 85 extern struct cma cma_areas[MAX_CMA_AREAS]; 88 static inline unsigned long cma_bitmap_maxno(struct cma *cma, 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 91 cma_sysfs_account_fail_pages(struct cma * cma,unsigned long nr_pages) cma_sysfs_account_fail_pages() argument 93 cma_sysfs_account_release_pages(struct cma * cma,unsigned long nr_pages) cma_sysfs_account_release_pages() argument [all...] |
| H A D | hugetlb_cma.c | 4 #include <linux/cma.h> 20 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() 255 * HugeTLB CMA reservation is required for gigantic in hugetlb_cma_reserve() 299 pr_warn("hugetlb_cma: cma area of node %d must be a multiple of %lu MiB\n", in hugetlb_cma_reserve() [all …]
|
| H A D | Kconfig | 636 allocations (e.g., ZONE_MOVABLE, CMA) and such that they can be 707 def_bool (MEMORY_ISOLATION && COMPACTION) || CMA 1055 config CMA 1063 CMA reserves a region of memory and allows only movable pages to 1071 bool "CMA debugfs interface" 1072 depends on CMA && DEBUG_FS 1074 Turns on the DebugFS interface for CMA. 1077 bool "CMA information through sysfs interface" 1078 depends on CMA && SYSFS 1081 from CMA 1056 config CMA global() config [all...] |
| H A D | internal.h | 872 struct cma; 875 bool cma_validate_zones(struct cma *cma); 876 void *cma_reserve_early(struct cma *cma, unsigned long size); 878 static inline bool cma_validate_zones(struct cma *cma) 882 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 D | contiguous.c | 11 * 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 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_are 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 D | Kconfig | 181 depends on HAVE_DMA_CONTIGUOUS && CMA 187 You can disable CMA by specifying "cma=0" on the kernel's command 199 Enable this option to get numa CMA areas so that NUMA devices 202 You can set the size of pernuma CMA by specifying "cma_pernuma=size" 203 or set the node id and its size of CMA by specifying "numa_cma= 209 bool "Default CMA area per NUMA node" 213 On systems with more than one NUMA node, the selected CMA 227 Memory Allocator. If the size of 0 is selected, CMA is disabled by 228 default, but it can be enabled by passing cma=size[MG] to the kernel. 239 If 0 percent is selected, CMA is disabled by default, but it can be [all …]
|
| H A D | pool.c | 6 #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() 76 /* CMA can't cross zone boundaries, see cma_activate_area() */ in cma_in_zone() 77 end = cma_get_base(cma) + size - 1; in cma_in_zone()
|
| /linux/Documentation/userspace-api/ |
| H A D | dma-buf-heaps.rst | 27 cacheable, buffers. Only present if a CMA region is present. Such a 29 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 72 physically contiguous, and backed by the CMA kernel allocator, good 74 ``cma-video`` wouldn't.
|
| /linux/Documentation/driver-api/cxl/allocation/ |
| H A D | hugepages.rst | 9 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/include/linux/ |
| H A D | dma-map-ops.h | 13 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/s390/mm/ |
| H A D | init.c | 32 #include <linux/cma.h> 229 /* Prevent memory blocks which contain cma regions from going offline */ 236 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/xtensa/boot/dts/ |
| H A D | kc705.dts | 22 linux,cma { 28 linux,cma-default;
|
| /linux/Documentation/devicetree/bindings/media/ |
| H A D | nuvoton,npcm-vcd.yaml | 46 CMA pool to use for buffers allocation instead of the default CMA pool.
|
| /linux/Documentation/ABI/testing/ |
| H A D | sysfs-kernel-kexec-kdump | 58 the Contiguous Memory Allocator (CMA) area that are allocated 60 addresses of CMA regions assigned for crashkernel use.
|
| /linux/arch/loongarch/boot/dts/ |
| H A D | loongson-2k2000-ref.dts | 33 linux,cma { 37 linux,cma-default;
|
| /linux/Documentation/ABI/obsolete/ |
| H A D | sysfs-kernel-kexec-kdump | 68 the Contiguous Memory Allocator (CMA) area that are allocated 70 addresses of CMA regions assigned for crashkernel use.
|
| /linux/arch/arm/boot/dts/nxp/imx/ |
| H A D | imx6ul-ccimx6ulsom.dtsi | 20 linux,cma { 24 linux,cma-default;
|
| /linux/arch/arm64/boot/dts/freescale/ |
| H A D | tqma8xx.dtsi | 37 linux,cma { 42 linux,cma-default;
|
| H A D | imx93-tqma9352.dtsi | 25 linux,cma { 30 linux,cma-default;
|
| /linux/drivers/gpu/drm/etnaviv/ |
| H A D | Kconfig | 12 select CMA if HAVE_DMA_CONTIGUOUS
|
| /linux/drivers/gpu/drm/ingenic/ |
| H A D | Kconfig | 5 depends on CMA
|
| /linux/drivers/s390/char/ |
| H A D | vmcp.c | 22 #include <linux/cma.h> 41 static struct cma *vmcp_cma;
|
| /linux/Documentation/features/io/dma-contiguous/ |
| H A D | arch-support.txt | 4 # description: arch supports the DMA CMA (continuous memory allocator)
|