Home
last modified time | relevance | path

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

12345678

/openbmc/linux/drivers/gpu/drm/
H A Ddrm_gem_shmem_helper.c31 * 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 …]
/openbmc/linux/include/drm/
H A 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_madvise(struct drm_gem_shmem_object *shmem, int madv);
[all …]
/openbmc/linux/drivers/firmware/arm_scmi/
H A Dshmem.c35 void shmem_tx_prepare(struct scmi_shared_mem __iomem *shmem, in shmem_tx_prepare() argument
55 spin_until_cond((ioread32(&shmem->channel_status) & in shmem_tx_prepare()
58 if (!(ioread32(&shmem->channel_status) & in shmem_tx_prepare()
67 iowrite32(0x0, &shmem->channel_status); in shmem_tx_prepare()
69 &shmem->flags); in shmem_tx_prepare()
70 iowrite32(sizeof(shmem->msg_header) + xfer->tx.len, &shmem->length); in shmem_tx_prepare()
71 iowrite32(pack_scmi_header(&xfer->hdr), &shmem->msg_header); in shmem_tx_prepare()
73 memcpy_toio(shmem->msg_payload, xfer->tx.buf, xfer->tx.len); in shmem_tx_prepare()
76 u32 shmem_read_header(struct scmi_shared_mem __iomem *shmem) in shmem_read_header() argument
78 return ioread32(&shmem->msg_header); in shmem_read_header()
[all …]
H A Dmailbox.c25 * @shmem: Transmit/Receive shared memory area
33 struct scmi_shared_mem __iomem *shmem; member
43 shmem_tx_prepare(smbox->shmem, m, smbox->cinfo); in tx_prepare()
59 if (cl->knows_txdone && !shmem_channel_free(smbox->shmem)) { in rx_callback()
64 scmi_rx_callback(smbox->cinfo, shmem_read_header(smbox->shmem), NULL); in rx_callback()
95 * 'mboxes' and 'shmem', then determin which mailbox channel indexes are
107 num_sh = of_count_phandle_with_args(np, "shmem", NULL); in mailbox_chan_validate()
110 /* Bail out if mboxes and shmem descriptors are inconsistent */ in mailbox_chan_validate()
119 /* Bail out if provided shmem descriptors do not refer distinct areas */ in mailbox_chan_validate()
123 np_tx = of_parse_phandle(np, "shmem", 0); in mailbox_chan_validate()
[all …]
H A Dsmc.c24 * The shmem address is split into 4K page and offset.
27 * This however limits the shmem address to 44 bit.
45 * @shmem: Transmit/Receive shared memory area
51 * @param_page: 4K page number of the shmem channel
52 * @param_offset: Offset within the 4K page of the shmem channel
58 struct scmi_shared_mem __iomem *shmem; member
59 /* Protect access to shmem area */
73 shmem_read_header(scmi_info->shmem), NULL); in smc_msg_done_isr()
80 struct device_node *np = of_parse_phandle(of_node, "shmem", 0); in smc_chan_available()
141 np = of_parse_phandle(cdev->of_node, "shmem", 0); in smc_chan_setup()
[all …]
H A Doptee.c89 * When set, OP-TEE supports command using SMT header protocol (SCMI shmem) in
112 * @shmem: Virtual base address of the shared memory
114 * @tee_shm: TEE shared memory handle @req or NULL if using IOMEM shmem
125 struct scmi_shared_mem __iomem *shmem; member
344 shmem_clear_channel(channel->req.shmem); in scmi_optee_clear_channel()
354 dev_err(channel->cinfo->dev, "shmem allocation failed\n"); in setup_dynamic_shmem()
374 np = of_parse_phandle(cinfo->dev->of_node, "shmem", 0); in setup_static_shmem()
375 if (!of_device_is_compatible(np, "arm,scmi-shmem")) { in setup_static_shmem()
388 channel->req.shmem = devm_ioremap(dev, res.start, size); in setup_static_shmem()
389 if (!channel->req.shmem) { in setup_static_shmem()
[all …]
H A Dcommon.h306 /* shmem related declarations */
309 void shmem_tx_prepare(struct scmi_shared_mem __iomem *shmem,
311 u32 shmem_read_header(struct scmi_shared_mem __iomem *shmem);
312 void shmem_fetch_response(struct scmi_shared_mem __iomem *shmem,
314 void shmem_fetch_notification(struct scmi_shared_mem __iomem *shmem,
316 void shmem_clear_channel(struct scmi_shared_mem __iomem *shmem);
317 bool shmem_poll_done(struct scmi_shared_mem __iomem *shmem,
319 bool shmem_channel_free(struct scmi_shared_mem __iomem *shmem);
/openbmc/linux/drivers/gpu/drm/panfrost/
H A Dpanfrost_gem_shrinker.c23 struct drm_gem_shmem_object *shmem; in panfrost_gem_shrinker_count() local
29 list_for_each_entry(shmem, &pfdev->shrinker_list, madv_list) { in panfrost_gem_shrinker_count()
30 if (drm_gem_shmem_is_purgeable(shmem)) in panfrost_gem_shrinker_count()
31 count += shmem->base.size >> PAGE_SHIFT; in panfrost_gem_shrinker_count()
41 struct drm_gem_shmem_object *shmem = to_drm_gem_shmem_obj(obj); in panfrost_gem_purge() local
51 if (!dma_resv_trylock(shmem->base.resv)) in panfrost_gem_purge()
58 dma_resv_unlock(shmem->base.resv); in panfrost_gem_purge()
70 struct drm_gem_shmem_object *shmem, *tmp; in panfrost_gem_shrinker_scan() local
76 list_for_each_entry_safe(shmem, tmp, &pfdev->shrinker_list, madv_list) { in panfrost_gem_shrinker_scan()
79 if (drm_gem_shmem_is_purgeable(shmem) && in panfrost_gem_shrinker_scan()
[all …]
H A Dpanfrost_gem.c240 struct drm_gem_shmem_object *shmem; in panfrost_gem_create() local
247 shmem = drm_gem_shmem_create(dev, size); in panfrost_gem_create()
248 if (IS_ERR(shmem)) in panfrost_gem_create()
249 return ERR_CAST(shmem); in panfrost_gem_create()
251 bo = to_panfrost_bo(&shmem->base); in panfrost_gem_create()
/openbmc/linux/Documentation/devicetree/bindings/firmware/
H A Darm,scmi.yaml38 with shmem address(4KB-page, offset) as parameters
85 The effective combination in numbers of mboxes and shmem descriptors let
88 1 mbox / 1 shmem => SCMI TX over 1 mailbox bidirectional channel
89 2 mbox / 2 shmem => SCMI TX and RX over 2 mailbox bidirectional channels
90 2 mbox / 1 shmem => SCMI TX over 2 mailbox unidirectional channels
91 3 mbox / 2 shmem => SCMI TX and RX over 3 mailbox unidirectional channels
92 Any other combination of mboxes and shmem is invalid.
96 shmem:
271 shmem:
299 - shmem
[all …]
H A 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>;
H A Dnvidia,tegra186-bpmp.yaml63 See "../reserved-memory/nvidia,tegra264-bpmp-shmem.yaml" for bindings for
81 shmem:
130 - shmem
182 shmem = <&cpu_bpmp_tx>, <&cpu_bpmp_rx>;
/openbmc/qemu/hw/net/
H A Dvmware_utils.h31 VMW_SHPRN("SHMEM r: %" PRIx64 ", len: %d to %p", addr, len, buf); in vmw_shmem_read()
38 VMW_SHPRN("SHMEM w: %" PRIx64 ", len: %d to %p", addr, len, buf); in vmw_shmem_write()
45 VMW_SHPRN("SHMEM r/w: %" PRIx64 ", len: %d (to %p), is write: %d", in vmw_shmem_rw()
58 VMW_SHPRN("SHMEM set: %" PRIx64 ", len: %d (value 0x%X)", addr, len, val); in vmw_shmem_set()
70 VMW_SHPRN("SHMEM load8: %" PRIx64 " (value 0x%X)", addr, res); in vmw_shmem_ld8()
77 VMW_SHPRN("SHMEM store8: %" PRIx64 " (value 0x%X)", addr, value); in vmw_shmem_st8()
87 VMW_SHPRN("SHMEM load16: %" PRIx64 " (value 0x%X)", addr, res); in vmw_shmem_ld16()
94 VMW_SHPRN("SHMEM store16: %" PRIx64 " (value 0x%X)", addr, value); in vmw_shmem_st16()
105 VMW_SHPRN("SHMEM load32: %" PRIx64 " (value 0x%X)", addr, res); in vmw_shmem_ld32()
112 VMW_SHPRN("SHMEM store32: %" PRIx64 " (value 0x%X)", addr, value); in vmw_shmem_st32()
[all …]
/openbmc/linux/drivers/net/ethernet/microsoft/mana/
H A 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 …]
/openbmc/linux/Documentation/devicetree/bindings/reserved-memory/
H A 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";
/openbmc/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>;
/openbmc/linux/drivers/net/arcnet/
H A 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 …]
H A 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 …]
/openbmc/linux/Documentation/admin-guide/cgroup-v1/
H A 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 …]
/openbmc/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";
/openbmc/u-boot/doc/device-tree-bindings/firmware/
H A Dnvidia,tegra186-bpmp.txt17 - shmem : List of the phandle of the TX and RX shared memory area that
82 compatible = "nvidia,tegra186-bpmp-shmem";
87 compatible = "nvidia,tegra186-bpmp-shmem";
95 shmem = <&cpu_bpmp_tx &cpu_bpmp_rx>;
/openbmc/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()
/openbmc/linux/tools/testing/selftests/cachestat/
H A 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()
/openbmc/linux/Documentation/devicetree/bindings/sram/
H A 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
/openbmc/linux/drivers/gpu/drm/lima/
H A Dlima_gem.c113 struct drm_gem_shmem_object *shmem; in lima_gem_create_handle() local
118 shmem = drm_gem_shmem_create(dev, size); in lima_gem_create_handle()
119 if (IS_ERR(shmem)) in lima_gem_create_handle()
120 return PTR_ERR(shmem); in lima_gem_create_handle()
122 obj = &shmem->base; in lima_gem_create_handle()
136 struct sg_table *sgt = drm_gem_shmem_get_pages_sgt(shmem); in lima_gem_create_handle()

12345678