/linux/drivers/fpga/ |
H A D | dfl-afu-dma-region.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Driver for FPGA Accelerated Function Unit (AFU) DMA Region Management 5 * Copyright (C) 2017-2018 Intel Corporation, Inc. 12 #include <linux/dma-mapping.h> 17 #include "dfl-afu.h" 23 afu->dma_regions = RB_ROOT; in afu_dma_region_init() 27 * afu_dma_pin_pages - pin pages of given dma memory regio 35 afu_dma_pin_pages(struct dfl_feature_platform_data * pdata,struct dfl_afu_dma_region * region) afu_dma_pin_pages() argument 83 afu_dma_unpin_pages(struct dfl_feature_platform_data * pdata,struct dfl_afu_dma_region * region) afu_dma_unpin_pages() argument 102 afu_dma_check_continuous_pages(struct dfl_afu_dma_region * region) afu_dma_check_continuous_pages() argument 124 dma_region_check_iova(struct dfl_afu_dma_region * region,u64 iova,u64 size) dma_region_check_iova() argument 144 afu_dma_region_add(struct dfl_feature_platform_data * pdata,struct dfl_afu_dma_region * region) afu_dma_region_add() argument 186 afu_dma_region_remove(struct dfl_feature_platform_data * pdata,struct dfl_afu_dma_region * region) afu_dma_region_remove() argument 207 struct dfl_afu_dma_region *region; afu_dma_region_destroy() local 252 struct dfl_afu_dma_region *region; afu_dma_region_find() local 304 struct dfl_afu_dma_region *region; afu_dma_map_region() local 382 struct dfl_afu_dma_region *region; afu_dma_unmap_region() local [all...] |
/linux/tools/testing/memblock/tests/ |
H A D | basic_api.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 17 ASSERT_NE(memblock.memory.regions, NULL); in memblock_initialization_check() 18 ASSERT_EQ(memblock.memory.cnt, 0); in memblock_initialization_check() 19 ASSERT_EQ(memblock.memory.max, EXPECTED_MEMBLOCK_REGIONS); in memblock_initialization_check() 20 ASSERT_EQ(strcmp(memblock.memory.name, "memory"), 0); in memblock_initialization_check() 24 ASSERT_EQ(memblock.memory.max, EXPECTED_MEMBLOCK_REGIONS); in memblock_initialization_check() 36 * A simple test that adds a memory block of a specified base address 37 * and size to the collection of available memory regions (memblock.memory). 38 * Expect to create a new entry. The region counter and total memory get 45 rgn = &memblock.memory.regions[0]; in memblock_add_simple_check() [all …]
|
H A D | alloc_api.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 21 * A simple test that tries to allocate a small memory region. 22 * Expect to allocate an aligned region near the end of the available memory. 34 expected_start = memblock_end_of_DRAM() - SMP_CACHE_BYTES; in alloc_top_down_simple_check() 41 ASSERT_EQ(rgn->size, size); in alloc_top_down_simple_check() 42 ASSERT_EQ(rgn->base, expected_start); in alloc_top_down_simple_check() 53 * A test that tries to allocate memory next to a reserved region that starts at 58 * | +--------+ +--------| 60 * +------------+--------+---------+--------+ 65 * The allocation direction is top-down and region arrays are sorted from lower [all …]
|
H A D | alloc_nid_api.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 51 * A simple test that tries to allocate a memory region within min_addr and 55 * | + +-----------+ | 57 * +----+-------+-----------+------+ 62 * Expect to allocate a region that ends at max_addr. 82 rgn_end = rgn->base + rgn->size; in alloc_nid_top_down_simple_check() 87 ASSERT_EQ(rgn->size, size); in alloc_nid_top_down_simple_check() 88 ASSERT_EQ(rgn->base, max_addr - size); in alloc_nid_top_down_simple_check() 100 * A simple test that tries to allocate a memory region within min_addr and 104 * | + +---------+ + | [all …]
|
H A D | alloc_exact_nid_api.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 23 * A test that tries to allocate a memory region in a specific NUMA node that 24 * has enough memory to allocate a region of the requested size. 25 * Expect to allocate an aligned region at the end of the requested node. 31 struct memblock_region *req_node = &memblock.memory.regions[nid_req]; in alloc_exact_nid_top_down_numa_simple_check() 40 ASSERT_LE(SZ_4, req_node->size); in alloc_exact_nid_top_down_numa_simple_check() 41 size = req_node->size / SZ_4; in alloc_exact_nid_top_down_numa_simple_check() 52 ASSERT_EQ(new_rgn->size, size); in alloc_exact_nid_top_down_numa_simple_check() 53 ASSERT_EQ(new_rgn->base, region_end(req_node) - size); in alloc_exact_nid_top_down_numa_simple_check() 54 ASSERT_LE(req_node->base, new_rgn->base); in alloc_exact_nid_top_down_numa_simple_check() [all …]
|
H A D | alloc_helpers_api.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * A simple test that tries to allocate a memory region above a specified, 9 * | +-----------+ | 11 * +----------+-----------+---------+ 16 * Expect to allocate a cleared region at the minimal memory address. 28 min_addr = memblock_end_of_DRAM() - SMP_CACHE_BYTES; in alloc_from_simple_generic_check() 35 ASSERT_EQ(rgn->size, size); in alloc_from_simple_generic_check() 36 ASSERT_EQ(rgn->base, min_addr); in alloc_from_simple_generic_check() 47 * A test that tries to allocate a memory region above a certain address. 51 * | + +---------+ | [all …]
|
/linux/arch/um/kernel/ |
H A D | physmem.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) 12 #include <as-layout.h> 19 static int physmem_fd = -1; 46 if (err == -ENOMEM) in map_memory() 49 "memory size>/4096\n"); in map_memory() 56 * setup_physmem() - Setup physical memory for UML 57 * @start: Start address of the physical kernel memory, 59 * @reserve_end: end address of the physical kernel memory. 60 * @len: Length of total physical memory that should be mapped/made [all …]
|
/linux/mm/ |
H A D | memblock.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Procedures for maintaining information about logical memory blocks. 39 * Memblock is a method of managing memory regions during the early 40 * boot period when the usual kernel memory allocators are not up and 43 * Memblock views the system memory as collections of contiguous 46 * * ``memory`` - describes the physical memory available to the 47 * kernel; this may differ from the actual physical memory installed 48 * in the system, for instance when the memory is restricted with 50 * * ``reserved`` - describes the regions that were allocated 51 * * ``physmem`` - describes the actual physical memory available during [all …]
|
H A D | nommu.c | 1 // SPDX-License-Identifier: GPL-2.0-only 6 * have any form of memory management unit (thus no virtual memory). 8 * See Documentation/admin-guide/mm/nommu-mmap.rst 10 * Copyright (c) 2004-2008 David Howells <dhowells@redhat.com> 11 * Copyright (c) 2000-2003 David McCullough <davidm@snapgear.com> 12 * Copyright (c) 2000-2001 D Jeff Dionne <jeff@uClinux.org> 14 * Copyright (c) 2007-2010 Paul Mundt <lethal@linux-sh.org> 29 #include <linux/backing-dev.h> 67 * Return the total memory allocated for this pointer, not 94 * region. This test is intentionally done in reverse order, in kobjsize() [all …]
|
/linux/include/uapi/linux/ |
H A D | nitro_enclaves.h | 1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 3 * Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 16 * NE_CREATE_VM - The command is used to create a slot that is associated with 20 * setting any resources, such as memory and vCPUs, for an 21 * enclave. Memory and vCPUs are set for the slot mapped to an enclave. 25 * Its format is the detailed in the cpu-lists section: 26 * https://www.kernel.org/doc/html/latest/admin-guide/kernel-parameters.html 34 * * Enclave file descriptor - Enclave file descriptor used with 35 * ioctl calls to set vCPUs and memory 37 * * -1 - There was a failure in the ioctl logic. [all …]
|
/linux/drivers/net/ipa/ |
H A D | ipa_mem.c | 1 // SPDX-License-Identifier: GPL-2.0 3 /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. 4 * Copyright (C) 2019-2024 Linaro Ltd. 7 #include <linux/dma-mapping.h> 23 /* "Canary" value placed between memory regions to detect overflow */ 33 for (i = 0; i < ipa->mem_count; i++) { in ipa_mem_find() 34 const struct ipa_mem *mem = &ipa->mem[i]; in ipa_mem_find() 36 if (mem->id == mem_id) in ipa_mem_find() 43 /* Add an immediate command to a transaction that zeroes a memory region */ 47 struct ipa *ipa = container_of(trans->gsi, struct ipa, gsi); in ipa_mem_zero_region_add() [all …]
|
H A D | ipa_mem.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 3 /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. 4 * Copyright (C) 2019-2024 Linaro Ltd. 17 * DOC: IPA Local Memory 19 * The IPA has a block of shared memory, divided into regions used for 23 * the "ipa-shared" memory range) and size found in the IPA_SHARED_MEM_SIZE 26 * Each region is optionally preceded by one or more 32-bit "canary" values. 27 * These are meant to detect out-of-range writes (if they become corrupted). 28 * A given region (such as a filter or routing table) has the same number 32 * The set of memory regions is defined in configuration data. They are [all …]
|
/linux/include/linux/ |
H A D | memblock.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 6 * Logical memory blocks. 28 * enum memblock_flags - definition of memory region attributes 30 * @MEMBLOCK_HOTPLUG: memory regio 97 struct memblock_type memory; global() member 551 for_each_mem_region(region) global() argument 560 for_each_reserved_mem_region(region) global() argument [all...] |
/linux/drivers/acpi/ |
H A D | nvs.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * nvs.c - Routines for saving and restoring ACPI NVS memory region 5 * Copyright (C) 2008-2011 Rafael J. Wysocki <rjw@sisk.pl>, Novell Inc. 40 struct nvs_region *region; in acpi_nvs_register() local 42 region = kmalloc(sizeof(*region), GFP_KERNEL); in acpi_nvs_register() 43 if (!region) in acpi_nvs_register() 44 return -ENOMEM; in acpi_nvs_register() 45 region->phys_start = start; in acpi_nvs_register() 46 region->size = size; in acpi_nvs_register() 47 list_add_tail(®ion->node, &nvs_region_list); in acpi_nvs_register() [all …]
|
/linux/Documentation/PCI/endpoint/ |
H A D | pci-ntb-function.rst | 1 .. SPDX-License-Identifier: GPL-2.0 9 PCI Non-Transparent Bridges (NTB) allow two host systems to communicate 12 machine, expose memory ranges as BARs, and perform DMA. They also support 13 scratchpads, which are areas of memory within the NTB that are accessible 26 .. code-block:: text 28 +-------------+ +-------------+ 32 +------^------+ +------^------+ 35 +---------|-------------------------------------------------|---------+ 36 | +------v------+ +------v------+ | 40 | | <-----------------------------------> | | [all …]
|
/linux/drivers/gpu/drm/i915/ |
H A D | intel_region_ttm.c | 1 // SPDX-License-Identifier: MIT 19 * The code in this file deals with setting up memory managers for TTM 22 * i915 GEM regions to TTM memory types and resource managers. 26 * intel_region_ttm_device_init - Initialize a TTM device 33 struct drm_device *drm = &dev_priv->drm; in intel_region_ttm_device_init() 35 return ttm_device_init(&dev_priv->bdev, i915_ttm_driver(), in intel_region_ttm_device_init() 36 drm->dev, drm->anon_inode->i_mapping, in intel_region_ttm_device_init() 37 drm->vma_offset_manager, false, false); in intel_region_ttm_device_init() 41 * intel_region_ttm_device_fini - Finalize a TTM device 46 ttm_device_fini(&dev_priv->bdev); in intel_region_ttm_device_fini() [all …]
|
/linux/Documentation/devicetree/bindings/remoteproc/ |
H A D | ti,k3-dsp-rproc.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/remoteproc/ti,k3-dsp-rproc.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Suman Anna <s-anna@ti.com> 13 The TI K3 family of SoCs usually have one or more TI DSP Core sub-systems 14 that are used to offload some of the processor-intensive tasks or algorithms, 17 These processor sub-systems usually contain additional sub-modules like 18 L1 and/or L2 caches/SRAMs, an Interrupt Controller, an external memory 23 Each DSP Core sub-system is represented as a single DT node. Each node has a [all …]
|
/linux/Documentation/devicetree/bindings/pmem/ |
H A D | pmem-region.txt | 1 Device-tree bindings for persistent memory regions 2 ----------------------------------------------------- 4 Persistent memory refers to a class of memory devices that are: 6 a) Usable as main system memory (i.e. cacheable), and 9 Given b) it is best to think of persistent memory as a kind of memory mapped 11 persistent regions separately to the normal memory pool. To aid with that this 13 memory regions exist inside the physical address space. 15 Bindings for the region nodes: 16 ----------------------------- 19 - compatible = "pmem-region" [all …]
|
/linux/Documentation/devicetree/bindings/arm/mediatek/ |
H A D | mediatek,mt7622-wed.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/arm/mediatek/mediatek,mt7622-wed.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Lorenzo Bianconi <lorenzo@kernel.org> 11 - Felix Fietkau <nbd@nbd.name> 21 - enum: 22 - mediatek,mt7622-wed 23 - mediatek,mt7981-wed 24 - mediatek,mt7986-wed [all …]
|
/linux/Documentation/ABI/testing/ |
H A D | sysfs-bus-cxl | 4 Contact: linux-cxl@vger.kernel.org 14 Contact: linux-cxl@vger.kernel.org 17 Memory Device Output Payload in the CXL-2.0 24 Contact: linux-cxl@vger.kernel.org 27 identically named field in the Identify Memory Device Output 28 Payload in the CXL-2.0 specification. 34 Contact: linux-cxl@vger.kernel.org 40 class-ids can be compared against a similar "qos_class" 42 that the endpoints map their local memory-class to a 45 side-effects that may result. First class-id is displayed. [all …]
|
/linux/drivers/virt/acrn/ |
H A D | mm.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * ACRN: Memory mapping management 19 static int modify_region(struct acrn_vm *vm, struct vm_memory_region_op *region) in modify_region() argument 26 return -ENOMEM; in modify_region() 28 regions->vmid = vm->vmid; in modify_region() 29 regions->regions_num = 1; in modify_region() 30 regions->regions_gpa = virt_to_phys(region); in modify_region() 35 "Failed to set memory region for VM[%u]!\n", vm->vmid); in modify_region() 42 * acrn_mm_region_add() - Set up the EPT mapping of a memory region. 46 * @size: Size of the region. [all …]
|
/linux/include/asm-generic/ |
H A D | sections.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 12 * _text, _data: architecture specific, don't use them in arch-independent code 50 /* Start and end of .ctors section - used for constructor calls. */ 53 /* Start and end of .opd section - used for function descriptors. */ 81 * memory_contains - checks if an object is contained within a memory region 82 * @begin: virtual address of the beginning of the memory region 83 * @end: virtual address of the end of the memory region 84 * @virt: virtual address of the memory object 85 * @size: size of the memory object 88 * contained within the memory region defined by @begin and @end, false [all …]
|
/linux/Documentation/mm/damon/ |
H A D | design.rst | 1 .. SPDX-License-Identifier: GPL-2.0 13 The monitoring-related information including the monitoring request 14 specification and DAMON-based operation schemes are stored in a data structure 19 To know how user-space can do the configurations and start/stop DAMON, refer to 28 - :ref:`Operations Set <damon_operations_set>`: Implements fundamental 30 address-space and available set of software/hardware primitives, 31 - :ref:`Core <damon_core_logic>`: Implements core logics including monitoring 32 overhead/accuracy control and access-awar [all...] |
/linux/drivers/of/ |
H A D | of_reserved_mem.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * Device tree based initialization code for reserved memory. 46 return -ENOMEM; in early_init_dt_alloc_reserved_memory_arch() 62 * alloc_reserved_mem_array() - allocate memory for the reserved_mem 65 * This function is used to allocate memory for the reserved_mem 66 * array according to the total number of reserved memory regions 79 pr_err("Failed to allocate memory for reserved_mem array with err: %d", -EOVERFLOW); in alloc_reserved_mem_array() 85 pr_err("Failed to allocate memory for reserved_mem array with err: %d", -ENOMEM); in alloc_reserved_mem_array() 93 pr_err("Failed to allocate memory for reserved_mem array with err: %d", -EOVERFLOW); in alloc_reserved_mem_array() 97 memset_size = alloc_size - copy_size; in alloc_reserved_mem_array() [all …]
|
/linux/samples/nitro_enclaves/ |
H A D | ne_ioctl_sample.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 11 * ----- 19 * https://www.kernel.org/doc/html/latest/admin-guide/kernel-parameters.html#cpu-lists 26 * echo <cpu-list> > /sys/module/nitro_enclaves/parameters/ne_cpus 43 * Setup hugetlbfs huge pages. The memory needs to be from the same NUMA node as 46 * https://www.kernel.org/doc/html/latest/admin-guide/mm/hugetlbpage.html 52 * /sys/devices/system/node/node<X>/hugepages/hugepages-2048kB/nr_hugepages 53 * /sys/devices/system/node/node<X>/hugepages/hugepages-1048576kB/nr_hugepages 58 * /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages [all …]
|