mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00

Now that DAX and all other reference counts to ZONE_DEVICE pages are managed normally there is no need for the special devmap PTE/PMD/PUD page table bits. So drop all references to these, freeing up a software defined page table bit on architectures supporting it. Link: https://lkml.kernel.org/r/6389398c32cc9daa3dfcaa9f79c7972525d310ce.1750323463.git-series.apopple@nvidia.com Signed-off-by: Alistair Popple <apopple@nvidia.com> Acked-by: Will Deacon <will@kernel.org> # arm64 Acked-by: David Hildenbrand <david@redhat.com> Suggested-by: Chunyan Zhang <zhang.lyra@gmail.com> Reviewed-by: Björn Töpel <bjorn@rivosinc.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Cc: Balbir Singh <balbirs@nvidia.com> Cc: Björn Töpel <bjorn@kernel.org> Cc: Christoph Hellwig <hch@lst.de> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Deepak Gupta <debug@rivosinc.com> Cc: Gerald Schaefer <gerald.schaefer@linux.ibm.com> Cc: Inki Dae <m.szyprowski@samsung.com> Cc: John Groves <john@groves.net> Cc: John Hubbard <jhubbard@nvidia.com> Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Cc: Matthew Wilcox (Oracle) <willy@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
41 lines
1.3 KiB
C
41 lines
1.3 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright (C) 2012 Regents of the University of California
|
|
*/
|
|
|
|
#ifndef _ASM_RISCV_PGTABLE_BITS_H
|
|
#define _ASM_RISCV_PGTABLE_BITS_H
|
|
|
|
#define _PAGE_ACCESSED_OFFSET 6
|
|
|
|
#define _PAGE_PRESENT (1 << 0)
|
|
#define _PAGE_READ (1 << 1) /* Readable */
|
|
#define _PAGE_WRITE (1 << 2) /* Writable */
|
|
#define _PAGE_EXEC (1 << 3) /* Executable */
|
|
#define _PAGE_USER (1 << 4) /* User */
|
|
#define _PAGE_GLOBAL (1 << 5) /* Global */
|
|
#define _PAGE_ACCESSED (1 << 6) /* Set by hardware on any access */
|
|
#define _PAGE_DIRTY (1 << 7) /* Set by hardware on any write */
|
|
#define _PAGE_SOFT (3 << 8) /* Reserved for software */
|
|
|
|
#define _PAGE_SPECIAL (1 << 8) /* RSW: 0x1 */
|
|
#define _PAGE_TABLE _PAGE_PRESENT
|
|
|
|
/*
|
|
* _PAGE_PROT_NONE is set on not-present pages (and ignored by the hardware) to
|
|
* distinguish them from swapped out pages
|
|
*/
|
|
#define _PAGE_PROT_NONE _PAGE_GLOBAL
|
|
|
|
/* Used for swap PTEs only. */
|
|
#define _PAGE_SWP_EXCLUSIVE _PAGE_ACCESSED
|
|
|
|
#define _PAGE_PFN_SHIFT 10
|
|
|
|
/*
|
|
* when all of R/W/X are zero, the PTE is a pointer to the next level
|
|
* of the page table; otherwise, it is a leaf PTE.
|
|
*/
|
|
#define _PAGE_LEAF (_PAGE_READ | _PAGE_WRITE | _PAGE_EXEC)
|
|
|
|
#endif /* _ASM_RISCV_PGTABLE_BITS_H */
|