/openbmc/linux/arch/powerpc/mm/nohash/ |
H A D | kaslr_booke.c | 23 struct regions { struct 38 struct regions __initdata regions; argument 113 if (regions.reserved_mem < 0) in overlaps_reserved_region() 117 for (subnode = fdt_first_subnode(fdt, regions.reserved_mem); in overlaps_reserved_region() 125 while (len >= (regions.reserved_mem_addr_cells + in overlaps_reserved_region() 126 regions.reserved_mem_size_cells)) { in overlaps_reserved_region() 128 if (regions.reserved_mem_addr_cells == 2) in overlaps_reserved_region() 131 reg += regions.reserved_mem_addr_cells; in overlaps_reserved_region() 132 len -= 4 * regions.reserved_mem_addr_cells; in overlaps_reserved_region() 135 if (regions.reserved_mem_size_cells == 2) in overlaps_reserved_region() [all …]
|
/openbmc/linux/drivers/mtd/chips/ |
H A D | jedec_probe.c | 275 const uint32_t regions[6]; member 307 .regions = { 319 .regions = { 334 .regions = { 349 .regions = { 364 .regions = { 379 .regions = { 395 .regions = { 412 .regions = { 429 .regions = { [all …]
|
/openbmc/linux/mm/damon/ |
H A D | vaddr-test.h | 69 struct damon_addr_range regions[3] = {0,}; in damon_test_three_regions_in_vmas() local 84 __damon_va_three_regions(&mm, regions); in damon_test_three_regions_in_vmas() 86 KUNIT_EXPECT_EQ(test, 10ul, regions[0].start); in damon_test_three_regions_in_vmas() 87 KUNIT_EXPECT_EQ(test, 25ul, regions[0].end); in damon_test_three_regions_in_vmas() 88 KUNIT_EXPECT_EQ(test, 200ul, regions[1].start); in damon_test_three_regions_in_vmas() 89 KUNIT_EXPECT_EQ(test, 220ul, regions[1].end); in damon_test_three_regions_in_vmas() 90 KUNIT_EXPECT_EQ(test, 300ul, regions[2].start); in damon_test_three_regions_in_vmas() 91 KUNIT_EXPECT_EQ(test, 330ul, regions[2].end); in damon_test_three_regions_in_vmas() 130 unsigned long *regions, int nr_regions, in damon_do_test_apply_three_regions() argument 140 r = damon_new_region(regions[i * 2], regions[i * 2 + 1]); in damon_do_test_apply_three_regions() [all …]
|
H A D | vaddr.c | 117 struct damon_addr_range regions[3]) in __damon_va_three_regions() 160 regions[0].start = ALIGN(start, DAMON_MIN_REGION); in __damon_va_three_regions() 161 regions[0].end = ALIGN(first_gap.start, DAMON_MIN_REGION); in __damon_va_three_regions() 162 regions[1].start = ALIGN(first_gap.end, DAMON_MIN_REGION); in __damon_va_three_regions() 163 regions[1].end = ALIGN(second_gap.start, DAMON_MIN_REGION); in __damon_va_three_regions() 164 regions[2].start = ALIGN(second_gap.end, DAMON_MIN_REGION); in __damon_va_three_regions() 165 regions[2].end = ALIGN(prev->vm_end, DAMON_MIN_REGION); in __damon_va_three_regions() 176 struct damon_addr_range regions[3]) in damon_va_three_regions() 186 rc = __damon_va_three_regions(mm, regions); in damon_va_three_regions() 240 struct damon_addr_range regions[3]; in __damon_va_init_regions() local [all …]
|
/openbmc/linux/drivers/vfio/cdx/ |
H A D | main.c | 19 vdev->regions = kcalloc(count, sizeof(struct vfio_cdx_region), in vfio_cdx_open_device() 21 if (!vdev->regions) in vfio_cdx_open_device() 27 vdev->regions[i].addr = res->start; in vfio_cdx_open_device() 28 vdev->regions[i].size = resource_size(res); in vfio_cdx_open_device() 29 vdev->regions[i].type = res->flags; in vfio_cdx_open_device() 34 if (!(vdev->regions[i].addr & ~PAGE_MASK) && in vfio_cdx_open_device() 35 !(vdev->regions[i].size & ~PAGE_MASK)) in vfio_cdx_open_device() 36 vdev->regions[i].flags |= in vfio_cdx_open_device() 38 vdev->regions[i].flags |= VFIO_REGION_INFO_FLAG_READ; in vfio_cdx_open_device() 40 vdev->regions[i].flags |= VFIO_REGION_INFO_FLAG_WRITE; in vfio_cdx_open_device() [all …]
|
/openbmc/u-boot/drivers/mtd/ |
H A D | jedec_flash.c | 151 const ulong regions[6]; member 177 .regions = { 193 .regions = { 207 .regions = { 221 .regions = { 235 .regions = { 249 .regions = { 263 .regions = { 277 .regions = { 293 .regions = { [all …]
|
H A D | cfi_mtd.c | 136 int regions = 0; in cfi_mtd_set_erasesize() local 147 regions++; in cfi_mtd_set_erasesize() 151 switch (regions) { in cfi_mtd_set_erasesize() 160 mtd->numeraseregions = regions; in cfi_mtd_set_erasesize() 161 mtd->eraseregions = malloc(sizeof(struct mtd_erase_region_info) * regions); in cfi_mtd_set_erasesize() 166 regions = 0; in cfi_mtd_set_erasesize() 171 mtd->eraseregions[regions].offset = offset - base_addr; in cfi_mtd_set_erasesize() 172 mtd->eraseregions[regions].erasesize = sect_size_old; in cfi_mtd_set_erasesize() 173 mtd->eraseregions[regions].numblocks = numblocks; in cfi_mtd_set_erasesize() 176 regions++; in cfi_mtd_set_erasesize() [all …]
|
/openbmc/linux/drivers/gpu/drm/nouveau/nvkm/nvfw/ |
H A D | acr.c | 130 hdr->regions.no_regions); in flcn_acr_desc_dump() 132 for (i = 0; i < ARRAY_SIZE(hdr->regions.region_props); i++) { in flcn_acr_desc_dump() 135 hdr->regions.region_props[i].start_addr); in flcn_acr_desc_dump() 137 hdr->regions.region_props[i].end_addr); in flcn_acr_desc_dump() 139 hdr->regions.region_props[i].region_id); in flcn_acr_desc_dump() 141 hdr->regions.region_props[i].read_mask); in flcn_acr_desc_dump() 143 hdr->regions.region_props[i].write_mask); in flcn_acr_desc_dump() 145 hdr->regions.region_props[i].client_mask); in flcn_acr_desc_dump() 173 hdr->regions.no_regions); in flcn_acr_desc_v1_dump() 175 for (i = 0; i < ARRAY_SIZE(hdr->regions.region_props); i++) { in flcn_acr_desc_v1_dump() [all …]
|
/openbmc/linux/drivers/vfio/platform/ |
H A D | vfio_platform_common.c | 144 vdev->regions = kcalloc(cnt, sizeof(struct vfio_platform_region), in vfio_platform_regions_init() 146 if (!vdev->regions) in vfio_platform_regions_init() 153 vdev->regions[i].addr = res->start; in vfio_platform_regions_init() 154 vdev->regions[i].size = resource_size(res); in vfio_platform_regions_init() 155 vdev->regions[i].flags = 0; in vfio_platform_regions_init() 159 vdev->regions[i].type = VFIO_PLATFORM_REGION_TYPE_MMIO; in vfio_platform_regions_init() 160 vdev->regions[i].flags |= VFIO_REGION_INFO_FLAG_READ; in vfio_platform_regions_init() 162 vdev->regions[i].flags |= in vfio_platform_regions_init() 169 if (!(vdev->regions[i].addr & ~PAGE_MASK) && in vfio_platform_regions_init() 170 !(vdev->regions[i].size & ~PAGE_MASK)) in vfio_platform_regions_init() [all …]
|
/openbmc/linux/tools/testing/memblock/tests/ |
H A D | alloc_exact_nid_api.c | 30 struct memblock_region *new_rgn = &memblock.reserved.regions[0]; in alloc_exact_nid_top_down_numa_simple_check() 31 struct memblock_region *req_node = &memblock.memory.regions[nid_req]; in alloc_exact_nid_top_down_numa_simple_check() 82 struct memblock_region *new_rgn = &memblock.reserved.regions[1]; in alloc_exact_nid_top_down_numa_part_reserved_check() 83 struct memblock_region *req_node = &memblock.memory.regions[nid_req]; in alloc_exact_nid_top_down_numa_part_reserved_check() 143 struct memblock_region *new_rgn = &memblock.reserved.regions[0]; in alloc_exact_nid_top_down_numa_split_range_low_check() 144 struct memblock_region *req_node = &memblock.memory.regions[nid_req]; in alloc_exact_nid_top_down_numa_split_range_low_check() 200 struct memblock_region *new_rgn = &memblock.reserved.regions[0]; in alloc_exact_nid_top_down_numa_no_overlap_split_check() 201 struct memblock_region *req_node = &memblock.memory.regions[nid_req]; in alloc_exact_nid_top_down_numa_no_overlap_split_check() 202 struct memblock_region *node2 = &memblock.memory.regions[6]; in alloc_exact_nid_top_down_numa_no_overlap_split_check() 258 struct memblock_region *new_rgn = &memblock.reserved.regions[0]; in alloc_exact_nid_top_down_numa_no_overlap_low_check() [all …]
|
H A D | alloc_nid_api.c | 66 struct memblock_region *rgn = &memblock.reserved.regions[0]; in alloc_nid_top_down_simple_check() 118 struct memblock_region *rgn = &memblock.reserved.regions[0]; in alloc_nid_top_down_end_misaligned_check() 169 struct memblock_region *rgn = &memblock.reserved.regions[0]; in alloc_nid_exact_address_generic_check() 221 struct memblock_region *rgn = &memblock.reserved.regions[0]; in alloc_nid_top_down_narrow_range_check() 311 struct memblock_region *rgn = &memblock.reserved.regions[0]; in alloc_nid_min_reserved_generic_check() 363 struct memblock_region *rgn = &memblock.reserved.regions[0]; in alloc_nid_max_reserved_generic_check() 416 struct memblock_region *rgn1 = &memblock.reserved.regions[1]; in alloc_nid_top_down_reserved_with_space_check() 417 struct memblock_region *rgn2 = &memblock.reserved.regions[0]; in alloc_nid_top_down_reserved_with_space_check() 481 struct memblock_region *rgn = &memblock.reserved.regions[0]; in alloc_nid_reserved_full_merge_generic_check() 543 struct memblock_region *rgn1 = &memblock.reserved.regions[1]; in alloc_nid_top_down_reserved_no_space_check() [all …]
|
H A D | basic_api.c | 17 ASSERT_NE(memblock.memory.regions, NULL); in memblock_initialization_check() 22 ASSERT_NE(memblock.reserved.regions, NULL); in memblock_initialization_check() 45 rgn = &memblock.memory.regions[0]; in memblock_add_simple_check() 78 rgn = &memblock.memory.regions[0]; in memblock_add_node_simple_check() 121 rgn1 = &memblock.memory.regions[0]; in memblock_add_disjoint_check() 122 rgn2 = &memblock.memory.regions[1]; in memblock_add_disjoint_check() 175 rgn = &memblock.memory.regions[0]; in memblock_add_overlap_top_check() 227 rgn = &memblock.memory.regions[0]; in memblock_add_overlap_bottom_check() 276 rgn = &memblock.memory.regions[0]; in memblock_add_within_check() 347 rgn = &memblock.memory.regions[0]; in memblock_add_between_check() [all …]
|
H A D | alloc_api.c | 26 struct memblock_region *rgn = &memblock.reserved.regions[0]; in alloc_top_down_simple_check() 73 struct memblock_region *rgn1 = &memblock.reserved.regions[1]; in alloc_top_down_disjoint_check() 74 struct memblock_region *rgn2 = &memblock.reserved.regions[0]; in alloc_top_down_disjoint_check() 125 struct memblock_region *rgn = &memblock.reserved.regions[0]; in alloc_top_down_before_check() 168 struct memblock_region *rgn = &memblock.reserved.regions[0]; in alloc_top_down_after_check() 217 struct memblock_region *rgn = &memblock.reserved.regions[0]; in alloc_top_down_second_fit_check() 266 struct memblock_region *rgn = &memblock.reserved.regions[0]; in alloc_in_between_generic_check() 416 struct memblock_region *rgn = &memblock.reserved.regions[0]; in alloc_limited_space_generic_check() 450 struct memblock_region *rgn = &memblock.reserved.regions[0]; in alloc_no_memory_generic_check() 484 struct memblock_region *rgn = &memblock.reserved.regions[0]; in alloc_too_large_generic_check() [all …]
|
/openbmc/u-boot/cmd/ |
H A D | armflash.c | 29 struct afs_region regions[MAX_REGIONS]; member 104 afi->regions[0].offset = readl((void *)imginfo + 0x04); in parse_bank() 105 afi->regions[0].load_address = in parse_bank() 107 afi->regions[0].size = readl((void *)imginfo + 0x0C); in parse_bank() 148 afi->regions[j].load_address = in parse_bank() 150 afi->regions[j].size = in parse_bank() 152 afi->regions[j].offset = in parse_bank() 200 from = afi->flash_mem_start + afi->regions[i].offset; in load_image() 203 } else if (afi->regions[i].load_address) { in load_image() 204 to = afi->regions[i].load_address; in load_image() [all …]
|
/openbmc/linux/mm/ |
H A D | memblock.c | 116 .memory.regions = memblock_memory_init_regions, 121 .reserved.regions = memblock_reserved_init_regions, 132 .regions = memblock_physmem_init_regions, 148 for (i = 0, rgn = &memblock_type->regions[0]; \ 150 i++, rgn = &memblock_type->regions[i]) 198 if (memblock_addrs_overlap(base, size, type->regions[i].base, in memblock_overlaps_region() 199 type->regions[i].size)) in memblock_overlaps_region() 351 type->total_size -= type->regions[r].size; in memblock_remove_region() 352 memmove(&type->regions[r], &type->regions[r + 1], in memblock_remove_region() 353 (type->cnt - (r + 1)) * sizeof(type->regions[r])); in memblock_remove_region() [all …]
|
/openbmc/linux/drivers/md/ |
H A D | dm-bio-prison-v1.c | 29 struct prison_region regions[]; member 47 prison = kzalloc(struct_size(prison, regions, num_locks), GFP_KERNEL); in dm_bio_prison_create() 53 spin_lock_init(&prison->regions[i].lock); in dm_bio_prison_create() 54 prison->regions[i].cell = RB_ROOT; in dm_bio_prison_create() 184 spin_lock_irq(&prison->regions[l].lock); in bio_detain() 185 r = __bio_detain(&prison->regions[l].cell, key, inmate, cell_prealloc, cell_result); in bio_detain() 186 spin_unlock_irq(&prison->regions[l].lock); in bio_detain() 232 spin_lock_irq(&prison->regions[l].lock); in dm_cell_release() 233 __cell_release(&prison->regions[l].cell, cell, bios); in dm_cell_release() 234 spin_unlock_irq(&prison->regions[l].lock); in dm_cell_release() [all …]
|
/openbmc/linux/drivers/vfio/fsl-mc/ |
H A D | vfio_fsl_mc.c | 30 vdev->regions = kcalloc(count, sizeof(struct vfio_fsl_mc_region), in vfio_fsl_mc_open_device() 32 if (!vdev->regions) in vfio_fsl_mc_open_device() 36 struct resource *res = &mc_dev->regions[i]; in vfio_fsl_mc_open_device() 39 vdev->regions[i].addr = res->start; in vfio_fsl_mc_open_device() 40 vdev->regions[i].size = resource_size(res); in vfio_fsl_mc_open_device() 41 vdev->regions[i].type = mc_dev->regions[i].flags & IORESOURCE_BITS; in vfio_fsl_mc_open_device() 46 if (!no_mmap && !(vdev->regions[i].addr & ~PAGE_MASK) && in vfio_fsl_mc_open_device() 47 !(vdev->regions[i].size & ~PAGE_MASK)) in vfio_fsl_mc_open_device() 48 vdev->regions[i].flags |= in vfio_fsl_mc_open_device() 50 vdev->regions[i].flags |= VFIO_REGION_INFO_FLAG_READ; in vfio_fsl_mc_open_device() [all …]
|
/openbmc/u-boot/drivers/pci/ |
H A D | pci_auto_common.c | 89 switch (hose->regions[i].flags) { in pciauto_config_init() 92 hose->pci_io->size < hose->regions[i].size) in pciauto_config_init() 93 hose->pci_io = hose->regions + i; in pciauto_config_init() 97 hose->pci_mem->size < hose->regions[i].size) in pciauto_config_init() 98 hose->pci_mem = hose->regions + i; in pciauto_config_init() 102 hose->pci_prefetch->size < hose->regions[i].size) in pciauto_config_init() 103 hose->pci_prefetch = hose->regions + i; in pciauto_config_init()
|
/openbmc/linux/drivers/virt/nitro_enclaves/ |
H A D | ne_misc_dev_test.c | 117 phys_contig_mem_regions.regions = kunit_kcalloc(test, MAX_PHYS_REGIONS, in ne_misc_dev_test_merge_phys_contig_memory_regions() 118 sizeof(*phys_contig_mem_regions.regions), in ne_misc_dev_test_merge_phys_contig_memory_regions() 120 KUNIT_ASSERT_TRUE(test, phys_contig_mem_regions.regions); in ne_misc_dev_test_merge_phys_contig_memory_regions() 135 KUNIT_EXPECT_EQ(test, phys_contig_mem_regions.regions[num - 1].start, in ne_misc_dev_test_merge_phys_contig_memory_regions() 137 KUNIT_EXPECT_EQ(test, range_len(&phys_contig_mem_regions.regions[num - 1]), in ne_misc_dev_test_merge_phys_contig_memory_regions() 141 kunit_kfree(test, phys_contig_mem_regions.regions); in ne_misc_dev_test_merge_phys_contig_memory_regions()
|
/openbmc/linux/drivers/net/dsa/sja1105/ |
H A D | sja1105_devlink.c | 85 priv->regions = kcalloc(num_regions, sizeof(struct devlink_region *), in sja1105_setup_devlink_regions() 87 if (!priv->regions) in sja1105_setup_devlink_regions() 97 dsa_devlink_region_destroy(priv->regions[i]); in sja1105_setup_devlink_regions() 99 kfree(priv->regions); in sja1105_setup_devlink_regions() 103 priv->regions[i] = region; in sja1105_setup_devlink_regions() 115 dsa_devlink_region_destroy(priv->regions[i]); in sja1105_teardown_devlink_regions() 117 kfree(priv->regions); in sja1105_teardown_devlink_regions()
|
/openbmc/linux/Documentation/admin-guide/device-mapper/ |
H A D | dm-clone.rst | 58 3. A small metadata device - it records which regions are already valid in the 59 destination device, i.e., which regions have already been hydrated, or have 68 dm-clone divides the source and destination devices in fixed sized regions. 77 Reads and writes from/to hydrated regions are serviced from the destination 93 as a hint to skip hydration of the regions covered by the request, i.e., it 111 A message `hydration_threshold <#regions>` can be used to set the maximum number 112 of regions being copied, the default being 1 region. 116 region size. A message `hydration_batch_size <#regions>` can be used to tune the 118 dm-clone trying to batch together contiguous regions, so we copy the data in 119 batches of this many regions. [all …]
|
/openbmc/linux/drivers/soc/qcom/ |
H A D | smem.c | 288 struct smem_region regions[]; member 468 header = smem->regions[0].virt_base; in qcom_smem_alloc_global() 555 header = smem->regions[0].virt_base; in qcom_smem_get_global() 563 region = &smem->regions[i]; in qcom_smem_get_global() 751 header = __smem->regions[0].virt_base; in qcom_smem_get_free_space() 754 if (ret > __smem->regions[0].size) in qcom_smem_get_free_space() 800 area = &__smem->regions[i]; in qcom_smem_virt_to_phys() 840 header = smem->regions[0].virt_base; in qcom_smem_get_sbl_version() 893 phys_addr = smem->regions[0].aux_base + le32_to_cpu(entry->offset); in qcom_smem_partition_header() 975 smem->global_partition.phys_base = smem->regions[0].aux_base + in qcom_smem_set_global_partition() [all …]
|
/openbmc/linux/drivers/perf/ |
H A D | marvell_cn10k_tad_pmu.c | 32 struct tad_region *regions; member 53 new += readq(tad_pmu->regions[i].base + in tad_pmu_event_counter_read() 71 writeq_relaxed(0, tad_pmu->regions[i].base + in tad_pmu_event_counter_stop() 92 writeq_relaxed(0, tad_pmu->regions[i].base + in tad_pmu_event_counter_start() 100 writeq_relaxed(reg_val, tad_pmu->regions[i].base + in tad_pmu_event_counter_start() 258 struct tad_region *regions; in tad_pmu_probe() local 299 regions = devm_kcalloc(&pdev->dev, tad_cnt, in tad_pmu_probe() 300 sizeof(*regions), GFP_KERNEL); in tad_pmu_probe() 301 if (!regions) in tad_pmu_probe() 306 regions[i].base = devm_ioremap(&pdev->dev, in tad_pmu_probe() [all …]
|
/openbmc/linux/Documentation/admin-guide/mm/damon/ |
H A D | lru_sort.rst | 31 DAMON_LRU_SORT finds hot pages (pages of memory regions that showing access 33 memory regions that showing no access for a time that longer than a 85 Access frequency threshold for hot memory regions identification in permil. 94 Time threshold for cold memory regions identification in microseconds. 179 Minimum number of monitoring regions. 181 The minimal number of monitoring regions of DAMON for the cold memory 190 Maximum number of monitoring regions. 192 The maximum number of monitoring regions of DAMON for the cold memory 225 Number of hot memory regions that tried to be LRU-sorted. 230 Total bytes of hot memory regions that tried to be LRU-sorted. [all …]
|
/openbmc/qemu/hw/usb/ |
H A D | chipidea.c | 104 } regions[ARRAY_SIZE(ci->iomem)] = { in chipidea_init() local 136 regions[i].ops, in chipidea_init() 138 regions[i].name, in chipidea_init() 139 regions[i].size); in chipidea_init() 142 regions[i].offset, in chipidea_init()
|