All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged mm-stable] s390-mm-use-pmd_pgtable_page-helper-in-__gmap_segment_gaddr.patch removed from -mm tree
@ 2022-12-01  0:03 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2022-12-01  0:03 UTC (permalink / raw)
  To: mm-commits, hca, david, borntraeger, agordeev, anshuman.khandual, akpm


The quilt patch titled
     Subject: s390/mm: use pmd_pgtable_page() helper in __gmap_segment_gaddr()
has been removed from the -mm tree.  Its filename was
     s390-mm-use-pmd_pgtable_page-helper-in-__gmap_segment_gaddr.patch

This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Anshuman Khandual <anshuman.khandual@arm.com>
Subject: s390/mm: use pmd_pgtable_page() helper in __gmap_segment_gaddr()
Date: Fri, 25 Nov 2022 09:15:02 +0530

In __gmap_segment_gaddr() pmd level page table page is being extracted
from the pmd pointer, similar to pmd_pgtable_page() implementation.  This
reduces some redundancy by directly using pmd_pgtable_page() instead,
though first making it available.

Link: https://lkml.kernel.org/r/20221125034502.1559986-1-anshuman.khandual@arm.com
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Acked-by: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: Christian Borntraeger <borntraeger@linux.ibm.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 arch/s390/mm/gmap.c |    5 ++---
 include/linux/mm.h  |    2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)

--- a/arch/s390/mm/gmap.c~s390-mm-use-pmd_pgtable_page-helper-in-__gmap_segment_gaddr
+++ a/arch/s390/mm/gmap.c
@@ -336,12 +336,11 @@ static int gmap_alloc_table(struct gmap
 static unsigned long __gmap_segment_gaddr(unsigned long *entry)
 {
 	struct page *page;
-	unsigned long offset, mask;
+	unsigned long offset;
 
 	offset = (unsigned long) entry / sizeof(unsigned long);
 	offset = (offset & (PTRS_PER_PMD - 1)) * PMD_SIZE;
-	mask = ~(PTRS_PER_PMD * sizeof(pmd_t) - 1);
-	page = virt_to_page((void *)((unsigned long) entry & mask));
+	page = pmd_pgtable_page((pmd_t *) entry);
 	return page->index + offset;
 }
 
--- a/include/linux/mm.h~s390-mm-use-pmd_pgtable_page-helper-in-__gmap_segment_gaddr
+++ a/include/linux/mm.h
@@ -2510,7 +2510,7 @@ static inline void pgtable_pte_page_dtor
 
 #if USE_SPLIT_PMD_PTLOCKS
 
-static struct page *pmd_pgtable_page(pmd_t *pmd)
+static inline struct page *pmd_pgtable_page(pmd_t *pmd)
 {
 	unsigned long mask = ~(PTRS_PER_PMD * sizeof(pmd_t) - 1);
 	return virt_to_page((void *)((unsigned long) pmd & mask));
_

Patches currently in -mm which might be from anshuman.khandual@arm.com are



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-12-01  0:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-01  0:03 [merged mm-stable] s390-mm-use-pmd_pgtable_page-helper-in-__gmap_segment_gaddr.patch removed from -mm tree Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.