Home
last modified time | relevance | path

Searched refs:afu (Results 1 – 12 of 12) sorted by relevance

/linux/drivers/misc/ocxl/
H A Dcore.c18 struct ocxl_afu *afu; in alloc_afu() local
20 afu = kzalloc(sizeof(struct ocxl_afu), GFP_KERNEL); in alloc_afu()
21 if (!afu) in alloc_afu()
24 kref_init(&afu->kref); in alloc_afu()
25 mutex_init(&afu->contexts_lock); in alloc_afu()
26 mutex_init(&afu->afu_control_lock); in alloc_afu()
27 idr_init(&afu->contexts_idr); in alloc_afu()
28 afu->fn = fn; in alloc_afu()
30 return afu; in alloc_afu()
35 struct ocxl_afu *afu = container_of(kref, struct ocxl_afu, kref); in free_afu() local
[all …]
H A Dmmio.c7 int ocxl_global_mmio_read32(struct ocxl_afu *afu, size_t offset, in ocxl_global_mmio_read32() argument
10 if (offset > afu->config.global_mmio_size - 4) in ocxl_global_mmio_read32()
20 *val = readl_be((char *)afu->global_mmio_ptr + offset); in ocxl_global_mmio_read32()
24 *val = readl((char *)afu->global_mmio_ptr + offset); in ocxl_global_mmio_read32()
32 int ocxl_global_mmio_read64(struct ocxl_afu *afu, size_t offset, in ocxl_global_mmio_read64() argument
35 if (offset > afu->config.global_mmio_size - 8) in ocxl_global_mmio_read64()
45 *val = readq_be((char *)afu->global_mmio_ptr + offset); in ocxl_global_mmio_read64()
49 *val = readq((char *)afu->global_mmio_ptr + offset); in ocxl_global_mmio_read64()
57 int ocxl_global_mmio_write32(struct ocxl_afu *afu, size_t offset, in ocxl_global_mmio_write32() argument
60 if (offset > afu->config.global_mmio_size - 4) in ocxl_global_mmio_write32()
[all …]
H A Dcontext.c7 int ocxl_context_alloc(struct ocxl_context **context, struct ocxl_afu *afu, in ocxl_context_alloc() argument
17 ctx->afu = afu; in ocxl_context_alloc()
18 mutex_lock(&afu->contexts_lock); in ocxl_context_alloc()
19 pasid = idr_alloc(&afu->contexts_idr, ctx, afu->pasid_base, in ocxl_context_alloc()
20 afu->pasid_base + afu->pasid_max, GFP_KERNEL); in ocxl_context_alloc()
22 mutex_unlock(&afu->contexts_lock); in ocxl_context_alloc()
26 afu->pasid_count++; in ocxl_context_alloc()
27 mutex_unlock(&afu->contexts_lock); in ocxl_context_alloc()
44 ocxl_afu_get(afu); in ocxl_context_alloc()
85 dev = to_pci_dev(ctx->afu->fn->dev.parent); in ocxl_context_attach()
[all …]
H A Dsysfs.c10 return info->afu; in to_afu()
17 struct ocxl_afu *afu = to_afu(device); in global_mmio_size_show() local
20 afu->config.global_mmio_size); in global_mmio_size_show()
27 struct ocxl_afu *afu = to_afu(device); in pp_mmio_size_show() local
30 afu->config.pp_mmio_stride); in pp_mmio_size_show()
37 struct ocxl_afu *afu = to_afu(device); in afu_version_show() local
40 afu->config.version_major, in afu_version_show()
41 afu->config.version_minor); in afu_version_show()
48 struct ocxl_afu *afu = to_afu(device); in contexts_show() local
51 afu->pasid_count, afu->pasid_max); in contexts_show()
[all …]
H A Dconfig.c423 struct ocxl_afu_config *afu) in read_afu_name() argument
433 ptr = (u32 *) &afu->name[i]; in read_afu_name()
436 afu->name[OCXL_AFU_NAME_SZ - 1] = '\0'; /* play safe */ in read_afu_name()
441 struct ocxl_afu_config *afu) in read_afu_mmio() argument
452 afu->global_mmio_bar = EXTRACT_BITS(val, 0, 2); in read_afu_mmio()
453 afu->global_mmio_offset = EXTRACT_BITS(val, 16, 31) << 16; in read_afu_mmio()
458 afu->global_mmio_offset += (u64) val << 32; in read_afu_mmio()
463 afu->global_mmio_size = val; in read_afu_mmio()
471 afu->pp_mmio_bar = EXTRACT_BITS(val, 0, 2); in read_afu_mmio()
472 afu->pp_mmio_offset = EXTRACT_BITS(val, 16, 31) << 16; in read_afu_mmio()
[all …]
H A Dpci.c20 struct ocxl_afu *afu, *tmp; in ocxl_probe() local
32 list_for_each_entry_safe(afu, tmp, afu_list, list) { in ocxl_probe()
34 rc = ocxl_file_register_afu(afu); in ocxl_probe()
37 afu->config.name, afu->config.idx); in ocxl_probe()
47 struct ocxl_afu *afu; in ocxl_remove() local
53 list_for_each_entry(afu, afu_list, list) { in ocxl_remove()
54 ocxl_file_unregister_afu(afu); in ocxl_remove()
H A Dfile.c61 rc = ocxl_context_alloc(&ctx, info->afu, inode->i_mapping); in afu_open()
99 arg.afu_version_major = ctx->afu->config.version_major; in afu_ioctl_get_metadata()
100 arg.afu_version_minor = ctx->afu->config.version_minor; in afu_ioctl_get_metadata()
102 arg.pp_mmio_size = ctx->afu->config.pp_mmio_stride; in afu_ioctl_get_metadata()
103 arg.global_mmio_size = ctx->afu->config.global_mmio_size; in afu_ioctl_get_metadata()
137 int rc = ocxl_link_update_pe(ctx->afu->fn->link, in afu_ioctl_enable_p9_wait()
488 ocxl_afu_put(info->afu); in info_release()
521 int ocxl_file_register_afu(struct ocxl_afu *afu) in ocxl_file_register_afu() argument
526 struct ocxl_fn *fn = afu->fn; in ocxl_file_register_afu()
544 info->afu = afu; in ocxl_file_register_afu()
[all …]
H A Docxl_internal.h31 struct ocxl_afu *afu; member
71 struct ocxl_afu *afu; member
100 int ocxl_file_register_afu(struct ocxl_afu *afu);
101 void ocxl_file_unregister_afu(struct ocxl_afu *afu);
143 void ocxl_context_detach_all(struct ocxl_afu *afu);
H A Dafu_irq.c22 return (offset - ctx->afu->irq_base_offset) >> PAGE_SHIFT; in ocxl_irq_offset_to_id()
27 return ctx->afu->irq_base_offset + (irq_id << PAGE_SHIFT); in ocxl_irq_id_to_offset()
128 rc = ocxl_link_irq_alloc(ctx->afu->fn->link, &irq->hw_irq); in ocxl_afu_irq_alloc()
144 ocxl_link_free_irq(ctx->afu->fn->link, irq->hw_irq); in ocxl_afu_irq_alloc()
164 ocxl_link_free_irq(ctx->afu->fn->link, irq->hw_irq); in afu_irq_free()
/linux/include/misc/
H A Docxl.h95 void ocxl_afu_get(struct ocxl_afu *afu);
101 void ocxl_afu_put(struct ocxl_afu *afu);
130 int ocxl_context_alloc(struct ocxl_context **context, struct ocxl_afu *afu,
212 struct ocxl_afu_config *ocxl_afu_config(struct ocxl_afu *afu);
219 void ocxl_afu_set_private(struct ocxl_afu *afu, void *private);
228 void *ocxl_afu_get_private(struct ocxl_afu *afu);
240 int ocxl_global_mmio_read32(struct ocxl_afu *afu, size_t offset,
252 int ocxl_global_mmio_read64(struct ocxl_afu *afu, size_t offset,
264 int ocxl_global_mmio_write32(struct ocxl_afu *afu, size_t offset,
276 int ocxl_global_mmio_write64(struct ocxl_afu *afu, size_t offset,
[all …]
/linux/Documentation/ABI/testing/
H A Dsysfs-class-ocxl1 What: /sys/class/ocxl/<afu name>/afu_version
8 What: /sys/class/ocxl/<afu name>/contexts
20 What: /sys/class/ocxl/<afu name>/pp_mmio_size
27 What: /sys/class/ocxl/<afu name>/global_mmio_size
34 What: /sys/class/ocxl/<afu name>/global_mmio_area
40 What: /sys/class/ocxl/<afu name>/reload_on_reset
/linux/Documentation/fpga/
H A Ddfl.rst294 error reporting sysfs interfaces allow user to read port/afu errors