/Linux-v6.1/drivers/pci/controller/ |
D | pci-xgene-msi.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * APM X-Gene MSI Driver 12 #include <linux/msi.h> 27 struct xgene_msi *msi; member 48 .name = "X-Gene1 MSI", 62 * X-Gene v1 has 16 groups of MSI termination registers MSInIRx, where 63 * n is group number (0..F), x is index of registers in each group (0..7) 85 * Each index register supports 16 MSI vectors (0..15) to generate interrupt. 86 * There are total 16 GIC IRQs assigned for these 16 groups of MSI termination 89 * Each MSI termination group has 1 MSIINTn register (n is 0..15) to indicate [all …]
|
D | pcie-microchip-host.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright (c) 2018 - 2020 Microchip Corporation. All rights reserved. 13 #include <linux/msi.h> 17 #include <linux/pci-ecam.h> 22 /* Number of MSI IRQs */ 88 /* PCIe Config space MSI capability structure */ 195 #define PCIE_EVENT_CAUSE(x, s) \ argument 196 [EVENT_PCIE_ ## x] = { __stringify(x), s } 198 #define SEC_ERROR_CAUSE(x, s) \ argument 199 [EVENT_SEC_ ## x] = { __stringify(x), s } [all …]
|
D | pcie-rcar-host.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * PCIe driver for Renesas R-Car SoCs 4 * Copyright (C) 2014-2020 Renesas Electronics Europe Ltd 7 * arch/sh/drivers/pci/pcie-sh7786.c 8 * arch/sh/drivers/pci/ops-sh7786.c 9 * Copyright (C) 2009 - 2011 Paul Mundt 16 #include <linux/clk-provider.h> 24 #include <linux/msi.h> 33 #include "pcie-rcar.h" 64 struct rcar_msi msi; member [all …]
|
D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0 15 is used on 32-bit Marvell ARM SoCs: Dove, Kirkwood, Armada 370, 16 Armada XP, Armada 375, Armada 38x and Armada 39x. 51 in the Intel IXP4xx XScale-based network processor SoC. 62 bool "Renesas R-Car Gen2 Internal PCI controller" 66 Say Y here if you want internal PCI support on R-Car Gen2 SoC. 68 built-in EHCI/OHCI host controller present on each one. 71 bool "Renesas R-Car PCIe host controller" 75 Say Y here if you want PCIe controller support on R-Car SoCs in host 79 bool "Renesas R-Car PCIe endpoint controller" [all …]
|
D | pcie-altera-msi.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Altera PCIe MSI support 7 * Copyright Altera Corporation (C) 2013-2015. All rights reserved 14 #include <linux/msi.h> 41 static inline void msi_writel(struct altera_msi *msi, const u32 value, in msi_writel() argument 44 writel_relaxed(value, msi->csr_base + reg); in msi_writel() 47 static inline u32 msi_readl(struct altera_msi *msi, const u32 reg) in msi_readl() argument 49 return readl_relaxed(msi->csr_base + reg); in msi_readl() 55 struct altera_msi *msi; in altera_msi_isr() local 61 msi = irq_desc_get_handler_data(desc); in altera_msi_isr() [all …]
|
D | pcie-brcmstb.c | 1 // SPDX-License-Identifier: GPL-2.0+ 2 /* Copyright (C) 2009 - 2019 Broadcom */ 19 #include <linux/msi.h> 25 #include <linux/pci-ecam.h> 36 /* BRCM_PCIE_CAP_REGS - Offset for the mandatory capability config regs */ 62 #define SCB_SIZE_MASK(x) PCIE_MISC_MISC_CTRL_SCB ## x ## _SIZE_MASK argument 149 #define BRCM_INT_PCI_MSI_MASK GENMASK(BRCM_INT_PCI_MSI_NR - 1, 0) 151 32 - BRCM_INT_PCI_MSI_LEGACY_NR) 153 /* MSI target addresses */ 166 #define MDIO_RD_DONE(x) (((x) & MDIO_DATA_DONE_MASK) ? 1 : 0) argument [all …]
|
/Linux-v6.1/Documentation/PCI/ |
D | msi-howto.rst | 1 .. SPDX-License-Identifier: GPL-2.0 5 The MSI Driver Guide HOWTO 16 the advantages of using MSI over traditional interrupt mechanisms, how 17 to change your driver to use MSI or MSI-X and some basic diagnostics to 27 The MSI capability was first specified in PCI 2.2 and was later enhanced 28 in PCI 3.0 to allow each interrupt to be masked individually. The MSI-X 30 per device than MSI and allows interrupts to be independently configured. 32 Devices may support both MSI and MSI-X, but only one can be enabled at 40 traditional pin-based interrupts. 42 Pin-based PCI interrupts are often shared amongst several devices. [all …]
|
/Linux-v6.1/drivers/pci/msi/ |
D | msi.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * PCI Message Signaled Interrupt (MSI) 5 * Copyright (C) 2003-2004 Intel 14 #include "msi.h" 21 raw_spinlock_t *lock = &to_pci_dev(desc->dev)->msi_lock; in pci_msi_update_mask() 24 if (!desc->pci.msi_attrib.can_mask) in pci_msi_update_mask() 28 desc->pci.msi_mask &= ~clear; in pci_msi_update_mask() 29 desc->pci.msi_mask |= set; in pci_msi_update_mask() 30 pci_write_config_dword(msi_desc_to_pci_dev(desc), desc->pci.mask_pos, in pci_msi_update_mask() 31 desc->pci.msi_mask); in pci_msi_update_mask() [all …]
|
/Linux-v6.1/include/linux/ |
D | msi.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 6 * This header file contains MSI data structures and functions which are 8 * - Interrupt core code 9 * - PCI/MSI core code 10 * - MSI interrupt domain implementations 11 * - IOMMU, low level VFIO, NTB and other justified exceptions 12 * dealing with low level MSI details. 15 * especially storing MSI descriptor pointers in random code is considered 23 #include <asm/msi.h> 45 * msi_msg - Representation of a MSI message [all …]
|
D | pci-epc.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 12 #include <linux/pci-epf.h> 17 UNKNOWN_INTERFACE = -1, 43 * struct pci_epc_ops - set of function pointers for performing EPC operations 49 * @set_msi: ops to set the requested number of MSI interrupts in the MSI 51 * @get_msi: ops to get the number of MSI interrupts allocated by the RC from 52 * the MSI capability register 53 * @set_msix: ops to set the requested number of MSI-X interrupts in the 54 * MSI-X capability register 55 * @get_msix: ops to get the number of MSI-X interrupts allocated by the RC [all …]
|
/Linux-v6.1/arch/sparc/kernel/ |
D | pci_msi.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* pci_msi.c: Sparc64 MSI support common layer. 16 struct pci_pbm_info *pbm = msiq_cookie->pbm; in sparc64_msiq_interrupt() 17 unsigned long msiqid = msiq_cookie->msiqid; in sparc64_msiq_interrupt() 22 ops = pbm->msi_ops; in sparc64_msiq_interrupt() 24 err = ops->get_head(pbm, msiqid, &head); in sparc64_msiq_interrupt() 30 unsigned long msi; in sparc64_msiq_interrupt() local 32 err = ops->dequeue_msi(pbm, msiqid, &head, &msi); in sparc64_msiq_interrupt() 36 irq = pbm->msi_irq_table[msi - pbm->msi_first]; in sparc64_msiq_interrupt() 47 err = ops->set_head(pbm, msiqid, head); in sparc64_msiq_interrupt() [all …]
|
/Linux-v6.1/arch/powerpc/platforms/cell/ |
D | axon_msi.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 11 #include <linux/msi.h> 51 * To configure the FIFO size as (1 << n) bytes, we write (n - 15) into bits 52 * 8-9 of the MSIC control reg. 54 #define MSIC_CTRL_FIFO_SIZE (((MSIC_FIFO_SIZE_SHIFT - 15) << 8) & 0x300) 58 * the bounds of the FIFO. Also they should always be 16-byte aligned. 60 #define MSIC_FIFO_SIZE_MASK ((MSIC_FIFO_SIZE_BYTES - 1) & ~0xFu) 87 pr_devel("axon_msi: dcr_write(0x%x, 0x%x)\n", val, dcr_n); in msic_dcr_write() 89 dcr_write(msic->dcr_host, dcr_n, val); in msic_dcr_write() 96 u32 write_offset, msi; in axon_msi_cascade() local [all …]
|
/Linux-v6.1/Documentation/devicetree/bindings/pci/ |
D | xgene-pci-msi.txt | 1 * AppliedMicro X-Gene v1 PCIe MSI controller 5 - compatible: should be "apm,xgene1-msi" to identify 6 X-Gene v1 PCIe MSI controller block. 7 - msi-controller: indicates that this is an X-Gene v1 PCIe MSI controller node 8 - reg: physical base address (0x79000000) and length (0x900000) for controller 9 registers. These registers include the MSI termination address and data 10 registers as well as the MSI interrupt status registers. 11 - reg-names: not required 12 - interrupts: A list of 16 interrupt outputs of the controller, starting from 14 - interrupt-names: not required [all …]
|
/Linux-v6.1/Documentation/PCI/endpoint/ |
D | pci-ntb-function.rst | 1 .. SPDX-License-Identifier: GPL-2.0 9 PCI Non-Transparent Bridges (NTB) allow two host systems to communicate 26 .. code-block:: text 28 +-------------+ +-------------+ 32 +------^------+ +------^------+ 35 +---------|-------------------------------------------------|---------+ 36 | +------v------+ +------v------+ | 40 | | <-----------------------------------> | | 45 | +-------------+ +-------------+ | 46 +---------------------------------------------------------------------+ [all …]
|
/Linux-v6.1/drivers/pci/controller/mobiveil/ |
D | pcie-mobiveil-host.c | 1 // SPDX-License-Identifier: GPL-2.0 6 * Copyright 2019-2020 NXP 19 #include <linux/msi.h> 28 #include "pcie-mobiveil.h" 40 if ((bus->primary == to_pci_host_bridge(bus->bridge)->busnr) && (PCI_SLOT(devfn) > 0)) in mobiveil_pcie_valid_device() 47 * mobiveil_pcie_map_bus - routine to get the configuration base of either 53 struct mobiveil_pcie *pcie = bus->sysdata; in mobiveil_pcie_map_bus() 54 struct mobiveil_root_port *rp = &pcie->rp; in mobiveil_pcie_map_bus() 62 return pcie->csr_axi_slave_base + where; in mobiveil_pcie_map_bus() 70 value = bus->number << PAB_BUS_SHIFT | in mobiveil_pcie_map_bus() [all …]
|
/Linux-v6.1/arch/powerpc/sysdev/ |
D | mpic_u3msi.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * Copyright 2006-2007, Michael Ellerman, IBM Corporation. 9 #include <linux/msi.h> 12 #include <asm/ppc-pci.h> 39 .name = "MPIC-U3MSI", 66 for (bus = pdev->bus; bus && bus->self; bus = bus->parent) { in find_ht_magic_addr() 67 pos = pci_find_ht_capability(bus->self, HT_CAPTYPE_MSI_MAPPING); in find_ht_magic_addr() 69 return read_ht_magic_addr(bus->self, pos); in find_ht_magic_addr() 77 struct pci_controller *hose = pci_bus_to_host(pdev->bus); in find_u4_magic_addr() 82 * the MSI number and that triggers the right interrupt, but in find_u4_magic_addr() [all …]
|
D | msi_bitmap.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright 2006-2008, Michael Ellerman, IBM Corporation. 20 spin_lock_irqsave(&bmp->lock, flags); in msi_bitmap_alloc_hwirqs() 22 offset = bitmap_find_next_zero_area(bmp->bitmap, bmp->irq_count, 0, in msi_bitmap_alloc_hwirqs() 23 num, (1 << order) - 1); in msi_bitmap_alloc_hwirqs() 24 if (offset > bmp->irq_count) in msi_bitmap_alloc_hwirqs() 27 bitmap_set(bmp->bitmap, offset, num); in msi_bitmap_alloc_hwirqs() 28 spin_unlock_irqrestore(&bmp->lock, flags); in msi_bitmap_alloc_hwirqs() 30 pr_debug("msi_bitmap: allocated 0x%x at offset 0x%x\n", num, offset); in msi_bitmap_alloc_hwirqs() 34 spin_unlock_irqrestore(&bmp->lock, flags); in msi_bitmap_alloc_hwirqs() [all …]
|
/Linux-v6.1/drivers/xen/xen-pciback/ |
D | pciback_ops.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * PCI Backend Operations - respond to PCI requests from Frontend 35 if (dev->hdr_type != PCI_HEADER_TYPE_NORMAL) in xen_pcibk_control_isr() 39 dev_data->enable_intx = 0; in xen_pcibk_control_isr() 40 dev_data->ack_intr = 0; in xen_pcibk_control_isr() 42 enable = dev_data->enable_intx; in xen_pcibk_control_isr() 45 if (!enable && !dev_data->isr_on) in xen_pcibk_control_isr() 49 * b/c when device transitions to MSI, the dev->irq is in xen_pcibk_control_isr() 50 * overwritten with the MSI vector. in xen_pcibk_control_isr() 53 dev_data->irq = dev->irq; in xen_pcibk_control_isr() [all …]
|
/Linux-v6.1/Documentation/translations/zh_CN/PCI/ |
D | msi-howto.rst | 1 .. SPDX-License-Identifier: GPL-2.0 3 .. include:: ../disclaimer-zh_CN.rst 5 :Original: Documentation/PCI/msi-howto.rst 26 本指南介绍了消息标记中断(MSI)的基本知识,使用MSI相对于传统中断机制的优势,如何 27 改变你的驱动程序以使用MSI或MSI-X,以及在设备不支持MSI时可以尝试的一些基本诊断方法。 36 MSI-X功能也随着PCI 3.0被引入。它比MSI支持每个设备更多的中断,并允许独立配置中断。 38 设备可以同时支持MSI和MSI-X,但一次只能启用一个。 50 之前,中断就已经到达了(这在PCI-PCI桥后面的设备中变得更有可能)。为了确保所有的数 65 PCI设备被初始化为使用基于引脚的中断。设备驱动程序必须将设备设置为使用MSI或MSI-X。 70 ------------------- [all …]
|
/Linux-v6.1/arch/powerpc/platforms/pasemi/ |
D | msi.c | 1 // SPDX-License-Identifier: GPL-2.0-only 8 * Copyright 2006-2007, Michael Ellerman, IBM Corporation. 13 #include <linux/msi.h> 16 #include <asm/ppc-pci.h> 23 * needs more than 32 MSI's down the road we'll have to rethink this, 36 pr_debug("mpic_pasemi_msi_mask_irq %d\n", data->irq); in mpic_pasemi_msi_mask_irq() 43 pr_debug("mpic_pasemi_msi_unmask_irq %d\n", data->irq); in mpic_pasemi_msi_unmask_irq() 55 .name = "PASEMI-MSI", 65 msi_for_each_desc(entry, &pdev->dev, MSI_DESC_ASSOCIATED) { in pasemi_msi_teardown_msi_irqs() 66 hwirq = virq_to_hw(entry->irq); in pasemi_msi_teardown_msi_irqs() [all …]
|
/Linux-v6.1/arch/mips/pci/ |
D | msi-octeon.c | 6 * Copyright (C) 2005-2009, 2010 Cavium Networks 10 #include <linux/msi.h> 15 #include <asm/octeon/cvmx-npi-defs.h> 16 #include <asm/octeon/cvmx-pci-defs.h> 17 #include <asm/octeon/cvmx-npei-defs.h> 18 #include <asm/octeon/cvmx-sli-defs.h> 19 #include <asm/octeon/cvmx-pexp-defs.h> 20 #include <asm/octeon/pci-octeon.h> 23 * Each bit in msi_free_irq_bitmask represents a MSI interrupt that is 31 * is used so we can disable all of the MSI interrupts when a device [all …]
|
/Linux-v6.1/drivers/pci/endpoint/ |
D | pci-epc-core.c | 1 // SPDX-License-Identifier: GPL-2.0 14 #include <linux/pci-epc.h> 15 #include <linux/pci-epf.h> 16 #include <linux/pci-ep-cfs.h> 35 * pci_epc_put() - release the PCI endpoint controller 45 module_put(epc->ops->owner); in pci_epc_put() 46 put_device(&epc->dev); in pci_epc_put() 51 * pci_epc_get() - get the PCI endpoint controller 59 int ret = -EINVAL; in pci_epc_get() 70 if (!try_module_get(epc->ops->owner)) { in pci_epc_get() [all …]
|
/Linux-v6.1/drivers/platform/x86/ |
D | msi-wmi.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * MSI WMI hotkeys 7 * Most stuff taken over from hp-wmi 14 #include <linux/input/sparse-keymap.h> 22 MODULE_DESCRIPTION("MSI laptop WMI hotkeys driver"); 25 #define DRV_NAME "msi-wmi" 27 #define MSIWMI_BIOS_GUID "551A1F84-FBDD-4125-91DB-3EA8F44F1D45" 28 #define MSIWMI_MSI_EVENT_GUID "B6F3EEF2-3D2F-49DC-9DE3-85BCE18C62F2" 29 #define MSIWMI_WIND_EVENT_GUID "5B3CC38A-40D9-7245-8AE6-1145B751BE3F" 36 /* Generic MSI keys (not present on MSI Wind) */ [all …]
|
/Linux-v6.1/Documentation/misc-devices/ |
D | pci-endpoint-test.rst | 1 .. SPDX-License-Identifier: GPL-2.0 17 #) raise MSI IRQ 18 #) raise MSI-X IRQ 23 This misc driver creates /dev/pci-endpoint-test.<num> for every 28 ----- 36 Tests message signalled interrupts. The MSI number 39 Tests message signalled interrupts. The MSI-X number 43 should be passed as argument (0: Legacy, 1:MSI, 2:MSI-X). 56 .. [1] Documentation/PCI/endpoint/function/binding/pci-test.rst
|
/Linux-v6.1/arch/powerpc/platforms/pseries/ |
D | msi.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * Copyright 2006-2007 Michael Ellerman, IBM Corp. 11 #include <linux/msi.h> 15 #include <asm/ppc-pci.h> 38 addr = rtas_config_addr(pdn->busno, pdn->devfn, 0); in rtas_change_msi() 39 buid = pdn->phb->buid; in rtas_change_msi() 63 rc = -rc; in rtas_change_msi() 80 * disabling MSI with the explicit interface also disables MSI-X in rtas_disable_msi() 99 addr = rtas_config_addr(pdn->busno, pdn->devfn, 0); in rtas_query_irq_number() 100 buid = pdn->phb->buid; in rtas_query_irq_number() [all …]
|