linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dongdong Liu <liudongdong3@huawei.com>
To: <helgaas@kernel.org>, <linux-pci@vger.kernel.org>
Cc: <linuxarm@huawei.com>, Dongdong Liu <liudongdong3@huawei.com>
Subject: [PATCH] PCI/LINK: Print IRQ number used by port
Date: Thu, 10 Sep 2020 19:24:15 +0800	[thread overview]
Message-ID: <1599737055-73624-1-git-send-email-liudongdong3@huawei.com> (raw)

Print IRQ number used by PCIe Link Bandwidth Notification services port
as AER, PME and DPC does. It provides convenience to track PCIe BW notif
interrupts counts of certain port from /proc/interrupts.

The dmesg log is as below.
pcieport 0000:00:00.0: bw_notification: enabled with IRQ 1166

Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/pci/pcie/bw_notification.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/pci/pcie/bw_notification.c b/drivers/pci/pcie/bw_notification.c
index 77e6857..565d23c 100644
--- a/drivers/pci/pcie/bw_notification.c
+++ b/drivers/pci/pcie/bw_notification.c
@@ -14,6 +14,8 @@
  * and warns when links become degraded in operation.
  */
 
+#define dev_fmt(fmt) "bw_notification: " fmt
+
 #include "../pci.h"
 #include "portdrv.h"
 
@@ -97,6 +99,7 @@ static int pcie_bandwidth_notification_probe(struct pcie_device *srv)
 		return ret;
 
 	pcie_enable_link_bandwidth_notification(srv->port);
+	pci_info(srv->port, "enabled with IRQ %d\n", srv->irq);
 
 	return 0;
 }
-- 
1.9.1


             reply	other threads:[~2020-09-10 11:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-10 11:24 Dongdong Liu [this message]
2020-09-17 17:01 ` [PATCH] PCI/LINK: Print IRQ number used by port Bjorn Helgaas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1599737055-73624-1-git-send-email-liudongdong3@huawei.com \
    --to=liudongdong3@huawei.com \
    --cc=helgaas@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).