FAILED: patch "[PATCH] s390/mm: convert to the generic get_user_pages_fast code" failed to apply to 4.19-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 1a42010cdc26bb7e5912984f3c91b8c6d55f089a Mon Sep 17 00:00:00 2001
From: Martin Schwidefsky <[email protected]>
Date: Tue, 23 Apr 2019 10:53:21 +0200
Subject: [PATCH] s390/mm: convert to the generic get_user_pages_fast code
Define the gup_fast_permitted to check against the asce_limit of the mm attached to the current task, then replace the s390 specific gup code with the generic implementation in mm/gup.c.
arch/s390/Kconfig +1 -0
@@ -149,6 +149,7 @@ config S390 select HAVE_FUNCTION_TRACER select HAVE_FUTEX_CMPXCHG if FUTEX select HAVE_GCC_PLUGINS + select HAVE_GENERIC_GUP select HAVE_KERNEL_BZIP2 select HAVE_KERNEL_GZIP select HAVE_KERNEL_LZ4
arch/s390/include/asm/pgtable.h +12 -0
@@ -1265,6 +1265,18 @@ static inline pte_t *pte_offset(pmd_t *pmd, unsigned long address)#define pte_offset_map (pmd, address) pte_offset_kernel(pmd, address)#define pte_unmap (pte) do { } while (0) +static inline bool gup_fast_permitted (unsigned long start,int nr_pages) +{ +unsigned long len, end; + + len = (unsigned long ) nr_pages <<PAGE_SHIFT ; + end = start + len; +if (end < start) +return false; +return end <= current->mm->context.asce_limit; +} +#define gup_fast_permitted gup_fast_permitted +#define pfn_pte (pfn,pgprot) mk_pte_phys(__pa((pfn) << PAGE_SHIFT),(pgprot))#define pte_pfn (x) (pte_val(x) >> PAGE_SHIFT)#define pte_page (x) pfn_to_page(pte_pfn(x))
arch/s390/mm/Makefile +1 -1
@@ -4,7 +4,7 @@ # obj-y := init.o fault.o extmem.o mmap.o vmem.o maccess.o -obj-y += page-states.o gup.o pageattr.o pgtable.o pgalloc.o +obj-y += page-states.o pageattr.o pgtable.o pgalloc.o obj-$(CONFIG_CMM) += cmm.o obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
arch/s390/mm/gup.c deleted +0 -291
291 lines not on this page · raw message