Lines Matching +full:0 +full:x10011
24 #define HISI_PCIE_GLOBAL_CTRL 0x00
25 #define HISI_PCIE_EVENT_CTRL 0x010
26 #define HISI_PCIE_CNT 0x090
27 #define HISI_PCIE_EXT_CNT 0x110
28 #define HISI_PCIE_INT_STAT 0x150
29 #define HISI_PCIE_INT_MASK 0x154
30 #define HISI_PCIE_REG_BDF 0xfe0
31 #define HISI_PCIE_REG_VERSION 0xfe4
32 #define HISI_PCIE_REG_INFO 0xfe8
35 #define HISI_PCIE_GLOBAL_EN 0x01
36 #define HISI_PCIE_GLOBAL_NONE 0
47 #define HISI_PCIE_EVENT_M GENMASK_ULL(15, 0)
62 #define HISI_PCIE_MAX_PERIOD (GENMASK_ULL(63, 0))
85 #define GET_PCI_DEVFN(bdf) ((bdf) & 0xff)
93 HISI_PCIE_PMU_FILTER_ATTR(event, config, 16, 0);
94 HISI_PCIE_PMU_FILTER_ATTR(thr_len, config1, 3, 0);
99 HISI_PCIE_PMU_FILTER_ATTR(port, config2, 15, 0);
108 return sysfs_emit(buf, "config=0x%llx\n", pmu_attr->id); in hisi_pcie_event_sysfs_show()
115 })[0].attr.attr)
175 * events(index = 0x0010), counter counts total delay cycles and ext_counter
179 * be treated as an independent event(index = 0x0010), "RX memory write packets
180 * number" as another(index = 0x10010). BIT 16 is used to distinguish and 0-15
187 return hisi_pcie_get_event(event) & GENMASK(15, 0); in hisi_pcie_get_real_event()
227 u64 reg = 0; in hisi_pcie_pmu_get_event_ctrl_val()
341 event_group[0] = leader; in hisi_pcie_pmu_validate_event_group()
357 for (num = 0; num < counters; num++) { in hisi_pcie_pmu_validate_event_group()
407 return 0; in hisi_pcie_pmu_event_init()
429 for (idx = 0; idx < HISI_PCIE_MAX_COUNTERS; idx++) { in hisi_pcie_pmu_get_event_idx()
515 hisi_pcie_pmu_writel(pcie_pmu, HISI_PCIE_INT_MASK, idx, 0); in hisi_pcie_pmu_enable_int()
542 hwc->state = 0; in hisi_pcie_pmu_start()
584 if (idx < 0) in hisi_pcie_pmu_add()
598 return 0; in hisi_pcie_pmu_add()
616 for (num = 0; num < HISI_PCIE_MAX_COUNTERS; num++) { in hisi_pcie_pmu_enable()
642 for (idx = 0; idx < HISI_PCIE_MAX_COUNTERS; idx++) { in hisi_pcie_pmu_irq()
666 if (ret < 0) { in hisi_pcie_pmu_irq_register()
671 irq = pci_irq_vector(pdev, 0); in hisi_pcie_pmu_irq_register()
682 return 0; in hisi_pcie_pmu_irq_register()
696 pcie_pmu->on_cpu = cpumask_local_spread(0, dev_to_node(&pcie_pmu->pdev->dev)); in hisi_pcie_pmu_online_cpu()
700 return 0; in hisi_pcie_pmu_online_cpu()
711 return 0; in hisi_pcie_pmu_offline_cpu()
725 return 0; in hisi_pcie_pmu_offline_cpu()
733 return 0; in hisi_pcie_pmu_offline_cpu()
737 HISI_PCIE_PMU_EVENT_ATTR(rx_mwr_latency, 0x0010),
738 HISI_PCIE_PMU_EVENT_ATTR(rx_mwr_cnt, 0x10010),
739 HISI_PCIE_PMU_EVENT_ATTR(rx_mrd_latency, 0x0210),
740 HISI_PCIE_PMU_EVENT_ATTR(rx_mrd_cnt, 0x10210),
741 HISI_PCIE_PMU_EVENT_ATTR(tx_mrd_latency, 0x0011),
742 HISI_PCIE_PMU_EVENT_ATTR(tx_mrd_cnt, 0x10011),
743 HISI_PCIE_PMU_EVENT_ATTR(rx_mwr_flux, 0x0104),
744 HISI_PCIE_PMU_EVENT_ATTR(rx_mwr_time, 0x10104),
745 HISI_PCIE_PMU_EVENT_ATTR(rx_mrd_flux, 0x0804),
746 HISI_PCIE_PMU_EVENT_ATTR(rx_mrd_time, 0x10804),
747 HISI_PCIE_PMU_EVENT_ATTR(rx_cpl_flux, 0x2004),
748 HISI_PCIE_PMU_EVENT_ATTR(rx_cpl_time, 0x12004),
749 HISI_PCIE_PMU_EVENT_ATTR(tx_mwr_flux, 0x0105),
750 HISI_PCIE_PMU_EVENT_ATTR(tx_mwr_time, 0x10105),
751 HISI_PCIE_PMU_EVENT_ATTR(tx_mrd_flux, 0x0405),
752 HISI_PCIE_PMU_EVENT_ATTR(tx_mrd_time, 0x10405),
753 HISI_PCIE_PMU_EVENT_ATTR(tx_cpl_flux, 0x1005),
754 HISI_PCIE_PMU_EVENT_ATTR(tx_cpl_time, 0x11005),
764 HISI_PCIE_PMU_FORMAT_ATTR(event, "config:0-16"),
765 HISI_PCIE_PMU_FORMAT_ATTR(thr_len, "config1:0-3"),
770 HISI_PCIE_PMU_FORMAT_ATTR(port, "config2:0-15"),
856 return 0; in hisi_pcie_alloc_pmu()
926 if (ret < 0) { in hisi_pcie_init_dev()
933 return 0; in hisi_pcie_init_dev()
965 { PCI_DEVICE(PCI_VENDOR_ID_HUAWEI, 0xa12d) },
966 { 0, }