summaryrefslogtreecommitdiffstats
path: root/arch/s390/pci/pci.c
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2015-04-10 14:33:08 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2015-04-15 12:23:52 +0200
commit6001018ae8c659e624351d2e73b1272bacd68d6a (patch)
tree5a489e3a6a65ca05d1b15a27c4f425f8181ca807 /arch/s390/pci/pci.c
parentdf3044f1ef002c2269b11cb76a1b2bec629732b4 (diff)
downloadlinux-6001018ae8c659e624351d2e73b1272bacd68d6a.tar.gz
linux-6001018ae8c659e624351d2e73b1272bacd68d6a.tar.bz2
linux-6001018ae8c659e624351d2e73b1272bacd68d6a.zip
s390/pci: extract software counters from fmb
The software counters are not a part of the function measurement block. Also we do not check for zdev->fmb != NULL when using these counters (function measurement can be toggled at runtime). Just move the software counters to struct zpci_dev. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/pci/pci.c')
-rw-r--r--arch/s390/pci/pci.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c
index 98336200c7b2..281893864e1b 100644
--- a/arch/s390/pci/pci.c
+++ b/arch/s390/pci/pci.c
@@ -190,6 +190,11 @@ int zpci_fmb_enable_device(struct zpci_dev *zdev)
return -ENOMEM;
WARN_ON((u64) zdev->fmb & 0xf);
+ /* reset software counters */
+ atomic64_set(&zdev->allocated_pages, 0);
+ atomic64_set(&zdev->mapped_pages, 0);
+ atomic64_set(&zdev->unmapped_pages, 0);
+
args.fmb_addr = virt_to_phys(zdev->fmb);
return mod_pci(zdev, ZPCI_MOD_FC_SET_MEASURE, 0, &args);
}