]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 1 Apr 2016 12:15:54 +0000 (07:15 -0500)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 1 Apr 2016 12:15:54 +0000 (07:15 -0500)
Pull s390 fixes from Martin Schwidefsky:
 - A proper fix for the locking issue in the dasd driver
 - Wire up the new preadv2 nad pwritev2 system calls
 - Add the mark_rodata_ro function and set DEBUG_RODATA=y
 - A few more bug fixes.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  s390: wire up preadv2/pwritev2 syscalls
  s390/pci: PCI function group 0 is valid for clp_query_pci_fn
  s390/crypto: provide correct file mode at device register.
  s390/mm: handle PTE-mapped tail pages in fast gup
  s390: add DEBUG_RODATA support
  s390: disable postinit-readonly for now
  s390/dasd: reorder lcu and device lock
  s390/cpum_sf: Fix cpu hotplug notifier transitions
  s390/cpum_cf: Fix missing cpu hotplug notifier transition

1  2 
arch/s390/Kconfig
arch/s390/mm/gup.c

diff --combined arch/s390/Kconfig
index b9df8d11d7a954562501110706b95b16954e5300,f8dea162bd32f79eb4060fca6182253075e4204e..aad23e3dff2c17b0bba5a7d2740ea47c21839480
@@@ -59,6 -59,9 +59,9 @@@ config PCI_QUIRK
  config ARCH_SUPPORTS_UPROBES
        def_bool y
  
+ config DEBUG_RODATA
+       def_bool y
  config S390
        def_bool y
        select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
        select HAVE_CMPXCHG_DOUBLE
        select HAVE_CMPXCHG_LOCAL
        select HAVE_DEBUG_KMEMLEAK
 +      select HAVE_DMA_API_DEBUG
        select HAVE_DYNAMIC_FTRACE
        select HAVE_DYNAMIC_FTRACE_WITH_REGS
        select HAVE_FTRACE_MCOUNT_RECORD
@@@ -618,6 -620,10 +621,6 @@@ config HAS_IOME
  config IOMMU_HELPER
        def_bool PCI
  
 -config HAS_DMA
 -      def_bool PCI
 -      select HAVE_DMA_API_DEBUG
 -
  config NEED_SG_DMA_LENGTH
        def_bool PCI
  
diff --combined arch/s390/mm/gup.c
index 49a1c84ed2663fadeadb2bc1b8548814d9cab012,3776aca2208226155ce32bb17ba240c525ee413e..a8a6765f1a519501b0f28bf7ca3a318d0b47f9a1
@@@ -20,9 -20,9 +20,9 @@@
  static inline int gup_pte_range(pmd_t *pmdp, pmd_t pmd, unsigned long addr,
                unsigned long end, int write, struct page **pages, int *nr)
  {
+       struct page *head, *page;
        unsigned long mask;
        pte_t *ptep, pte;
-       struct page *page;
  
        mask = (write ? _PAGE_PROTECT : 0) | _PAGE_INVALID | _PAGE_SPECIAL;
  
                        return 0;
                VM_BUG_ON(!pfn_valid(pte_pfn(pte)));
                page = pte_page(pte);
-               if (!page_cache_get_speculative(page))
+               head = compound_head(page);
+               if (!page_cache_get_speculative(head))
                        return 0;
                if (unlikely(pte_val(pte) != pte_val(*ptep))) {
-                       put_page(page);
+                       put_page(head);
                        return 0;
                }
+               VM_BUG_ON_PAGE(compound_head(page) != head, page);
                pages[*nr] = page;
                (*nr)++;
  
@@@ -210,6 -212,7 +212,6 @@@ int __get_user_pages_fast(unsigned lon
  int get_user_pages_fast(unsigned long start, int nr_pages, int write,
                        struct page **pages)
  {
 -      struct mm_struct *mm = current->mm;
        int nr, ret;
  
        might_sleep();
        /* Try to get the remaining pages with get_user_pages */
        start += nr << PAGE_SHIFT;
        pages += nr;
 -      ret = get_user_pages_unlocked(current, mm, start,
 -                           nr_pages - nr, write, 0, pages);
 +      ret = get_user_pages_unlocked(start, nr_pages - nr, write, 0, pages);
        /* Have to be a bit careful with return values */
        if (nr > 0)
                ret = (ret < 0) ? nr : ret + nr;