s390/pci: add fmt3 fmb
authorSebastian Ott <sebott@linux.vnet.ibm.com>
Fri, 8 Apr 2016 15:55:19 +0000 (17:55 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 4 Jul 2018 06:35:58 +0000 (08:35 +0200)
Add support for format 3 function measurement blocks.

Signed-off-by: Sebastian Ott <sebott@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/include/asm/pci.h
arch/s390/pci/pci_debug.c

index 94f8db468c9b46c2cae33251e7e73fa49260c4f4..10fe982f2b4bf9ad1479bee371ecb89ddaaaca9c 100644 (file)
@@ -51,6 +51,10 @@ struct zpci_fmb_fmt2 {
        u64 max_work_units;
 };
 
+struct zpci_fmb_fmt3 {
+       u64 tx_bytes;
+};
+
 struct zpci_fmb {
        u32 format      : 8;
        u32 fmt_ind     : 24;
@@ -66,6 +70,7 @@ struct zpci_fmb {
                struct zpci_fmb_fmt0 fmt0;
                struct zpci_fmb_fmt1 fmt1;
                struct zpci_fmb_fmt2 fmt2;
+               struct zpci_fmb_fmt3 fmt3;
        };
 } __packed __aligned(128);
 
index b482e95b6249e380dfb39d89253789c61dedb1e3..57f7cdac70a3114891c044f8cda2ae6fb6d48dc7 100644 (file)
@@ -48,6 +48,10 @@ static char *pci_fmt2_names[] = {
        "Maximum work units",
 };
 
+static char *pci_fmt3_names[] = {
+       "Transmitted bytes",
+};
+
 static char *pci_sw_names[] = {
        "Allocated pages",
        "Mapped pages",
@@ -112,6 +116,10 @@ static int pci_perf_show(struct seq_file *m, void *v)
                pci_fmb_show(m, pci_fmt2_names, ARRAY_SIZE(pci_fmt2_names),
                             &zdev->fmb->fmt2.consumed_work_units);
                break;
+       case 3:
+               pci_fmb_show(m, pci_fmt3_names, ARRAY_SIZE(pci_fmt3_names),
+                            &zdev->fmb->fmt3.tx_bytes);
+               break;
        default:
                seq_puts(m, "Unknown format\n");
        }