Home
last modified time | relevance | path

Searched refs:mem (Results 1 – 25 of 535) sorted by relevance

12345678910>>...22

/drivers/base/
Ddma-coherent.c22 struct dma_coherent_mem **mem) in dma_init_coherent_memory() argument
52 *mem = dma_mem; in dma_init_coherent_memory()
66 static void dma_release_coherent_memory(struct dma_coherent_mem *mem) in dma_release_coherent_memory() argument
68 if (!mem) in dma_release_coherent_memory()
70 iounmap(mem->virt_base); in dma_release_coherent_memory()
71 kfree(mem->bitmap); in dma_release_coherent_memory()
72 kfree(mem); in dma_release_coherent_memory()
76 struct dma_coherent_mem *mem) in dma_assign_coherent_memory() argument
81 dev->dma_mem = mem; in dma_assign_coherent_memory()
90 struct dma_coherent_mem *mem; in dma_declare_coherent_memory() local
[all …]
Dmemory.c81 struct memory_block *mem = to_memory_block(dev); in memory_block_release() local
83 kfree(mem); in memory_block_release()
114 struct memory_block *mem = to_memory_block(dev); in show_mem_start_phys_index() local
117 phys_index = mem->start_section_nr / sections_per_block; in show_mem_start_phys_index()
129 struct memory_block *mem = to_memory_block(dev); in show_mem_removable() local
132 if (!present_section_nr(mem->start_section_nr + i)) in show_mem_removable()
134 pfn = section_nr_to_pfn(mem->start_section_nr + i); in show_mem_removable()
147 struct memory_block *mem = to_memory_block(dev); in show_mem_state() local
154 switch (mem->state) { in show_mem_state()
166 mem->state); in show_mem_state()
[all …]
/drivers/media/v4l2-core/
Dvideobuf-dma-contig.c41 struct videobuf_dma_contig_memory *mem, in __videobuf_dc_alloc() argument
44 mem->size = size; in __videobuf_dc_alloc()
45 mem->vaddr = dma_alloc_coherent(dev, mem->size, in __videobuf_dc_alloc()
46 &mem->dma_handle, flags); in __videobuf_dc_alloc()
48 if (!mem->vaddr) { in __videobuf_dc_alloc()
49 dev_err(dev, "memory alloc size %ld failed\n", mem->size); in __videobuf_dc_alloc()
53 dev_dbg(dev, "dma mapped data is at %p (%ld)\n", mem->vaddr, mem->size); in __videobuf_dc_alloc()
59 struct videobuf_dma_contig_memory *mem) in __videobuf_dc_free() argument
61 dma_free_coherent(dev, mem->size, mem->vaddr, mem->dma_handle); in __videobuf_dc_free()
63 mem->vaddr = NULL; in __videobuf_dc_free()
[all …]
Dvideobuf-vmalloc.c75 struct videobuf_vmalloc_memory *mem; in videobuf_vm_close() local
91 mem = q->bufs[i]->priv; in videobuf_vm_close()
92 if (mem) { in videobuf_vm_close()
99 MAGIC_CHECK(mem->magic, MAGIC_VMAL_MEM); in videobuf_vm_close()
105 __func__, i, mem->vaddr); in videobuf_vm_close()
107 vfree(mem->vaddr); in videobuf_vm_close()
108 mem->vaddr = NULL; in videobuf_vm_close()
140 struct videobuf_vmalloc_memory *mem; in __videobuf_alloc_vb() local
143 vb = kzalloc(size + sizeof(*mem), GFP_KERNEL); in __videobuf_alloc_vb()
147 mem = vb->priv = ((char *)vb) + size; in __videobuf_alloc_vb()
[all …]
Dvideobuf-dma-sg.c139 struct videobuf_dma_sg_memory *mem = buf->priv; in videobuf_to_dma() local
140 BUG_ON(!mem); in videobuf_to_dma()
142 MAGIC_CHECK(mem->magic, MAGIC_SG_MEM); in videobuf_to_dma()
144 return &mem->dma; in videobuf_to_dma()
401 struct videobuf_dma_sg_memory *mem; in videobuf_vm_close() local
414 mem = q->bufs[i]->priv; in videobuf_vm_close()
415 if (!mem) in videobuf_vm_close()
418 MAGIC_CHECK(mem->magic, MAGIC_SG_MEM); in videobuf_vm_close()
473 struct videobuf_dma_sg_memory *mem; in __videobuf_alloc_vb() local
476 vb = kzalloc(size + sizeof(*mem), GFP_KERNEL); in __videobuf_alloc_vb()
[all …]
/drivers/uio/
Duio_mf624.c48 void __iomem *INTCSR_reg = info->mem[0].internal_addr + INTCSR; in mf624_disable_interrupt()
76 void __iomem *INTCSR_reg = info->mem[0].internal_addr + INTCSR; in mf624_enable_interrupt()
103 void __iomem *INTCSR_reg = info->mem[0].internal_addr + INTCSR; in mf624_irq_handler()
150 info->mem[0].name = "PCI chipset, interrupts, status " in mf624_pci_probe()
152 info->mem[0].addr = pci_resource_start(dev, 0); in mf624_pci_probe()
153 if (!info->mem[0].addr) in mf624_pci_probe()
155 info->mem[0].size = pci_resource_len(dev, 0); in mf624_pci_probe()
156 info->mem[0].memtype = UIO_MEM_PHYS; in mf624_pci_probe()
157 info->mem[0].internal_addr = pci_ioremap_bar(dev, 0); in mf624_pci_probe()
158 if (!info->mem[0].internal_addr) in mf624_pci_probe()
[all …]
Duio.c45 struct uio_mem *mem; member
49 static ssize_t map_name_show(struct uio_mem *mem, char *buf) in map_name_show() argument
51 if (unlikely(!mem->name)) in map_name_show()
52 mem->name = ""; in map_name_show()
54 return sprintf(buf, "%s\n", mem->name); in map_name_show()
57 static ssize_t map_addr_show(struct uio_mem *mem, char *buf) in map_addr_show() argument
59 return sprintf(buf, "%pa\n", &mem->addr); in map_addr_show()
62 static ssize_t map_size_show(struct uio_mem *mem, char *buf) in map_size_show() argument
64 return sprintf(buf, "%pa\n", &mem->size); in map_size_show()
67 static ssize_t map_offset_show(struct uio_mem *mem, char *buf) in map_offset_show() argument
[all …]
Duio_cif.c31 void __iomem *plx_intscr = dev_info->mem[0].internal_addr in hilscher_handler()
58 info->mem[0].addr = pci_resource_start(dev, 0); in hilscher_pci_probe()
59 if (!info->mem[0].addr) in hilscher_pci_probe()
61 info->mem[0].internal_addr = pci_ioremap_bar(dev, 0); in hilscher_pci_probe()
62 if (!info->mem[0].internal_addr) in hilscher_pci_probe()
65 info->mem[0].size = pci_resource_len(dev, 0); in hilscher_pci_probe()
66 info->mem[0].memtype = UIO_MEM_PHYS; in hilscher_pci_probe()
67 info->mem[1].addr = pci_resource_start(dev, 2); in hilscher_pci_probe()
68 info->mem[1].size = pci_resource_len(dev, 2); in hilscher_pci_probe()
69 info->mem[1].memtype = UIO_MEM_PHYS; in hilscher_pci_probe()
[all …]
Duio_sercos3.c54 void __iomem *ier0 = info->mem[3].internal_addr + IER0_OFFSET; in sercos3_disable_interrupts()
67 void __iomem *ier0 = info->mem[3].internal_addr + IER0_OFFSET; in sercos3_enable_interrupts()
77 void __iomem *isr0 = info->mem[3].internal_addr + ISR0_OFFSET; in sercos3_handler()
78 void __iomem *ier0 = info->mem[3].internal_addr + IER0_OFFSET; in sercos3_handler()
107 info->mem[n].addr = pci_resource_start(dev, pci_bar); in sercos3_setup_iomem()
108 if (!info->mem[n].addr) in sercos3_setup_iomem()
110 info->mem[n].internal_addr = ioremap(pci_resource_start(dev, pci_bar), in sercos3_setup_iomem()
112 if (!info->mem[n].internal_addr) in sercos3_setup_iomem()
114 info->mem[n].size = pci_resource_len(dev, pci_bar); in sercos3_setup_iomem()
115 info->mem[n].memtype = UIO_MEM_PHYS; in sercos3_setup_iomem()
[all …]
/drivers/firmware/efi/
Dcper.c208 static int cper_mem_err_location(struct cper_mem_err_compact *mem, char *msg) in cper_mem_err_location() argument
217 if (mem->validation_bits & CPER_MEM_VALID_NODE) in cper_mem_err_location()
218 n += scnprintf(msg + n, len - n, "node: %d ", mem->node); in cper_mem_err_location()
219 if (mem->validation_bits & CPER_MEM_VALID_CARD) in cper_mem_err_location()
220 n += scnprintf(msg + n, len - n, "card: %d ", mem->card); in cper_mem_err_location()
221 if (mem->validation_bits & CPER_MEM_VALID_MODULE) in cper_mem_err_location()
222 n += scnprintf(msg + n, len - n, "module: %d ", mem->module); in cper_mem_err_location()
223 if (mem->validation_bits & CPER_MEM_VALID_RANK_NUMBER) in cper_mem_err_location()
224 n += scnprintf(msg + n, len - n, "rank: %d ", mem->rank); in cper_mem_err_location()
225 if (mem->validation_bits & CPER_MEM_VALID_BANK) in cper_mem_err_location()
[all …]
/drivers/char/hw_random/
Dintel-rng.c155 static inline u8 hwstatus_get(void __iomem *mem) in hwstatus_get() argument
157 return readb(mem + INTEL_RNG_HW_STATUS); in hwstatus_get()
160 static inline u8 hwstatus_set(void __iomem *mem, in hwstatus_set() argument
163 writeb(hw_status, mem + INTEL_RNG_HW_STATUS); in hwstatus_set()
164 return hwstatus_get(mem); in hwstatus_set()
169 void __iomem *mem = (void __iomem *)rng->priv; in intel_rng_data_present() local
173 data = !!(readb(mem + INTEL_RNG_STATUS) & in intel_rng_data_present()
184 void __iomem *mem = (void __iomem *)rng->priv; in intel_rng_data_read() local
186 *data = readb(mem + INTEL_RNG_DATA); in intel_rng_data_read()
193 void __iomem *mem = (void __iomem *)rng->priv; in intel_rng_init() local
[all …]
Dmxc-rnga.c65 void __iomem *mem; member
76 int level = (__raw_readl(mxc_rng->mem + RNGA_STATUS) & in mxc_rnga_data_present()
92 *data = __raw_readl(mxc_rng->mem + RNGA_OUTPUT_FIFO); in mxc_rnga_data_read()
95 err = __raw_readl(mxc_rng->mem + RNGA_STATUS) & RNGA_STATUS_ERROR_INT; in mxc_rnga_data_read()
100 ctrl = __raw_readl(mxc_rng->mem + RNGA_CONTROL); in mxc_rnga_data_read()
102 mxc_rng->mem + RNGA_CONTROL); in mxc_rnga_data_read()
114 ctrl = __raw_readl(mxc_rng->mem + RNGA_CONTROL); in mxc_rnga_init()
115 __raw_writel(ctrl & ~RNGA_CONTROL_SLEEP, mxc_rng->mem + RNGA_CONTROL); in mxc_rnga_init()
118 osc = __raw_readl(mxc_rng->mem + RNGA_STATUS); in mxc_rnga_init()
125 ctrl = __raw_readl(mxc_rng->mem + RNGA_CONTROL); in mxc_rnga_init()
[all …]
Dgeode-rng.c57 void __iomem *mem = (void __iomem *)rng->priv; in geode_rng_data_read() local
59 *data = readl(mem + GEODE_RNG_DATA_REG); in geode_rng_data_read()
66 void __iomem *mem = (void __iomem *)rng->priv; in geode_rng_data_present() local
70 data = !!(readl(mem + GEODE_RNG_STATUS_REG)); in geode_rng_data_present()
91 void __iomem *mem; in mod_init() local
107 mem = ioremap(rng_base, 0x58); in mod_init()
108 if (!mem) in mod_init()
110 geode_rng.priv = (unsigned long)mem; in mod_init()
123 iounmap(mem); in mod_init()
129 void __iomem *mem = (void __iomem *)geode_rng.priv; in mod_exit() local
[all …]
/drivers/gpu/drm/ttm/
Dttm_bo_util.c44 ttm_bo_mem_put(bo, &bo->mem); in ttm_bo_free_old_node()
52 struct ttm_mem_reg *old_mem = &bo->mem; in ttm_bo_move_ttm()
120 struct ttm_mem_reg *mem) in ttm_mem_io_reserve() argument
122 struct ttm_mem_type_manager *man = &bdev->man[mem->mem_type]; in ttm_mem_io_reserve()
128 return bdev->driver->io_mem_reserve(bdev, mem); in ttm_mem_io_reserve()
131 mem->bus.io_reserved_count++ == 0) { in ttm_mem_io_reserve()
133 ret = bdev->driver->io_mem_reserve(bdev, mem); in ttm_mem_io_reserve()
145 struct ttm_mem_reg *mem) in ttm_mem_io_free() argument
147 struct ttm_mem_type_manager *man = &bdev->man[mem->mem_type]; in ttm_mem_io_free()
153 --mem->bus.io_reserved_count == 0 && in ttm_mem_io_free()
[all …]
Dttm_bo.c91 bo, bo->mem.num_pages, bo->mem.size >> 10, in ttm_bo_mem_space_debug()
92 bo->mem.size >> 20); in ttm_bo_mem_space_debug()
146 BUG_ON(bo->mem.mm_node != NULL); in ttm_bo_release_list()
171 if (!(bo->mem.placement & TTM_PL_FLAG_NO_EVICT)) { in ttm_bo_add_to_lru()
175 man = &bdev->man[bo->mem.mem_type]; in ttm_bo_add_to_lru()
277 struct ttm_mem_reg *mem, in ttm_bo_handle_move_mem() argument
282 bool old_is_pci = ttm_mem_reg_is_pci(bdev, &bo->mem); in ttm_bo_handle_move_mem()
283 bool new_is_pci = ttm_mem_reg_is_pci(bdev, mem); in ttm_bo_handle_move_mem()
284 struct ttm_mem_type_manager *old_man = &bdev->man[bo->mem.mem_type]; in ttm_bo_handle_move_mem()
285 struct ttm_mem_type_manager *new_man = &bdev->man[mem->mem_type]; in ttm_bo_handle_move_mem()
[all …]
Dttm_agp_backend.c47 struct agp_memory *mem; member
55 struct agp_memory *mem; in ttm_agp_bind() local
59 mem = agp_allocate_memory(agp_be->bridge, ttm->num_pages, AGP_USER_MEMORY); in ttm_agp_bind()
60 if (unlikely(mem == NULL)) in ttm_agp_bind()
63 mem->page_count = 0; in ttm_agp_bind()
70 mem->pages[mem->page_count++] = page; in ttm_agp_bind()
72 agp_be->mem = mem; in ttm_agp_bind()
74 mem->is_flushed = 1; in ttm_agp_bind()
75 mem->type = (cached) ? AGP_USER_CACHED_MEMORY : AGP_USER_MEMORY; in ttm_agp_bind()
77 ret = agp_bind_memory(mem, node->start); in ttm_agp_bind()
[all …]
/drivers/gpu/drm/amd/amdgpu/
Damdgpu_amdkfd.c174 struct kgd_mem **mem = (struct kgd_mem **) mem_obj; in alloc_gtt_mem() local
181 *mem = kmalloc(sizeof(struct kgd_mem), GFP_KERNEL); in alloc_gtt_mem()
182 if ((*mem) == NULL) in alloc_gtt_mem()
186 AMDGPU_GEM_CREATE_CPU_GTT_USWC, NULL, NULL, &(*mem)->bo); in alloc_gtt_mem()
194 r = amdgpu_bo_reserve((*mem)->bo, true); in alloc_gtt_mem()
200 r = amdgpu_bo_pin((*mem)->bo, AMDGPU_GEM_DOMAIN_GTT, in alloc_gtt_mem()
201 &(*mem)->gpu_addr); in alloc_gtt_mem()
206 *gpu_addr = (*mem)->gpu_addr; in alloc_gtt_mem()
208 r = amdgpu_bo_kmap((*mem)->bo, &(*mem)->cpu_ptr); in alloc_gtt_mem()
214 *cpu_ptr = (*mem)->cpu_ptr; in alloc_gtt_mem()
[all …]
/drivers/leds/
Dleds-bcm6328.c69 void __iomem *mem; member
108 mode = led->mem + BCM6328_REG_MODE_HI; in bcm6328_led_mode()
110 mode = led->mem + BCM6328_REG_MODE_LO; in bcm6328_led_mode()
172 val = bcm6328_led_read(led->mem + BCM6328_REG_INIT); in bcm6328_blink_set()
175 bcm6328_led_write(led->mem + BCM6328_REG_INIT, val); in bcm6328_blink_set()
191 void __iomem *mem, spinlock_t *lock) in bcm6328_hwled() argument
197 val = bcm6328_led_read(mem + BCM6328_REG_HWDIS); in bcm6328_hwled()
199 bcm6328_led_write(mem + BCM6328_REG_HWDIS, val); in bcm6328_hwled()
213 addr = mem + BCM6328_REG_LNKACTSEL_LO; in bcm6328_hwled()
215 addr = mem + BCM6328_REG_LNKACTSEL_HI; in bcm6328_hwled()
[all …]
Dleds-bcm6358.c44 void __iomem *mem; member
60 static unsigned long bcm6358_led_busy(void __iomem *mem) in bcm6358_led_busy() argument
64 while ((val = bcm6358_led_read(mem + BCM6358_REG_CTRL)) & in bcm6358_led_busy()
75 bcm6358_led_busy(led->mem); in bcm6358_led_mode()
77 val = bcm6358_led_read(led->mem + BCM6358_REG_MODE); in bcm6358_led_mode()
83 bcm6358_led_write(led->mem + BCM6358_REG_MODE, val); in bcm6358_led_mode()
99 void __iomem *mem, spinlock_t *lock) in bcm6358_led() argument
111 led->mem = mem; in bcm6358_led()
129 bcm6358_led_busy(led->mem); in bcm6358_led()
131 val = bcm6358_led_read(led->mem + BCM6358_REG_MODE); in bcm6358_led()
[all …]
/drivers/char/agp/
Dsgi-agp.c63 static void sgi_tioca_tlbflush(struct agp_memory *mem) in sgi_tioca_tlbflush() argument
65 tioca_tlbflush(mem->bridge->dev_private_data); in sgi_tioca_tlbflush()
127 static int sgi_tioca_insert_memory(struct agp_memory *mem, off_t pg_start, in sgi_tioca_insert_memory() argument
137 bridge = mem->bridge; in sgi_tioca_insert_memory()
169 if (type != 0 || mem->type != 0) { in sgi_tioca_insert_memory()
173 if ((pg_start + mem->page_count) > num_entries) in sgi_tioca_insert_memory()
178 while (j < (pg_start + mem->page_count)) { in sgi_tioca_insert_memory()
184 if (!mem->is_flushed) { in sgi_tioca_insert_memory()
186 mem->is_flushed = true; in sgi_tioca_insert_memory()
189 for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { in sgi_tioca_insert_memory()
[all …]
Di460-agp.c170 static void i460_tlb_flush (struct agp_memory *mem) in i460_tlb_flush() argument
293 static int i460_insert_memory_small_io_page (struct agp_memory *mem, in i460_insert_memory_small_io_page() argument
301 mem, pg_start, type, page_to_phys(mem->pages[0])); in i460_insert_memory_small_io_page()
303 if (type >= AGP_USER_TYPES || mem->type >= AGP_USER_TYPES) in i460_insert_memory_small_io_page()
311 if ((io_pg_start + I460_IOPAGES_PER_KPAGE * mem->page_count) > num_entries) { in i460_insert_memory_small_io_page()
317 while (j < (io_pg_start + I460_IOPAGES_PER_KPAGE * mem->page_count)) { in i460_insert_memory_small_io_page()
327 for (i = 0, j = io_pg_start; i < mem->page_count; i++) { in i460_insert_memory_small_io_page()
328 paddr = page_to_phys(mem->pages[i]); in i460_insert_memory_small_io_page()
330 WR_GATT(j, i460_mask_memory(agp_bridge, paddr, mem->type)); in i460_insert_memory_small_io_page()
336 static int i460_remove_memory_small_io_page(struct agp_memory *mem, in i460_remove_memory_small_io_page() argument
[all …]
/drivers/usb/host/
Dohci-sm501.c91 struct resource *res, *mem; in ohci_hcd_sm501_drv_probe() local
99 mem = platform_get_resource(pdev, IORESOURCE_MEM, 1); in ohci_hcd_sm501_drv_probe()
100 if (mem == NULL) { in ohci_hcd_sm501_drv_probe()
106 if (!request_mem_region(mem->start, resource_size(mem), pdev->name)) { in ohci_hcd_sm501_drv_probe()
126 if (!dma_declare_coherent_memory(dev, mem->start, in ohci_hcd_sm501_drv_probe()
127 mem->start - mem->parent->start, in ohci_hcd_sm501_drv_probe()
128 resource_size(mem), in ohci_hcd_sm501_drv_probe()
188 release_mem_region(mem->start, resource_size(mem)); in ohci_hcd_sm501_drv_probe()
196 struct resource *mem; in ohci_hcd_sm501_drv_remove() local
203 mem = platform_get_resource(pdev, IORESOURCE_MEM, 1); in ohci_hcd_sm501_drv_remove()
[all …]
/drivers/gpu/drm/sis/
Dsis_mm.c86 drm_sis_mem_t *mem = data; in sis_drm_alloc() local
108 mem->size = (mem->size + SIS_MM_ALIGN_MASK) >> SIS_MM_ALIGN_SHIFT; in sis_drm_alloc()
112 mem->size, 0, in sis_drm_alloc()
117 item->req.size = mem->size; in sis_drm_alloc()
125 mem->size, 0, in sis_drm_alloc()
141 mem->offset = ((pool == 0) ? in sis_drm_alloc()
144 mem->free = user_key; in sis_drm_alloc()
145 mem->size = mem->size << SIS_MM_ALIGN_SHIFT; in sis_drm_alloc()
155 mem->offset = 0; in sis_drm_alloc()
156 mem->size = 0; in sis_drm_alloc()
[all …]
/drivers/gpu/drm/via/
Dvia_mm.c113 drm_via_mem_t *mem = data; in via_mem_alloc() local
120 if (mem->type > VIA_MEM_AGP) { in via_mem_alloc()
125 if (0 == ((mem->type == VIA_MEM_VIDEO) ? dev_priv->vram_initialized : in via_mem_alloc()
139 tmpSize = (mem->size + VIA_MM_ALIGN_MASK) >> VIA_MM_ALIGN_SHIFT; in via_mem_alloc()
140 if (mem->type == VIA_MEM_AGP) in via_mem_alloc()
159 mem->offset = ((mem->type == VIA_MEM_VIDEO) ? in via_mem_alloc()
162 mem->index = user_key; in via_mem_alloc()
172 mem->offset = 0; in via_mem_alloc()
173 mem->size = 0; in via_mem_alloc()
174 mem->index = 0; in via_mem_alloc()
[all …]
/drivers/gpu/drm/nouveau/
Dnouveau_ttm.c67 struct ttm_mem_reg *mem) in nouveau_vram_manager_del() argument
71 nvkm_mem_node_cleanup(mem->mm_node); in nouveau_vram_manager_del()
72 ram->func->put(ram, (struct nvkm_mem **)&mem->mm_node); in nouveau_vram_manager_del()
79 struct ttm_mem_reg *mem) in nouveau_vram_manager_new() argument
94 ret = ram->func->get(ram, mem->num_pages << PAGE_SHIFT, in nouveau_vram_manager_new()
95 mem->page_alignment << PAGE_SHIFT, size_nc, in nouveau_vram_manager_new()
98 mem->mm_node = NULL; in nouveau_vram_manager_new()
104 mem->mm_node = node; in nouveau_vram_manager_new()
105 mem->start = node->offset >> PAGE_SHIFT; in nouveau_vram_manager_new()
130 struct ttm_mem_reg *mem) in nouveau_gart_manager_del() argument
[all …]

12345678910>>...22