/Linux-v5.10/drivers/net/ethernet/pensando/ionic/ |
D | ionic_bus_pci.c | 50 struct ionic_dev_bar *bars; in ionic_map_bars() local 53 bars = ionic->bars; in ionic_map_bars() 59 bars[j].len = pci_resource_len(pdev, i); in ionic_map_bars() 63 bars[j].vaddr = NULL; in ionic_map_bars() 65 bars[j].vaddr = pci_iomap(pdev, i, bars[j].len); in ionic_map_bars() 66 if (!bars[j].vaddr) { in ionic_map_bars() 74 bars[j].bus_addr = pci_resource_start(pdev, i); in ionic_map_bars() 75 bars[j].res_index = i; in ionic_map_bars() 85 struct ionic_dev_bar *bars = ionic->bars; in ionic_unmap_bars() local 89 if (bars[i].vaddr) { in ionic_unmap_bars() [all …]
|
/Linux-v5.10/drivers/ide/ |
D | setup-pci.c | 26 * we succeed the BARs are ok and the controller is in PCI mode. 29 * FIXME: if we program the interface and then fail to set the BARS 182 * @bars: PCI BARs mask 193 static int ide_pci_enable(struct pci_dev *dev, int bars, in ide_pci_enable() argument 221 ret = pci_request_selected_regions(dev, bars, d->name); in ide_pci_enable() 331 printk(KERN_ERR "%s %s: bad PCI BARs for port %d, skipping\n", in ide_hw_configure() 396 * @bars: PCI BARs mask 405 static int ide_setup_pci_controller(struct pci_dev *dev, int bars, in ide_setup_pci_controller() argument 414 ret = ide_pci_enable(dev, bars, d); in ide_setup_pci_controller() 435 pci_release_selected_regions(dev, bars); in ide_setup_pci_controller() [all …]
|
/Linux-v5.10/Documentation/powerpc/ |
D | pci_iov_resource_on_powernv.rst | 107 scheme where individual function BARs can be "grouped" to fit in one or 127 for large BARs in 64-bit space: 156 PE" mode to overlay over specific BARs to work around some of that, for 157 example for devices with very large BARs, e.g., GPUs. It would make 170 PCI devices, but the BARs in VF config space headers are unusual. For 171 a non-VF device, software uses BARs in the config space header to 174 discover sizes and assign addresses. The BARs in the VF's config space 178 base address for all the corresponding VF(n) BARs. For example, if the 190 window with 1MB segments. VF BARs that are 1MB or larger could be 193 flexible, but it works best when all the VF BARs are the same size. If [all …]
|
/Linux-v5.10/arch/s390/pci/ |
D | pci.c | 296 idx = zdev->bars[bar].map_idx; in pci_iomap_range_fh() 315 iova = ioremap((unsigned long) zdev->bars[bar].mio_wt, barsize); in pci_iomap_range_mio() 345 iova = ioremap((unsigned long) zdev->bars[bar].mio_wb, barsize); in pci_iomap_wc_range_mio() 430 (resource_size_t __force) zdev->bars[i].mio_wt; in zpci_map_resources() 513 if (!zdev->bars[i].size) in zpci_setup_bus_resources() 518 zdev->bars[i].map_idx = entry; in zpci_setup_bus_resources() 522 if (zdev->bars[i].val & 8) in zpci_setup_bus_resources() 524 if (zdev->bars[i].val & 4) in zpci_setup_bus_resources() 528 addr = (unsigned long) zdev->bars[i].mio_wt; in zpci_setup_bus_resources() 531 size = 1UL << zdev->bars[i].size; in zpci_setup_bus_resources() [all …]
|
/Linux-v5.10/drivers/misc/habanalabs/common/ |
D | pci.c | 21 * hl_pci_bars_map() - Map PCI BARs. 43 bar = i * 2; /* 64-bit BARs */ in hl_pci_bars_map() 59 bar = i * 2; /* 64-bit BARs */ in hl_pci_bars_map() 70 * hl_pci_bars_unmap() - Unmap PCI BARS. 73 * Release all PCI BARs and unmap their virtual addresses. 81 bar = i * 2; /* 64-bit BARs */ in hl_pci_bars_unmap() 346 * Set DMA masks, initialize the PCI controller and map the PCI BARs. 369 dev_err(hdev->dev, "Failed to initialize PCI BARs\n"); in hl_pci_init() 407 * Unmap PCI bars and disable PCI device.
|
/Linux-v5.10/drivers/mfd/ |
D | sta2x11-mfd.c | 520 struct sta2x11_mfd_bar_setup_data bars[2]; member 529 .bars = { 542 .bars = { 559 for (i = 0; i < ARRAY_SIZE(sd->bars); i++) in sta2x11_mfd_setup() 560 for (j = 0; j < sd->bars[i].ncells; j++) { in sta2x11_mfd_setup() 561 sd->bars[i].cells[j].pdata_size = sizeof(pdev); in sta2x11_mfd_setup() 562 sd->bars[i].cells[j].platform_data = &pdev; in sta2x11_mfd_setup() 595 /* Just 2 bars for all mfd's at present */ in sta2x11_mfd_probe() 598 setup_data->bars[i].cells, in sta2x11_mfd_probe() 599 setup_data->bars[i].ncells, in sta2x11_mfd_probe()
|
/Linux-v5.10/drivers/scsi/csiostor/ |
D | csio_init.c | 185 * @bars: Bitmask of bars to be requested. 191 csio_pci_init(struct pci_dev *pdev, int *bars) in csio_pci_init() argument 195 *bars = pci_select_bars(pdev, IORESOURCE_MEM); in csio_pci_init() 200 if (pci_request_selected_regions(pdev, *bars, KBUILD_MODNAME)) in csio_pci_init() 218 pci_release_selected_regions(pdev, *bars); in csio_pci_init() 229 * @bars: Bars to be released. 233 csio_pci_exit(struct pci_dev *pdev, int *bars) in csio_pci_exit() argument 235 pci_release_selected_regions(pdev, *bars); in csio_pci_exit() 513 * Allocates HW structure, DMA, memory resources, maps BARS to 930 * - Allocates HW structure, DMA, memory resources, maps BARS to [all …]
|
/Linux-v5.10/arch/powerpc/platforms/powernv/ |
D | pci-sriov.c | 24 * For conventional PCI devices this isn't really an issue since PCI device BARs 32 * allocate the SR-IOV BARs in a way that lets us map them using the MBT. 48 * (num-vfs * num-sriov-bars) in total. To use a) we need the size of each segment 59 * At this point the device has been probed and the device's BARs are sized, 60 * but no resource allocations have been done. The SR-IOV BARs are sized 66 * sorts the BARs on a bus by their required alignment, which is calculated 112 * it only usable for devices with very large per-VF BARs. Such devices are 126 * us to support SR-IOV BARs in the 32bit MMIO window. This is useful since 218 /* Save ourselves some MMIO space by disabling the unusable BARs */ in pnv_pci_ioda_fixup_iov_resources() 264 * BARs would not be placed in the correct PE. in pnv_pci_iov_resource_alignment() [all …]
|
D | pci.h | 243 /* Did we map the VF BAR with single-PE IODA BARs? */ 255 * SR-IOV BARs for this device. 260 * If we map the SR-IOV BARs with a segmented window then
|
/Linux-v5.10/drivers/net/ethernet/netronome/nfp/nfpcore/ |
D | nfp6000_pcie.c | 10 * Multiplexes the NFP BARs between NFP internal resources and 13 * The BARs are managed with refcounts and are allocated/acquired 109 /* The number of explicit BARs to reserve. 151 int bars; member 352 /* We don't match explicit bars through the area interface */ in matching_bar() 377 for (n = 0; n < nfp->bars; n++) { in find_matching_bar() 395 for (n = 0; n < nfp->bars; n++) { in find_unused_bar_noblock() 524 /* Map all PCI bars and fetch the actual BAR configurations from the 569 snprintf(status_msg, sizeof(status_msg) - 1, "RESERVED BARs: "); in enable_bars() 578 /* Skip over BARs that are not IORESOURCE_MEM */ in enable_bars() [all …]
|
/Linux-v5.10/lib/ |
D | devres.c | 404 * pcim_iomap_regions - Request and iomap PCI BARs 406 * @mask: Mask of BARs to request and iomap 457 * pcim_iomap_regions_request_all - Request all BARs and iomap specified ones 459 * @mask: Mask of BARs to iomap 462 * Request all PCI BARs and iomap regions specified by @mask. 482 * pcim_iounmap_regions - Unmap and release PCI BARs 484 * @mask: Mask of BARs to unmap and release
|
/Linux-v5.10/drivers/ntb/hw/idt/ |
D | Kconfig | 18 and SWPORTxCTL registers). Then all NT-function BARs must be enabled 19 with chosen valid aperture. For memory windows related BARs the
|
D | ntb_hw_idt.h | 972 * @IDT_BAR_CNT: Number of BARs of each port 1184 * @bars: BARs related registers 1188 struct idt_ntb_bar bars[IDT_BAR_CNT]; member 1201 * @bars: BARs related registers 1211 struct idt_ntb_bar bars[IDT_BAR_CNT]; member
|
/Linux-v5.10/drivers/infiniband/hw/efa/ |
D | efa_main.c | 141 int bars; in efa_request_doorbell_bar() local 145 bars = pci_select_bars(pdev, IORESOURCE_MEM) & BIT(db_bar_idx); in efa_request_doorbell_bar() 147 err = pci_request_selected_regions(pdev, bars, DRV_MODULE_NAME); in efa_request_doorbell_bar() 429 int bars; in efa_probe_device() local 453 bars = pci_select_bars(pdev, IORESOURCE_MEM) & EFA_BASE_BAR_MASK; in efa_probe_device() 454 err = pci_request_selected_regions(pdev, bars, DRV_MODULE_NAME); in efa_probe_device()
|
/Linux-v5.10/Documentation/devicetree/bindings/i2c/ |
D | i2c-pxa-pci-ce4100.txt | 5 PCI device has three PCI-bars, each bar contains a complete I2C 20 1:1 mapped to the BARs, and the second is the
|
/Linux-v5.10/arch/sparc/kernel/ |
D | leon_pci_grpci2.c | 29 * - barcfgs : Custom Configuration of Host's 6 target BARs 77 unsigned int bars[6]; /* 0x20 read-only PCI BARs */ member 603 /* Setup the Host's PCI Target BARs for other peripherals to access, in grpci2_hw_init() 604 * and do DMA to the host's memory. The target BARs can be sized and in grpci2_hw_init() 607 * User may set custom target BARs, but default is: in grpci2_hw_init() 608 * The first BARs is used to map kernel low (DMA is part of normal in grpci2_hw_init() 610 * PCI bus, the other BARs are disabled. We assume that the first BAR in grpci2_hw_init() 615 /* Target BARs must have the proper alignment */ in grpci2_hw_init()
|
/Linux-v5.10/drivers/pci/ |
D | setup-res.c | 34 /* Per SR-IOV spec 3.4.1.11, VF BARs are RO zero */ in pci_std_update_resource() 39 * Ignore resources for unimplemented BARs and unused resource slots in pci_std_update_resource() 40 * for 64 bit BARs. in pci_std_update_resource() 74 * Apparently some Matrox devices have ROM BARs that read in pci_std_update_resource() 75 * as zero when disabled, so don't update ROM BARs unless in pci_std_update_resource()
|
D | pci.c | 744 * Goes over standard PCI resources (BARs) and checks if the given resource 922 * @dev: PCI device to have its BARs restored 1100 * restore at least the BARs so that the device will be in pci_raw_set_power_state() 1613 /* Restore BARs before the command register. */ in pci_restore_config_space() 1795 int __weak pcibios_enable_device(struct pci_dev *dev, int bars) in pcibios_enable_device() argument 1797 return pci_enable_resources(dev, bars); in pcibios_enable_device() 1800 static int do_pci_enable_device(struct pci_dev *dev, int bars) in do_pci_enable_device() argument 1815 err = pcibios_enable_device(dev, bars); in do_pci_enable_device() 1875 int i, bars = 0; in pci_enable_device_flags() local 1899 bars |= (1 << i); in pci_enable_device_flags() [all …]
|
D | Kconfig | 87 re-allocate PCI resources if SR-IOV BARs have not been allocated by 170 BARs that are exposed in other devices that are the part of
|
/Linux-v5.10/drivers/gpu/drm/i915/gvt/ |
D | cfg_space.c | 242 struct intel_vgpu_pci_bar *bars = vgpu->cfg_space.bar; in emulate_pci_bar_write() local 255 size = ~(bars[INTEL_GVT_PCI_BAR_GTTMMIO].size -1); in emulate_pci_bar_write() 266 size = ~(bars[INTEL_GVT_PCI_BAR_APERTURE].size -1); in emulate_pci_bar_write() 272 /* Unimplemented BARs */ in emulate_pci_bar_write()
|
/Linux-v5.10/Documentation/networking/device_drivers/ethernet/google/ |
D | gve.rst | 28 PCI Bars 30 The gVNIC PCI device exposes three 32-bit memory BARS:
|
/Linux-v5.10/arch/arm/mach-iop32x/ |
D | hardware.h | 14 * 0x90000000. The PCI BARs must be programmed with physical addresses,
|
/Linux-v5.10/include/linux/ |
D | 8250_pci.h | 13 /* Use successive BARs (PCI base address registers),
|
/Linux-v5.10/drivers/pci/hotplug/ |
D | ibmphp_pci.c | 136 /* We need to do this in case some other BARs were properly inserted */ in ibmphp_configure_card() 149 /* We need to do this in case some other BARs were properly inserted */ in ibmphp_configure_card() 181 /* We need to do this in case some other BARs were properly inserted */ in ibmphp_configure_card() 250 /* We need to do this in case some other BARs were properly inserted */ in ibmphp_configure_card() 283 /* We need to do this in case some other BARs were properly inserted */ in ibmphp_configure_card() 326 * This function configures the pci BARs of a single device. 356 for (count = 0; address[count]; count++) { /* for 6 BARs */ in configure_device() 632 for (count = 0; address[count]; count++) { /* for 2 BARs */ in configure_bridge() 787 /* for 2 BARs */ in configure_bridge() 1026 for (i = 0; i < 2; i++) { /* for 2 BARs */ in configure_bridge() [all …]
|
/Linux-v5.10/drivers/vfio/pci/ |
D | vfio_pci_rdwr.c | 95 * leftover space for ROM BARs. 256 * filling large ROM BARs much faster. in vfio_pci_bar_rw() 421 /* Only support ioeventfds into BARs */ in vfio_pci_ioeventfd()
|