Linux SNPS ARC Archive on
 help / color / Atom feed
* [PATCH v17 02/23] arc: mm: Add p?d_leaf() definitions
       [not found] <>
@ 2019-12-18 16:23 ` Steven Price
  0 siblings, 0 replies; only message in thread
From: Steven Price @ 2019-12-18 16:23 UTC (permalink / raw)
  To: Andrew Morton, linux-mm
  Cc: Mark Rutland, x86, Arnd Bergmann, Ard Biesheuvel, Peter Zijlstra,
	Catalin Marinas, Dave Hansen, linux-kernel, Steven Price,
	Vineet Gupta, Jérôme Glisse, Ingo Molnar,
	Borislav Petkov, Andy Lutomirski, H. Peter Anvin, James Morse,
	Thomas Gleixner, linux-snps-arc, Will Deacon, linux-arm-kernel,
	Liang, Kan

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.

CC: Vineet Gupta <>
Acked-by: Vineet Gupta <>
Signed-off-by: Steven Price <>
 arch/arc/include/asm/pgtable.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arc/include/asm/pgtable.h b/arch/arc/include/asm/pgtable.h
index 9019ed9f9c94..12be7e1b7cc0 100644
--- a/arch/arc/include/asm/pgtable.h
+++ b/arch/arc/include/asm/pgtable.h
@@ -273,6 +273,7 @@ static inline void pmd_set(pmd_t *pmdp, pte_t *ptep)
 #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))

linux-snps-arc mailing list

^ 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 --
     [not found] <>
2019-12-18 16:23 ` [PATCH v17 02/23] arc: mm: Add p?d_leaf() definitions Steven Price

Linux SNPS ARC Archive on

Archives are clonable:
	git clone --mirror linux-snps-arc/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-snps-arc linux-snps-arc/ \
	public-inbox-index linux-snps-arc

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone