BAR_2
DW_BLOCK(BAR_2, 0x00000000, 0x00000800)
DW_BLOCK(BAR_2, 0x00200000, 0x00000800)
DW_BLOCK(BAR_2, 0x00400000, 0x00000800)
DW_BLOCK(BAR_2, 0x00600000, 0x00000800)
DW_BLOCK(BAR_2, 0x00800000, 0x00000800)
DW_BLOCK(BAR_2, 0x00900000, 0x00000800)
DW_BLOCK(BAR_2, 0x00a00000, 0x00000800)
DW_BLOCK(BAR_2, 0x00b00000, 0x00000800)
memcpy_fromio(&log, vk->bar[BAR_2] + vk->peerlog_off, sizeof(log));
loc_buf[cnt] = vkread8(vk, BAR_2, data_offset + log.rd_idx);
vkwrite32(vk, log.rd_idx, BAR_2,
offset &= (pci_resource_len(vk->pdev, BAR_2 * 2) - 1);
*dst++ = vkread8(vk, BAR_2, offset++);
memcpy_fromio(&vk->peerlog_info, vk->bar[BAR_2] + vk->peerlog_off,
buf_size = vkread32(vk, BAR_2,
num = vkread32(vk, BAR_2, offset);
entry_size = vkread32(vk, BAR_2, offset + sizeof(num));
memcpy_fromio(dst, vk->bar[BAR_2] + offset, num * entry_size);
.test_reg_bar = BAR_2,
tp->aperegs = pci_ioremap_bar(pdev, BAR_2);
[BAR_DB] = BAR_2,
[BAR_MW1] = BAR_2,
[BAR_DB] = BAR_2,
[BAR_MW1] = BAR_2,
.bar[BAR_2] = { .type = BAR_RESIZABLE, },
ls_epc->bar[BAR_2].only_64bit = true;
.bar[BAR_2] = { .type = BAR_RESIZABLE, },
.bar[BAR_2] = { .type = BAR_RESIZABLE, },
.bar[BAR_2] = { .only_64bit = true, },
.bar[BAR_2] = { .only_64bit = true, },
.bar[BAR_2] = { .type = BAR_RESERVED, },
.bar[BAR_2] = { .only_64bit = true, },
.bar[BAR_2] = { .only_64bit = true, },
.bar[BAR_2] = { .type = BAR_FIXED, .fixed_size = 256,
PCI_EPF_TEST_BAR_SIZE_R(bar2_size, BAR_2)
PCI_EPF_TEST_BAR_SIZE_W(bar2_size, BAR_2)
hns3_pmu->base = pcim_iomap_table(pdev)[BAR_2];
ret = pcim_iomap_regions(pdev, BIT(BAR_2), "hns3_pmu");
if (pci_resource_flags(pdev, BAR_2) & IORESOURCE_MEM_64) {
if (pci_resource_flags(pdev, BAR_2) & IORESOURCE_PREFETCH)
priv->p2r_bar[0].base = pci_resource_start(pdev, BAR_2);
priv->p2r_bar[0].size = pci_resource_len(pdev, BAR_2);