| /linux/drivers/gpu/drm/ |
| H A D | drm_gem_shmem_helper.c | 31 * This library provides helpers for GEM objects backed by shmem buffers 52 static int __drm_gem_shmem_init(struct drm_device *dev, struct drm_gem_shmem_object *shmem, in __drm_gem_shmem_init() argument 55 struct drm_gem_object *obj = &shmem->base; in __drm_gem_shmem_init() 63 shmem->map_wc = false; /* dma-buf mappings use always writecombine */ in __drm_gem_shmem_init() 76 INIT_LIST_HEAD(&shmem->madv_list); in __drm_gem_shmem_init() 99 * @shmem: The allocated shmem GEM object. 105 int drm_gem_shmem_init(struct drm_device *dev, struct drm_gem_shmem_object *shmem, size_t size) in drm_gem_shmem_init() 107 return __drm_gem_shmem_init(dev, shmem, size, false, NULL); in drm_gem_shmem_init() 115 struct drm_gem_shmem_object *shmem; in __drm_gem_shmem_create() 104 drm_gem_shmem_init(struct drm_device * dev,struct drm_gem_shmem_object * shmem,size_t size) drm_gem_shmem_init() argument 114 struct drm_gem_shmem_object *shmem; __drm_gem_shmem_create() local 185 drm_gem_shmem_release(struct drm_gem_shmem_object * shmem) drm_gem_shmem_release() argument 222 drm_gem_shmem_free(struct drm_gem_shmem_object * shmem) drm_gem_shmem_free() argument 229 drm_gem_shmem_get_pages_locked(struct drm_gem_shmem_object * shmem) drm_gem_shmem_get_pages_locked() argument 269 drm_gem_shmem_put_pages_locked(struct drm_gem_shmem_object * shmem) drm_gem_shmem_put_pages_locked() argument 289 drm_gem_shmem_pin_locked(struct drm_gem_shmem_object * shmem) drm_gem_shmem_pin_locked() argument 308 drm_gem_shmem_unpin_locked(struct drm_gem_shmem_object * shmem) drm_gem_shmem_unpin_locked() argument 327 drm_gem_shmem_pin(struct drm_gem_shmem_object * shmem) drm_gem_shmem_pin() argument 354 drm_gem_shmem_unpin(struct drm_gem_shmem_object * shmem) drm_gem_shmem_unpin() argument 384 drm_gem_shmem_vmap_locked(struct drm_gem_shmem_object * shmem,struct iosys_map * map) drm_gem_shmem_vmap_locked() argument 447 drm_gem_shmem_vunmap_locked(struct drm_gem_shmem_object * shmem,struct iosys_map * map) drm_gem_shmem_vunmap_locked() argument 474 struct drm_gem_shmem_object *shmem; drm_gem_shmem_create_with_handle() local 495 drm_gem_shmem_madvise_locked(struct drm_gem_shmem_object * shmem,int madv) drm_gem_shmem_madvise_locked() argument 508 drm_gem_shmem_purge_locked(struct drm_gem_shmem_object * shmem) drm_gem_shmem_purge_locked() argument 574 struct drm_gem_shmem_object *shmem = to_drm_gem_shmem_obj(obj); drm_gem_shmem_fault() local 603 struct drm_gem_shmem_object *shmem = to_drm_gem_shmem_obj(obj); drm_gem_shmem_vm_open() local 625 struct drm_gem_shmem_object *shmem = to_drm_gem_shmem_obj(obj); drm_gem_shmem_vm_close() local 652 drm_gem_shmem_mmap(struct drm_gem_shmem_object * shmem,struct vm_area_struct * vma) drm_gem_shmem_mmap() argument 699 drm_gem_shmem_print_info(const struct drm_gem_shmem_object * shmem,struct drm_printer * p,unsigned int indent) drm_gem_shmem_print_info() argument 726 drm_gem_shmem_get_sg_table(struct drm_gem_shmem_object * shmem) drm_gem_shmem_get_sg_table() argument 736 drm_gem_shmem_get_pages_sgt_locked(struct drm_gem_shmem_object * shmem) drm_gem_shmem_get_pages_sgt_locked() argument 789 drm_gem_shmem_get_pages_sgt(struct drm_gem_shmem_object * shmem) drm_gem_shmem_get_pages_sgt() argument 825 struct drm_gem_shmem_object *shmem; drm_gem_shmem_prime_import_sg_table() local 852 struct drm_gem_shmem_object *shmem; drm_gem_shmem_prime_import_no_map() local [all...] |
| H A D | drm_fbdev_shmem.c | 48 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() 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() 140 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() 177 if (!shmem->map_wc) in drm_fbdev_shmem_driver_fbdev_probe()
|
| /linux/drivers/gpu/drm/tests/ |
| H A D | drm_gem_shmem_test.c | 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() 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 D | shmem.c | 88 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 D | common.h | 390 void (*tx_prepare)(struct scmi_shared_mem __iomem *shmem, 394 u32 (*read_header)(struct scmi_shared_mem __iomem *shmem); 396 void (*fetch_response)(struct scmi_shared_mem __iomem *shmem, 399 void (*fetch_notification)(struct scmi_shared_mem __iomem *shmem, 402 void (*clear_channel)(struct scmi_shared_mem __iomem *shmem); 403 bool (*poll_done)(struct scmi_shared_mem __iomem *shmem, 405 bool (*channel_free)(struct scmi_shared_mem __iomem *shmem); 406 bool (*channel_intr_enabled)(struct scmi_shared_mem __iomem *shmem); 457 const struct scmi_shared_mem_operations *shmem; member
|
| /linux/drivers/net/ethernet/microsoft/mana/ |
| H A D | shm_channel.c | 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()
|
| /linux/drivers/platform/x86/amd/hfi/ |
| H A D | hfi.c | 75 struct amd_shmem_info *shmem; member 154 memcpy_fromio(amd_hfi_data->shmem, pcc_comm_addr, pcct_ext->length); in amd_hfi_fill_metadata() 157 if (amd_hfi_data->shmem->header.signature != PCC_SIGNATURE) { in amd_hfi_fill_metadata() 161 if (amd_hfi_data->shmem->version_number != AMD_HETERO_RANKING_TABLE_VER) { in amd_hfi_fill_metadata() 163 amd_hfi_data->shmem->version_number); in amd_hfi_fill_metadata() 167 for (unsigned int i = 0; i < amd_hfi_data->shmem->n_bitmaps; i++) { in amd_hfi_fill_metadata() 168 u32 bitmap = amd_hfi_data->shmem->table_data[i]; in amd_hfi_fill_metadata() 191 u32 *table = amd_hfi_data->shmem->table_data + in amd_hfi_fill_metadata() 192 amd_hfi_data->shmem->n_bitmaps + in amd_hfi_fill_metadata() 383 amd_hfi_data->shmem = devm_kzalloc(amd_hfi_data->dev, pcct_ext->length, GFP_KERNEL); in amd_hfi_metadata_parser() [all …]
|
| /linux/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>;
|
| /linux/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()
|
| /linux/arch/arm64/boot/dts/arm/ |
| H A D | juno-scmi.dtsi | 49 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";
|
| H A D | morello.dtsi | 155 shmem = <&cpu_scp_hpri0>, <&cpu_scp_hpri1>; 305 compatible = "arm,scmi-shmem"; 310 compatible = "arm,scmi-shmem";
|
| /linux/drivers/gpu/drm/panthor/ |
| H A D | panthor_gem.c | 266 struct drm_gem_shmem_object *shmem; in panthor_gem_create_with_handle() local 269 shmem = drm_gem_shmem_create(ddev, *size); in panthor_gem_create_with_handle() 270 if (IS_ERR(shmem)) in panthor_gem_create_with_handle() 271 return PTR_ERR(shmem); in panthor_gem_create_with_handle() 273 bo = to_panthor_bo(&shmem->base); in panthor_gem_create_with_handle() 291 if (shmem->map_wc) { in panthor_gem_create_with_handle() 294 sgt = drm_gem_shmem_get_pages_sgt(shmem); in panthor_gem_create_with_handle() 305 ret = drm_gem_handle_create(file, &shmem->base, handle); in panthor_gem_create_with_handle() 311 drm_gem_object_put(&shmem->base); in panthor_gem_create_with_handle()
|
| /linux/drivers/firmware/samsung/ |
| H A D | exynos-acpm.c | 169 struct acpm_shmem __iomem *shmem; member 549 struct acpm_shmem __iomem *shmem = acpm->shmem; in acpm_channels_init() local 554 acpm->num_chans = readl(&shmem->num_chans); in acpm_channels_init() 560 chans_shmem = acpm->sram_base + readl(&shmem->chans); in acpm_channels_init() 619 struct device_node *shmem; in acpm_probe() local 629 shmem = of_parse_phandle(dev->of_node, "shmem", 0); in acpm_probe() 630 ret = of_address_to_resource(shmem, 0, &res); in acpm_probe() 631 of_node_put(shmem); in acpm_probe() 647 acpm->shmem = acpm->sram_base + match_data->initdata_base; in acpm_probe()
|
| /linux/drivers/mailbox/ |
| H A D | pcc.c | 297 pcc_hdr = pchan->chan.shmem; in pcc_chan_acknowledge() 314 memcpy_fromio(&pcc_header, pchan->chan.shmem, in write_response() 320 memcpy_fromio(buffer, pchan->chan.shmem, data_len); in write_response() 412 pcc_mchan->shmem = acpi_os_ioremap(pcc_mchan->shmem_base_addr, in pcc_mbox_request_channel() 414 if (!pcc_mchan->shmem) in pcc_mbox_request_channel() 453 if (pcc_mbox_chan->shmem) { in pcc_mbox_free_channel() 454 iounmap(pcc_mbox_chan->shmem); in pcc_mbox_free_channel() 455 pcc_mbox_chan->shmem = NULL; in pcc_mbox_free_channel() 482 memcpy_toio(pcc_mbox_chan->shmem, data, len); in pcc_write_to_buffer()
|
| /linux/mm/ |
| H A D | mincore.c | 61 static unsigned char mincore_swap(swp_entry_t entry, bool shmem) in mincore_swap() argument 78 return !shmem; in mincore_swap() 85 if (shmem) { in mincore_swap() 91 if (shmem) in mincore_swap()
|
| /linux/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. 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/net/ethernet/8390/ |
| H A D | mac8390.c | 738 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()
|
| /linux/arch/arm64/boot/dts/blaize/ |
| H A D | blaize-blzp1600.dtsi | 50 shmem = <&scmi0_shm>; 82 scmi0_shm: scmi-shmem@800 { 83 compatible = "arm,scmi-shmem";
|
| /linux/Documentation/admin-guide/mm/ |
| H A D | transhuge.rst | 15 Currently THP only works for anonymous memory mappings and tmpfs/shmem. 373 allocation policy for the internal shmem mount by using the kernel parameter 375 seven valid policies for shmem (``always``, ``within_size``, ``advise``, 385 policies for shmem (``CONFIG_TRANSPARENT_HUGEPAGE_SHMEM_HUGE_*``) and tmpfs 390 size, ``thp_shmem`` controls each supported shmem THP size. ``thp_shmem`` 395 as required. If ``thp_shmem=`` is specified at least once, any shmem THP 406 Hugepages in tmpfs/shmem 415 shmem mount (see below), ordinary tmpfs mounts will make use of all available 464 shmem / internal tmpfs 558 is incremented every time a shmem huge page is successfully [all …]
|
| /linux/drivers/tee/amdtee/ |
| H A D | core.c | 347 struct shmem_desc shmem; in amdtee_map_shmem() local 359 shmem.kaddr = shm->kaddr; in amdtee_map_shmem() 360 shmem.size = shm->size; in amdtee_map_shmem() 366 rc = handle_map_shmem(count, &shmem, &buf_id); in amdtee_map_shmem()
|
| /linux/tools/testing/selftests/mm/ |
| H A D | run_vmtests.sh | 341 CATEGORY="userfaultfd" run_test ${uffd_stress_bin} shmem 20 16 342 CATEGORY="userfaultfd" run_test ${uffd_stress_bin} shmem-private 20 16 502 CATEGORY="thp" run_test ./khugepaged all:shmem 504 CATEGORY="thp" run_test ./khugepaged -s 4 all:shmem
|
| /linux/drivers/gpu/drm/i915/selftests/ |
| H A D | i915_mock_selftests.h | 19 selftest(shmem, shmem_utils_mock_selftests)
|
| /linux/include/acpi/ |
| H A D | pcc.h | 15 void __iomem *shmem; member
|
| /linux/arch/arm64/boot/dts/cix/ |
| H A D | sky1.dtsi | 162 shmem = <&ap2pm_scmi_mem>, <&pm2ap_scmi_mem>; 372 ap2pm_scmi_mem: shmem@6590000 { 373 compatible = "arm,scmi-shmem"; 386 pm2ap_scmi_mem: shmem@65a0000 { 387 compatible = "arm,scmi-shmem";
|