Linux-mm Archive on
 help / color / Atom feed
* [patch 047/158] arc: mm: add p?d_leaf() definitions
@ 2019-12-01  1:51 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2019-12-01  1:51 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: arc: 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 will be provided by the
p?d_leaf() functions/macros.

For arc, we only have two levels, so only pmd_leaf() is needed.

Signed-off-by: Steven Price <>
Acked-by: Vineet Gupta <>
Cc: Vineet Gupta <>
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: Christian Borntraeger <>
Cc: Dave Hansen <>
Cc: Dave Jiang <>
Cc: David S. Miller <>
Cc: Dmitry Vyukov <>
Cc: Heiko Carstens <>
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: Vasily Gorbik <>
Cc: Will Deacon <>
Cc: Zong Li <>
Signed-off-by: Andrew Morton <>

 arch/arc/include/asm/pgtable.h |    1 +
 1 file changed, 1 insertion(+)

--- a/arch/arc/include/asm/pgtable.h~arc-mm-add-pd_leaf-definitions
+++ a/arch/arc/include/asm/pgtable.h
@@ -273,6 +273,7 @@ static inline void pmd_set(pmd_t *pmdp,
 #define pmd_none(x)			(!pmd_val(x))
 #define	pmd_bad(x)			((pmd_val(x) & ~PAGE_MASK))
 #define pmd_present(x)			(pmd_val(x))
+#define pmd_leaf(x)			(pmd_val(x) & _PAGE_HW_SZ)
 #define pmd_clear(xp)			do { pmd_val(*(xp)) = 0; } while (0)
 #define pte_page(pte)		pfn_to_page(pte_pfn(pte))

^ 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:51 [patch 047/158] arc: 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