]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 20 Apr 2015 17:15:33 +0000 (10:15 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 20 Apr 2015 17:15:33 +0000 (10:15 -0700)
Pull more s390 updates from Martin Schwidefsky:
 "The big thing in this second merge for s390 is the new eBPF JIT from
  Michael which replaces the old 32-bit backend.

  The remaining commits are bug fixes"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  s390/pci: add locking for fmb access
  s390/pci: extract software counters from fmb
  s390/dasd: Fix unresumed device after suspend/resume having no paths
  s390/dasd: fix unresumed device after suspend/resume
  s390/dasd: fix inability to set a DASD device offline
  s390/mm: Fix memory hotplug for unaligned standby memory
  s390/bpf: Add s390x eBPF JIT compiler backend
  s390: Use bool function return values of true/false not 1/0

1  2 
arch/s390/Kconfig
arch/s390/pci/pci_debug.c

diff --combined arch/s390/Kconfig
index de2726a487b0a4161b96d450dc3419ef9edce754,53a91425d92d5e67384a1dd6400a9f1cbfe05404..8e58c614c37d7203e39f389ab33e31b8542328c2
@@@ -115,7 -115,7 +115,7 @@@ config S39
        select HAVE_ARCH_SECCOMP_FILTER
        select HAVE_ARCH_TRACEHOOK
        select HAVE_ARCH_TRANSPARENT_HUGEPAGE
-       select HAVE_BPF_JIT if PACK_STACK
+       select HAVE_BPF_JIT if PACK_STACK && HAVE_MARCH_Z9_109_FEATURES
        select HAVE_CMPXCHG_DOUBLE
        select HAVE_CMPXCHG_LOCAL
        select HAVE_DEBUG_KMEMLEAK
@@@ -328,7 -328,6 +328,7 @@@ config COMPA
        select COMPAT_BINFMT_ELF if BINFMT_ELF
        select ARCH_WANT_OLD_COMPAT_IPC
        select COMPAT_OLD_SIGACTION
 +      depends on MULTIUSER
        help
          Select this option if you want to enable your system kernel to
          handle system-calls from ELF binaries for 31 bit ESA.  This option
index c22d4402ae45cde3f18878600bb9fdd50d1d0a1c,3fc9b4d90b59f224cc8471ed09bbad3c706fd534..4129b0a5fd780f1f1b74260ee6be656ff93d91c1
@@@ -31,12 -31,25 +31,25 @@@ static char *pci_perf_names[] = 
        "Refresh operations",
        "DMA read bytes",
        "DMA write bytes",
-       /* software counters */
+ };
+ static char *pci_sw_names[] = {
        "Allocated pages",
        "Mapped pages",
        "Unmapped pages",
  };
  
+ static void pci_sw_counter_show(struct seq_file *m)
+ {
+       struct zpci_dev *zdev = m->private;
+       atomic64_t *counter = &zdev->allocated_pages;
+       int i;
+       for (i = 0; i < ARRAY_SIZE(pci_sw_names); i++, counter++)
+               seq_printf(m, "%26s:\t%llu\n", pci_sw_names[i],
+                          atomic64_read(counter));
+ }
  static int pci_perf_show(struct seq_file *m, void *v)
  {
        struct zpci_dev *zdev = m->private;
  
        if (!zdev)
                return 0;
+       mutex_lock(&zdev->lock);
        if (!zdev->fmb) {
 -              return seq_printf(m, "FMB statistics disabled\n");
+               mutex_unlock(&zdev->lock);
 +              seq_puts(m, "FMB statistics disabled\n");
 +              return 0;
        }
  
        /* header */
                for (i = 4; i < 6; i++)
                        seq_printf(m, "%26s:\t%llu\n",
                                   pci_perf_names[i], *(stat + i));
-       /* software counters */
-       for (i = 6; i < ARRAY_SIZE(pci_perf_names); i++)
-               seq_printf(m, "%26s:\t%llu\n",
-                          pci_perf_names[i],
-                          atomic64_read((atomic64_t *) (stat + i)));
  
+       pci_sw_counter_show(m);
+       mutex_unlock(&zdev->lock);
        return 0;
  }
  
@@@ -88,19 -100,17 +101,17 @@@ static ssize_t pci_perf_seq_write(struc
        if (rc)
                return rc;
  
+       mutex_lock(&zdev->lock);
        switch (val) {
        case 0:
                rc = zpci_fmb_disable_device(zdev);
-               if (rc)
-                       return rc;
                break;
        case 1:
                rc = zpci_fmb_enable_device(zdev);
-               if (rc)
-                       return rc;
                break;
        }
-       return count;
+       mutex_unlock(&zdev->lock);
+       return rc ? rc : count;
  }
  
  static int pci_perf_seq_open(struct inode *inode, struct file *filp)