/linux/drivers/gpu/drm/ |
H A D | drm_gem_shmem_helper.c | 30 * This library provides helpers for GEM objects backed by shmem buffers 55 struct drm_gem_shmem_object *shmem; in __drm_gem_shmem_create() local 65 shmem = to_drm_gem_shmem_obj(obj); in __drm_gem_shmem_create() 67 shmem = kzalloc(sizeof(*shmem), GFP_KERNEL); in __drm_gem_shmem_create() 68 if (!shmem) in __drm_gem_shmem_create() 70 obj = &shmem->base; in __drm_gem_shmem_create() 78 shmem->map_wc = false; /* dma-buf mappings use always writecombine */ in __drm_gem_shmem_create() 91 INIT_LIST_HEAD(&shmem->madv_list); in __drm_gem_shmem_create() 105 return shmem; in __drm_gem_shmem_create() 119 * This function creates a shmem GEM object. [all …]
|
/linux/drivers/gpu/drm/tests/ |
H A D | drm_gem_shmem_test.c | 3 * KUnit test suite for GEM objects backed by shmem buffers 38 * Test creating a shmem GEM object backed by shmem buffer. The test 40 * shmem file node and object functions attributes set, and the size 46 struct drm_gem_shmem_object *shmem; in drm_gem_shmem_test_obj_create() local 48 shmem = drm_gem_shmem_create(drm_dev, TEST_SIZE); in drm_gem_shmem_test_obj_create() 49 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, shmem); in drm_gem_shmem_test_obj_create() 50 KUNIT_EXPECT_EQ(test, shmem->base.size, TEST_SIZE); in drm_gem_shmem_test_obj_create() 51 KUNIT_EXPECT_NOT_NULL(test, shmem->base.filp); in drm_gem_shmem_test_obj_create() 52 KUNIT_EXPECT_NOT_NULL(test, shmem->base.funcs); in drm_gem_shmem_test_obj_create() 54 drm_gem_shmem_free(shmem); in drm_gem_shmem_test_obj_create() [all …]
|
/linux/drivers/firmware/arm_scmi/ |
H A D | shmem.c | 88 static void shmem_tx_prepare(struct scmi_shared_mem __iomem *shmem, in shmem_tx_prepare() argument 110 spin_until_cond((ioread32(&shmem->channel_status) & in shmem_tx_prepare() 113 if (!(ioread32(&shmem->channel_status) & in shmem_tx_prepare() 122 iowrite32(0x0, &shmem->channel_status); in shmem_tx_prepare() 124 &shmem->flags); in shmem_tx_prepare() 125 iowrite32(sizeof(shmem->msg_header) + xfer->tx.len, &shmem->length); in shmem_tx_prepare() 126 iowrite32(pack_scmi_header(&xfer->hdr), &shmem->msg_header); in shmem_tx_prepare() 128 copy_toio(shmem->msg_payload, xfer->tx.buf, xfer->tx.len); in shmem_tx_prepare() 131 static u32 shmem_read_header(struct scmi_shared_mem __iomem *shmem) in shmem_read_header() argument 133 return ioread32(&shmem->msg_header); in shmem_read_header() [all …]
|
/linux/arch/riscv/kvm/ |
H A D | vcpu_sbi_sta.c | 21 vcpu->arch.sta.shmem = INVALID_GPA; in kvm_riscv_vcpu_sbi_sta_reset() 27 gpa_t shmem = vcpu->arch.sta.shmem; in kvm_riscv_vcpu_record_steal_time() local 38 if (shmem == INVALID_GPA) in kvm_riscv_vcpu_record_steal_time() 42 * shmem is 64-byte aligned (see the enforcement in in kvm_riscv_vcpu_record_steal_time() 46 gfn = shmem >> PAGE_SHIFT; in kvm_riscv_vcpu_record_steal_time() 50 vcpu->arch.sta.shmem = INVALID_GPA; in kvm_riscv_vcpu_record_steal_time() 54 sequence_ptr = (__le32 __user *)(hva + offset_in_page(shmem) + in kvm_riscv_vcpu_record_steal_time() 56 steal_ptr = (__le64 __user *)(hva + offset_in_page(shmem) + in kvm_riscv_vcpu_record_steal_time() 90 gpa_t shmem; in kvm_sbi_sta_steal_time_set_shmem() local 98 vcpu->arch.sta.shmem = INVALID_GPA; in kvm_sbi_sta_steal_time_set_shmem() [all …]
|
/linux/drivers/gpu/drm/panfrost/ |
H A D | panfrost_gem_shrinker.c | 22 struct drm_gem_shmem_object *shmem; in panfrost_gem_shrinker_count() local 28 list_for_each_entry(shmem, &pfdev->shrinker_list, madv_list) { in panfrost_gem_shrinker_count() 29 if (drm_gem_shmem_is_purgeable(shmem)) in panfrost_gem_shrinker_count() 30 count += shmem->base.size >> PAGE_SHIFT; in panfrost_gem_shrinker_count() 40 struct drm_gem_shmem_object *shmem = to_drm_gem_shmem_obj(obj); in panfrost_gem_purge() local 50 if (!dma_resv_trylock(shmem->base.resv)) in panfrost_gem_purge() 57 dma_resv_unlock(shmem->base.resv); in panfrost_gem_purge() 68 struct drm_gem_shmem_object *shmem, *tmp; in panfrost_gem_shrinker_scan() local 74 list_for_each_entry_safe(shmem, tmp, &pfdev->shrinker_list, madv_list) { in panfrost_gem_shrinker_scan() 77 if (drm_gem_shmem_is_purgeable(shmem) && in panfrost_gem_shrinker_scan() [all …]
|
/linux/Documentation/devicetree/bindings/firmware/ |
H A D | arm,scmi.yaml | 41 with shmem address(4KB-page, offset) as parameters 94 The effective combination in numbers of mboxes and shmem descriptors let 97 1 mbox / 1 shmem => SCMI TX over 1 mailbox bidirectional channel 98 2 mbox / 2 shmem => SCMI TX and RX over 2 mailbox bidirectional channels 99 2 mbox / 1 shmem => SCMI TX over 2 mailbox unidirectional channels 100 3 mbox / 2 shmem => SCMI TX and RX over 3 mailbox unidirectional channels 101 4 mbox / 2 shmem => SCMI TX and RX over 4 mailbox unidirectional channels 102 Any other combination of mboxes and shmem is invalid. 106 shmem: 351 shmem: [all …]
|
H A D | arm,scpi.yaml | 48 shmem: 170 - shmem 178 shmem = <&cpu_scp_hpri>; /* HP-NonSecure */ 225 compatible = "arm,scp-shmem"; 230 compatible = "arm,scp-shmem"; 241 shmem = <&cpu_scp_lpri>, <&cpu_scp_hpri>;
|
H A D | nvidia,tegra186-bpmp.yaml | 63 See "../reserved-memory/nvidia,tegra264-bpmp-shmem.yaml" for bindings for 81 shmem: 130 - shmem 182 shmem = <&cpu_bpmp_tx>, <&cpu_bpmp_rx>;
|
/linux/drivers/net/arcnet/ |
H A D | com90xx.c | 44 * shmem are left in the list at Stage 5, they must correspond to each 58 static int com90xx_found(int ioaddr, int airq, u_long shmem, void __iomem *); 86 static int io; /* use the insmod io= irq= shmem= options */ 88 static int shmem; variable 93 module_param(shmem, int, 0); 107 if (!io && !irq && !shmem && !*device && com90xx_skip_probe) in com90xx_probe() 131 if (shmem) in com90xx_probe() 132 shmems[numshmems++] = shmem; in com90xx_probe() 203 /* Stage 3: abandon any shmem addresses that don't have the signature in com90xx_probe() 243 * sure no "mirror" shmem areas show up - if they occur in com90xx_probe() [all …]
|
H A D | arc-rimi.c | 65 * need to be passed a specific shmem address, IRQ, and node ID. 72 pr_info("Given: node %02Xh, shmem %lXh, irq %d\n", in arcrimi_probe() 78 pr_err("No autoprobe for RIM I; you must specify the shmem and irq!\n"); in arcrimi_probe() 126 unsigned long first_mirror, last_mirror, shmem; in arcrimi_found() local 146 shmem = dev->mem_start; in arcrimi_found() 159 check_mirror(shmem - MIRROR_SIZE, MIRROR_SIZE) == 0 && in arcrimi_found() 160 check_mirror(shmem - 2 * MIRROR_SIZE, MIRROR_SIZE) == 1) in arcrimi_found() 163 first_mirror = shmem - mirror_size; in arcrimi_found() 168 last_mirror = shmem + mirror_size; in arcrimi_found() 194 release_mem_region(shmem, MIRROR_SIZE); in arcrimi_found() [all …]
|
/linux/drivers/net/ethernet/microsoft/mana/ |
H A D | shm_channel.c | 82 /* shmem reads as 0xFFFFFFFF in the reset case */ in mana_smc_poll_register() 146 u64 *shmem; in mana_smc_setup_hwc() local 186 shmem = (u64 *)ptr; in mana_smc_setup_hwc() 188 *shmem = frame_addr & PAGE_FRAME_L48_MASK; in mana_smc_setup_hwc() 194 shmem = (u64 *)ptr; in mana_smc_setup_hwc() 196 *shmem = frame_addr & PAGE_FRAME_L48_MASK; in mana_smc_setup_hwc() 202 shmem = (u64 *)ptr; in mana_smc_setup_hwc() 204 *shmem = frame_addr & PAGE_FRAME_L48_MASK; in mana_smc_setup_hwc() 210 shmem = (u64 *)ptr; in mana_smc_setup_hwc() 212 *shmem = frame_addr & PAGE_FRAME_L48_MASK; in mana_smc_setup_hwc() [all …]
|
/linux/drivers/accel/amdxdna/ |
H A D | amdxdna_gem.c | 267 struct drm_gem_shmem_object *shmem; in amdxdna_drm_alloc_shmem() local 270 shmem = drm_gem_shmem_create(dev, args->size); in amdxdna_drm_alloc_shmem() 271 if (IS_ERR(shmem)) in amdxdna_drm_alloc_shmem() 272 return ERR_CAST(shmem); in amdxdna_drm_alloc_shmem() 274 shmem->map_wc = false; in amdxdna_drm_alloc_shmem() 276 abo = to_xdna_obj(&shmem->base); in amdxdna_drm_alloc_shmem() 290 struct drm_gem_shmem_object *shmem; in amdxdna_drm_create_dev_heap() local 307 shmem = drm_gem_shmem_create(dev, args->size); in amdxdna_drm_create_dev_heap() 308 if (IS_ERR(shmem)) { in amdxdna_drm_create_dev_heap() 309 ret = PTR_ERR(shmem); in amdxdna_drm_create_dev_heap() [all …]
|
/linux/Documentation/devicetree/bindings/reserved-memory/ |
H A D | nvidia,tegra264-bpmp-shmem.yaml | 4 $id: http://devicetree.org/schemas/reserved-memory/nvidia,tegra264-bpmp-shmem.yaml# 17 The sub-node is named shmem@<address>. 24 const: nvidia,tegra264-bpmp-shmem 41 dram_cpu_bpmp_mail: shmem@f1be0000 { 42 compatible = "nvidia,tegra264-bpmp-shmem";
|
/linux/Documentation/devicetree/bindings/mailbox/ |
H A D | mailbox.txt | 26 - shmem : List of phandle pointing to the shared memory(SHM) area between the 39 Example with shared memory(shmem): 49 cl_shmem: shmem@0 { 50 compatible = "client-shmem"; 58 shmem = <&cl_shmem>;
|
H A D | arm,mhu.yaml | 111 shmem = <&cpu_scp_hpri>; /* HP-NonSecure */ 145 shmem = <&cpu_scp_lpri0>, 163 shmem = <&cpu_scp_hpri0>,
|
/linux/drivers/firmware/arm_scmi/transports/ |
H A D | optee.c | 88 * When set, OP-TEE supports command using SMT header protocol (SCMI shmem) in 112 * @req.shmem: Virtual base address of the shared memory 116 * @tee_shm: TEE shared memory handle @req or NULL if using IOMEM shmem 127 struct scmi_shared_mem __iomem *shmem; member 328 core->shmem->clear_channel(channel->req.shmem); in scmi_optee_clear_channel() 338 dev_err(channel->cinfo->dev, "shmem allocation failed\n"); in setup_dynamic_shmem() 353 channel->req.shmem = core->shmem->setup_iomap(cinfo, dev, true, NULL, in setup_static_shmem() 355 if (IS_ERR(channel->req.shmem)) in setup_static_shmem() 356 return PTR_ERR(channel->req.shmem); in setup_static_shmem() 364 if (of_property_present(cinfo->dev->of_node, "shmem")) in setup_shmem() [all …]
|
/linux/Documentation/admin-guide/cgroup-v1/ |
H A D | memcg_test.rst | 108 6. Shmem(tmpfs) Page Cache 111 The best way to understand shmem's page state transition is to read 112 mm/shmem.c. 114 But brief explanation of the behavior of memcg around shmem will be 117 Shmem's page (just leaf page, not direct/indirect block) can be on 119 - radix-tree of shmem's inode. 126 - A new page is added to shmem's radix-tree. 155 9.2 Shmem 158 Historically, memcg's shmem handling was poor and we saw some amount 159 of troubles here. This is because shmem is page-cache but can be [all …]
|
/linux/arch/arm64/boot/dts/arm/ |
H A D | juno-scmi.dtsi | 49 shmem = <&cpu_scp_lpri0 &cpu_scp_lpri1>; 63 shmem = <&cpu_scp_hpri0 &cpu_scp_hpri1>; 205 compatible = "arm,scmi-shmem"; 210 compatible = "arm,scmi-shmem"; 215 compatible = "arm,scmi-shmem"; 220 compatible = "arm,scmi-shmem";
|
/linux/Documentation/admin-guide/mm/ |
H A D | transhuge.rst | 15 Currently THP only works for anonymous memory mappings and tmpfs/shmem. 330 allocation policy for the internal shmem mount by using the kernel parameter 332 seven valid policies for shmem (``always``, ``within_size``, ``advise``, 342 size, ``thp_shmem`` controls each supported shmem THP size. ``thp_shmem`` 347 as required. If ``thp_shmem=`` is specified at least once, any shmem THP 358 Hugepages in tmpfs/shmem 367 shmem mount (see below), ordinary tmpfs mounts will make use of all available 410 shmem / internal tmpfs 502 is incremented every time a shmem huge page is successfully 504 measures only shmem). [all …]
|
/linux/tools/testing/selftests/cachestat/ |
H A D | test_cachestat.c | 219 ksft_print_msg("Unable to create shmem file.\n"); in test_cachestat_shmem() 225 ksft_print_msg("Unable to truncate shmem file.\n"); in test_cachestat_shmem() 231 ksft_print_msg("Unable to write to shmem file.\n"); in test_cachestat_shmem() 312 ksft_test_result_pass("cachestat works with a shmem file\n"); in main() 314 ksft_test_result_fail("cachestat fails with a shmem file\n"); in main()
|
/linux/drivers/gpu/drm/virtio/ |
H A D | virtgpu_object.c | 147 struct virtio_gpu_object_shmem *shmem; in virtio_gpu_create_object() local 150 shmem = kzalloc(sizeof(*shmem), GFP_KERNEL); in virtio_gpu_create_object() 151 if (!shmem) in virtio_gpu_create_object() 154 dshmem = &shmem->base.base; in virtio_gpu_create_object()
|
/linux/fs/xfs/ |
H A D | xfs_buf_mem.c | 26 * requirements. Therefore, the xmbuf mechanism uses an unlinked shmem file to 39 * shmem files used to back an in-memory buffer cache must not be exposed to 130 /* Directly map a shmem page into the buffer cache. */ 178 /* Unmap a shmem page that was mapped into the buffer cache. */
|
/linux/include/uapi/linux/ |
H A D | userfaultfd.h | 196 * UFFD_FEATURE_MISSING_HUGETLBFS, but it applies to shmem 197 * (i.e. tmpfs and other shmem based APIs). 211 * UFFD_FEATURE_MINOR_HUGETLBFS, but for shmem-backed pages instead. 218 * write-protection mode is supported on both shmem and hugetlbfs. 222 * (i.e. empty ptes). This will be the default behavior for shmem
|
/linux/drivers/accel/ivpu/ |
H A D | ivpu_gem.c | 177 struct drm_gem_shmem_object *shmem; in ivpu_bo_alloc() local 188 shmem = drm_gem_shmem_create(&vdev->drm, size); in ivpu_bo_alloc() 189 if (IS_ERR(shmem)) in ivpu_bo_alloc() 190 return ERR_CAST(shmem); in ivpu_bo_alloc() 192 bo = to_ivpu_bo(&shmem->base); in ivpu_bo_alloc()
|
/linux/tools/testing/selftests/mm/ |
H A D | uffd-stress.c | 60 "./uffd-stress shmem 1000 99\n\n" 73 "hugetlb-private, shmem, shmem-private\n\n"); in usage() 381 } else if (!strcmp(type, "shmem")) { in set_test_type() 385 } else if (!strcmp(type, "shmem-private")) { in set_test_type()
|