Home
last modified time | relevance | path

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

123456789

/linux-6.12.1/drivers/gpu/drm/
Ddrm_gem_shmem_helper.c30 * This library provides helpers for GEM objects backed by shmem buffers
54 struct drm_gem_shmem_object *shmem; in __drm_gem_shmem_create() local
64 shmem = to_drm_gem_shmem_obj(obj); in __drm_gem_shmem_create()
66 shmem = kzalloc(sizeof(*shmem), GFP_KERNEL); in __drm_gem_shmem_create()
67 if (!shmem) in __drm_gem_shmem_create()
69 obj = &shmem->base; in __drm_gem_shmem_create()
77 shmem->map_wc = false; /* dma-buf mappings use always writecombine */ in __drm_gem_shmem_create()
90 INIT_LIST_HEAD(&shmem->madv_list); in __drm_gem_shmem_create()
104 return shmem; in __drm_gem_shmem_create()
118 * This function creates a shmem GEM object.
[all …]
Ddrm_fbdev_shmem.c48 struct drm_gem_shmem_object *shmem = to_drm_gem_shmem_obj(obj); in drm_fbdev_shmem_fb_mmap() local
50 if (shmem->map_wc) in drm_fbdev_shmem_fb_mmap()
89 struct drm_gem_shmem_object *shmem = to_drm_gem_shmem_obj(obj); in drm_fbdev_shmem_get_page() local
96 page = shmem->pages[i]; // protected by active vmap in drm_fbdev_shmem_get_page()
114 struct drm_gem_shmem_object *shmem; in drm_fbdev_shmem_helper_fb_probe() local
130 shmem = to_drm_gem_shmem_obj(buffer->gem); in drm_fbdev_shmem_helper_fb_probe()
157 if (!shmem->map_wc) in drm_fbdev_shmem_helper_fb_probe()
259 drm_err(dev, "fbdev-shmem: Failed to setup emulation (ret=%d)\n", ret); in drm_fbdev_shmem_client_hotplug()
271 * drm_fbdev_shmem_setup() - Setup fbdev emulation for GEM SHMEM helpers
/linux-6.12.1/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.12.1/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).
100 void drm_gem_shmem_free(struct drm_gem_shmem_object *shmem);
102 void drm_gem_shmem_put_pages(struct drm_gem_shmem_object *shmem);
103 int drm_gem_shmem_pin(struct drm_gem_shmem_object *shmem);
104 void drm_gem_shmem_unpin(struct drm_gem_shmem_object *shmem);
105 int drm_gem_shmem_vmap(struct drm_gem_shmem_object *shmem,
107 void drm_gem_shmem_vunmap(struct drm_gem_shmem_object *shmem,
109 int drm_gem_shmem_mmap(struct drm_gem_shmem_object *shmem, struct vm_area_struct *vma);
111 int drm_gem_shmem_pin_locked(struct drm_gem_shmem_object *shmem);
[all …]
/linux-6.12.1/drivers/firmware/arm_scmi/
Dshmem.c37 static void shmem_tx_prepare(struct scmi_shared_mem __iomem *shmem, in shmem_tx_prepare() argument
58 spin_until_cond((ioread32(&shmem->channel_status) & in shmem_tx_prepare()
61 if (!(ioread32(&shmem->channel_status) & in shmem_tx_prepare()
70 iowrite32(0x0, &shmem->channel_status); in shmem_tx_prepare()
72 &shmem->flags); in shmem_tx_prepare()
73 iowrite32(sizeof(shmem->msg_header) + xfer->tx.len, &shmem->length); in shmem_tx_prepare()
74 iowrite32(pack_scmi_header(&xfer->hdr), &shmem->msg_header); in shmem_tx_prepare()
76 memcpy_toio(shmem->msg_payload, xfer->tx.buf, xfer->tx.len); in shmem_tx_prepare()
79 static u32 shmem_read_header(struct scmi_shared_mem __iomem *shmem) in shmem_read_header() argument
81 return ioread32(&shmem->msg_header); in shmem_read_header()
[all …]
Dcommon.h314 /* shmem related declarations */
321 * @tx_prepare: Prepare the @xfer message for transmission on the chosen @shmem
322 * @read_header: Read header of the message currently hold in @shmem
323 * @fetch_response: Copy the message response from @shmem into @xfer
324 * @fetch_notification: Copy the message notification from @shmem into @xfer
325 * @clear_channel: Clear the @shmem channel busy flag
326 * @poll_done: Check if poll has completed for @xfer on @shmem
327 * @channel_free: Check if @shmem channel is marked as free
328 * @channel_intr_enabled: Check is @shmem channel has requested a completion irq
332 void (*tx_prepare)(struct scmi_shared_mem __iomem *shmem,
[all …]
/linux-6.12.1/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 …]
/linux-6.12.1/drivers/firmware/arm_scmi/transports/
Dmailbox.c27 * @shmem: Transmit/Receive shared memory area
36 struct scmi_shared_mem __iomem *shmem; member
48 core->shmem->tx_prepare(smbox->shmem, m, smbox->cinfo); in tx_prepare()
65 !core->shmem->channel_free(smbox->shmem)) { in rx_callback()
68 core->shmem->read_header(smbox->shmem), in rx_callback()
74 core->shmem->read_header(smbox->shmem), NULL); in rx_callback()
107 * 'mboxes' and 'shmem', then determin which mailbox channel indexes are
119 num_sh = of_count_phandle_with_args(np, "shmem", NULL); in mailbox_chan_validate()
122 /* Bail out if mboxes and shmem descriptors are inconsistent */ in mailbox_chan_validate()
132 /* 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
53 * @param_page: 4K page number of the shmem channel
54 * @param_offset: Offset within the 4K page of the shmem channel
62 struct scmi_shared_mem __iomem *shmem; member
63 /* Protect access to shmem area */
80 core->shmem->read_header(scmi_info->shmem), NULL); in smc_msg_done_isr()
88 of_parse_phandle(of_node, "shmem", 0); in smc_chan_available()
147 scmi_info->shmem = core->shmem->setup_iomap(cinfo, dev, tx, &res); in smc_chan_setup()
[all …]
Doptee.c90 * When set, OP-TEE supports command using SMT header protocol (SCMI shmem) in
114 * @req.shmem: Virtual base address of the shared memory
117 * @tee_shm: TEE shared memory handle @req or NULL if using IOMEM shmem
128 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()
354 if (IS_ERR(channel->req.shmem)) in setup_static_shmem()
355 return PTR_ERR(channel->req.shmem); in setup_static_shmem()
363 if (of_property_present(cinfo->dev->of_node, "shmem")) in setup_shmem()
[all …]
/linux-6.12.1/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.12.1/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:
336 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.12.1/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.12.1/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.12.1/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.12.1/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.12.1/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.12.1/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.12.1/drivers/gpu/drm/panthor/
Dpanthor_gem.c209 struct drm_gem_shmem_object *shmem; in panthor_gem_create_with_handle() local
212 shmem = drm_gem_shmem_create(ddev, *size); in panthor_gem_create_with_handle()
213 if (IS_ERR(shmem)) in panthor_gem_create_with_handle()
214 return PTR_ERR(shmem); in panthor_gem_create_with_handle()
216 bo = to_panthor_bo(&shmem->base); in panthor_gem_create_with_handle()
229 ret = drm_gem_handle_create(file, &shmem->base, handle); in panthor_gem_create_with_handle()
234 drm_gem_object_put(&shmem->base); in panthor_gem_create_with_handle()
/linux-6.12.1/Documentation/admin-guide/mm/
Dtranshuge.rst15 Currently THP only works for anonymous memory mappings and tmpfs/shmem.
329 Hugepages in tmpfs/shmem
355 shmem mount: /sys/kernel/mm/transparent_hugepage/shmem_enabled. The mount
368 Shmem can also use "multi-size THP" (mTHP) by adding a new sysfs knob to
449 is incremented every time a shmem huge page is successfully
451 measures only shmem).
454 is incremented if a shmem huge page is attempted to be allocated
456 despite being named after "file", the counter measures only shmem).
459 is incremented if a shmem huge page cannot be charged and instead
462 counter measures only shmem).
[all …]
/linux-6.12.1/drivers/gpu/drm/virtio/
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-6.12.1/tools/testing/selftests/cachestat/
Dtest_cachestat.c219 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-6.12.1/Documentation/devicetree/bindings/sram/
Dsram.yaml87 - amlogic,meson-gxbb-scp-shmem
88 - amlogic,meson-axg-scp-shmem
89 - arm,juno-scp-shmem
90 - arm,scmi-shmem
91 - arm,scp-shmem

123456789