Linux-mm Archive on
 help / color / Atom feed
* [patch 053/158] s390: mm: add p?d_leaf() definitions
@ 2019-12-01  1:52 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2019-12-01  1:52 UTC (permalink / raw)
  To: akpm, alex, aou, ard.biesheuvel, arnd, aryabinin, benh,
	borntraeger, bp, catalin.marinas, dave.hansen, dave.jiang, davem,
	dvyukov, glider, gor, heiko.carstens, hpa, james.morse, jhogan,
	kan.liang, linux-mm, linux, luto, mark.rutland, mawilcox, mingo,
	mm-commits, mpe, n-horiguchi, palmer, paul.burton, paul.walmsley,
	paulus, peterz, ralf, shashim, steven.price, tglx, torvalds,
	vgupta, will,

From: Steven Price <>
Subject: s390: mm: add p?d_leaf() definitions

walk_page_range() is going to be allowed to walk page tables other than
those of user space. For this it needs to know when it has reached a
'leaf' entry in the page tables. This information is provided by the
p?d_leaf() functions/macros.

For s390, pud_large() and pmd_large() are already implemented as static
inline functions. Add a macro to provide the p?d_leaf names for the
generic code to use.

Signed-off-by: Steven Price <>
Cc: Heiko Carstens <>
Cc: Vasily Gorbik <>
Cc: Christian Borntraeger <>
Cc: Albert Ou <>
Cc: Alexander Potapenko <>
Cc: Alexandre Ghiti <>
Cc: Andrey Ryabinin <>
Cc: Andy Lutomirski <>
Cc: Ard Biesheuvel <>
Cc: Arnd Bergmann <>
Cc: Benjamin Herrenschmidt <>
Cc: Borislav Petkov <>
Cc: Catalin Marinas <>
Cc: Dave Hansen <>
Cc: Dave Jiang <>
Cc: David S. Miller <>
Cc: Dmitry Vyukov <>
Cc: "H. Peter Anvin" <>
Cc: Ingo Molnar <>
Cc: James Hogan <>
Cc: James Morse <>
Cc: "Liang, Kan" <>
Cc: Mark Rutland <>
Cc: Matthew Wilcox <>
Cc: Michael Ellerman <>
Cc: Naoya Horiguchi <>
Cc: Palmer Dabbelt <>
Cc: Paul Burton <>
Cc: Paul Mackerras <>
Cc: Paul Walmsley <>
Cc: Peter Zijlstra <>
Cc: Ralf Baechle <>
Cc: Russell King <>
Cc: Shiraz Hashim <>
Cc: Thomas Gleixner <>
Cc: Vineet Gupta <>
Cc: Will Deacon <>
Cc: Zong Li <>
Signed-off-by: Andrew Morton <>

 arch/s390/include/asm/pgtable.h |    2 ++
 1 file changed, 2 insertions(+)

--- a/arch/s390/include/asm/pgtable.h~s390-mm-add-pd_leaf-definitions
+++ a/arch/s390/include/asm/pgtable.h
@@ -673,6 +673,7 @@ static inline int pud_none(pud_t pud)
 	return pud_val(pud) == _REGION3_ENTRY_EMPTY;
+#define pud_leaf	pud_large
 static inline int pud_large(pud_t pud)
 	if ((pud_val(pud) & _REGION_ENTRY_TYPE_MASK) != _REGION_ENTRY_TYPE_R3)
@@ -690,6 +691,7 @@ static inline unsigned long pud_pfn(pud_
 	return (pud_val(pud) & origin_mask) >> PAGE_SHIFT;
+#define pmd_leaf	pmd_large
 static inline int pmd_large(pmd_t pmd)
 	return (pmd_val(pmd) & _SEGMENT_ENTRY_LARGE) != 0;

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

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-01  1:52 [patch 053/158] s390: mm: add p?d_leaf() definitions akpm

Linux-mm Archive on

Archives are clonable:
	git clone --mirror linux-mm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mm linux-mm/ \
	public-inbox-index linux-mm

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone