/linux/drivers/gpu/drm/i915/ |
H A D | intel_memory_region.c | 1 // SPDX-License-Identifier: MIT 36 static int __iopagetest(struct intel_memory_region *mem, in __iopagetest() argument 49 result[2] = ioread8(va + pagesize - 1); in __iopagetest() 51 dev_err(mem->i915->drm.dev, in __iopagetest() 53 &mem->region, &mem->io.start, &offset, caller, in __iopagetest() 55 return -EINVAL; in __iopagetest() 61 static int iopagetest(struct intel_memory_region *mem, in iopagetest() argument 70 va = ioremap_wc(mem->io.start + offset, PAGE_SIZE); in iopagetest() 72 dev_err(mem->i915->drm.dev, in iopagetest() 74 &mem->io.start, &offset, caller); in iopagetest() [all …]
|
H A D | intel_region_ttm.c | 1 // SPDX-License-Identifier: MIT 26 * intel_region_ttm_device_init - Initialize a TTM device 33 struct drm_device *drm = &dev_priv->drm; in intel_region_ttm_device_init() 35 return ttm_device_init(&dev_priv->bdev, i915_ttm_driver(), in intel_region_ttm_device_init() 36 drm->dev, drm->anon_inode->i_mapping, in intel_region_ttm_device_init() 37 drm->vma_offset_manager, false, false); in intel_region_ttm_device_init() 41 * intel_region_ttm_device_fini - Finalize a TTM device 46 ttm_device_fini(&dev_priv->bdev); in intel_region_ttm_device_fini() 51 * driver-private types for now, reserving TTM_PL_VRAM for stolen 54 int intel_region_to_ttm_type(const struct intel_memory_region *mem) in intel_region_to_ttm_type() argument [all …]
|
H A D | intel_memory_region.h | 1 /* SPDX-License-Identifier: MIT */ 11 #include <linux/io-mapping.h> 44 for (id = 0; id < ARRAY_SIZE((i915)->mm.regions); id++) \ 45 for_each_if((mr) = (i915)->mm.regions[id]) 48 int (*init)(struct intel_memory_region *mem); 49 int (*release)(struct intel_memory_region *mem); 51 int (*init_object)(struct intel_memory_region *mem, 71 u16 type; member 99 u16 type, 103 void intel_memory_region_destroy(struct intel_memory_region *mem); [all …]
|
/linux/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/ |
H A D | mem.c | 23 #include "mem.h" 35 struct page **mem; member 45 return nvkm_mem(memory)->target; in nvkm_mem_target() 57 struct nvkm_mem *mem = nvkm_mem(memory); in nvkm_mem_addr() local 58 if (mem->pages == 1 && mem->mem) in nvkm_mem_addr() 59 return mem->dma[0]; in nvkm_mem_addr() 66 return nvkm_mem(memory)->pages << PAGE_SHIFT; in nvkm_mem_size() 73 struct nvkm_mem *mem = nvkm_mem(memory); in nvkm_mem_map_dma() local 75 .memory = &mem->memory, in nvkm_mem_map_dma() 77 .dma = mem->dma, in nvkm_mem_map_dma() [all …]
|
/linux/drivers/gpu/drm/nouveau/ |
H A D | nouveau_mem.c | 37 nouveau_mem_map(struct nouveau_mem *mem, in nouveau_mem_map() argument 46 switch (vmm->object.oclass) { in nouveau_mem_map() 53 args.nv50.kind = mem->kind; in nouveau_mem_map() 54 args.nv50.comp = mem->comp; in nouveau_mem_map() 61 if (mem->mem.type & NVIF_MEM_VRAM) in nouveau_mem_map() 67 args.gf100.kind = mem->kind; in nouveau_mem_map() 72 return -ENOSYS; in nouveau_mem_map() 75 return nvif_vmm_map(vmm, vma->addr, mem->mem.size, &args, argc, &mem->mem, 0); in nouveau_mem_map() 79 nouveau_mem_fini(struct nouveau_mem *mem) in nouveau_mem_fini() argument 81 nvif_vmm_put(&mem->drm->client.vmm.vmm, &mem->vma[1]); in nouveau_mem_fini() [all …]
|
/linux/drivers/gpu/drm/nouveau/nvif/ |
H A D | mem.c | 22 #include <nvif/mem.h> 28 nvif_mem_ctor_map(struct nvif_mmu *mmu, const char *name, u8 type, u64 size, in nvif_mem_ctor_map() argument 29 struct nvif_mem *mem) in nvif_mem_ctor_map() argument 31 int ret = nvif_mem_ctor(mmu, name, mmu->mem, NVIF_MEM_MAPPABLE | type, in nvif_mem_ctor_map() 32 0, size, NULL, 0, mem); in nvif_mem_ctor_map() 34 ret = nvif_object_map(&mem->object, NULL, 0); in nvif_mem_ctor_map() 36 nvif_mem_dtor(mem); in nvif_mem_ctor_map() 42 nvif_mem_dtor(struct nvif_mem *mem) in nvif_mem_dtor() argument 44 nvif_object_dtor(&mem->object); in nvif_mem_dtor() 49 int type, u8 page, u64 size, void *argv, u32 argc, in nvif_mem_ctor_type() argument [all …]
|
/linux/net/core/ |
H A D | xdp.c | 1 // SPDX-License-Identifier: GPL-2.0-only 44 BUILD_BUG_ON(sizeof_field(struct xdp_mem_allocator, mem.id) in xdp_mem_id_hashfn() 55 u32 mem_id = *(u32 *)arg->key; in xdp_mem_id_cmp() 57 return xa->mem.id != mem_id; in xdp_mem_id_cmp() 63 .key_offset = offsetof(struct xdp_mem_allocator, mem.id), 64 .key_len = sizeof_field(struct xdp_mem_allocator, mem.id), 79 ida_free(&mem_id_pool, xa->mem.id); in __xdp_mem_allocator_rcu_free() 88 if (!rhashtable_remove_fast(mem_id_ht, &xa->node, mem_id_rht_params)) in mem_xa_remove() 89 call_rcu(&xa->rcu, __xdp_mem_allocator_rcu_free); in mem_xa_remove() 104 if (xa->allocator == allocator) in mem_allocator_disconnect() [all …]
|
/linux/tools/perf/ |
H A D | builtin-mem.c | 1 // SPDX-License-Identifier: GPL-2.0 8 #include <subcmd/parse-options.h> 10 #include "util/trace-event.h" 15 #include "util/mem-events.h" 50 struct perf_mem *mem = (struct perf_mem *)opt->value; in parse_record_events() local 55 pr_err("failed: there is no PMU that supports perf mem\n"); in parse_record_events() 56 exit(-1); in parse_record_events() 64 exit(-1); in parse_record_events() 66 mem->operation = 0; in parse_record_events() 70 static int __cmd_record(int argc, const char **argv, struct perf_mem *mem, in __cmd_record() argument [all …]
|
/linux/crypto/ |
H A D | api.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 40 static struct crypto_alg *crypto_alg_lookup(const char *name, u32 type, 45 return try_module_get(alg->cra_module) ? crypto_alg_get(alg) : NULL; in crypto_mod_get() 51 struct module *module = alg->cra_module; in crypto_mod_put() 58 static struct crypto_alg *__crypto_alg_lookup(const char *name, u32 type, in __crypto_alg_lookup() argument 62 int best = -2; in __crypto_alg_lookup() 70 if ((q->cra_flags ^ type) & mask) in __crypto_alg_lookup() 73 exact = !strcmp(q->cra_driver_name, name); in __crypto_alg_lookup() 74 fuzzy = !strcmp(q->cra_name, name); in __crypto_alg_lookup() 75 if (!exact && !(fuzzy && q->cra_priority > best)) in __crypto_alg_lookup() [all …]
|
/linux/tools/perf/Documentation/ |
H A D | perf-mem.txt | 1 perf-mem(1) 5 ---- 6 perf-mem - Profile memory accesses 9 -------- 11 'perf mem' [<options>] (record [<command>] | report) 14 ----------- 15 "perf mem record" runs a command and gathers memory operation data 18 "perf mem report" displays the result. It invokes perf report with the 20 and stores are sampled. Use the -t option to limit to loads or stores. 22 Note that on Intel systems the memory latency reported is the use-latency, [all …]
|
/linux/kernel/module/ |
H A D | tree_lookup.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 14 * Use a latched RB-tree for __module_address(); this allows us to use 15 * RCU-sched lookups of the address from any context. 26 return (unsigned long)mod_mem->base; in __mod_tree_val() 33 return (unsigned long)mod_mem->size; in __mod_tree_size() 50 return -1; in mod_tree_comp() 66 latch_tree_insert(&node->node, &tree->root, &mod_tree_ops); in __mod_tree_insert() 71 latch_tree_erase(&node->node, &tree->root, &mod_tree_ops); in __mod_tree_remove() 80 for_each_mod_mem_type(type) { in mod_tree_insert() 81 mod->mem[type].mtn.mod = mod; in mod_tree_insert() [all …]
|
/linux/drivers/pci/hotplug/ |
H A D | ibmphp_res.c | 1 // SPDX-License-Identifier: GPL-2.0+ 7 * Copyright (C) 2001 Greg Kroah-Hartman (greg@kroah.com) 25 static void update_resources(struct bus_node *bus_cur, int type, int rangeno); 29 static int add_bus_range(int type, struct range_node *, struct bus_node *); 49 newbus->busno = busno; in alloc_error_bus() 51 newbus->busno = curr->bus_num; in alloc_error_bus() 52 list_add_tail(&newbus->bus_list, &gbuses); in alloc_error_bus() 69 rs->busno = curr->bus_num; in alloc_resources() 70 rs->devfunc = curr->dev_fun; in alloc_resources() 71 rs->start = curr->start_addr; in alloc_resources() [all …]
|
/linux/drivers/char/agp/ |
H A D | parisc-agp.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Copyright (c) 2006, Kyle McMartin <kyle@parisc-linux.org> 7 * Based on drivers/char/agpgart/hp-agp.c which is 8 * (c) Copyright 2002, 2003 Hewlett-Packard Development Company, L.P. 20 #include <asm/parisc-device.h> 33 int type); 55 .type = 0 71 agp_bridge->current_size = (void *) &parisc_agp_sizes[0]; in parisc_agp_fetch_size() 81 agp_bridge->gart_bus_addr = info->gart_base; in parisc_agp_configure() 82 agp_bridge->capndx = info->lba_cap_offset; in parisc_agp_configure() [all …]
|
H A D | nvidia-agp.c | 11 #include <linux/page-flags.h> 44 pci_read_config_byte(agp_bridge->dev, NVIDIA_0_APSIZE, &size_value); in nvidia_fetch_size() 46 values = A_SIZE_8(agp_bridge->driver->aperture_sizes); in nvidia_fetch_size() 48 for (i = 0; i < agp_bridge->driver->num_aperture_sizes; i++) { in nvidia_fetch_size() 50 agp_bridge->previous_size = in nvidia_fetch_size() 51 agp_bridge->current_size = (void *) (values + i); in nvidia_fetch_size() 52 agp_bridge->aperture_size_idx = i; in nvidia_fetch_size() 89 return -EINVAL; in nvidia_init_iorr() 94 mask_lo = ((~(size - 1)) & 0xfffff000) | 0x800; in nvidia_init_iorr() 113 current_size = A_SIZE_8(agp_bridge->current_size); in nvidia_configure() [all …]
|
H A D | ati-agp.c | 41 { .mask = 1, .type = 0} 60 page_map->real = (unsigned long *) __get_free_page(GFP_KERNEL); in ati_create_page_map() 61 if (page_map->real == NULL) in ati_create_page_map() 62 return -ENOMEM; in ati_create_page_map() 64 set_memory_uc((unsigned long)page_map->real, 1); in ati_create_page_map() 65 err = map_page_into_agp(virt_to_page(page_map->real)); in ati_create_page_map() 67 free_page((unsigned long)page_map->real); in ati_create_page_map() 70 page_map->remapped = page_map->real; in ati_create_page_map() 73 writel(agp_bridge->scratch_page, page_map->remapped+i); in ati_create_page_map() 74 readl(page_map->remapped+i); /* PCI Posting. */ in ati_create_page_map() [all …]
|
H A D | generic.c | 4 * Copyright (C) 2002-2005 Dave Jones. 28 * - Allocate more than order 0 pages to avoid too much linear map splitting. 37 #include <linux/dma-mapping.h> 57 * Generic routines for handling agp_memory structures - 67 clear_bit(key, agp_bridge->key_list); in agp_free_key() 76 bit = find_first_zero_bit(agp_bridge->key_list, MAXKEY); in agp_get_key() 78 set_bit(bit, agp_bridge->key_list); in agp_get_key() 81 return -1; in agp_get_key() 90 void agp_alloc_page_array(size_t size, struct agp_memory *mem) in agp_alloc_page_array() argument 92 mem->pages = kvmalloc(size, GFP_KERNEL); in agp_alloc_page_array() [all …]
|
H A D | alpha-agp.c | 16 alpha_agp_info *agp = agp_bridge->dev_private_data; in alpha_core_agp_vm_fault() 21 dma_addr = vmf->address - vmf->vma->vm_start + agp->aperture.bus_base; in alpha_core_agp_vm_fault() 22 pa = agp->ops->translate(agp, dma_addr); in alpha_core_agp_vm_fault() 24 if (pa == (unsigned long)-EINVAL) in alpha_core_agp_vm_fault() 32 vmf->page = page; in alpha_core_agp_vm_fault() 53 alpha_agp_info *agp = agp_bridge->dev_private_data; in alpha_core_agp_configure() 54 agp_bridge->gart_bus_addr = agp->aperture.bus_base; in alpha_core_agp_configure() 60 alpha_agp_info *agp = agp_bridge->dev_private_data; in alpha_core_agp_cleanup() 62 agp->ops->cleanup(agp); in alpha_core_agp_cleanup() 65 static void alpha_core_agp_tlbflush(struct agp_memory *mem) in alpha_core_agp_tlbflush() argument [all …]
|
/linux/drivers/infiniband/hw/irdma/ |
H A D | hmc.c | 1 // SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB 2 /* Copyright (c) 2015 - 2021 Intel Corporation */ 6 #include "type.h" 10 * irdma_find_sd_index_limit - finds segment descriptor index limit 12 * @type: type of HMC resources we're searching 22 static void irdma_find_sd_index_limit(struct irdma_hmc_info *hmc_info, u32 type, in irdma_find_sd_index_limit() argument 28 fpm_addr = hmc_info->hmc_obj[(type)].base + in irdma_find_sd_index_limit() 29 hmc_info->hmc_obj[type].size * idx; in irdma_find_sd_index_limit() 30 fpm_limit = fpm_addr + hmc_info->hmc_obj[type].size * cnt; in irdma_find_sd_index_limit() 32 *sd_limit = (u32)((fpm_limit - 1) / IRDMA_HMC_DIRECT_BP_SIZE); in irdma_find_sd_index_limit() [all …]
|
/linux/drivers/media/platform/mediatek/vcodec/decoder/vdec/ |
H A D | vdec_vp8_req_if.c | 1 // SPDX-License-Identifier: GPL-2.0 8 #include <media/v4l2-mem2mem.h> 9 #include <media/videobuf2-dma-contig.h> 10 #include <uapi/linux/v4l2-controls.h> 28 * struct vdec_vp8_slice_info - decode misc information 38 * @resolution_changed:resolution change flag 1 - changed, 0 - not changed 39 * @frame_header_type: current frame header type 59 * struct vdec_vp8_slice_dpb_info - vp8 reference information 74 * struct vdec_vp8_slice_vsi - VPU shared information 87 * struct vdec_vp8_slice_inst - VP8 decoder instance [all …]
|
/linux/drivers/net/can/softing/ |
H A D | softing_fw.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) 2008-2010 5 * - Kurt Van Dijck, EIA Electronics 17 * Make sure that card->dpram[DPRAM_FCT_HOST] is preset 25 iowrite16(cmd, &card->dpram[DPRAM_FCT_PARAM]); in _softing_fct_cmd() 26 iowrite8(vector >> 8, &card->dpram[DPRAM_FCT_HOST + 1]); in _softing_fct_cmd() 27 iowrite8(vector, &card->dpram[DPRAM_FCT_HOST]); in _softing_fct_cmd() 34 ret = ioread8(&card->dpram[DPRAM_FCT_HOST]) + in _softing_fct_cmd() 35 (ioread8(&card->dpram[DPRAM_FCT_HOST + 1]) << 8); in _softing_fct_cmd() 39 /* read return-value now */ in _softing_fct_cmd() [all …]
|
/linux/drivers/gpu/drm/mgag200/ |
H A D | mgag200_drv.c | 1 // SPDX-License-Identifier: GPL-2.0-only 26 static int mgag200_modeset = -1; 32 struct device *dev = &pdev->dev; in mgag200_init_pci_options() 50 resource_size_t mgag200_probe_vram(void __iomem *mem, resource_size_t size) in mgag200_probe_vram() argument 59 orig = ioread16(mem); in mgag200_probe_vram() 60 iowrite16(0, mem); in mgag200_probe_vram() 65 orig1 = ioread8(mem + offset); in mgag200_probe_vram() 66 orig2 = ioread8(mem + offset + 0x100); in mgag200_probe_vram() 68 iowrite16(0xaa55, mem + offset); in mgag200_probe_vram() 69 iowrite16(0xaa55, mem + offset + 0x100); in mgag200_probe_vram() [all …]
|
/linux/Documentation/devicetree/bindings/regulator/ |
H A D | richtek,rtq2208.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Alina Yu <alina_yu@richtek.com> 14 multi-configurable synchronous buck converters and two LDOs. 16 Bucks support "regulator-allowed-modes" and "regulator-mode". The former defines the permitted 25 0 - Auto mode for power saving, which reducing the switching frequency at light load condition 27 …1 - FCCM to meet the strict voltage regulation accuracy, which keeping constant switching frequenc… 35 - richtek,rtq2208 43 richtek,mtp-sel-high: [all …]
|
H A D | active-semi,act8945a.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/regulator/active-semi,act8945a.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Active-semi ACT8945a regulator 10 - Paul Cercueil <paul@crapouillou.net> 14 const: active-semi,act8945a 19 system-power-controller: 23 type: boolean 25 active-semi,vsel-high: [all …]
|
/linux/drivers/gpu/drm/nouveau/nvkm/core/ |
H A D | firmware.c | 52 blob->data = kmemdup(fw->data, fw->size, GFP_KERNEL); in nvkm_firmware_load_blob() 53 blob->size = fw->size; in nvkm_firmware_load_blob() 55 if (!blob->data) in nvkm_firmware_load_blob() 56 return -ENOMEM; in nvkm_firmware_load_blob() 63 * nvkm_firmware_get - load firmware from the official nvidia/chip/ directory 76 struct nvkm_device *device = subdev->device; in nvkm_firmware_get() 82 strscpy(cname, device->chip->name, sizeof(cname)); in nvkm_firmware_get() 85 --i; in nvkm_firmware_get() 90 snprintf(f, sizeof(f), "nvidia/%s/%s-%d.bin", cname, fwname, ver); in nvkm_firmware_get() 94 if (!firmware_request_nowarn(fw, f, device->dev)) { in nvkm_firmware_get() [all …]
|
/linux/Documentation/devicetree/bindings/mfd/ |
H A D | rockchip,rk817.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Chris Zhong <zyw@rock-chips.com> 11 - Zhang Qing <zhangqing@rock-chips.com> 21 - rockchip,rk809 22 - rockchip,rk817 30 '#clock-cells': 32 See <dt-bindings/clock/rockchip,rk808.h> for clock IDs. 39 clock-names: [all …]
|