| /kernel/linux/linux-5.10/drivers/pci/ |
| D | ecam.c | 1 // SPDX-License-Identifier: GPL-2.0 11 #include <linux/pci-ecam.h> 15 * On 64-bit systems, we do a single ioremap for the whole config space 16 * since we have enough virtual address range available. On 32-bit, we 17 * ioremap the config space for each bus individually. 22 * Create a PCI config space window 23 * - reserve mem region 24 * - alloc struct pci_config_window with space for all mappings 25 * - ioremap the config space 31 struct pci_config_window *cfg; in pci_ecam_create() local [all …]
|
| /kernel/linux/linux-6.6/drivers/pci/ |
| D | ecam.c | 1 // SPDX-License-Identifier: GPL-2.0 11 #include <linux/pci-ecam.h> 15 * On 64-bit systems, we do a single ioremap for the whole config space 16 * since we have enough virtual address range available. On 32-bit, we 17 * ioremap the config space for each bus individually. 22 * Create a PCI config space window 23 * - reserve mem region 24 * - alloc struct pci_config_window with space for all mappings 25 * - ioremap the config space 31 unsigned int bus_shift = ops->bus_shift; in pci_ecam_create() [all …]
|
| /kernel/linux/linux-5.10/arch/x86/pci/ |
| D | mmconfig_64.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * mmconfig.c - Low-level direct PCI config space access via MMCONFIG 6 * space mapped. This allows lockless config space operation. 21 struct pci_mmcfg_region *cfg = pci_mmconfig_lookup(seg, bus); in pci_dev_base() local 23 if (cfg && cfg->virt) in pci_dev_base() 24 return cfg->virt + (PCI_MMCFG_BUS_OFFSET(bus) | (devfn << 12)); in pci_dev_base() 33 /* Why do we have this when nobody checks it. How about a BUG()!? -AK */ in pci_mmcfg_read() 35 err: *value = -1; in pci_mmcfg_read() 36 return -EINVAL; in pci_mmcfg_read() 67 /* Why do we have this when nobody checks it. How about a BUG()!? -AK */ in pci_mmcfg_write() [all …]
|
| D | mmconfig_32.c | 1 // SPDX-License-Identifier: GPL-2.0-only 8 * mmconfig.c - Low-level direct PCI config space access via MMCONFIG 25 * Functions for accessing PCI configuration space with MMCONFIG accesses 29 struct pci_mmcfg_region *cfg = pci_mmconfig_lookup(seg, bus); in get_base_addr() local 31 if (cfg) in get_base_addr() 32 return cfg->address; in get_base_addr() 58 err: *value = -1; in pci_mmcfg_read() 59 return -EINVAL; in pci_mmcfg_read() 97 return -EINVAL; in pci_mmcfg_write() 103 return -EINVAL; in pci_mmcfg_write() [all …]
|
| /kernel/linux/linux-6.6/arch/x86/pci/ |
| D | mmconfig_64.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * mmconfig.c - Low-level direct PCI config space access via MMCONFIG 6 * space mapped. This allows lockless config space operation. 21 struct pci_mmcfg_region *cfg = pci_mmconfig_lookup(seg, bus); in pci_dev_base() local 23 if (cfg && cfg->virt) in pci_dev_base() 24 return cfg->virt + (PCI_MMCFG_BUS_OFFSET(bus) | (devfn << 12)); in pci_dev_base() 33 /* Why do we have this when nobody checks it. How about a BUG()!? -AK */ in pci_mmcfg_read() 35 err: *value = -1; in pci_mmcfg_read() 36 return -EINVAL; in pci_mmcfg_read() 67 /* Why do we have this when nobody checks it. How about a BUG()!? -AK */ in pci_mmcfg_write() [all …]
|
| D | mmconfig_32.c | 1 // SPDX-License-Identifier: GPL-2.0-only 8 * mmconfig.c - Low-level direct PCI config space access via MMCONFIG 25 * Functions for accessing PCI configuration space with MMCONFIG accesses 29 struct pci_mmcfg_region *cfg = pci_mmconfig_lookup(seg, bus); in get_base_addr() local 31 if (cfg) in get_base_addr() 32 return cfg->address; in get_base_addr() 58 err: *value = -1; in pci_mmcfg_read() 59 return -EINVAL; in pci_mmcfg_read() 97 return -EINVAL; in pci_mmcfg_write() 103 return -EINVAL; in pci_mmcfg_write() [all …]
|
| /kernel/linux/linux-6.6/arch/loongarch/pci/ |
| D | acpi.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (C) 2020-2022 Loongson Technology Corporation Limited 10 #include <linux/pci-acpi.h> 11 #include <linux/pci-ecam.h> 19 struct pci_config_window *cfg; member 30 struct device *bus_dev = &bridge->bus->dev; in pcibios_root_bridge_prepare() 31 struct pci_config_window *cfg = bridge->bus->sysdata; in pcibios_root_bridge_prepare() local 34 adev = to_acpi_device(cfg->parent); in pcibios_root_bridge_prepare() 36 ACPI_COMPANION_SET(&bridge->dev, adev); in pcibios_root_bridge_prepare() 37 set_dev_node(bus_dev, pa_to_nid(cfg->res.start)); in pcibios_root_bridge_prepare() [all …]
|
| /kernel/linux/linux-5.10/arch/loongarch/pci/ |
| D | acpi.c | 1 // SPDX-License-Identifier: GPL-2.0 11 #include <linux/pci-acpi.h> 12 #include <linux/pci-ecam.h> 20 struct pci_config_window *cfg; member 30 struct pci_config_window *cfg = bridge->bus->sysdata; in pcibios_root_bridge_prepare() local 31 struct acpi_device *adev = to_acpi_device(cfg->parent); in pcibios_root_bridge_prepare() 32 struct device *bus_dev = &bridge->bus->dev; in pcibios_root_bridge_prepare() 34 ACPI_COMPANION_SET(&bridge->dev, adev); in pcibios_root_bridge_prepare() 35 set_dev_node(bus_dev, pa_to_nid(cfg->res.start)); in pcibios_root_bridge_prepare() 42 struct pci_config_window *cfg = bus->sysdata; in acpi_pci_bus_find_domain_nr() local [all …]
|
| /kernel/linux/linux-6.6/arch/arm64/kernel/ |
| D | pci.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Code borrowed from powerpc/kernel/pci-common.c 15 #include <linux/pci-acpi.h> 16 #include <linux/pci-ecam.h> 33 * raw_pci_read/write - Platform-specific PCI config space access. 42 return b->ops->read(b, devfn, reg, len, val); in raw_pci_read() 52 return b->ops->write(b, devfn, reg, len, val); in raw_pci_write() 59 return dev_to_node(&bus->dev); in pcibus_to_node() 69 struct pci_config_window *cfg; /* config space mapping */ member 74 struct pci_config_window *cfg = bus->sysdata; in acpi_pci_bus_find_domain_nr() local [all …]
|
| /kernel/linux/linux-5.10/arch/arm64/kernel/ |
| D | pci.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Code borrowed from powerpc/kernel/pci-common.c 17 #include <linux/pci-acpi.h> 18 #include <linux/pci-ecam.h> 35 * raw_pci_read/write - Platform-specific PCI config space access. 44 return b->ops->read(b, devfn, reg, len, val); in raw_pci_read() 54 return b->ops->write(b, devfn, reg, len, val); in raw_pci_write() 61 return dev_to_node(&bus->dev); in pcibus_to_node() 71 struct pci_config_window *cfg; /* config space mapping */ member 76 struct pci_config_window *cfg = bus->sysdata; in acpi_pci_bus_find_domain_nr() local [all …]
|
| /kernel/linux/linux-6.6/net/core/ |
| D | dev_ioctl.c | 1 // SPDX-License-Identifier: GPL-2.0 24 * match. --pb 29 ifr->ifr_name[IFNAMSIZ-1] = 0; in dev_ifname() 30 return netdev_get_name(net, ifr->ifr_name, ifr->ifr_ifindex); in dev_ifname() 50 return -EFAULT; in dev_ifconf() 59 return -EFAULT; in dev_ifconf() 73 len - total, size); in dev_ifconf() 76 return -EFAULT; in dev_ifconf() 82 return put_user(total, &uifc->ifc_len); in dev_ifconf() 87 struct ifmap *ifmap = &ifr->ifr_map; in dev_getifmap() [all …]
|
| /kernel/linux/linux-5.10/arch/sparc/kernel/ |
| D | leon_pci_grpci1.c | 1 // SPDX-License-Identifier: GPL-2.0 31 /* Enable/Disable Debugging Configuration Space Access */ 107 struct grpci1_priv *priv = dev->bus->sysdata; in grpci1_map_irq() 112 pin = ((pin - 1) + irq_group) & 0x3; in grpci1_map_irq() 114 return priv->irq_map[pin]; in grpci1_map_irq() 120 u32 *pci_conf, tmp, cfg; in grpci1_cfg_r32() local 123 return -EINVAL; in grpci1_cfg_r32() 133 cfg = REGLOAD(priv->regs->cfg_stat); in grpci1_cfg_r32() 134 REGSTORE(priv->regs->cfg_stat, (cfg & ~(0xf << 23)) | (bus << 23)); in grpci1_cfg_r32() 137 pci_conf = (u32 *) (priv->pci_conf | (devfn << 8) | (where & 0xfc)); in grpci1_cfg_r32() [all …]
|
| /kernel/linux/linux-6.6/arch/sparc/kernel/ |
| D | leon_pci_grpci1.c | 1 // SPDX-License-Identifier: GPL-2.0 32 /* Enable/Disable Debugging Configuration Space Access */ 108 struct grpci1_priv *priv = dev->bus->sysdata; in grpci1_map_irq() 113 pin = ((pin - 1) + irq_group) & 0x3; in grpci1_map_irq() 115 return priv->irq_map[pin]; in grpci1_map_irq() 121 u32 *pci_conf, tmp, cfg; in grpci1_cfg_r32() local 124 return -EINVAL; in grpci1_cfg_r32() 134 cfg = REGLOAD(priv->regs->cfg_stat); in grpci1_cfg_r32() 135 REGSTORE(priv->regs->cfg_stat, (cfg & ~(0xf << 23)) | (bus << 23)); in grpci1_cfg_r32() 138 pci_conf = (u32 *) (priv->pci_conf | (devfn << 8) | (where & 0xfc)); in grpci1_cfg_r32() [all …]
|
| /kernel/linux/linux-6.6/drivers/net/ethernet/netronome/nfp/crypto/ |
| D | ipsec.c | 1 // SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 92 struct nfp_ipsec_aesgcm { /* AES-GCM-ESP fields */ 135 unsigned int offset = nn->tlv_caps.mbox_off + NFP_NET_CFG_MBOX_SIMPLE_VAL; in nfp_net_ipsec_cfg() 136 struct nfp_ipsec_cfg_mssg *msg = (struct nfp_ipsec_cfg_mssg *)entry->msg; in nfp_net_ipsec_cfg() 143 msg_size = ARRAY_SIZE(msg->raw); in nfp_net_ipsec_cfg() 145 nn_writel(nn, offset + 4 * i, msg->raw[i]); in nfp_net_ipsec_cfg() 147 ret = nfp_net_mbox_reconfig(nn, entry->cmd); in nfp_net_ipsec_cfg() 155 msg->raw[i] = nn_readl(nn, offset + 4 * i); in nfp_net_ipsec_cfg() 159 switch (msg->rsp) { in nfp_net_ipsec_cfg() 163 return -EINVAL; in nfp_net_ipsec_cfg() [all …]
|
| /kernel/linux/linux-5.10/drivers/pci/controller/ |
| D | pcie-rockchip-ep.c | 1 // SPDX-License-Identifier: GPL-2.0+ 7 * Author: Shawn Lin <shawn.lin@rock-chips.com> 8 * Simon Xue <xxm@rock-chips.com> 15 #include <linux/pci-epc.h> 17 #include <linux/pci-epf.h> 20 #include "pcie-rockchip.h" 23 * struct rockchip_pcie_ep - private data for PCIe endpoint controller driver 31 * @irq_cpu_addr: base address in the CPU space where a write access triggers 74 u64 sz = 1ULL << fls64(size - 1); in rockchip_pcie_prog_ep_ob_atu() 83 cpu_addr -= rockchip->mem_res->start; in rockchip_pcie_prog_ep_ob_atu() [all …]
|
| D | pci-host-common.c | 1 // SPDX-License-Identifier: GPL-2.0 15 #include <linux/pci-ecam.h> 29 struct pci_config_window *cfg; in gen_pci_init() local 31 err = of_address_to_resource(dev->of_node, 0, &cfgres); in gen_pci_init() 37 bus = resource_list_first_type(&bridge->windows, IORESOURCE_BUS); in gen_pci_init() 39 return ERR_PTR(-ENODEV); in gen_pci_init() 41 cfg = pci_ecam_create(dev, &cfgres, bus->res, ops); in gen_pci_init() 42 if (IS_ERR(cfg)) in gen_pci_init() 43 return cfg; in gen_pci_init() 45 err = devm_add_action_or_reset(dev, gen_pci_unmap_cfg, cfg); in gen_pci_init() [all …]
|
| /kernel/linux/linux-6.6/include/linux/ |
| D | net_tstamp.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 14 * struct kernel_hwtstamp_config - Kernel copy of struct hwtstamp_config 22 * copied the ioctl request back to user space 26 * Prefer using this structure for in-kernel processing of hardware 40 const struct hwtstamp_config *cfg) in hwtstamp_config_to_kernel() argument 42 kernel_cfg->flags = cfg->flags; in hwtstamp_config_to_kernel() 43 kernel_cfg->tx_type = cfg->tx_type; in hwtstamp_config_to_kernel() 44 kernel_cfg->rx_filter = cfg->rx_filter; in hwtstamp_config_to_kernel() 47 static inline void hwtstamp_config_from_kernel(struct hwtstamp_config *cfg, in hwtstamp_config_from_kernel() argument 50 cfg->flags = kernel_cfg->flags; in hwtstamp_config_from_kernel() [all …]
|
| /kernel/linux/linux-6.6/drivers/pci/controller/ |
| D | pci-host-common.c | 1 // SPDX-License-Identifier: GPL-2.0 15 #include <linux/pci-ecam.h> 29 struct pci_config_window *cfg; in gen_pci_init() local 31 err = of_address_to_resource(dev->of_node, 0, &cfgres); in gen_pci_init() 37 bus = resource_list_first_type(&bridge->windows, IORESOURCE_BUS); in gen_pci_init() 39 return ERR_PTR(-ENODEV); in gen_pci_init() 41 cfg = pci_ecam_create(dev, &cfgres, bus->res, ops); in gen_pci_init() 42 if (IS_ERR(cfg)) in gen_pci_init() 43 return cfg; in gen_pci_init() 45 err = devm_add_action_or_reset(dev, gen_pci_unmap_cfg, cfg); in gen_pci_init() [all …]
|
| /kernel/linux/linux-6.6/drivers/phy/qualcomm/ |
| D | phy-qcom-qmp-pcie-msm8996.c | 1 // SPDX-License-Identifier: GPL-2.0 7 #include <linux/clk-provider.h> 22 #include "phy-qcom-qmp.h" 66 /* set of registers with offsets different per-PHY */ 169 /* struct qmp_phy_cfg - per-PHY initialization config */ 174 /* Init sequence for PHY blocks - serdes, tx, rx, pcs */ 199 * struct qmp_phy - per-lane phy descriptor 202 * @cfg: phy specific configuration 203 * @serdes: iomapped memory space for phy's serdes (i.e. PLL) 204 * @tx: iomapped memory space for lane's tx [all …]
|
| /kernel/linux/linux-5.10/drivers/tty/ |
| D | mips_ejtag_fdc.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright (C) 2007-2015 Imagination Technologies Ltd 80 * and space becoming available in TX FIFO. 87 * struct mips_ejtag_fdc_tty_port - Wrapper struct for FDC tty_port. 117 * struct mips_ejtag_fdc_tty - Driver data for FDC as a whole. 123 * @ports: Per-channel data. 124 * @waitqueue: Wait queue for waiting for TX data, or for space in TX 133 * @xmit_full: Indicates TX FIFO is full, we're waiting for space. 174 __raw_writel(data, priv->reg + offs); in mips_ejtag_fdc_write() 180 return __raw_readl(priv->reg + offs); in mips_ejtag_fdc_read() [all …]
|
| /kernel/linux/linux-6.6/drivers/tty/ |
| D | mips_ejtag_fdc.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright (C) 2007-2015 Imagination Technologies Ltd 80 * and space becoming available in TX FIFO. 87 * struct mips_ejtag_fdc_tty_port - Wrapper struct for FDC tty_port. 117 * struct mips_ejtag_fdc_tty - Driver data for FDC as a whole. 123 * @ports: Per-channel data. 124 * @waitqueue: Wait queue for waiting for TX data, or for space in TX 133 * @xmit_full: Indicates TX FIFO is full, we're waiting for space. 174 __raw_writel(data, priv->reg + offs); in mips_ejtag_fdc_write() 180 return __raw_readl(priv->reg + offs); in mips_ejtag_fdc_read() [all …]
|
| /kernel/linux/linux-6.6/rust/alloc/ |
| D | raw_vec.rs | 1 // SPDX-License-Identifier: Apache-2.0 OR MIT 12 #[cfg(not(no_global_oom_handling))] 19 #[cfg(test)] 30 /// A low-level utility for more ergonomically allocating, reallocating, and deallocating 35 /// * Produces `Unique::dangling()` on zero-sized types. 36 /// * Produces `Unique::dangling()` on zero-length allocations. 39 /// * Guards against 32-bit systems allocating more than isize::MAX bytes. 49 /// Note that the excess of a zero-sized types is always infinite, so `capacity()` always returns 50 /// `usize::MAX`. This means that you need to be careful when round-tripping this type with a 64 /// that would truly const-call something unstable. [all …]
|
| /kernel/linux/linux-6.6/drivers/scsi/cxlflash/ |
| D | vlun.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 27 * marshal_virt_to_resize() - translate uvirtual to resize structure 34 resize->hdr = virt->hdr; in marshal_virt_to_resize() 35 resize->context_id = virt->context_id; in marshal_virt_to_resize() 36 resize->rsrc_handle = virt->rsrc_handle; in marshal_virt_to_resize() 37 resize->req_size = virt->lun_size; in marshal_virt_to_resize() 38 resize->last_lba = virt->last_lba; in marshal_virt_to_resize() 42 * marshal_clone_to_rele() - translate clone to release structure 49 release->hdr = clone->hdr; in marshal_clone_to_rele() 50 release->context_id = clone->context_id_dst; in marshal_clone_to_rele() [all …]
|
| /kernel/linux/linux-5.10/drivers/scsi/cxlflash/ |
| D | vlun.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 27 * marshal_virt_to_resize() - translate uvirtual to resize structure 34 resize->hdr = virt->hdr; in marshal_virt_to_resize() 35 resize->context_id = virt->context_id; in marshal_virt_to_resize() 36 resize->rsrc_handle = virt->rsrc_handle; in marshal_virt_to_resize() 37 resize->req_size = virt->lun_size; in marshal_virt_to_resize() 38 resize->last_lba = virt->last_lba; in marshal_virt_to_resize() 42 * marshal_clone_to_rele() - translate clone to release structure 49 release->hdr = clone->hdr; in marshal_clone_to_rele() 50 release->context_id = clone->context_id_dst; in marshal_clone_to_rele() [all …]
|
| /kernel/linux/linux-6.6/drivers/virtio/ |
| D | virtio_pci_modern_dev.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 9 * vp_modern_map_capability - map a part of virtio pci capability 10 * @mdev: the modern virtio-pci device 26 struct pci_dev *dev = mdev->pci_dev; in vp_modern_map_capability() 40 if (bar >= PCI_STD_NUM_BARS || !(mdev->modern_bars & (1 << bar))) { in vp_modern_map_capability() 41 dev_err(&dev->dev, in vp_modern_map_capability() 47 dev_err(&dev->dev, in vp_modern_map_capability() 53 if (length - start < minlen) { in vp_modern_map_capability() 54 dev_err(&dev->dev, in vp_modern_map_capability() 60 length -= start; in vp_modern_map_capability() [all …]
|