/openbmc/linux/drivers/xen/ |
H A D | grant-dma-ops.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Xen grant DMA-mapping layer - contains special DMA-mapping routines 4 * for providing grant references as DMA addresses to be used by frontends 11 #include <linux/dma-map-ops.h> 19 #include <xen/xen-ops.h> 33 static inline dma_addr_t grant_to_dma(grant_ref_t grant) in grant_to_dma() argument 35 return XEN_GRANT_DMA_ADDR_OFF | ((dma_addr_t)grant << XEN_PAGE_SHIFT); in grant_to_dma() 38 static inline grant_ref_t dma_to_grant(dma_addr_t dma) in dma_to_grant() argument 40 return (grant_ref_t)((dma & ~XEN_GRANT_DMA_ADDR_OFF) >> XEN_PAGE_SHIFT); in dma_to_grant() 70 * DMA ops for Xen frontends (e.g. virtio). [all …]
|
H A D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 32 2) control domain: xl mem-max <target-domain> <maxmem> 35 3) control domain: xl mem-set <target-domain> <memory> 51 …SUBSYSTEM=="memory", ACTION=="add", RUN+="/bin/sh -c '[ -f /sys$devpath/state ] && echo online > /… 137 tristate "userspace grant access device driver" 145 bool "Add support for dma-buf grant access device driver extension" 150 dma-buf implementation. With this extension grant references to 151 the pages of an imported dma-buf can be exported for other domain 152 use and grant references coming from a foreign domain can be 153 converted into a local dma-buf for local export. [all …]
|
H A D | grant-dma-iommu.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * bindings by Xen grant DMA-mapping layer. 21 return ERR_PTR(-ENODEV); in grant_dma_iommu_probe_device() 30 { .compatible = "xen,grant-dma" }, 39 mmu = devm_kzalloc(&pdev->dev, sizeof(*mmu), GFP_KERNEL); in grant_dma_iommu_probe() 41 return -ENOMEM; in grant_dma_iommu_probe() 43 mmu->dev = &pdev->dev; in grant_dma_iommu_probe() 45 ret = iommu_device_register(&mmu->iommu, &grant_dma_iommu_ops, &pdev->dev); in grant_dma_iommu_probe() 59 iommu_device_unregister(&mmu->iommu); in grant_dma_iommu_remove() 66 .name = "grant-dma-iommu",
|
H A D | Makefile | 1 # SPDX-License-Identifier: GPL-2.0 2 obj-$(CONFIG_HOTPLUG_CPU) += cpu_hotplug.o 3 obj-y += grant-table.o features.o balloon.o manage.o time.o 4 obj-y += mem-reservation.o 5 obj-y += events/ 6 obj-y += xenbus/ 8 CFLAGS_features.o := -fno-stack-protector 10 dom0-$(CONFIG_ARM64) += arm-device.o 11 dom0-$(CONFIG_PCI) += pci.o 12 dom0-$(CONFIG_USB_SUPPORT) += dbgp.o [all …]
|
H A D | grant-table.c | 6 * Copyright (c) 2005-2006, Christopher Clark 7 * Copyright (c) 2004-2005, K A Fraser 50 #include <linux/dma-mapping.h> 58 #include <xen/hvc-console.h> 59 #include <xen/swiotlb-xen.h> 64 #include <xen/mem-reservation.h> 79 * linked by grant ref, the last element contains GNTTAB_LIST_END. The number 110 /*This is a structure of function pointers for grant table*/ 113 * Version of the grant interface. 117 * Grant refs per grant frame. [all …]
|
H A D | gntdev-common.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 4 * Common functionality of grant device. 6 * Copyright (c) 2006-2007, D G Murray. 30 /* Device for which DMA memory is allocated. */ 67 * If dmabuf_vaddr is not NULL then this mapping is backed by DMA 72 /* Flags used to create this DMA buffer: GNTDEV_DMA_FLAG_XXX. */
|
H A D | gntdev-dmabuf.c | 1 // SPDX-License-Identifier: GPL-2.0 4 * Xen dma-buf functionality for gntdev. 6 * DMA buffer implementation is based on drivers/gpu/drm/drm_prime.c. 13 #include <linux/dma-buf.h> 14 #include <linux/dma-direct.h> 23 #include "gntdev-common.h" 24 #include "gntdev-dmabuf.h" 45 /* Scatter-gather table of the imported buffer. */ 47 /* dma-buf attachment of the imported buffer. */ 54 /* Pages of this buffer (only for dma-buf export). */ [all …]
|
/openbmc/linux/include/uapi/xen/ |
H A D | gntdev.h | 1 /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR MIT) */ 41 /* The domain ID of the grant to be mapped. */ 43 /* The grant reference of the grant to be mapped. */ 48 * Inserts the grant references into the mapping table of an instance 51 * considered opaque to userspace, with one exception: if no grant 69 /* Array of grant references, of size @count. */ 74 * Removes the grant references from the mapping table of an instance of 99 * contiguously-allocated range at once, and not any subrange thereof. 131 * cleanup if this side crashes. Required to implement cross-domain robust 171 * Copy between grant references and local buffers. [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/iommu/ |
H A D | xen,grant-dma.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/iommu/xen,grant-dma.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Stefano Stabellini <sstabellini@kernel.org> 13 The Xen IOMMU represents the Xen grant table interface. Grant mappings 16 The binding is required to restrict memory access using Xen grant mappings. 20 const: xen,grant-dma 22 '#iommu-cells': 29 - compatible [all …]
|
/openbmc/qemu/hw/xen/ |
H A D | xen-mapcache.c | 5 * the COPYING file in the top-level directory. 7 * Contributions after 2012-01-13 are licensed under the terms of the 13 #include "qemu/error-report.h" 17 #include "hw/xen/xen-hvm-common.h" 22 #include "sysemu/xen-mapcache.h" 58 bool dma; member 83 qemu_mutex_lock(&mc->lock); in mapcache_lock() 88 qemu_mutex_unlock(&mc->lock); in mapcache_unlock() 112 mc->phys_offset_to_gaddr = f; in xen_map_cache_init_single() 113 mc->opaque = opaque; in xen_map_cache_init_single() [all …]
|
/openbmc/linux/include/xen/ |
H A D | grant_table.h | 6 * 2. Accessing others' memory reservations via grant references. 7 * (i.e., mechanisms for both sender and recipient of grant references) 9 * Copyright (c) 2004-2005, K A Fraser 50 #include <linux/page-flags.h> 54 * Technically there's no reliably invalid grant reference or grant handle, 57 #define INVALID_GRANT_REF ((grant_ref_t)-1) 58 #define INVALID_GRANT_HANDLE ((grant_handle_t)-1) 94 * End access through the given grant reference, iff the grant entry is no 95 * longer in use. Return 1 if the grant entry was freed, 0 if it is still in 101 * Eventually end access through the given grant reference, and once that [all …]
|
/openbmc/linux/arch/powerpc/include/asm/ |
H A D | dcr-regs.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 9 * Mostly lifted from asm-ppc/ibm4xx.h by 11 * Copyright (c) 1999 Grant Erickson <grant@lcse.umn.edu> 19 * Most DCRs used for controlling devices such as the MAL, DMA engine, 162 * DCR register offsets for 440SP/440SPe I2O/DMA controller. 167 #define I2O_REG_ENABLE 0x00000001 /* Enable I2O/DMA access */ 171 #define DCRN_SDR0_SRST_I2ODMA (0x80000000 >> 15) /* Reset I2O/DMA */
|
/openbmc/linux/arch/mips/pci/ |
H A D | pci-ar2315.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 6 * Both AR2315 and AR2316 chips have PCI interface unit, which supports DMA 10 * Read/write operation in the region 0x80000000-0xBFFFFFFF causes 18 * Devices on the bus can perform DMA requests via chip BAR1. PCI host 23 * We know (and support) only one board that uses the PCI interface - 34 #include <linux/dma-direct.h> 54 #define AR2315_PCIMISC_GIG_MASK 0x0000000C /* bits 31-30 for pci req */ 59 #define AR2315_PCIGRANT_EN 0x00000000 /* 6:7=0 early grant en */ 60 #define AR2315_PCIGRANT_FRAME 0x00000040 /* 6:7=1 grant waits 4 frame */ 61 #define AR2315_PCIGRANT_IDLE 0x00000080 /* 6:7=2 grant waits 4 idle */ [all …]
|
/openbmc/linux/drivers/parport/ |
H A D | parport_gsc.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 3 * Low-level parallel-support for PC-style hardware integrated in the 4 * LASI-Controller (on GSC-Bus) for HP-PARISC Workstations 6 * (C) 1999-2001 by Helge Deller <deller@gmx.de> 9 * Grant Guenther <grant@torque.net> 43 /* --- register definitions ------------------------------- */ 45 #define EPPDATA(p) ((p)->base + 0x4) 46 #define EPPADDR(p) ((p)->base + 0x3) 47 #define CONTROL(p) ((p)->base + 0x2) 48 #define STATUS(p) ((p)->base + 0x1) [all …]
|
H A D | parport_sunbpp.c | 1 // SPDX-License-Identifier: GPL-2.0-only 2 /* parport_sunbpp.c: Parallel-port routines for SBUS 11 * Grant Guenther <grant@torque.net> 40 #include <asm/dma.h> /* BPP uses LSI 64854 for DMA */ 53 struct bpp_regs __iomem *regs = (struct bpp_regs __iomem *)p->base; in parport_sunbpp_disable_irq() 56 tmp = sbus_readl(®s->p_csr); in parport_sunbpp_disable_irq() 58 sbus_writel(tmp, ®s->p_csr); in parport_sunbpp_disable_irq() 63 struct bpp_regs __iomem *regs = (struct bpp_regs __iomem *)p->base; in parport_sunbpp_enable_irq() 66 tmp = sbus_readl(®s->p_csr); in parport_sunbpp_enable_irq() 68 sbus_writel(tmp, ®s->p_csr); in parport_sunbpp_enable_irq() [all …]
|
H A D | share.c | 2 * Parallel-port resource manager code. 10 * based on work by Grant Guenther <grant@torque.net> 48 /* list of all allocated ports, sorted by ->number */ 110 return dev->type == &parport_device_type; in is_parport() 118 return -ENODEV; in parport_probe() 120 drv = to_parport_driver(dev->driver); in parport_probe() 121 if (!drv->probe) { in parport_probe() 125 if (strcmp(par_dev->name, drv->name)) in parport_probe() 126 return -ENODEV; in parport_probe() 130 return drv->probe(to_pardevice(dev)); in parport_probe() [all …]
|
H A D | procfs.c | 1 // SPDX-License-Identifier: GPL-2.0 10 * based on work by Grant Guenther <grant@torque.net> 13 * Cleaned up include files - Russell King <linux@arm.uk.linux.org> 46 struct parport *port = (struct parport *)table->extra1; in do_active_device() 52 return -EACCES; in do_active_device() 59 for (dev = port->devices; dev ; dev = dev->next) { in do_active_device() 60 if(dev == port->cad) { in do_active_device() 61 len += scnprintf(buffer, sizeof(buffer), "%s\n", dev->name); in do_active_device() 83 struct parport_device_info *info = table->extra2; in do_autoprobe() 89 return -EACCES; in do_autoprobe() [all …]
|
/openbmc/linux/arch/parisc/include/asm/ |
H A D | dma.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* asm/dma.h: Defines for using and allocating dma channels. 4 * High DMA channel support & info by Hannu Savolainen 6 * (c) Copyright 2000, Grant Grundler 20 ** DMA_CHUNK_SIZE is used by the SCSI mid-layer to break up 28 /* The maximum address that we can perform a DMA transfer to on this platform 29 ** New dynamic DMA interfaces should obsolete this.... 34 ** We don't have DMA channels... well V-class does but the 35 ** Dynamic DMA Mapping interface will support them... right? :^) 36 ** Note: this is not relevant right now for PA-RISC, but we cannot [all …]
|
/openbmc/linux/sound/soc/fsl/ |
H A D | mpc5200_dma.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 // Freescale MPC5200 PSC DMA 11 #include <linux/dma-mapping.h> 33 struct mpc52xx_psc __iomem *regs = psc_dma->psc_regs; in psc_dma_status_irq() 36 isr = in_be16(®s->mpc52xx_psc_isr); in psc_dma_status_irq() 39 if (psc_dma->playback.active && (isr & MPC52xx_PSC_IMR_TXEMP)) in psc_dma_status_irq() 40 psc_dma->stats.underrun_count++; in psc_dma_status_irq() 43 if (psc_dma->capture.active && (isr & MPC52xx_PSC_IMR_ORERR)) in psc_dma_status_irq() 44 psc_dma->stats.overrun_count++; in psc_dma_status_irq() 46 out_8(®s->command, MPC52xx_PSC_RST_ERR_STAT); in psc_dma_status_irq() [all …]
|
H A D | mpc5200_psc_i2s.c | 1 // SPDX-License-Identifier: GPL-2.0-only 45 dev_dbg(psc_dma->dev, "%s(substream=%p) p_size=%i p_bytes=%i" in psc_i2s_hw_params() 65 dev_dbg(psc_dma->dev, "invalid format\n"); in psc_i2s_hw_params() 66 return -EINVAL; in psc_i2s_hw_params() 68 out_be32(&psc_dma->psc_regs->sicr, psc_dma->sicr | mode); in psc_i2s_hw_params() 91 dev_dbg(psc_dma->dev, "psc_i2s_set_sysclk(cpu_dai=%p, dir=%i)\n", in psc_i2s_set_sysclk() 93 return (dir == SND_SOC_CLOCK_IN) ? 0 : -EINVAL; in psc_i2s_set_sysclk() 110 dev_dbg(psc_dma->dev, "psc_i2s_set_fmt(cpu_dai=%p, format=%i)\n", in psc_i2s_set_fmt() 112 return (format == SND_SOC_DAIFMT_I2S) ? 0 : -EINVAL; in psc_i2s_set_fmt() 115 /* --------------------------------------------------------------------- [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/ |
H A D | ABI.rst | 1 .. SPDX-License-Identifier: GPL-2.0 7 I. Regarding stable bindings/ABI, we quote from the 2013 ARM mini-summit 13 frozen for all time. Grant said there are ways to change bindings that 26 2) Use specific compatible strings so that if we need to add a feature (DMA)
|
/openbmc/linux/drivers/dma/ |
H A D | moxart-dma.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * MOXA ART SoCs DMA Engine support. 11 #include <linux/dma-mapping.h> 28 #include "virt-dma.h" 63 * 101: -1 (Burst=0), -4 (Burst=1) 64 * 110: -2 (Burst=0), -8 (Burst=1) 65 * 111: -4 (Burst=0), -16 (Burst=1) 83 * Request signal select source/destination address for DMA hardware handshake. 85 * The request line number is a property of the DMA controller itself, 86 * e.g. MMC must always request channels where dma_slave_config->slave_id is 5. [all …]
|
/openbmc/linux/arch/arm/mach-sa1100/ |
H A D | generic.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * linux/arch/arm/mach-sa1100/generic.c 15 #include <linux/dma-mapping.h> 23 #include <linux/irqchip/irq-sa11x0.h> 75 * Default power-off for SA1100 83 /* enable wake-up on GPIO0 (Assabet...) */ in sa1100_power_off() 102 /* Use on-chip reset capability */ in sa11x0_restart() 110 dev->dev.platform_data = data; in sa11x0_register_device() 114 dev->name, err); in sa11x0_register_device() 126 .name = "sa11x0-udc", [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/powerpc/fsl/ |
H A D | mpc5200.txt | 2 ---------------------------- 4 (c) 2006-2009 Secret Lab Technologies Ltd 5 Grant Likely <grant.likely@secretlab.ca> 8 ------------------ 9 For mpc5200 on-chip devices, the format for each compatible value is 10 <chip>-<device>[-<mode>]. The OS should be able to match a device driver 21 "fsl,mpc5200-<device>". 29 compatible = "fsl,mpc5200b-<device>","fsl,mpc5200-<device>"; 34 ie. ethernet on mpc5200: compatible = "fsl,mpc5200-fec"; 35 ethernet on mpc5200b: compatible = "fsl,mpc5200b-fec", "fsl,mpc5200-fec"; [all …]
|
/openbmc/linux/net/sunrpc/xprtrdma/ |
H A D | rpc_rdma.c | 1 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 3 * Copyright (c) 2014-2020, Oracle and/or its affiliates. 4 * Copyright (c) 2003-2007 Network Appliance, Inc. All rights reserved. 9 * COPYING in the main directory of this source tree, or the BSD-type 57 /* Returns size of largest RPC-over-RDMA header in a Call message 59 * The largest Call header contains a full-size Read list and a 80 /* Returns size of largest RPC-over-RDMA header in a Reply message 101 * rpcrdma_set_max_header_sizes - Initialize inline payload sizes 110 unsigned int maxsegs = ep->re_max_rdma_segs; in rpcrdma_set_max_header_sizes() 112 ep->re_max_inline_send = in rpcrdma_set_max_header_sizes() [all …]
|