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);
118 return sysfs_emit(buf, "config=0x%llx\n", pmu_attr->id); in hisi_pcie_event_sysfs_show()
126 })[0].attr.attr)
170 * events(index = 0x0010), counter counts total delay cycles and ext_counter
174 * be treated as an independent event(index = 0x0010), "RX memory write packets
175 * number" as another(index = 0x10010). BIT 16 is used to distinguish and 0-15
182 return hisi_pcie_get_event(event) & GENMASK(15, 0); in hisi_pcie_get_real_event()
224 u64 reg = 0; in hisi_pcie_pmu_config_filter()
323 event_group[0] = leader; in hisi_pcie_pmu_validate_event_group()
339 for (num = 0; num < counters; num++) { in hisi_pcie_pmu_validate_event_group()
389 return 0; in hisi_pcie_pmu_event_init()
406 for (idx = 0; idx < HISI_PCIE_MAX_COUNTERS; idx++) { in hisi_pcie_pmu_find_related_event()
428 for (idx = 0; idx < HISI_PCIE_MAX_COUNTERS; idx++) { in hisi_pcie_pmu_get_event_idx()
505 hisi_pcie_pmu_writel(pcie_pmu, HISI_PCIE_INT_MASK, idx, 0); in hisi_pcie_pmu_enable_int()
532 hwc->state = 0; in hisi_pcie_pmu_start()
575 if (idx < 0) in hisi_pcie_pmu_add()
585 if (idx < 0) in hisi_pcie_pmu_add()
597 return 0; in hisi_pcie_pmu_add()
615 for (num = 0; num < HISI_PCIE_MAX_COUNTERS; num++) { in hisi_pcie_pmu_enable()
641 for (idx = 0; idx < HISI_PCIE_MAX_COUNTERS; idx++) { in hisi_pcie_pmu_irq()
665 if (ret < 0) { in hisi_pcie_pmu_irq_register()
670 irq = pci_irq_vector(pdev, 0); in hisi_pcie_pmu_irq_register()
681 return 0; in hisi_pcie_pmu_irq_register()
695 pcie_pmu->on_cpu = cpumask_local_spread(0, dev_to_node(&pcie_pmu->pdev->dev)); in hisi_pcie_pmu_online_cpu()
699 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_mrd_flux, 0x0804),
744 HISI_PCIE_PMU_EVENT_ATTR(rx_mrd_time, 0x10804),
745 HISI_PCIE_PMU_EVENT_ATTR(tx_mrd_flux, 0x0405),
746 HISI_PCIE_PMU_EVENT_ATTR(tx_mrd_time, 0x10405),
756 HISI_PCIE_PMU_FORMAT_ATTR(event, "config:0-16"),
757 HISI_PCIE_PMU_FORMAT_ATTR(thr_len, "config1:0-3"),
762 HISI_PCIE_PMU_FORMAT_ATTR(port, "config2:0-15"),
845 return 0; in hisi_pcie_alloc_pmu()
915 if (ret < 0) { in hisi_pcie_init_dev()
922 return 0; in hisi_pcie_init_dev()
954 { PCI_DEVICE(PCI_VENDOR_ID_HUAWEI, 0xa12d) },
955 { 0, }