| /OK3568_Linux_fs/kernel/drivers/gpu/drm/ |
| H A D | drm_gem_shmem_helper.c | 41 struct drm_gem_shmem_object *shmem; in __drm_gem_shmem_create() local 50 obj = kzalloc(sizeof(*shmem), GFP_KERNEL); in __drm_gem_shmem_create() 68 shmem = to_drm_gem_shmem_obj(obj); in __drm_gem_shmem_create() 69 mutex_init(&shmem->pages_lock); in __drm_gem_shmem_create() 70 mutex_init(&shmem->vmap_lock); in __drm_gem_shmem_create() 71 INIT_LIST_HEAD(&shmem->madv_list); in __drm_gem_shmem_create() 85 return shmem; in __drm_gem_shmem_create() 121 struct drm_gem_shmem_object *shmem = to_drm_gem_shmem_obj(obj); in drm_gem_shmem_free_object() local 123 WARN_ON(shmem->vmap_use_count); in drm_gem_shmem_free_object() 126 drm_prime_gem_destroy(obj, shmem->sgt); in drm_gem_shmem_free_object() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/firmware/arm_scmi/ |
| H A D | shmem.c | 32 void shmem_tx_prepare(struct scmi_shared_mem __iomem *shmem, in shmem_tx_prepare() argument 41 spin_until_cond(ioread32(&shmem->channel_status) & in shmem_tx_prepare() 44 iowrite32(0x0, &shmem->channel_status); in shmem_tx_prepare() 46 &shmem->flags); in shmem_tx_prepare() 47 iowrite32(sizeof(shmem->msg_header) + xfer->tx.len, &shmem->length); in shmem_tx_prepare() 48 iowrite32(pack_scmi_header(&xfer->hdr), &shmem->msg_header); in shmem_tx_prepare() 50 memcpy_toio(shmem->msg_payload, xfer->tx.buf, xfer->tx.len); in shmem_tx_prepare() 53 u32 shmem_read_header(struct scmi_shared_mem __iomem *shmem) in shmem_read_header() argument 55 return ioread32(&shmem->msg_header); in shmem_read_header() 58 void shmem_fetch_response(struct scmi_shared_mem __iomem *shmem, in shmem_fetch_response() argument [all …]
|
| H A D | mailbox.c | 30 struct scmi_shared_mem __iomem *shmem; member 39 shmem_tx_prepare(smbox->shmem, m); in tx_prepare() 46 scmi_rx_callback(smbox->cinfo, shmem_read_header(smbox->shmem)); in rx_callback() 61 struct device_node *shmem; in mailbox_chan_setup() local 71 shmem = of_parse_phandle(cdev->of_node, "shmem", idx); in mailbox_chan_setup() 72 ret = of_address_to_resource(shmem, 0, &res); in mailbox_chan_setup() 73 of_node_put(shmem); in mailbox_chan_setup() 80 smbox->shmem = devm_ioremap(dev, res.start, size); in mailbox_chan_setup() 81 if (!smbox->shmem) { in mailbox_chan_setup() 158 shmem_fetch_response(smbox->shmem, xfer); in mailbox_fetch_response() [all …]
|
| H A D | smc.c | 34 struct scmi_shared_mem __iomem *shmem; member 87 scmi_info->shmem = devm_ioremap(dev, res.start, size); in smc_chan_setup() 88 if (!scmi_info->shmem) { in smc_chan_setup() 144 shmem_tx_prepare(scmi_info->shmem, xfer); in smc_send_message() 154 scmi_rx_callback(scmi_info->cinfo, shmem_read_header(scmi_info->shmem)); in smc_send_message() 169 shmem_fetch_response(scmi_info->shmem, xfer); in smc_fetch_response() 177 return shmem_poll_done(scmi_info->shmem, xfer); in smc_poll_done()
|
| H A D | common.h | 342 void shmem_tx_prepare(struct scmi_shared_mem __iomem *shmem, 344 u32 shmem_read_header(struct scmi_shared_mem __iomem *shmem); 345 void shmem_fetch_response(struct scmi_shared_mem __iomem *shmem, 347 void shmem_fetch_notification(struct scmi_shared_mem __iomem *shmem, 349 void shmem_clear_channel(struct scmi_shared_mem __iomem *shmem); 350 bool shmem_poll_done(struct scmi_shared_mem __iomem *shmem,
|
| /OK3568_Linux_fs/kernel/drivers/gpu/drm/virtio/ |
| H A D | virtgpu_object.c | 71 struct virtio_gpu_object_shmem *shmem = to_virtio_gpu_shmem(bo); in virtio_gpu_cleanup_object() local 73 if (shmem->pages) { in virtio_gpu_cleanup_object() 74 if (shmem->mapped) { in virtio_gpu_cleanup_object() 76 shmem->pages, DMA_TO_DEVICE, 0); in virtio_gpu_cleanup_object() 77 shmem->mapped = 0; in virtio_gpu_cleanup_object() 80 sg_free_table(shmem->pages); in virtio_gpu_cleanup_object() 81 kfree(shmem->pages); in virtio_gpu_cleanup_object() 82 shmem->pages = NULL; in virtio_gpu_cleanup_object() 126 struct virtio_gpu_object_shmem *shmem; in virtio_gpu_create_object() local 129 shmem = kzalloc(sizeof(*shmem), GFP_KERNEL); in virtio_gpu_create_object() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/gpu/drm/panfrost/ |
| H A D | panfrost_gem_shrinker.c | 23 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 (!mutex_trylock(&shmem->pages_lock)) in panfrost_gem_purge() 58 mutex_unlock(&shmem->pages_lock); 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 D | panfrost_gem.c | 241 struct drm_gem_shmem_object *shmem; in panfrost_gem_create_with_handle() local 248 shmem = drm_gem_shmem_create(dev, size); in panfrost_gem_create_with_handle() 249 if (IS_ERR(shmem)) in panfrost_gem_create_with_handle() 250 return ERR_CAST(shmem); in panfrost_gem_create_with_handle() 252 bo = to_panfrost_bo(&shmem->base); in panfrost_gem_create_with_handle() 260 ret = drm_gem_handle_create(file_priv, &shmem->base, handle); in panfrost_gem_create_with_handle() 262 drm_gem_object_put(&shmem->base); in panfrost_gem_create_with_handle()
|
| /OK3568_Linux_fs/kernel/include/drm/ |
| H A D | drm_gem_shmem_helper.h | 112 int drm_gem_shmem_get_pages(struct drm_gem_shmem_object *shmem); 113 void drm_gem_shmem_put_pages(struct drm_gem_shmem_object *shmem); 121 static inline bool drm_gem_shmem_is_purgeable(struct drm_gem_shmem_object *shmem) in drm_gem_shmem_is_purgeable() argument 123 return (shmem->madv > 0) && in drm_gem_shmem_is_purgeable() 124 !shmem->vmap_use_count && shmem->sgt && in drm_gem_shmem_is_purgeable() 125 !shmem->base.dma_buf && !shmem->base.import_attach; in drm_gem_shmem_is_purgeable()
|
| /OK3568_Linux_fs/kernel/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>;
|
| /OK3568_Linux_fs/kernel/drivers/net/arcnet/ |
| H A D | com90xx.c | 58 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 D | arc-rimi.c | 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()
|
| /OK3568_Linux_fs/kernel/drivers/media/platform/rockchip/isp/ |
| H A D | rkisp_tb_helper.c | 138 static struct dma_buf *shm_alloc(struct rkisp_thunderboot_shmem *shmem) in shm_alloc() argument 145 npages = PAGE_ALIGN(shmem->shm_size) / PAGE_SIZE; in shm_alloc() 152 data->pages[i] = phys_to_page(shmem->shm_start + i * PAGE_SIZE); in shm_alloc() 261 long rkisp_tb_shm_ioctl(struct rkisp_thunderboot_shmem *shmem) in rkisp_tb_shm_ioctl() argument 266 dmabuf = shm_alloc(shmem); in rkisp_tb_shm_ioctl() 273 shmem->shm_fd = fd; in rkisp_tb_shm_ioctl()
|
| H A D | rkisp_tb_helper.h | 19 long rkisp_tb_shm_ioctl(struct rkisp_thunderboot_shmem *shmem); 27 static inline long rkisp_tb_shm_ioctl(struct rkisp_thunderboot_shmem *shmem) in rkisp_tb_shm_ioctl() argument
|
| /OK3568_Linux_fs/kernel/drivers/media/platform/rockchip/cif/ |
| H A D | common.c | 302 static struct dma_buf *rkcif_shm_alloc(struct rkisp_thunderboot_shmem *shmem) in rkcif_shm_alloc() argument 309 npages = PAGE_ALIGN(shmem->shm_size) / PAGE_SIZE; in rkcif_shm_alloc() 316 data->pages[i] = phys_to_page(shmem->shm_start + i * PAGE_SIZE); in rkcif_shm_alloc() 337 buf->shmem.shm_start = dummy->dma_addr; in rkcif_alloc_reserved_mem_buf() 338 buf->shmem.shm_size = dummy->size; in rkcif_alloc_reserved_mem_buf() 339 dummy->dbuf = rkcif_shm_alloc(&buf->shmem); in rkcif_alloc_reserved_mem_buf() 381 free_reserved_area(phys_to_virt(buf->shmem.shm_start), in rkcif_free_reserved_mem_buf() 382 phys_to_virt(buf->shmem.shm_start + buf->shmem.shm_size), in rkcif_free_reserved_mem_buf()
|
| /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/firmware/ |
| H A D | nvidia,tegra186-bpmp.txt | 16 - shmem : List of the phandle of the TX and RX shared memory area that 80 cpu_bpmp_tx: shmem@4e000 { 81 compatible = "nvidia,tegra186-bpmp-shmem"; 87 cpu_bpmp_rx: shmem@4f000 { 88 compatible = "nvidia,tegra186-bpmp-shmem"; 98 shmem = <&cpu_bpmp_tx &cpu_bpmp_rx>;
|
| /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/arm/ |
| H A D | arm,scmi.txt | 22 - shmem : List of phandle pointing to the shared memory(SHM) area as per 52 mboxes, mbox-names and shmem shall be present in the sub-node corresponding 121 - compatible : should be "arm,scmi-shmem" for Non-secure SRAM based 142 cpu_scp_lpri: scp-shmem@0 { 143 compatible = "arm,scmi-shmem"; 147 cpu_scp_hpri: scp-shmem@200 { 148 compatible = "arm,scmi-shmem"; 167 shmem = <&cpu_scp_lpri &cpu_scp_hpri>;
|
| H A D | arm,scpi.txt | 17 - shmem : List of phandle pointing to the shared memory(SHM) area between the 71 - compatible : should be "arm,scp-shmem" for Non-secure SRAM based 125 cpu_scp_lpri: scp-shmem@0 { 126 compatible = "arm,juno-scp-shmem"; 130 cpu_scp_hpri: scp-shmem@200 { 131 compatible = "arm,juno-scp-shmem"; 144 shmem = <&cpu_scp_lpri &cpu_scp_hpri>;
|
| /OK3568_Linux_fs/kernel/Documentation/admin-guide/cgroup-v1/ |
| H A D | memcg_test.rst | 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 119 - radix-tree of shmem's inode. 126 - A new page is added to shmem's radix-tree. 167 Historically, memcg's shmem handling was poor and we saw some amount 168 of troubles here. This is because shmem is page-cache but can be 169 SwapCache. Test with shmem/tmpfs is always good test.
|
| /OK3568_Linux_fs/u-boot/doc/device-tree-bindings/firmware/ |
| H A D | nvidia,tegra186-bpmp.txt | 17 - 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>;
|
| /OK3568_Linux_fs/kernel/drivers/gpu/drm/lima/ |
| H A D | lima_gem.c | 107 struct drm_gem_shmem_object *shmem; in lima_gem_create_handle() local 112 shmem = drm_gem_shmem_create(dev, size); in lima_gem_create_handle() 113 if (IS_ERR(shmem)) in lima_gem_create_handle() 114 return PTR_ERR(shmem); in lima_gem_create_handle() 116 obj = &shmem->base; in lima_gem_create_handle()
|
| /OK3568_Linux_fs/kernel/drivers/net/ethernet/8390/ |
| H A D | mac8390.c | 746 long shmem = (start_page - WD_START_PG)<<8; in sane_block_output() local 748 memcpy_toio((void __iomem *)dev->mem_start + shmem, buf, count); in sane_block_output() 788 long shmem = (start_page - WD_START_PG)<<8; in dayna_block_output() local 790 dayna_memcpy_tocard(dev, shmem, buf, count); in dayna_block_output() 827 long shmem = (start_page - WD_START_PG)<<8; in slow_sane_block_output() local 829 word_memcpy_tocard(dev->mem_start + shmem, buf, count); in slow_sane_block_output()
|
| /OK3568_Linux_fs/kernel/arch/arm64/boot/dts/nvidia/ |
| H A D | tegra234.dtsi | 132 cpu_bpmp_tx: shmem@4e000 { 138 cpu_bpmp_rx: shmem@4f000 { 149 shmem = <&cpu_bpmp_tx &cpu_bpmp_rx>;
|
| /OK3568_Linux_fs/u-boot/arch/arm/dts/ |
| H A D | tegra186.dtsi | 304 sysram_cpu_bpmp_tx: shmem@4e000 { 305 compatible = "nvidia,tegra186-bpmp-shmem"; 309 sysram_cpu_bpmp_rx: shmem@4f000 { 310 compatible = "nvidia,tegra186-bpmp-shmem"; 325 shmem = <&sysram_cpu_bpmp_tx &sysram_cpu_bpmp_rx>;
|
| H A D | meson-gx.dtsi | 189 shmem = <&cpu_scp_lpri &cpu_scp_hpri>; 343 cpu_scp_lpri: scp-shmem@0 { 344 compatible = "amlogic,meson-gx-scp-shmem", "amlogic,meson-gxbb-scp-shmem"; 348 cpu_scp_hpri: scp-shmem@200 { 349 compatible = "amlogic,meson-gx-scp-shmem", "amlogic,meson-gxbb-scp-shmem";
|