/linux-6.12.1/drivers/pci/msi/ |
D | api.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * PCI MSI/MSI-X — Exported APIs for device drivers 5 * Copyright (C) 2003-2004 Intel 14 #include "msi.h" 17 * pci_enable_msi() - Enable MSI interrupt mode on device 20 * Legacy device driver API to enable MSI interrupts mode on device and 22 * Linux IRQ will be saved at @dev->irq. The driver must invoke 40 * pci_disable_msi() - Disable MSI interrupt mode on device 43 * Legacy device driver API to disable MSI interrupt mode on device, 45 * The PCI device Linux IRQ (@dev->irq) is restored to its default [all …]
|
D | irqdomain.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * PCI Message Signaled Interrupt (MSI) - irqdomain support 9 #include "msi.h" 15 domain = dev_get_msi_domain(&dev->dev); in pci_msi_setup_msi_irqs() 17 return msi_domain_alloc_irqs_all_locked(&dev->dev, MSI_DEFAULT_DOMAIN, nvec); in pci_msi_setup_msi_irqs() 26 domain = dev_get_msi_domain(&dev->dev); in pci_msi_teardown_msi_irqs() 28 msi_domain_free_irqs_all_locked(&dev->dev, MSI_DEFAULT_DOMAIN); in pci_msi_teardown_msi_irqs() 31 msi_free_msi_descs(&dev->dev); in pci_msi_teardown_msi_irqs() 36 * pci_msi_domain_write_msg - Helper to write MSI message to PCI config space 37 * @irq_data: Pointer to interrupt data of the MSI interrupt [all …]
|
D | msi.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * PCI Message Signaled Interrupt (MSI) 5 * Copyright (C) 2003-2004 Intel 15 #include "msi.h" 21 * pci_msi_supported - check whether MSI may be enabled on a device 22 * @dev: pointer to the pci_dev data structure of MSI device function 26 * to determine if MSI/-X are supported for the device. If MSI/-X is 33 /* MSI must be globally enabled and supported by the device */ in pci_msi_supported() 37 if (!dev || dev->no_msi) in pci_msi_supported() 49 * Any bridge which does NOT route MSI transactions from its in pci_msi_supported() [all …]
|
/linux-6.12.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-6.12.1/drivers/pci/controller/ |
D | pci-xgene-msi.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * APM X-Gene MSI Driver 13 #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-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> 34 #include "pcie-rcar.h" 50 struct rcar_msi msi; member [all …]
|
D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0 25 tristate "Altera PCIe MSI feature" 29 Say Y here if you want PCIe MSI support for the Altera FPGA. 30 This MSI driver supports Altera MSI to GIC controller IP. 45 system-on-chips, like the Apple M1. This is required for the USB 46 type-A ports, Ethernet, Wi-Fi, and Bluetooth. 93 bool "Broadcom iProc PCIe MSI support" 98 Say Y here if you want to enable MSI support for Broadcom's iProc 102 bool "Cavium Thunder PCIe controller to off-chip devices" 110 bool "Cavium Thunder ECAM controller to on-chip devices on pass-1.x silicon" [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 15 #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-xilinx-dma-pl.c | 1 // SPDX-License-Identifier: GPL-2.0-only 13 #include <linux/msi.h> 18 #include "pcie-xilinx-common.h" 35 #define IMR(x) BIT(XILINX_PCIE_INTR_ ##x) argument 46 IMR(MSI) | \ 76 /* Number of MSI IRQs */ 85 * struct xilinx_pl_dma_variant - PL DMA PCIe variant information 102 * struct pl_dma_pcie - PCIe port information 112 * @msi: MSI information 127 struct xilinx_msi msi; member [all …]
|
/linux-6.12.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 26 #include <asm/msi.h> 52 * 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, 36 * struct pci_epc_ops - set of function pointers for performing EPC operations 42 * @set_msi: ops to set the requested number of MSI interrupts in the MSI 44 * @get_msi: ops to get the number of MSI interrupts allocated by the RC from 45 * the MSI capability register 46 * @set_msix: ops to set the requested number of MSI-X interrupts in the 47 * MSI-X capability register 48 * @get_msix: ops to get the number of MSI-X interrupts allocated by the RC [all …]
|
/linux-6.12.1/arch/sparc/kernel/ |
D | pci_msi.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* pci_msi.c: Sparc64 MSI support common layer. 18 struct pci_pbm_info *pbm = msiq_cookie->pbm; in sparc64_msiq_interrupt() 19 unsigned long msiqid = msiq_cookie->msiqid; in sparc64_msiq_interrupt() 24 ops = pbm->msi_ops; in sparc64_msiq_interrupt() 26 err = ops->get_head(pbm, msiqid, &head); in sparc64_msiq_interrupt() 32 unsigned long msi; in sparc64_msiq_interrupt() local 34 err = ops->dequeue_msi(pbm, msiqid, &head, &msi); in sparc64_msiq_interrupt() 38 irq = pbm->msi_irq_table[msi - pbm->msi_first]; in sparc64_msiq_interrupt() 49 err = ops->set_head(pbm, msiqid, head); in sparc64_msiq_interrupt() [all …]
|
/linux-6.12.1/arch/powerpc/platforms/cell/ |
D | axon_msi.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 11 #include <linux/msi.h> 52 * To configure the FIFO size as (1 << n) bytes, we write (n - 15) into bits 53 * 8-9 of the MSIC control reg. 55 #define MSIC_CTRL_FIFO_SIZE (((MSIC_FIFO_SIZE_SHIFT - 15) << 8) & 0x300) 59 * the bounds of the FIFO. Also they should always be 16-byte aligned. 61 #define MSIC_FIFO_SIZE_MASK ((MSIC_FIFO_SIZE_BYTES - 1) & ~0xFu) 88 pr_devel("axon_msi: dcr_write(0x%x, 0x%x)\n", val, dcr_n); in msic_dcr_write() 90 dcr_write(msic->dcr_host, dcr_n, val); in msic_dcr_write() 97 u32 write_offset, msi; in axon_msi_cascade() local [all …]
|
/linux-6.12.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-6.12.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-6.12.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-6.12.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> 25 #include "pcie-mobiveil.h" 37 if ((bus->primary == to_pci_host_bridge(bus->bridge)->busnr) && (PCI_SLOT(devfn) > 0)) in mobiveil_pcie_valid_device() 44 * mobiveil_pcie_map_bus - routine to get the configuration base of either 50 struct mobiveil_pcie *pcie = bus->sysdata; in mobiveil_pcie_map_bus() 51 struct mobiveil_root_port *rp = &pcie->rp; in mobiveil_pcie_map_bus() 59 return pcie->csr_axi_slave_base + where; in mobiveil_pcie_map_bus() 67 value = bus->number << PAB_BUS_SHIFT | in mobiveil_pcie_map_bus() [all …]
|
/linux-6.12.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-6.12.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-6.12.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-6.12.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-6.12.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-6.12.1/drivers/net/ethernet/intel/ice/ |
D | ice_irq.c | 1 // SPDX-License-Identifier: GPL-2.0 9 * ice_init_irq_tracker - initialize interrupt tracker 18 pf->irq_tracker.num_entries = max_vectors; in ice_init_irq_tracker() 19 pf->irq_tracker.num_static = num_static; in ice_init_irq_tracker() 20 xa_init_flags(&pf->irq_tracker.entries, XA_FLAGS_ALLOC); in ice_init_irq_tracker() 24 * ice_deinit_irq_tracker - free xarray tracker 29 xa_destroy(&pf->irq_tracker.entries); in ice_deinit_irq_tracker() 33 * ice_free_irq_res - free a block of resources 41 entry = xa_erase(&pf->irq_tracker.entries, index); in ice_free_irq_res() 46 * ice_get_irq_res - get an interrupt resource [all …]
|
/linux-6.12.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
|