| /linux/drivers/net/ethernet/pensando/ionic/ |
| H A D | ionic_bus_pci.c | 51 struct ionic_dev_bar *bars; in ionic_map_bars() local 54 bars = ionic->bars; in ionic_map_bars() 60 bars[j].len = pci_resource_len(pdev, i); in ionic_map_bars() 64 bars[j].vaddr = NULL; in ionic_map_bars() 66 bars[j].vaddr = pci_iomap(pdev, i, bars[j].len); in ionic_map_bars() 67 if (!bars[j].vaddr) { in ionic_map_bars() 75 bars[j].bus_addr = pci_resource_start(pdev, i); in ionic_map_bars() 76 bars[j].res_index = i; in ionic_map_bars() 86 struct ionic_dev_bar *bars = ionic->bars; in ionic_unmap_bars() local 90 if (bars[i].vaddr) { in ionic_unmap_bars() [all …]
|
| /linux/drivers/net/ethernet/amd/pds_core/ |
| H A D | main.c | 39 struct pdsc_dev_bar *bars = pdsc->bars; in pdsc_unmap_bars() local 48 if (bars[i].vaddr) in pdsc_unmap_bars() 49 pci_iounmap(pdsc->pdev, bars[i].vaddr); in pdsc_unmap_bars() 50 bars[i].vaddr = NULL; in pdsc_unmap_bars() 56 struct pdsc_dev_bar *bar = pdsc->bars; in pdsc_map_bars() 59 struct pdsc_dev_bar *bars; in pdsc_map_bars() local 65 bars = pdsc->bars; in pdsc_map_bars() 68 * we need to poke into all the bars to find the set we're in pdsc_map_bars() 75 bars[j].len = pci_resource_len(pdev, i); in pdsc_map_bars() 76 bars[j].bus_addr = pci_resource_start(pdev, i); in pdsc_map_bars() [all …]
|
| /linux/Documentation/arch/powerpc/ |
| H A 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/tools/testing/selftests/vfio/lib/drivers/ioat/ |
| H A D | ioat.c | 33 return device->bars[0].vaddr + IOAT_CHANNEL_MMIO_SIZE; in ioat_channel_registers() 45 VFIO_ASSERT_NOT_NULL(device->bars[0].vaddr); in ioat_probe() 47 version = readb(device->bars[0].vaddr + IOAT_VER_OFFSET); in ioat_probe() 118 writeb(intrctrl, device->bars[0].vaddr + IOAT_INTRCTRL_OFFSET); in ioat_init() 124 1UL << readb(device->bars[0].vaddr + IOAT_XFERCAP_OFFSET); in ioat_init()
|
| /linux/drivers/accel/habanalabs/common/pci/ |
| H A D | pci.c | 23 * hl_pci_bars_map() - Map PCI BARs. 45 bar = i * 2; /* 64-bit BARs */ in hl_pci_bars_map() 61 bar = i * 2; /* 64-bit BARs */ in hl_pci_bars_map() 72 * hl_pci_bars_unmap() - Unmap PCI BARS. 75 * Release all PCI BARs and unmap their virtual addresses. 83 bar = i * 2; /* 64-bit BARs */ in hl_pci_bars_unmap() 374 * Set DMA masks, initialize the PCI controller and map the PCI BARs. 432 * Unmap PCI bars and disable PCI device.
|
| /linux/drivers/scsi/csiostor/ |
| H A D | csio_init.c | 184 * @bars: Bitmask of bars to be requested. 190 csio_pci_init(struct pci_dev *pdev, int *bars) in csio_pci_init() argument 194 *bars = pci_select_bars(pdev, IORESOURCE_MEM); in csio_pci_init() 199 if (pci_request_selected_regions(pdev, *bars, KBUILD_MODNAME)) in csio_pci_init() 217 pci_release_selected_regions(pdev, *bars); in csio_pci_init() 228 * @bars: Bars to be released. 232 csio_pci_exit(struct pci_dev *pdev, int *bars) in csio_pci_exit() argument 234 pci_release_selected_regions(pdev, *bars); in csio_pci_exit() 512 * Allocates HW structure, DMA, memory resources, maps BARS to 930 * - Allocates HW structure, DMA, memory resources, maps BARS to [all …]
|
| /linux/arch/powerpc/platforms/powernv/ |
| H A D | pci-sriov.c | 21 * For conventional PCI devices this isn't really an issue since PCI device BARs 29 * allocate the SR-IOV BARs in a way that lets us map them using the MBT. 45 * (num-vfs * num-sriov-bars) in total. To use a) we need the size of each segment 56 * At this point the device has been probed and the device's BARs are sized, 57 * but no resource allocations have been done. The SR-IOV BARs are sized 63 * sorts the BARs on a bus by their required alignment, which is calculated 109 * it only usable for devices with very large per-VF BARs. Such devices are 123 * us to support SR-IOV BARs in the 32bit MMIO window. This is useful since 215 /* Save ourselves some MMIO space by disabling the unusable BARs */ in pnv_pci_ioda_fixup_iov_resources() 258 * BARs would not be placed in the correct PE. in pnv_pci_iov_resource_alignment() [all …]
|
| H A D | pci.h | 228 /* Did we map the VF BAR with single-PE IODA BARs? */ 240 * SR-IOV BARs for this device. 245 * If we map the SR-IOV BARs with a segmented window then
|
| /linux/drivers/net/ethernet/netronome/nfp/nfpcore/ |
| H A 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 106 /* The number of explicit BARs to reserve. 149 int bars; member 347 /* We don't match explicit bars through the area interface */ in matching_bar() 372 for (n = 0; n < nfp->bars; n++) { in find_matching_bar() 390 for (n = 0; n < nfp->bars; n++) { in find_unused_bar_noblock() 519 /* Map all PCI bars and fetch the actual BAR configurations from the 566 snprintf(status_msg, sizeof(status_msg) - 1, "RESERVED BARs: "); in enable_bars() 575 /* Skip over BARs that are not IORESOURCE_MEM */ in enable_bars() [all …]
|
| /linux/drivers/ntb/hw/idt/ |
| H A 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
|
| /linux/Documentation/PCI/endpoint/ |
| H A D | pci-ntb-function.rst | 12 machine, expose memory ranges as BARs, and perform DMA. They also support 230 one is permitted. All these regions should be mapped to BARs for hosts to 248 be enough BARs for all the regions in a platform that supports only 64-bit 249 BARs. 252 packed and mapped to BARs in a way that provides NTB functionality and 269 With this scheme, for the basic NTB functionality 3 BARs should be sufficient. 339 space. Allocating and configuring BARs for doorbell and memory window1 348 is mapped to separate BARs.
|
| H A D | pci-vntb-function.rst | 103 32-bit BARs. 116 64-bit BARs.
|
| /linux/tools/testing/selftests/vfio/lib/drivers/dsa/ |
| H A D | dsa.c | 54 void *bar0 = device->bars[0].vaddr; in dsa_int_handle_request_required() 93 void *reg = device->bars[0].vaddr + IDXD_SWERR_OFFSET; in dsa_check_sw_err() 130 void *bar0 = device->bars[0].vaddr; in dsa_command() 198 void *bar0 = device->bars[0].vaddr; in dsa_register_cache_init() 318 iosubmit_cmds512(device->bars[2].vaddr, desc, 1); in dsa_memcpy_one()
|
| /linux/drivers/pci/ |
| H A D | setup-res.c | 35 /* Per SR-IOV spec 3.4.1.11, VF BARs are RO zero */ in pci_std_update_resource() 40 * Ignore resources for unimplemented BARs and unused resource slots in pci_std_update_resource() 41 * for 64 bit BARs. in pci_std_update_resource() 75 * Apparently some Matrox devices have ROM BARs that read in pci_std_update_resource() 76 * as zero when disabled, so don't update ROM BARs unless in pci_std_update_resource() 80 * disabled ROM can conflict with other BARs. in pci_std_update_resource()
|
| H A D | Kconfig | 87 re-allocate PCI resources if SR-IOV BARs have not been allocated by 218 BARs that are exposed in other devices that are the part of
|
| /linux/drivers/vdpa/solidrun/ |
| H A D | snet_vdpa.h | 143 /* PCI BARs */ 144 void __iomem *bars[PCI_STD_NUM_BARS]; member 170 return ioread32(psnet->bars[psnet->barno] + off); in psnet_read32()
|
| H A D | snet_main.c | 562 name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "psnet[%s]-bars", pci_name(pdev)); in psnet_open_pf_bar() 569 * Later, we will discover the BAR and unmap all other BARs. in psnet_open_pf_bar() 579 SNET_ERR(pdev, "Failed to request and map PCI BARs\n"); in psnet_open_pf_bar() 583 psnet->bars[i] = io; in psnet_open_pf_bar() 601 name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "snet[%s]-bars", pci_name(pdev)); in snet_open_vf_bar() 647 if (!psnet->bars[i]) in psnet_detect_bar() 650 if (ioread32(psnet->bars[i] + off) == SNET_SIGNATURE) in psnet_detect_bar() 664 if (psnet->bars[i] && i != psnet->barno) in psnet_unmap_unused_bars() 686 /* Save used BAR number and unmap all other BARs */ in psnet_read_cfg()
|
| /linux/arch/sparc/kernel/ |
| H A D | leon_pci_grpci2.c | 31 * - barcfgs : Custom Configuration of Host's 6 target BARs 79 unsigned int bars[6]; /* 0x20 read-only PCI BARs */ member 605 /* Setup the Host's PCI Target BARs for other peripherals to access, in grpci2_hw_init() 606 * and do DMA to the host's memory. The target BARs can be sized and in grpci2_hw_init() 609 * User may set custom target BARs, but default is: in grpci2_hw_init() 610 * The first BARs is used to map kernel low (DMA is part of normal in grpci2_hw_init() 612 * PCI bus, the other BARs are disabled. We assume that the first BAR in grpci2_hw_init() 617 /* Target BARs must have the proper alignment */ in grpci2_hw_init()
|
| /linux/tools/testing/selftests/vfio/lib/ |
| H A D | vfio_pci_device.c | 192 struct vfio_pci_bar *bar = &device->bars[index]; in vfio_pci_bar_map() 213 * larger alignment. BARs smaller than 1G will be aligned by their in vfio_pci_bar_map() 229 struct vfio_pci_bar *bar = &device->bars[index]; in vfio_pci_bar_unmap() 243 if (device->bars[i].vaddr) in vfio_pci_bar_unmap_all() 369 struct vfio_pci_bar *bar = device->bars + i; in vfio_pci_device_setup()
|
| /linux/Documentation/devicetree/bindings/i2c/ |
| H A 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/drivers/fpga/ |
| H A D | dfl-pci.c | 155 int dfl_res_off, i, bars, voff; in find_dfls_by_vsec() local 180 for (i = 0, bars = 0; i < dfl_cnt; i++, dfl_res_off += sizeof(u32)) { in find_dfls_by_vsec() 191 if (bars & BIT(bir)) { in find_dfls_by_vsec() 197 bars |= BIT(bir); in find_dfls_by_vsec()
|
| /linux/drivers/pci/endpoint/functions/ |
| H A D | pci-epf-ntb.c | 223 * BAR_MW4 for rest of the BARs of epf_ntb_epc that is connected to HOST1. This 231 * mapped to a single BAR (BAR2) above for 32-bit BARs. The exact BAR that's 729 * other BARs for peer scratchpad (because of 64-bit BARs or reserved BARs). 774 * other BARs for peer scratchpad (because of 64-bit BARs or reserved BARs). 845 * the default self scratchpad BAR, an NTB could have other BARs for self 846 * scratchpad (because of reserved BARs). This function can get the exact BAR 890 * NTB could have other BARs for self scratchpad (because of reserved BARs). 1222 * Clear doorbell and memory BARs (remove inbound ATU configuration). In the above 1423 * epf_ntb_db_mw_bar_init() - Configure Doorbell and Memory window BARs 1584 * epf_ntb_init_epc_bar_interface() - Identify BARs to be used for each of [all …]
|
| /linux/drivers/gpu/drm/tiny/ |
| H A D | Kconfig | 4 tristate "DRM support for Apple Touch Bars" 10 Say Y here if you want support for the display of Touch Bars on x86
|
| /linux/tools/testing/selftests/vfio/ |
| H A D | vfio_pci_device_test.c | 87 bar = &self->device->bars[i]; in TEST_F() 96 * BARs that support mmap() should be automatically mapped by in TEST_F()
|
| /linux/drivers/pci/hotplug/ |
| H A 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() 325 * This function configures the pci BARs of a single device. 355 for (count = 0; address[count]; count++) { /* for 6 BARs */ in configure_device() 631 for (count = 0; address[count]; count++) { /* for 2 BARs */ in configure_bridge() 786 /* for 2 BARs */ in configure_bridge() 1025 for (i = 0; i < 2; i++) { /* for 2 BARs */ in configure_bridge() [all …]
|