Home
last modified time | relevance | path

Searched +full:sg +full:- +full:micro (Results 1 – 25 of 38) sorted by relevance

12

/linux/kernel/dma/
H A Ddebug.h1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (C) 2008 Advanced Micro Devices, Inc.
19 extern void debug_dma_map_sg(struct device *dev, struct scatterlist *sg,
42 struct scatterlist *sg,
46 struct scatterlist *sg,
67 static inline void debug_dma_map_sg(struct device *dev, struct scatterlist *sg, in debug_dma_map_sg() argument
103 struct scatterlist *sg, in debug_dma_sync_sg_for_cpu() argument
109 struct scatterlist *sg, in debug_dma_sync_sg_for_device() argument
H A Ddebug.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) 2008 Advanced Micro Devices, Inc.
8 #define pr_fmt(fmt) "DMA-API: " fmt
12 #include <linux/dma-map-ops.h>
32 #define HASH_FN_MASK (HASH_SIZE - 1)
55 * struct dma_debug_entry - track a dma_map* or dma_alloc_coherent mapping
56 * @list: node on pre-allocated free_entries list
57 * @dev: 'dev' argument to dma_map_{page|single|sg} or dma_alloc_coherent
60 * @type: single, page, sg, coherent
95 /* List of pre-allocated dma_debug_entry's */
[all …]
/linux/drivers/gpu/drm/radeon/
H A Dradeon_prime.c2 * Copyright 2012 Advanced Micro Devices, Inc.
27 #include <linux/dma-buf.h>
41 return drm_prime_pages_to_sg(obj->dev, bo->tbo.ttm->pages, in radeon_gem_prime_get_sg_table()
42 bo->tbo.ttm->num_pages); in radeon_gem_prime_get_sg_table()
47 struct sg_table *sg) in radeon_gem_prime_import_sg_table() argument
49 struct dma_resv *resv = attach->dmabuf->resv; in radeon_gem_prime_import_sg_table()
50 struct radeon_device *rdev = dev->dev_private; in radeon_gem_prime_import_sg_table()
55 ret = radeon_bo_create(rdev, attach->dmabuf->size, PAGE_SIZE, false, in radeon_gem_prime_import_sg_table()
56 RADEON_GEM_DOMAIN_GTT, 0, sg, resv, &bo); in radeon_gem_prime_import_sg_table()
61 bo->tbo.base.funcs = &radeon_gem_object_funcs; in radeon_gem_prime_import_sg_table()
[all …]
H A Dradeon_prime.h1 /* radeon_prime.h -- Private header for radeon driver -*- linux-c -*-
3 * Copyright 2012 Advanced Micro Devices, Inc.
38 struct sg_table *sg);
H A Dradeon_object.h2 * Copyright 2008 Advanced Micro Devices, Inc.
35 * radeon_mem_type_to_domain - return domain corresponding to mem_type
56 * radeon_bo_reserve - reserve bo
58 * @no_intr: don't return -ERESTARTSYS on pending signal
61 * -ERESTARTSYS: A wait for the buffer to become unreserved was interrupted by
62 * a signal. Release all buffer reservations and return to user-space.
68 r = ttm_bo_reserve(&bo->tbo, !no_intr, false, NULL); in radeon_bo_reserve()
70 if (r != -ERESTARTSYS) in radeon_bo_reserve()
71 dev_err(bo->rdev->dev, "%p reserve failed\n", bo); in radeon_bo_reserve()
79 ttm_bo_unreserve(&bo->tbo); in radeon_bo_unreserve()
[all …]
/linux/drivers/tee/amdtee/
H A Damdtee_if.h1 /* SPDX-License-Identifier: MIT */
4 * Copyright 2019 Advanced Micro Devices, Inc.
8 * This file has definitions related to Host and AMD-TEE Trusted OS interface.
23 * struct memref - memory reference structure
72 * non-contiguous. Below structures are meant to describe a shared memory region
73 * via scatter/gather (sg) list
77 * struct tee_sg_desc - sg descriptor for a physically contiguous buffer
89 * struct tee_sg_list - structure describing a scatter/gather list
90 * @count: [in] number of sg descriptors
92 * @buf: [in] list of sg buffer descriptors
[all …]
/linux/drivers/crypto/ccp/
H A Dccp-crypto-aes-cmac.c1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (C) 2013,2018 Advanced Micro Devices, Inc.
21 #include "ccp-crypto.h"
34 if (rctx->hash_rem) { in ccp_aes_cmac_complete()
36 unsigned int offset = rctx->nbytes - rctx->hash_rem; in ccp_aes_cmac_complete()
38 scatterwalk_map_and_copy(rctx->buf, rctx->src, in ccp_aes_cmac_complete()
39 offset, rctx->hash_rem, 0); in ccp_aes_cmac_complete()
40 rctx->buf_count = rctx->hash_rem; in ccp_aes_cmac_complete()
42 rctx->buf_count = 0; in ccp_aes_cmac_complete()
46 if (req->result && rctx->final) in ccp_aes_cmac_complete()
[all …]
H A Dccp-crypto-sha.c1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (C) 2013,2018 Advanced Micro Devices, Inc.
25 #include "ccp-crypto.h"
37 if (rctx->hash_rem) { in ccp_sha_complete()
39 unsigned int offset = rctx->nbytes - rctx->hash_rem; in ccp_sha_complete()
41 scatterwalk_map_and_copy(rctx->buf, rctx->src, in ccp_sha_complete()
42 offset, rctx->hash_rem, 0); in ccp_sha_complete()
43 rctx->buf_count = rctx->hash_rem; in ccp_sha_complete()
45 rctx->buf_count = 0; in ccp_sha_complete()
49 if (req->result && rctx->final) in ccp_sha_complete()
[all …]
H A Dccp-dev.h1 /* SPDX-License-Identifier: GPL-2.0-only */
5 * Copyright (C) 2013,2017 Advanced Micro Devices, Inc.
19 #include <linux/dma-direction.h>
27 #include "sp-dev.h"
63 /* ------------------------ CCP Version 5 Specifics ------------------------ */
103 #define QUEUE_SIZE_VAL ((ffs(COMMANDS_PER_QUEUE) - 2) & \
105 #define Q_PTR_MASK (2 << (QUEUE_SIZE_VAL + 5) - 1)
125 /* ------------------------ CCP Version 3 Specifics ------------------------ */
147 /* XTS-AES Related Values */
156 /* Pass-Through Related Values */
[all …]
/linux/drivers/vfio/pci/pds/
H A Dlm.h1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright(c) 2023 Advanced Micro Devices, Inc. */
23 struct sg_table sg_table; /* SG table for backing pages */
H A Dlm.c1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright(c) 2023 Advanced Micro Devices, Inc. */
32 lm_file->filep = in pds_vfio_get_lm_file()
34 if (IS_ERR(lm_file->filep)) in pds_vfio_get_lm_file()
37 stream_open(lm_file->filep->f_inode, lm_file->filep); in pds_vfio_get_lm_file()
38 mutex_init(&lm_file->lock); in pds_vfio_get_lm_file()
41 get_file(lm_file->filep); in pds_vfio_get_lm_file()
53 p = page_mem - offset_in_page(page_mem); in pds_vfio_get_lm_file()
66 if (sg_alloc_table_from_pages(&lm_file->sg_table, pages, npages, 0, in pds_vfio_get_lm_file()
70 lm_file->size = size; in pds_vfio_get_lm_file()
[all …]
H A Dcmds.c1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright(c) 2023 Advanced Micro Devices, Inc. */
30 cmd.client_request.client_id = cpu_to_le16(pds_vfio->client_id); in pds_vfio_client_adminq_cmd()
39 if (err && err != -EAGAIN) in pds_vfio_client_adminq_cmd()
53 snprintf(devname, sizeof(devname), "%s.%d-%u", PDS_VFIO_LM_DEV_NAME, in pds_vfio_register_client_cmd()
54 pci_domain_nr(pdev->bus), in pds_vfio_register_client_cmd()
55 PCI_DEVID(pdev->bus->number, pdev->devfn)); in pds_vfio_register_client_cmd()
65 pds_vfio->client_id = ci; in pds_vfio_register_client_cmd()
80 err = pds_client_unregister(pdsc, pds_vfio->client_id); in pds_vfio_unregister_client_cmd()
82 dev_err(&pdev->dev, "unregister from DSC failed: %pe\n", in pds_vfio_unregister_client_cmd()
[all …]
/linux/Documentation/devicetree/bindings/leds/
H A Dleds-sgm3140.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/leds/leds-sgm3140.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Luca Weiss <luca@z3ntu.xyz>
13 The SGM3140 is a current-regulated charge pump which can regulate two current
17 http://www.sg-micro.com/uploads/soft/20190626/1561535688.pdf
22 - ocs,ocp8110
23 - richtek,rt5033-led
24 - sgmicro,sgm3140
[all …]
/linux/drivers/scsi/megaraid/
H A Dmegaraid_mbox.h1 /* SPDX-License-Identifier: GPL-2.0-or-later */
6 * Copyright (c) 2003-2004 LSI Logic Corporation.
93 #define MBOX_DEFAULT_SG_SIZE 26 // default sg size supported by all fw
94 #define MBOX_MAX_SG_SIZE 32 // maximum scatter-gather list size
102 #define MBOX_SYNC_DELAY_200 200 // 200 micro-seconds
112 * mbox_ccb_t - command control block specific to mailbox based controllers
117 * @sgl64 : 64-bit scatter-gather list
118 * @sgl32 : 32-bit scatter-gather list
119 * @sgl_dma_h : dma handle for the scatter-gather list
124 * @buf_dma_h : dma handle for buffers w/o sg list
[all …]
/linux/drivers/gpu/drm/amd/amdgpu/
H A Damdgpu_vram_mgr.c2 * Copyright 2016 Advanced Micro Devices, Inc.
25 #include <linux/dma-mapping.h>
70 while (head != block->link.next) { in amdgpu_is_vram_mgr_blocks_contiguous()
74 block = list_entry(block->link.next, struct drm_buddy_block, link); in amdgpu_is_vram_mgr_blocks_contiguous()
107 return sysfs_emit(buf, "%llu\n", adev->gmc.real_vram_size); in amdgpu_mem_info_vram_total_show()
124 return sysfs_emit(buf, "%llu\n", adev->gmc.visible_vram_size); in amdgpu_mem_info_vis_vram_total_show()
141 struct ttm_resource_manager *man = &adev->mman.vram_mgr.manager; in amdgpu_mem_info_vram_used_show()
162 amdgpu_vram_mgr_vis_usage(&adev->mman.vram_mgr)); in amdgpu_mem_info_vis_vram_used_show()
180 switch (adev->gmc.vram_vendor) { in amdgpu_mem_info_vram_vendor()
234 !adev->gmc.vram_vendor) in amdgpu_vram_attrs_is_visible()
[all …]
H A Damdgpu_amdkfd_gpuvm.c1 // SPDX-License-Identifier: MIT
3 * Copyright 2014-2018 Advanced Micro Devices, Inc.
23 #include <linux/dma-buf.h>
73 #define domain_string(domain) domain_bit_to_string[ffs(domain)-1]
82 list_for_each_entry(entry, &mem->attachments, list) in kfd_mem_is_attached()
83 if (entry->bo_va->base.vm == avm) in kfd_mem_is_attached()
90 * reuse_dmamap() - Check whether adev can share the original
104 return (adev->ram_is_direct_mapped && bo_adev->ram_is_direct_mapped) || in reuse_dmamap()
105 (adev->dev->iommu_group == bo_adev->dev->iommu_group); in reuse_dmamap()
109 * System (TTM + userptr) memory - 15/16th System RAM
[all …]
H A Damdgpu_amdkfd.h2 * Copyright 2014 Advanced Micro Devices, Inc.
54 KFD_MEM_ATT_SHARED, /* Share kgd_mem->bo or another attachment's */
55 KFD_MEM_ATT_USERPTR, /* SG bo to DMA map pages from a userptr bo */
57 KFD_MEM_ATT_SG /* Tag to DMA map SG BOs */
114 * Must be last --ends in a flexible-array member.
148 /* MMU-notifier related fields */
284 if ((mmptr) == current->mm) { \
286 } else if (current->flags & PF_KTHREAD) { \
299 ((struct drm_file *)(drm_priv))->driver_priv)->vm)
360 ((adev)->xcp_mgr && (xcp_id) >= 0 ?\
[all …]
H A Damdgpu_dma_buf.c2 * Copyright 2019 Advanced Micro Devices, Inc.
42 #include <linux/dma-buf.h>
43 #include <linux/dma-fence-array.h>
44 #include <linux/pci-p2pdma.h>
49 * dma_buf_attach_adev - Helper to get adev of an attachment
59 if (attach->importer_ops == &amdgpu_dma_buf_attach_ops) { in dma_buf_attach_adev()
60 struct drm_gem_object *obj = attach->importer_priv; in dma_buf_attach_adev()
63 return amdgpu_ttm_adev(bo->tbo.bdev); in dma_buf_attach_adev()
70 * amdgpu_dma_buf_attach - &dma_buf_ops.attach implementation
72 * @dmabuf: DMA-buf where we attach to
[all …]
/linux/drivers/leds/flash/
H A Dleds-sgm3140.c1 // SPDX-License-Identifier: GPL-2.0
5 #include <linux/led-class-flash.h>
10 #include <media/v4l2-flash-led-class.h>
43 if (priv->enabled == state) in sgm3140_strobe_set()
47 ret = regulator_enable(priv->vin_regulator); in sgm3140_strobe_set()
49 dev_err(fled_cdev->led_cdev.dev, in sgm3140_strobe_set()
53 gpiod_set_value_cansleep(priv->flash_gpio, 1); in sgm3140_strobe_set()
54 gpiod_set_value_cansleep(priv->enable_gpio, 1); in sgm3140_strobe_set()
55 mod_timer(&priv->powerdown_timer, in sgm3140_strobe_set()
56 jiffies + usecs_to_jiffies(priv->timeout)); in sgm3140_strobe_set()
[all …]
/linux/drivers/usb/misc/
H A Dusbtest.c1 // SPDX-License-Identifier: GPL-2.0
16 /*-------------------------------------------------------------------------*/
18 static int override_alt = -1;
23 /*-------------------------------------------------------------------------*/
30 __u32 test_num; /* 0..(TEST_CASES-1) */
47 __u32 test_num; /* 0..(TEST_CASES-1) */
63 /*-------------------------------------------------------------------------*/
72 //#define KEYSPAN_19Qi /* grab un-renumerated serial adapter */
74 /*-------------------------------------------------------------------------*/
112 return interface_to_usbdev(test->intf); in testdev_to_usbdev()
[all …]
/linux/drivers/dma/amd/qdma/
H A Dqdma.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * DMA driver for AMD Queue-based DMA Subsystem
5 * Copyright (C) 2023-2024, Advanced Micro Devices, Inc.
10 #include <linux/dma-mapping.h>
19 #define CHAN_STR(q) (((q)->dir == DMA_MEM_TO_DEV) ? "H2C" : "C2H")
20 #define QDMA_REG_OFF(d, r) ((d)->roffs[r].off)
43 idx = qdev->qintr_rings[qdev->qintr_ring_idx++].ridx; in qdma_get_intr_ring_idx()
44 qdev->qintr_ring_idx %= qdev->qintr_ring_num; in qdma_get_intr_ring_idx()
52 const struct qdma_reg_field *f = &qdev->rfields[field]; in qdma_get_field()
56 low_pos = f->lsb / BITS_PER_TYPE(*data); in qdma_get_field()
[all …]
/linux/include/linux/usb/
H A Dgadget.h1 // SPDX-License-Identifier: GPL-2.0
5 * We call the USB code inside a Linux-based peripheral device a "gadget"
6 * driver, except for the hardware-specific bus glue. One USB host can
11 * (C) Copyright 2002-2004 by David Brownell
35 * struct usb_request - describes one i/o request
42 * @sg: a scatterlist for SG-capabl
105 struct scatterlist *sg; global() member
[all...]
/linux/drivers/ata/
H A Dsata_dwc_460ex.c1 // SPDX-License-Identifier: GPL-2.0-or-later
13 * Copyright 2006 Applied Micro Circuits Corporation
38 #define DRV_NAME "sata-dwc"
123 struct ata_probe_ent *pe; /* ptr to probe-ent */
155 #define HSDEV_FROM_HOST(host) ((struct sata_dwc_device *)(host)->private_data)
156 #define HSDEV_FROM_AP(ap) ((struct sata_dwc_device *)(ap)->host->private_data)
157 #define HSDEVP_FROM_AP(ap) ((struct sata_dwc_device_port *)(ap)->private_data)
158 #define HSDEV_FROM_QC(qc) ((struct sata_dwc_device *)(qc)->ap->host->private_data)
159 #define HSDEV_FROM_HSDEVP(p) ((struct sata_dwc_device *)(p)->hsdev)
182 #include <linux/platform_data/dma-dw.h>
[all …]
/linux/include/linux/
H A Dusb.h1 /* SPDX-License-Identifier: GPL-2.0 */
14 #include <linux/errno.h> /* for -ENODEV */
29 /*------
1627 struct scatterlist *sg; /* (in) scatter gather buffer list */ global() member
[all...]
/linux/drivers/usb/dwc2/
H A Dhcd_ddma.c1 // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
3 * hcd_ddma.c - DesignWare HS OTG Controller descriptor DMA routines
5 * Copyright (C) 2004-2013 Synopsys, Inc.
15 #include <linux/dma-mapping.h>
28 return frame & (FRLISTEN_64_SIZE - 1); in dwc2_frame_list_idx()
35 MAX_DMA_DESC_NUM_GENERIC) - 1); in dwc2_desclist_idx_inc()
40 return (idx - inc) & in dwc2_desclist_idx_dec()
42 MAX_DMA_DESC_NUM_GENERIC) - 1); in dwc2_desclist_idx_dec()
47 return (qh->ep_type == USB_ENDPOINT_XFER_ISOC && in dwc2_max_desc_num()
48 qh->dev_speed == USB_SPEED_HIGH) ? in dwc2_max_desc_num()
[all …]

12