Home
last modified time | relevance | path

Searched refs:shmem (Results 1 – 25 of 66) sorted by relevance

123

/linux/drivers/gpu/drm/
H A Ddrm_gem_shmem_helper.c55 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()
159 void drm_gem_shmem_free(struct drm_gem_shmem_object *shmem) in drm_gem_shmem_free() argument
161 struct drm_gem_object *obj = &shmem->base; in drm_gem_shmem_free()
[all …]
/linux/drivers/gpu/drm/tests/
H A Ddrm_gem_shmem_test.c46 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()
66 struct drm_gem_shmem_object *shmem; in drm_gem_shmem_test_obj_create_private() local
117 shmem = to_drm_gem_shmem_obj(gem_obj); in drm_gem_shmem_test_obj_create_private()
118 KUNIT_EXPECT_PTR_EQ(test, shmem->sgt, sgt); in drm_gem_shmem_test_obj_create_private()
[all …]
/linux/drivers/firmware/arm_scmi/
H A Dshmem.c88 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 …]
H A Dcommon.h363 void (*tx_prepare)(struct scmi_shared_mem __iomem *shmem,
367 u32 (*read_header)(struct scmi_shared_mem __iomem *shmem);
369 void (*fetch_response)(struct scmi_shared_mem __iomem *shmem,
372 void (*fetch_notification)(struct scmi_shared_mem __iomem *shmem,
375 void (*clear_channel)(struct scmi_shared_mem __iomem *shmem);
376 bool (*poll_done)(struct scmi_shared_mem __iomem *shmem,
378 bool (*channel_free)(struct scmi_shared_mem __iomem *shmem);
379 bool (*channel_intr_enabled)(struct scmi_shared_mem __iomem *shmem);
430 const struct scmi_shared_mem_operations *shmem; member
H A DMakefile7 scmi-transport-$(CONFIG_ARM_SCMI_HAVE_SHMEM) = shmem.o
/linux/arch/riscv/kvm/
H A Dvcpu_sbi_sta.c21 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()
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()
105 shmem = shmem_phys_lo; in kvm_sbi_sta_steal_time_set_shmem()
[all …]
/linux/drivers/gpu/drm/panfrost/
H A Dpanfrost_gem_shrinker.c22 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/drivers/firmware/arm_scmi/transports/
H A Dmailbox.c37 struct scmi_shared_mem __iomem *shmem; member
50 core->shmem->tx_prepare(smbox->shmem, m, smbox->cinfo, in tx_prepare()
68 !core->shmem->channel_free(smbox->shmem)) { in rx_callback()
71 core->shmem->read_header(smbox->shmem), in rx_callback()
77 core->shmem->read_header(smbox->shmem), NULL); in rx_callback()
203 smbox->shmem = core->shmem->setup_iomap(cinfo, dev, tx, NULL, in mailbox_chan_setup()
205 if (IS_ERR(smbox->shmem)) in mailbox_chan_setup()
206 return PTR_ERR(smbox->shmem); in mailbox_chan_setup()
312 core->shmem->fetch_response(smbox->shmem, xfer, smbox->io_ops->fromio); in mailbox_fetch_response()
320 core->shmem->fetch_notification(smbox->shmem, max_len, xfer, in mailbox_fetch_notification()
[all …]
H A Dsmc.c63 struct scmi_shared_mem __iomem *shmem; member
82 core->shmem->read_header(scmi_info->shmem), NULL); in smc_msg_done_isr()
149 scmi_info->shmem = core->shmem->setup_iomap(cinfo, dev, tx, &res, in smc_chan_setup()
151 if (IS_ERR(scmi_info->shmem)) in smc_chan_setup()
152 return PTR_ERR(scmi_info->shmem); in smc_chan_setup()
160 void __iomem *ptr = (void __iomem *)scmi_info->shmem + size - 8; in smc_chan_setup()
235 core->shmem->tx_prepare(scmi_info->shmem, xfer, cinfo, in smc_send_message()
260 core->shmem->fetch_response(scmi_info->shmem, xfer, in smc_fetch_response()
H A Doptee.c127 struct scmi_shared_mem __iomem *shmem; member
328 core->shmem->clear_channel(channel->req.shmem); in scmi_optee_clear_channel()
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()
469 core->shmem->tx_prepare(channel->req.shmem, xfer, cinfo, in scmi_optee_send_message()
489 core->shmem->fetch_response(channel->req.shmem, xfer, in scmi_optee_fetch_response()
/linux/drivers/net/ethernet/microsoft/mana/
H A Dshm_channel.c146 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()
/linux/Documentation/devicetree/bindings/mailbox/
H A Dmailbox.txt26 - 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>;
/linux/drivers/net/arcnet/
H A Dcom90xx.c58 static int com90xx_found(int ioaddr, int airq, u_long shmem, void __iomem *);
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()
460 static int __init com90xx_found(int ioaddr, int airq, u_long shmem, in com90xx_found() argument
473 release_mem_region(shmem, MIRROR_SIZE); in com90xx_found()
485 check_mirror(shmem - MIRROR_SIZE, MIRROR_SIZE) == 0 && in com90xx_found()
486 check_mirror(shmem - 2 * MIRROR_SIZE, MIRROR_SIZE) == 1) in com90xx_found()
[all …]
H A Darc-rimi.c126 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()
/linux/arch/arm64/boot/dts/arm/
H A Djuno-scmi.dtsi49 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/drivers/gpu/drm/virtio/
H A Dvirtgpu_object.c123 struct virtio_gpu_object_shmem *shmem; in virtio_gpu_create_object() local
126 shmem = kzalloc(sizeof(*shmem), GFP_KERNEL); in virtio_gpu_create_object()
127 if (!shmem) in virtio_gpu_create_object()
130 dshmem = &shmem->base.base; in virtio_gpu_create_object()
/linux/Documentation/admin-guide/cgroup-v1/
H A Dmemcg_test.rst111 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
119 - radix-tree of shmem's inode.
126 - A new page is added to shmem's radix-tree.
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
160 SwapCache. Test with shmem/tmpfs is always good test.
/linux/drivers/mailbox/
H A Dpcc.c282 if (pchan->chan.shmem == NULL) { in check_and_ack()
286 memcpy_fromio(&pcc_hdr, pchan->chan.shmem, in check_and_ack()
397 if (pcc_mbox_chan->shmem) { in pcc_mbox_free_channel()
398 iounmap(pcc_mbox_chan->shmem); in pcc_mbox_free_channel()
399 pcc_mbox_chan->shmem = NULL; in pcc_mbox_free_channel()
415 pcc_mbox_chan->shmem = ioremap(pcc_mbox_chan->shmem_base_addr, in pcc_mbox_ioremap()
/linux/drivers/net/ethernet/8390/
H A Dmac8390.c738 long shmem = (start_page - WD_START_PG)<<8; in sane_block_output() local
740 memcpy_toio((void __iomem *)dev->mem_start + shmem, buf, count); in sane_block_output()
780 long shmem = (start_page - WD_START_PG)<<8; in dayna_block_output() local
782 dayna_memcpy_tocard(dev, shmem, buf, count); in dayna_block_output()
819 long shmem = (start_page - WD_START_PG)<<8; in slow_sane_block_output() local
821 word_memcpy_tocard(dev->mem_start + shmem, buf, count); in slow_sane_block_output()
H A Dwd.c466 void __iomem *shmem = ei_status.mem + ((start_page - WD_START_PG)<<8); in wd_block_output() local
472 memcpy_toio(shmem, buf, count); in wd_block_output()
475 memcpy_toio(shmem, buf, count); in wd_block_output()
/linux/drivers/accel/ivpu/
H A Divpu_gem.c177 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/drivers/tee/amdtee/
H A Dcore.c344 struct shmem_desc shmem; in amdtee_map_shmem() local
356 shmem.kaddr = shm->kaddr; in amdtee_map_shmem()
357 shmem.size = shm->size; in amdtee_map_shmem()
363 rc = handle_map_shmem(count, &shmem, &buf_id); in amdtee_map_shmem()
/linux/drivers/gpu/drm/i915/selftests/
H A Di915_mock_selftests.h19 selftest(shmem, shmem_utils_mock_selftests)
/linux/include/acpi/
H A Dpcc.h15 void __iomem *shmem; member
/linux/drivers/gpu/drm/ttm/tests/
H A Dttm_tt_test.c134 struct file *shmem; in ttm_tt_fini_shmem() local
146 shmem = shmem_file_setup("ttm swap", BO_SIZE, 0); in ttm_tt_fini_shmem()
147 tt->swap_storage = shmem; in ttm_tt_fini_shmem()

123