mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-25 23:45:26 +07:00
50acfb2b76
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation version 2 this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 97 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Alexios Zavras <alexios.zavras@intel.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190529141901.025053186@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
44 lines
1.3 KiB
C
44 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
|
|
|
|
/*
|
|
* PTE format:
|
|
* | XLEN-1 10 | 9 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
|
|
* PFN reserved for SW D A G U X W R V
|
|
*/
|
|
|
|
#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 (1 << 8) /* Reserved for software */
|
|
|
|
#define _PAGE_SPECIAL _PAGE_SOFT
|
|
#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_READ
|
|
|
|
#define _PAGE_PFN_SHIFT 10
|
|
|
|
/* Set of bits to preserve across pte_modify() */
|
|
#define _PAGE_CHG_MASK (~(unsigned long)(_PAGE_PRESENT | _PAGE_READ | \
|
|
_PAGE_WRITE | _PAGE_EXEC | \
|
|
_PAGE_USER | _PAGE_GLOBAL))
|
|
|
|
#endif /* _ASM_RISCV_PGTABLE_BITS_H */
|