| /linux/drivers/fpga/ |
| H A D | dfl-afu-dma-region.c | 3 * Driver for FPGA Accelerated Function Unit (AFU) DMA Region Management 27 * afu_dma_pin_pages - pin pages of given dma memory region 29 * @region: dma memory region to be pinned 35 struct dfl_afu_dma_region *region) in afu_dma_pin_pages() argument 37 int npages = region->length >> PAGE_SHIFT; in afu_dma_pin_pages() 45 region->pages = kzalloc_objs(struct page *, npages); in afu_dma_pin_pages() 46 if (!region->pages) { in afu_dma_pin_pages() 51 pinned = pin_user_pages_fast(region->user_addr, npages, FOLL_WRITE, in afu_dma_pin_pages() 52 region->pages); in afu_dma_pin_pages() 66 unpin_user_pages(region->pages, pinned); in afu_dma_pin_pages() [all …]
|
| H A D | fpga-region.c | 3 * FPGA Region - Support for FPGA programming under Linux 10 #include <linux/fpga/fpga-region.h> 36 * fpga_region_get - get an exclusive reference to an fpga region 37 * @region: FPGA Region struct 39 * Caller should call fpga_region_put() when done with region. 43 * * -EBUSY if someone already has a reference to the region. 46 static struct fpga_region *fpga_region_get(struct fpga_region *region) in fpga_region_get() argument 48 struct device *dev = ®ion->dev; in fpga_region_get() 50 if (!mutex_trylock(®ion->mutex)) { in fpga_region_get() 51 dev_dbg(dev, "%s: FPGA Region already in use\n", __func__); in fpga_region_get() [all …]
|
| /linux/net/devlink/ |
| H A D | region.c | 29 struct devlink_region *region; member 37 struct devlink_region *region; in devlink_region_get_by_name() local 39 list_for_each_entry(region, &devlink->region_list, list) in devlink_region_get_by_name() 40 if (!strcmp(region->ops->name, region_name)) in devlink_region_get_by_name() 41 return region; in devlink_region_get_by_name() 50 struct devlink_region *region; in devlink_port_region_get_by_name() local 52 list_for_each_entry(region, &port->region_list, list) in devlink_port_region_get_by_name() 53 if (!strcmp(region->port_ops->name, region_name)) in devlink_port_region_get_by_name() 54 return region; in devlink_port_region_get_by_name() 60 devlink_region_snapshot_get_by_id(struct devlink_region *region, u32 id) in devlink_region_snapshot_get_by_id() argument [all …]
|
| /linux/drivers/net/ethernet/mellanox/mlxsw/ |
| H A D | spectrum1_acl_tcam.c | 14 struct mlxsw_sp_acl_tcam_region *region; member 62 struct mlxsw_sp1_acl_tcam_region *region) in mlxsw_sp1_acl_ctcam_region_catchall_add() argument 67 mlxsw_sp_acl_ctcam_chunk_init(®ion->cregion, in mlxsw_sp1_acl_ctcam_region_catchall_add() 68 ®ion->catchall.cchunk, in mlxsw_sp1_acl_ctcam_region_catchall_add() 81 err = mlxsw_sp_acl_ctcam_entry_add(mlxsw_sp, ®ion->cregion, in mlxsw_sp1_acl_ctcam_region_catchall_add() 82 ®ion->catchall.cchunk, in mlxsw_sp1_acl_ctcam_region_catchall_add() 83 ®ion->catchall.centry, in mlxsw_sp1_acl_ctcam_region_catchall_add() 87 region->catchall.rulei = rulei; in mlxsw_sp1_acl_ctcam_region_catchall_add() 95 mlxsw_sp_acl_ctcam_chunk_fini(®ion->catchall.cchunk); in mlxsw_sp1_acl_ctcam_region_catchall_add() 101 struct mlxsw_sp1_acl_tcam_region *region) in mlxsw_sp1_acl_ctcam_region_catchall_del() argument [all …]
|
| H A D | spectrum_acl_ctcam.c | 15 struct mlxsw_sp_acl_tcam_region *region, in mlxsw_sp_acl_ctcam_region_resize() argument 21 region->key_type, new_size, region->id, in mlxsw_sp_acl_ctcam_region_resize() 22 region->tcam_region_info); in mlxsw_sp_acl_ctcam_region_resize() 28 struct mlxsw_sp_acl_tcam_region *region, in mlxsw_sp_acl_ctcam_region_move() argument 34 region->tcam_region_info, src_offset, in mlxsw_sp_acl_ctcam_region_move() 35 region->tcam_region_info, dst_offset, size); in mlxsw_sp_acl_ctcam_region_move() 46 struct mlxsw_sp_acl_tcam_region *region = cregion->region; in mlxsw_sp_acl_ctcam_region_entry_insert() local 61 region->tcam_region_info, in mlxsw_sp_acl_ctcam_region_entry_insert() 65 mlxsw_afk_encode(afk, region->key_info, &rulei->values, key, mask); in mlxsw_sp_acl_ctcam_region_entry_insert() 94 cregion->region->tcam_region_info, in mlxsw_sp_acl_ctcam_region_entry_remove() [all …]
|
| H A D | spectrum_acl_tcam.c | 109 struct mutex lock; /* guards region list updates */ 146 struct mutex lock; /* Protects consistency of region, region2 pointers 149 struct mlxsw_sp_acl_tcam_region *region; member 169 struct mlxsw_sp_acl_tcam_region *region; member 210 struct mlxsw_sp_acl_tcam_region *region; in mlxsw_sp_acl_tcam_group_update() local 215 list_for_each_entry(region, &group->region_list, list) { in mlxsw_sp_acl_tcam_group_update() 219 if (region->list.next != &group->region_list && in mlxsw_sp_acl_tcam_group_update() 220 list_next_entry(region, list)->vregion == region->vregion) in mlxsw_sp_acl_tcam_group_update() 223 region->id, multi); in mlxsw_sp_acl_tcam_group_update() 385 struct mlxsw_sp_acl_tcam_region *region, in mlxsw_sp_acl_tcam_group_region_attach() argument [all …]
|
| /linux/tools/testing/selftests/vfio/ |
| H A D | vfio_dma_mapping_test.c | 138 struct dma_region region; in TEST_F() local 144 region.vaddr = mmap(NULL, size, PROT_READ | PROT_WRITE, flags, -1, 0); in TEST_F() 147 if (flags & MAP_HUGETLB && region.vaddr == MAP_FAILED) in TEST_F() 150 ASSERT_NE(region.vaddr, MAP_FAILED); in TEST_F() 152 region.iova = iova_allocator_alloc(self->iova_allocator, size); in TEST_F() 153 region.size = size; in TEST_F() 155 iommu_map(self->iommu, ®ion); in TEST_F() 156 printf("Mapped HVA %p (size 0x%lx) at IOVA 0x%lx\n", region.vaddr, size, region.iova); in TEST_F() 158 ASSERT_EQ(region in TEST_F() 206 struct dma_region region; FIXTURE() local 225 struct dma_region *region = &self->region; FIXTURE_SETUP() local 262 struct dma_region *region = &self->region; TEST_F() local 276 struct dma_region *region = &self->region; TEST_F() local 290 struct dma_region *region = &self->region; TEST_F() local [all...] |
| /linux/tools/testing/selftests/kvm/lib/ |
| H A D | kvm_util.c | 266 * range addressed by a single page table into a low and high region 268 * the VA region spans [0, 2^(va_bits - 1)), [-(2^(va_bits - 1), -1]. 424 * maximum page table size for a memory region will be when the in vm_nr_pages_required() 496 * Force GUEST_MEMFD for the primary memory region if necessary, e.g. in __vm_create() 513 * MMIO region would prevent silently clobbering the MMIO region. in __vm_create() 516 ucall_init(vm, slot0->region.guest_phys_addr + slot0->region.memory_size); in __vm_create() 596 struct userspace_mem_region *region; in kvm_vm_restart() local 602 hash_for_each(vmp->regions.slot_hash, ctr, region, slot_nod in kvm_vm_restart() 723 struct userspace_mem_region *region = userspace_mem_region_find() local 806 __vm_mem_region_delete(struct kvm_vm * vm,struct userspace_mem_region * region) __vm_mem_region_delete() argument 833 struct userspace_mem_region *region; kvm_vm_free() local 870 vm_userspace_mem_region_gpa_insert(struct rb_root * gpa_tree,struct userspace_mem_region * region) vm_userspace_mem_region_gpa_insert() argument 896 vm_userspace_mem_region_hva_insert(struct rb_root * hva_tree,struct userspace_mem_region * region) vm_userspace_mem_region_hva_insert() argument 924 struct kvm_userspace_memory_region region = { __vm_set_user_memory_region() local 952 struct kvm_userspace_memory_region2 region = { __vm_set_user_memory_region2() local 985 struct userspace_mem_region *region; vm_mem_add() local 1167 struct userspace_mem_region *region; memslot2region() local 1199 struct userspace_mem_region *region; vm_mem_region_set_flags() local 1214 struct userspace_mem_region *region = memslot2region(vm, slot); vm_mem_region_reload() local 1238 struct userspace_mem_region *region; vm_mem_region_move() local 1267 struct userspace_mem_region *region = memslot2region(vm, slot); vm_mem_region_delete() local 1279 struct userspace_mem_region *region; vm_guest_mem_fallocate() local 1546 struct userspace_mem_region *region; addr_gpa2hva() local 1582 struct userspace_mem_region *region = addr_hva2gpa() local 1622 struct userspace_mem_region *region; addr_gpa2alias() local 1892 struct userspace_mem_region *region; vm_dump() local 2028 struct userspace_mem_region *region; __vm_phy_pages_alloc() local 2292 struct userspace_mem_region *region; vm_is_gpa_protected() local [all...] |
| /linux/Documentation/networking/devlink/ |
| H A D | devlink-region.rst | 4 Devlink Region 11 region can then be accessed via the devlink region interface. 13 Region snapshots are collected by the driver, and can be accessed via read 17 Snapshot identifiers are scoped to the devlink instance, not a region. 21 The major benefit to creating a region is to provide access to internal 29 requested snapshots must implement the ``.snapshot`` callback for the region 38 region should implement the ``.read`` callback in the ``devlink_region_ops`` 48 $ devlink region help 49 $ devlink region show [ DEV/REGION ] 50 $ devlink region del DEV/REGION snapshot SNAPSHOT_ID [all …]
|
| H A D | iosm.rst | 59 each having one secure bin file and at least one Loadmap/Region file. For flashing 61 data required for flashing. The data like region count and address of each region 91 b) Flashing the Loadmap/Region file 109 - The summary of exception details logged as part of this region. 111 - This region contains the details related to the exception occurred in the 114 - This region contains the logs related to the modem CDD driver. 116 - This region contains the eeprom logs. 118 - This region contains the current instance of bootloader logs. 120 - This region contains the previous instance of bootloader logs. 123 Region commands [all …]
|
| /linux/drivers/vfio/pci/pds/ |
| H A D | dirty.c | 72 static int pds_vfio_dirty_alloc_bitmaps(struct pds_vfio_region *region, in pds_vfio_dirty_alloc_bitmaps() argument 87 region->host_seq = host_seq_bmp; in pds_vfio_dirty_alloc_bitmaps() 88 region->host_ack = host_ack_bmp; in pds_vfio_dirty_alloc_bitmaps() 89 region->bmp_bytes = bytes; in pds_vfio_dirty_alloc_bitmaps() 100 struct pds_vfio_region *region = &dirty->regions[i]; in pds_vfio_dirty_free_bitmaps() local 102 vfree(region->host_seq); in pds_vfio_dirty_free_bitmaps() 103 vfree(region->host_ack); in pds_vfio_dirty_free_bitmaps() 104 region->host_seq = NULL; in pds_vfio_dirty_free_bitmaps() 105 region->host_ack = NULL; in pds_vfio_dirty_free_bitmaps() 106 region->bmp_bytes = 0; in pds_vfio_dirty_free_bitmaps() [all …]
|
| /linux/drivers/acpi/pmic/ |
| H A D | Kconfig | 4 bool "PMIC (Power Management Integrated Circuit) operation region support" 7 region of the PMIC chip. The operation region can be used 14 bool "ACPI operation region support for Bay Trail Crystal Cove PMIC" 17 This config adds ACPI operation region support for the Bay Trail 21 bool "ACPI operation region support for Cherry Trail Crystal Cove PMIC" 24 This config adds ACPI operation region support for the Cherry Trail 28 bool "ACPI operation region support for XPower AXP288 PMIC" 31 This config adds ACPI operation region support for XPower AXP288 PMIC. 34 bool "ACPI operation region support for BXT WhiskeyCove PMIC" 37 This config adds ACPI operation region support for BXT WhiskeyCove PMIC. [all …]
|
| /linux/kernel/cgroup/ |
| H A D | dmem.c | 25 /* SRCU domain serialising reclaim callbacks against region unregistration. */ 30 * @ref: References keeping the region alive. 31 * Keeps the region reference alive after a succesful RCU lookup. 45 * @pools: List of pools linked to this region. 50 /** @size: Size of region, in bytes */ 57 * @unregistered: Whether the region is unregistered by its caller. 58 * No new pools should be added to the region afterwards, and no new 64 * @ops: Optional driver operations for this region. 79 struct dmem_cgroup_region *region; 82 /* css node, RCU protected against region teardow 63 struct dmem_cgroup_region *region; global() member 234 find_cg_pool_locked(struct dmemcg_state * dmemcs,struct dmem_cgroup_region * region) find_cg_pool_locked() argument 355 alloc_pool_single(struct dmemcg_state * dmemcs,struct dmem_cgroup_region * region,struct dmem_cgroup_pool_state ** allocpool) alloc_pool_single() argument 397 get_cg_pool_locked(struct dmemcg_state * dmemcs,struct dmem_cgroup_region * region,struct dmem_cgroup_pool_state ** allocpool) get_cg_pool_locked() argument 446 struct dmem_cgroup_region *region = container_of(rcu, typeof(*region), rcu); dmemcg_free_rcu() local 468 dmem_cgroup_unregister_region(struct dmem_cgroup_region * region) dmem_cgroup_unregister_region() argument 545 struct dmem_cgroup_region *region; dmemcg_get_region_by_name() local 572 get_cg_pool_unlocked(struct dmemcg_state * cg,struct dmem_cgroup_region * region) get_cg_pool_unlocked() argument 652 dmem_cgroup_try_charge(struct dmem_cgroup_region * region,u64 size,struct dmem_cgroup_pool_state ** ret_pool,struct dmem_cgroup_pool_state ** ret_limit_pool) dmem_cgroup_try_charge() argument 700 struct dmem_cgroup_region *region; dmem_cgroup_region_capacity_show() local 737 struct dmem_cgroup_region *region; dmemcg_limit_write() local 791 struct dmem_cgroup_region *region; dmemcg_limit_show() local [all...] |
| /linux/arch/arm/mm/ |
| H A D | pmsa-v7.c | 19 struct region { struct 25 static struct region __initdata mem[MPU_MAX_REGIONS]; argument 27 static struct region __initdata xip[MPU_MAX_REGIONS]; 46 /* Region number */ 52 /* Data-side / unified region attributes */ 54 /* Region access control register */ 60 /* Region size register */ 66 /* Region base address register */ 76 /* Optional instruction-side region attributes */ 78 /* I-side Region access control register */ [all …]
|
| /linux/Documentation/devicetree/bindings/fpga/ |
| H A D | fpga-region.yaml | 4 $id: http://devicetree.org/schemas/fpga/fpga-region.yaml# 7 title: FPGA Region 17 - FPGA Region 44 Partial Reconfiguration Region (PRR) 51 into a PRR must fit and must use a subset of the region's connections. 52 * The busses within the FPGA are split such that each region gets its own 69 * During Partial Reconfiguration of a specific region, that region's bridge 105 region (PRR0-2) gets its own split of the busses that is independently gated by 112 When a DT overlay that targets an FPGA Region is applied, the FPGA Region will 121 When the overlay is removed, the child nodes will be removed and the FPGA Region [all …]
|
| /linux/drivers/platform/x86/intel/pmt/ |
| H A D | discovery-kunit.c | 27 struct telemetry_region *region = &feature_group->regions[i]; in validate_pmt_regions() local 29 kunit_info(test, " - Region %d: cdie_mask=%u, package_id=%u, partition=%u, segment=%u,", in validate_pmt_regions() 30 i, region->plat_info.cdie_mask, region->plat_info.package_id, in validate_pmt_regions() 31 region->plat_info.partition, region->plat_info.segment); in validate_pmt_regions() 33 region->plat_info.bus_number, region->plat_info.device_number, in validate_pmt_regions() 34 region->plat_info.function_number, region->guid); in validate_pmt_regions() 35 kunit_info(test, "\t\taddr=%p, size=%zu, num_rmids=%u", region->addr, region->size, in validate_pmt_regions() 36 region->num_rmids); in validate_pmt_regions() 39 KUNIT_ASSERT_GE(test, region->plat_info.cdie_mask, 0); in validate_pmt_regions() 40 KUNIT_ASSERT_GE(test, region->plat_info.package_id, 0); in validate_pmt_regions() [all …]
|
| /linux/drivers/fpga/tests/ |
| H A D | fpga-region-test.c | 3 * KUnit test for the FPGA Region 14 #include <linux/fpga/fpga-region.h> 32 struct fpga_region *region; member 64 * of the Region. 90 static int fake_region_get_bridges(struct fpga_region *region) in fake_region_get_bridges() argument 92 struct fpga_bridge *bridge = region->priv; in fake_region_get_bridges() 94 return fpga_bridge_get_to_list(bridge->dev.parent, region->info, ®ion->bridge_list); in fake_region_get_bridges() 105 struct fpga_region *region; in fpga_region_test_class_find() local 107 region = fpga_region_class_find(NULL, ctx->region_dev, fake_region_match); in fpga_region_test_class_find() 108 KUNIT_EXPECT_PTR_EQ(test, region, ctx->region); in fpga_region_test_class_find() [all …]
|
| /linux/drivers/virt/acrn/ |
| H A D | mm.c | 19 static int modify_region(struct acrn_vm *vm, struct vm_memory_region_op *region) in modify_region() argument 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. 55 struct vm_memory_region_op *region; in acrn_mm_region_add() local 58 region = kzalloc_obj(*region); in acrn_mm_region_add() 59 if (!region) in acrn_mm_region_add() 62 region->type = ACRN_MEM_REGION_ADD; in acrn_mm_region_add() 63 region->user_vm_pa = user_gpa; in acrn_mm_region_add() [all …]
|
| /linux/drivers/s390/cio/ |
| H A D | vfio_ccw_async.c | 3 * Async I/O region for vfio_ccw 21 struct ccw_cmd_region *region; in vfio_ccw_async_region_read() local 24 if (pos + count > sizeof(*region)) in vfio_ccw_async_region_read() 35 region = private->region[i].data; in vfio_ccw_async_region_read() 36 if (copy_to_user(buf, (void *)region + pos, count)) in vfio_ccw_async_region_read() 52 struct ccw_cmd_region *region; in vfio_ccw_async_region_write() local 55 if (pos + count > sizeof(*region)) in vfio_ccw_async_region_write() 67 region = private->region[i].data; in vfio_ccw_async_region_write() 68 if (copy_from_user((void *)region + pos, buf, count)) { in vfio_ccw_async_region_write() 75 ret = region->ret_code ? region->ret_code : count; in vfio_ccw_async_region_write() [all …]
|
| H A D | vfio_ccw_chp.c | 23 struct ccw_schib_region *region; in vfio_ccw_schib_region_read() local 26 if (pos + count > sizeof(*region)) in vfio_ccw_schib_region_read() 37 region = private->region[i].data; in vfio_ccw_schib_region_read() 44 memcpy(region, &sch->schib, sizeof(*region)); in vfio_ccw_schib_region_read() 46 if (copy_to_user(buf, (void *)region + pos, count)) { in vfio_ccw_schib_region_read() 67 struct vfio_ccw_region *region) in vfio_ccw_schib_region_release() argument 94 struct ccw_crw_region *region; in vfio_ccw_crw_region_read() local 99 if (pos + count > sizeof(*region)) in vfio_ccw_crw_region_read() 109 region = private->region[i].data; in vfio_ccw_crw_region_read() 122 memcpy(®ion->crw, &crw->crw, sizeof(region->crw)); in vfio_ccw_crw_region_read() [all …]
|
| /linux/tools/testing/memblock/tests/ |
| H A D | basic_api.c | 38 * Expect to create a new entry. The region counter and total memory get 47 struct region r = { in memblock_add_simple_check() 71 * Expect to create a new entry. The region counter and total memory get 80 struct region r = { in memblock_add_node_simple_check() 115 * region counter fields get updated. 124 struct region r1 = { in memblock_add_disjoint_check() 128 struct region r2 = { in memblock_add_disjoint_check() 166 * Expect to merge the two entries into one region that starts at r2.base 168 * the available memory is updated, and the region counter stays the same. 177 struct region r1 = { in memblock_add_overlap_top_check() [all …]
|
| /linux/include/linux/ |
| H A D | dm-region-hash.h | 6 * Device-Mapper dirty region hash interface. 18 * Region hash 25 * States a region can have. 35 * Region hash create/destroy. 54 sector_t dm_rh_region_to_sector(struct dm_region_hash *rh, region_t region); 58 * Get region size and key (ie. number of the region). 64 * Get/set/update region state (and dirty log). 67 int dm_rh_get_state(struct dm_region_hash *rh, region_t region, int may_block); 68 void dm_rh_set_state(struct dm_region_hash *rh, region_t region, 71 /* Non-zero errors_handled leaves the state of the region NOSYNC */ [all …]
|
| /linux/drivers/md/ |
| H A D | dm-region-hash.c | 10 #include <linux/dm-region-hash.h> 20 #define DM_MSG_PREFIX "region hash" 24 * Region hash 27 * region can be in one of three states: clean, dirty, 30 * In addition to being present in the hash table a region _may_ 45 * io, up the recovery_count, and remove the region from the 64 /* holds persistent region state */ 125 sector_t dm_rh_region_to_sector(struct dm_region_hash *rh, region_t region) in dm_rh_region_to_sector() argument 127 return region << rh->region_shift; in dm_rh_region_to_sector() 189 DMERR("unable to allocate region hash memory"); in dm_region_hash_create() [all …]
|
| /linux/drivers/mtd/maps/ |
| H A D | pismo.c | 89 struct pismo_mem *region, const char *name, in pismo_add_device() argument 94 phys_addr_t base = region->base; in pismo_add_device() 101 res.end = base + region->size - 1; in pismo_add_device() 131 struct pismo_mem *region) in pismo_add_nor() argument 134 .width = region->width, in pismo_add_nor() 140 return pismo_add_device(pismo, i, region, "physmap-flash", in pismo_add_nor() 145 struct pismo_mem *region) in pismo_add_sram() argument 148 .bankwidth = region->width, in pismo_add_sram() 151 return pismo_add_device(pismo, i, region, "mtd-ram", in pismo_add_sram() 159 struct pismo_mem region; in pismo_add_one() local [all …]
|
| /linux/tools/testing/selftests/vfio/lib/ |
| H A D | iommu.c | 71 struct dma_region *region; in __iommu_hva2iova() local 73 list_for_each_entry(region, &iommu->dma_regions, link) { in __iommu_hva2iova() 74 if (vaddr < region->vaddr) in __iommu_hva2iova() 77 if (vaddr >= region->vaddr + region->size) in __iommu_hva2iova() 81 *iova = region->iova + (vaddr - region->vaddr); in __iommu_hva2iova() 100 static int vfio_iommu_map(struct iommu *iommu, struct dma_region *region) in vfio_iommu_map() argument 105 .vaddr = (u64)region->vaddr, in vfio_iommu_map() 106 .iova = region->iova, in vfio_iommu_map() 107 .size = region->size, in vfio_iommu_map() 116 static int iommufd_map(struct iommu *iommu, struct dma_region *region) in iommufd_map() argument [all …]
|