Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp869092rdb; Fri, 23 Feb 2024 02:38:57 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVuE8qCx4wtku+rF8SKqBh6HCoMM6NnYZqLvsfXydGNqaoo6ZBwL1UK6ADBexZIrzKL6/GXSmqijThJVbaADHZrwyhgVzgo7aPzbiOaTg== X-Google-Smtp-Source: AGHT+IGoOPJE5bV8c2myjpYPsN/tu+85LtSvsT1CqG0SayS9pq66rvTqoSwvPpS7kFYamSQab6PH X-Received: by 2002:a05:6402:1755:b0:565:6ddf:32cf with SMTP id v21-20020a056402175500b005656ddf32cfmr755779edx.26.1708684737550; Fri, 23 Feb 2024 02:38:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708684737; cv=pass; d=google.com; s=arc-20160816; b=HUh4EporfAlHzDv57aK6/6pfa3djCBi49QhI7xKqKqM8L5EdaSZ/xs55eG/puzlohT 2vIUeZq0CvxG6tPVp/qAtspM1Cs6VnYs7lRt0BHhkbG8yWN/pENx2em7d4hrDwVxi3fh wXRk6rFkBznBMnJEbn9/8QlrYsp1ZEyt4D+tcapt20vwF69/UCAI0k65N1dLmJEoTIwc qhwxjmUR29OGW3IT7ZF5pmmUwV4lXHkcAL0B3po/kFVNzAqWGvEQTZDOD0iWjefH7f5N 6l+2o/BOMc1DrONmLyFUBaPzHArypBFaiFXieSsbjBlbfPV6jsDMaD56hx1awbcSJQbN AdBQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=BSEWHwXonUfYZdlUn0oDKqw+1HaUS9n7MqgJzmITfus=; fh=jersQh8TE0KFZCA3V8poDAKHKQ+owT+1iuzuvpXietI=; b=cpe5jx7U0/fnKXk3Zj9q6B2vREYIdpFyzDU8rjTdWYNUW3OwAFZKNTT0zPTLCSCC+j g58XlCtTMaPH2tvAIE2Q6n5XNhenXgofBa4kz+QCnFyie370J4RifjSLo92yt3oR+UmP wTT+8kVDCiN20Otfp9RMFOW0ElaKOLCacaDkxh8reytNHW6asb9XCX9VSfBmU3hYBCa1 oDE74AcJsyThMf2a3sLzf2I2PKjjPn48kQdOvmBxw2s8E5AvGn46HiWXARMgAf/JxORP yDSbVuKURKMO2y+z/YcoD2glF309M3u4rlSJK1UIGqZ+dXvw2eIWY0WwECDyUeMHeYSy E6MQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-78146-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78146-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id t5-20020a056402524500b005649255c2eesi4269590edd.532.2024.02.23.02.38.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 02:38:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78146-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-78146-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78146-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 503C01F24CFF for ; Fri, 23 Feb 2024 10:38:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 27C6678B57; Fri, 23 Feb 2024 10:38:25 +0000 (UTC) Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9EC406166C for ; Fri, 23 Feb 2024 10:38:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.190 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708684704; cv=none; b=CNdm3d9mSam4qbKm6shZaiu1yyyk3enOiqj4FOHmzVPMa4BjdfoGEy7tWTsvgYvau9YluHyrw1MO1TmQ4CHpoLBcj0/KzdkLDz9yU24sihoSnuuGDLCY8n5/xjm1e5x3Obg0UgRWs3+zYexIlf1KpeUFIoJ6qSuOUJO+EaU03eU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708684704; c=relaxed/simple; bh=pk+IyGIGi9yJjgkMjhMmpH6GqxmlnEiNPeUiPwjsYzE=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=eHqCIOhnMJ/RxDI5Ednlc/I8IRYfeSddZ/CQ5zi70HPOxg54uoCbsMihYupoO/HJ5zXe8shkhPDqWGITdcmTlA+dlByBtXsKN4D2lT05MlubTep6ybL7fNzvbD5iIKDRwsvrtYarGO6sHbsJwTqRvl73XueMZHfXlCPVmERpzpE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.190 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.234]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4Th5yc5vTjz2BdRP; Fri, 23 Feb 2024 18:36:08 +0800 (CST) Received: from canpemm500009.china.huawei.com (unknown [7.192.105.203]) by mail.maildlp.com (Postfix) with ESMTPS id 750D01400CC; Fri, 23 Feb 2024 18:38:19 +0800 (CST) Received: from localhost.localdomain (10.50.165.33) by canpemm500009.china.huawei.com (7.192.105.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Fri, 23 Feb 2024 18:38:19 +0800 From: Yicong Yang To: , , , , , CC: , , , Subject: [PATCH v2 4/8] drivers/perf: hisi_pcie: Add more events for counting TLP bandwidth Date: Fri, 23 Feb 2024 18:33:55 +0800 Message-ID: <20240223103359.18669-5-yangyicong@huawei.com> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20240223103359.18669-1-yangyicong@huawei.com> References: <20240223103359.18669-1-yangyicong@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To canpemm500009.china.huawei.com (7.192.105.203) From: Yicong Yang A typical PCIe transaction is consisted of various TLP packets in both direction. For counting bandwidth only memory read events are exported currently. Add memory write and completion counting events of both direction to complete the bandwidth counting. Signed-off-by: Yicong Yang Reviewed-by: Jonathan Cameron --- drivers/perf/hisilicon/hisi_pcie_pmu.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/perf/hisilicon/hisi_pcie_pmu.c b/drivers/perf/hisilicon/hisi_pcie_pmu.c index 9176242eadb3..6f39cb82661e 100644 --- a/drivers/perf/hisilicon/hisi_pcie_pmu.c +++ b/drivers/perf/hisilicon/hisi_pcie_pmu.c @@ -727,10 +727,18 @@ static struct attribute *hisi_pcie_pmu_events_attr[] = { HISI_PCIE_PMU_EVENT_ATTR(rx_mrd_cnt, 0x10210), HISI_PCIE_PMU_EVENT_ATTR(tx_mrd_latency, 0x0011), HISI_PCIE_PMU_EVENT_ATTR(tx_mrd_cnt, 0x10011), + HISI_PCIE_PMU_EVENT_ATTR(rx_mwr_flux, 0x0104), + HISI_PCIE_PMU_EVENT_ATTR(rx_mwr_time, 0x10104), HISI_PCIE_PMU_EVENT_ATTR(rx_mrd_flux, 0x0804), HISI_PCIE_PMU_EVENT_ATTR(rx_mrd_time, 0x10804), + HISI_PCIE_PMU_EVENT_ATTR(rx_cpl_flux, 0x2004), + HISI_PCIE_PMU_EVENT_ATTR(rx_cpl_time, 0x12004), + HISI_PCIE_PMU_EVENT_ATTR(tx_mwr_flux, 0x0105), + HISI_PCIE_PMU_EVENT_ATTR(tx_mwr_time, 0x10105), HISI_PCIE_PMU_EVENT_ATTR(tx_mrd_flux, 0x0405), HISI_PCIE_PMU_EVENT_ATTR(tx_mrd_time, 0x10405), + HISI_PCIE_PMU_EVENT_ATTR(tx_cpl_flux, 0x1005), + HISI_PCIE_PMU_EVENT_ATTR(tx_cpl_time, 0x11005), NULL }; -- 2.24.0