Home
last modified time | relevance | path

Searched full:shmem (Results 1 – 25 of 210) sorted by relevance

123456789

/linux-6.14.4/drivers/gpu/drm/
Ddrm_gem_shmem_helper.c30 * 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 …]
Ddrm_fbdev_shmem.c46 struct drm_gem_shmem_object *shmem = to_drm_gem_shmem_obj(obj); in drm_fbdev_shmem_fb_mmap() local
48 if (shmem->map_wc) in drm_fbdev_shmem_fb_mmap()
87 struct drm_gem_shmem_object *shmem = to_drm_gem_shmem_obj(obj); in drm_fbdev_shmem_get_page() local
94 page = shmem->pages[i]; // protected by active vmap in drm_fbdev_shmem_get_page()
139 struct drm_gem_shmem_object *shmem; in drm_fbdev_shmem_driver_fbdev_probe() local
155 shmem = to_drm_gem_shmem_obj(buffer->gem); in drm_fbdev_shmem_driver_fbdev_probe()
183 if (!shmem->map_wc) in drm_fbdev_shmem_driver_fbdev_probe()
/linux-6.14.4/drivers/gpu/drm/tests/
Ddrm_gem_shmem_test.c3 * 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-6.14.4/include/drm/
Ddrm_gem_shmem_helper.h21 * struct drm_gem_shmem_object - GEM object backed by shmem
91 * @map_wc: map object write-combined (instead of using shmem defaults).
103 void drm_gem_shmem_free(struct drm_gem_shmem_object *shmem);
105 void drm_gem_shmem_put_pages(struct drm_gem_shmem_object *shmem);
106 int drm_gem_shmem_pin(struct drm_gem_shmem_object *shmem);
107 void drm_gem_shmem_unpin(struct drm_gem_shmem_object *shmem);
108 int drm_gem_shmem_vmap(struct drm_gem_shmem_object *shmem,
110 void drm_gem_shmem_vunmap(struct drm_gem_shmem_object *shmem,
112 int drm_gem_shmem_mmap(struct drm_gem_shmem_object *shmem, struct vm_area_struct *vma);
114 int drm_gem_shmem_pin_locked(struct drm_gem_shmem_object *shmem);
[all …]
/linux-6.14.4/drivers/firmware/arm_scmi/
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 …]
Dcommon.h345 /* shmem related declarations */
352 * @tx_prepare: Prepare the @xfer message for transmission on the chosen @shmem
353 * @read_header: Read header of the message currently hold in @shmem
354 * @fetch_response: Copy the message response from @shmem into @xfer
355 * @fetch_notification: Copy the message notification from @shmem into @xfer
356 * @clear_channel: Clear the @shmem channel busy flag
357 * @poll_done: Check if poll has completed for @xfer on @shmem
358 * @channel_free: Check if @shmem channel is marked as free
359 * @channel_intr_enabled: Check is @shmem channel has requested a completion irq
363 void (*tx_prepare)(struct scmi_shared_mem __iomem *shmem,
[all …]
/linux-6.14.4/arch/riscv/kvm/
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()
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 …]
Dnacl.c17 void __kvm_riscv_nacl_hfence(void *shmem, in __kvm_riscv_nacl_hfence() argument
27 entp = shmem + SBI_NACL_SHMEM_HFENCE_ENTRY_CONFIG(i); in __kvm_riscv_nacl_hfence()
45 entp = shmem + SBI_NACL_SHMEM_HFENCE_ENTRY_CONFIG(i); in __kvm_riscv_nacl_hfence()
47 entp = shmem + SBI_NACL_SHMEM_HFENCE_ENTRY_PNUM(i); in __kvm_riscv_nacl_hfence()
49 entp = shmem + SBI_NACL_SHMEM_HFENCE_ENTRY_PCOUNT(i); in __kvm_riscv_nacl_hfence()
92 if (!nacl->shmem) in kvm_riscv_nacl_exit()
95 free_pages((unsigned long)nacl->shmem, in kvm_riscv_nacl_exit()
97 nacl->shmem = NULL; in kvm_riscv_nacl_exit()
147 nacl->shmem = page_to_virt(shmem_page); in kvm_riscv_nacl_init()
/linux-6.14.4/drivers/firmware/arm_scmi/transports/
Dmailbox.c27 * @shmem: Transmit/Receive shared memory area
37 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()
110 * 'mboxes' and 'shmem', then determin which mailbox channel indexes are
122 num_sh = of_count_phandle_with_args(np, "shmem", NULL); in mailbox_chan_validate()
125 /* Bail out if mboxes and shmem descriptors are inconsistent */ in mailbox_chan_validate()
135 /* Bail out if provided shmem descriptors do not refer distinct areas */ in mailbox_chan_validate()
[all …]
Dsmc.c26 * The shmem address is split into 4K page and offset.
29 * This however limits the shmem address to 44 bit.
47 * @shmem: Transmit/Receive shared memory area
54 * @param_page: 4K page number of the shmem channel
55 * @param_offset: Offset within the 4K page of the shmem channel
63 struct scmi_shared_mem __iomem *shmem; member
65 /* Protect access to shmem area */
82 core->shmem->read_header(scmi_info->shmem), NULL); in smc_msg_done_isr()
90 of_parse_phandle(of_node, "shmem", 0); in smc_chan_available()
149 scmi_info->shmem = core->shmem->setup_iomap(cinfo, dev, tx, &res, in smc_chan_setup()
[all …]
Doptee.c88 * 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-6.14.4/drivers/gpu/drm/panfrost/
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-6.14.4/Documentation/devicetree/bindings/firmware/
Darm,scmi.yaml41 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 …]
Darm,scpi.yaml48 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>;
/linux-6.14.4/drivers/net/ethernet/microsoft/mana/
Dshm_channel.c82 /* 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-6.14.4/drivers/net/arcnet/
Dcom90xx.c44 * 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 …]
Darc-rimi.c65 * 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-6.14.4/drivers/accel/amdxdna/
Damdxdna_gem.c267 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-6.14.4/Documentation/devicetree/bindings/mailbox/
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-6.14.4/Documentation/devicetree/bindings/reserved-memory/
Dnvidia,tegra264-bpmp-shmem.yaml4 $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-6.14.4/Documentation/admin-guide/cgroup-v1/
Dmemcg_test.rst108 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-6.14.4/arch/arm64/boot/dts/arm/
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-6.14.4/Documentation/admin-guide/mm/
Dtranshuge.rst15 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-6.14.4/drivers/gpu/drm/panthor/
Dpanthor_gem.c221 struct drm_gem_shmem_object *shmem; in panthor_gem_create_with_handle() local
224 shmem = drm_gem_shmem_create(ddev, *size); in panthor_gem_create_with_handle()
225 if (IS_ERR(shmem)) in panthor_gem_create_with_handle()
226 return PTR_ERR(shmem); in panthor_gem_create_with_handle()
228 bo = to_panthor_bo(&shmem->base); in panthor_gem_create_with_handle()
241 ret = drm_gem_handle_create(file, &shmem->base, handle); in panthor_gem_create_with_handle()
246 drm_gem_object_put(&shmem->base); in panthor_gem_create_with_handle()
/linux-6.14.4/drivers/gpu/drm/virtio/
Dvirtgpu_object.c147 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()

123456789