Home
last modified time | relevance | path

Searched full:bars (Results 1 – 25 of 183) sorted by relevance

12345678

/linux/drivers/net/ethernet/pensando/ionic/
H A Dionic_bus_pci.c51 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 Dmain.c37 struct pdsc_dev_bar *bars = pdsc->bars; in pdsc_unmap_bars() local
46 if (bars[i].vaddr) in pdsc_unmap_bars()
47 pci_iounmap(pdsc->pdev, bars[i].vaddr); in pdsc_unmap_bars()
48 bars[i].vaddr = NULL; in pdsc_unmap_bars()
54 struct pdsc_dev_bar *bar = pdsc->bars; in pdsc_map_bars()
57 struct pdsc_dev_bar *bars; in pdsc_map_bars() local
63 bars = pdsc->bars; in pdsc_map_bars()
66 * we need to poke into all the bars to find the set we're in pdsc_map_bars()
73 bars[j].len = pci_resource_len(pdev, i); in pdsc_map_bars()
74 bars[j].bus_addr = pci_resource_start(pdev, i); in pdsc_map_bars()
[all …]
/linux/Documentation/arch/powerpc/
H A Dpci_iov_resource_on_powernv.rst107 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 Dioat.c33 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/scsi/csiostor/
H A Dcsio_init.c184 * @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/drivers/accel/habanalabs/common/pci/
H A Dpci.c23 * 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/net/ethernet/netronome/nfp/nfpcore/
H A Dnfp6000_pcie.c10 * 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/arch/powerpc/platforms/powernv/
H A Dpci-sriov.c21 * 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 …]
/linux/Documentation/PCI/endpoint/
H A Dpci-ntb-function.rst12 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 Dpci-vntb-function.rst103 32-bit BARs.
116 64-bit BARs.
/linux/drivers/ntb/hw/idt/
H A DKconfig18 and SWPORTxCTL registers). Then all NT-function BARs must be enabled
19 with chosen valid aperture. For memory windows related BARs the
H A Dntb_hw_idt.h972 * @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/tools/testing/selftests/vfio/lib/
H A Dvfio_pci_device.c131 struct vfio_pci_bar *bar = &device->bars[index]; in vfio_pci_bar_map()
152 * larger alignment. BARs smaller than 1G will be aligned by their in vfio_pci_bar_map()
168 struct vfio_pci_bar *bar = &device->bars[index]; in vfio_pci_bar_unmap()
182 if (device->bars[i].vaddr) in vfio_pci_bar_unmap_all()
281 struct vfio_pci_bar *bar = device->bars + i; in vfio_pci_device_setup()
/linux/drivers/pci/
H A Dsetup-res.c35 /* 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 Dpci.c773 * Goes over standard PCI resources (BARs) and checks if the given resource
1050 * @dev: PCI device to have its BARs restored
1292 * restore the device's BARs subsequently (1 is returned in that case).
1363 * to confirm the state change, restore its BARs if they might be lost and
1399 * restore at least the BARs so that the device will be in pci_set_full_power_state()
1806 /* Restore BARs before the command register. */ in pci_restore_config_space()
1954 int __weak pcibios_enable_device(struct pci_dev *dev, int bars) in pcibios_enable_device() argument
1956 return pci_enable_resources(dev, bars); in pcibios_enable_device()
1981 static int do_pci_enable_device(struct pci_dev *dev, int bars) in do_pci_enable_device() argument
2000 err = pcibios_enable_device(dev, bars); in do_pci_enable_device()
[all …]
/linux/tools/testing/selftests/vfio/lib/drivers/dsa/
H A Ddsa.c54 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/vdpa/solidrun/
H A Dsnet_vdpa.h143 /* PCI BARs */
144 void __iomem *bars[PCI_STD_NUM_BARS]; member
170 return ioread32(psnet->bars[psnet->barno] + off); in psnet_read32()
H A Dsnet_main.c562 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 Dleon_pci_grpci2.c31 * - 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/drivers/fpga/
H A Ddfl-pci.c155 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/Documentation/devicetree/bindings/i2c/
H A Di2c-pxa-pci-ce4100.txt5 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/accel/qaic/
H A Dqaic_drv.c50 /* A bitmask representing the available BARs */
485 int bars; in init_pci() local
488 bars = pci_select_bars(pdev, IORESOURCE_MEM) & 0x3f; in init_pci()
490 /* make sure the device has the expected BARs */ in init_pci()
491 if (bars != config->bar_mask) { in init_pci()
492 pci_dbg(pdev, "%s: expected BARs %#x not found in device. Found %#x\n", in init_pci()
493 __func__, config->bar_mask, bars); in init_pci()
/linux/drivers/gpu/drm/tiny/
H A DKconfig4 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 Dvfio_pci_device_test.c86 bar = &self->device->bars[i]; in TEST_F()
95 * BARs that support mmap() should be automatically mapped by in TEST_F()
/linux/drivers/pci/hotplug/
H A Dibmphp_pci.c136 /* 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 …]

12345678