/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/drivers/gpu/drm/i915/ |
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 …]
|
/linux/tools/perf/ |
H A D | builtin-mem.c | 1 // SPDX-License-Identifier: GPL-2.0 9 #include <subcmd/parse-options.h> 11 #include "util/trace-event.h" 16 #include "util/mem-events.h" 51 struct perf_mem *mem = (struct perf_mem *)opt->value; in parse_record_events() local 56 pr_err("failed: there is no PMU that supports perf mem\n"); in parse_record_events() 57 exit(-1); in parse_record_events() 65 exit(-1); in parse_record_events() 67 mem->operation = 0; in parse_record_events() 71 static int __cmd_record(int argc, const char **argv, struct perf_mem *mem, in __cmd_record() argument [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/crypto/ |
H A D | api.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 39 u32 type, u32 mask); 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() [all …]
|
/linux/drivers/accel/amdxdna/ |
H A D | amdxdna_gem.c | 1 // SPDX-License-Identifier: GPL-2.0 12 #include <linux/dma-buf.h> 13 #include <linux/dma-direct.h> 14 #include <linux/iosys-map.h> 29 struct amdxdna_client *client = abo->client; in amdxdna_gem_heap_alloc() 30 struct amdxdna_dev *xdna = client->xdna; in amdxdna_gem_heap_alloc() 31 struct amdxdna_mem *mem = &abo->mem; in amdxdna_gem_heap_alloc() local 37 mutex_lock(&client->mm_lock); in amdxdna_gem_heap_alloc() 39 heap = client->dev_heap; in amdxdna_gem_heap_alloc() 41 ret = -EINVAL; in amdxdna_gem_heap_alloc() [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 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() 82 if (mod->mem[type].size) in mod_tree_insert() [all …]
|
H A D | strict_rwx.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 15 static int module_set_memory(const struct module *mod, enum mod_mem_type type, in module_set_memory() argument 18 const struct module_memory *mod_mem = &mod->mem[type]; in module_set_memory() 20 if (!mod_mem->base) in module_set_memory() 23 set_vm_flush_reset_perms(mod_mem->base); in module_set_memory() 24 return set_memory((unsigned long)mod_mem->base, mod_mem->size >> PAGE_SHIFT); in module_set_memory() 35 for_class_mod_mem_type(type, text) { in module_enable_text_rox() 36 const struct module_memory *mem = &mod->mem[type]; in module_enable_text_rox() local 39 if (mem->is_rox) in module_enable_text_rox() 40 ret = execmem_restore_rox(mem->base, mem->size); in module_enable_text_rox() [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> 45 pci_read_config_byte(agp_bridge->dev, NVIDIA_0_APSIZE, &size_value); in nvidia_fetch_size() 47 values = A_SIZE_8(agp_bridge->driver->aperture_sizes); in nvidia_fetch_size() 49 for (i = 0; i < agp_bridge->driver->num_aperture_sizes; i++) { in nvidia_fetch_size() 51 agp_bridge->previous_size = in nvidia_fetch_size() 52 agp_bridge->current_size = (void *) (values + i); in nvidia_fetch_size() 53 agp_bridge->aperture_size_idx = i; in nvidia_fetch_size() 90 return -EINVAL; in nvidia_init_iorr() 95 mask_lo = ((~(size - 1)) & 0xfffff000) | 0x800; in nvidia_init_iorr() 114 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 …]
|
/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/Documentation/devicetree/bindings/mfd/ |
H A D | rockchip,rk816.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,rk816 29 '#clock-cells': 31 See <dt-bindings/clock/rockchip,rk808.h> for clock IDs. 34 clock-output-names: 37 gpio-controller: true [all …]
|
H A D | rockchip,rk818.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> 20 - rockchip,rk818 28 '#clock-cells': 30 See <dt-bindings/clock/rockchip,rk808.h> for clock IDs. 33 clock-output-names: 38 rockchip,system-power-controller: [all …]
|
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 …]
|
/linux/tools/testing/selftests/bpf/progs/ |
H A D | verifier_global_ptr_args.c | 1 // SPDX-License-Identifier: GPL-2.0 19 return task->pid + task->tgid; in subprog_trusted_task_nullable() 40 /* known non-NULL */ in trusted_task_arg_nullable() 49 /* known non-NULL after explicit NULL check, just in case */ in trusted_task_arg_nullable() 61 return task->pid + task->tgid; in subprog_trusted_task_nonnull() 66 __msg("R1 type=scalar expected=ptr_, trusted_ptr_, rcu_ptr_") 75 __msg("R1 type=ptr_or_null_ expected=ptr_, trusted_ptr_, rcu_ptr_") 184 return task->pid; in subprog_untrusted_bad_tags() 204 __msg("arg#0 reference type('STRUCT local_type_wont_be_accepted') has no matches") 212 return task->pid; in subprog_untrusted() [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/Documentation/devicetree/bindings/regulator/ |
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/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/drivers/net/ethernet/netronome/nfp/bpf/ |
H A D | main.c | 1 // SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 /* Copyright (C) 2017-2018 Netronome Systems, Inc. */ 27 struct nfp_app_bpf *bpf = nn->app->priv; in nfp_net_ebpf_capable() 29 return nn->cap & NFP_NET_CFG_CTRL_BPF && in nfp_net_ebpf_capable() 30 bpf->abi_version && in nfp_net_ebpf_capable() 31 nn_readb(nn, NFP_NET_CFG_BPF_ABI) == bpf->abi_version; in nfp_net_ebpf_capable() 44 return -EINVAL; in nfp_bpf_xdp_offload() 46 running = nn->dp.ctrl & NFP_NET_CFG_CTRL_BPF; in nfp_bpf_xdp_offload() 47 xdp_running = running && nn->xdp_hw.prog; in nfp_bpf_xdp_offload() 52 return -EBUSY; in nfp_bpf_xdp_offload() [all …]
|