drm/panthor: Don't add write fences to the shared BOs
[drm/drm-misc.git] / arch / riscv / include / asm / pgtable-32.h
blob00f3369570a83668c68dcdaaa15f085ba780f5e7
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * Copyright (C) 2012 Regents of the University of California
4 */
6 #ifndef _ASM_RISCV_PGTABLE_32_H
7 #define _ASM_RISCV_PGTABLE_32_H
9 #include <asm-generic/pgtable-nopmd.h>
10 #include <linux/bits.h>
11 #include <linux/const.h>
13 /* Size of region mapped by a page global directory */
14 #define PGDIR_SHIFT 22
15 #define PGDIR_SIZE (_AC(1, UL) << PGDIR_SHIFT)
16 #define PGDIR_MASK (~(PGDIR_SIZE - 1))
18 #define MAX_POSSIBLE_PHYSMEM_BITS 34
21 * rv32 PTE format:
22 * | XLEN-1 10 | 9 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
23 * PFN reserved for SW D A G U X W R V
25 #define _PAGE_PFN_MASK GENMASK(31, 10)
27 #define _PAGE_NOCACHE 0
28 #define _PAGE_IO 0
29 #define _PAGE_MTMASK 0
31 /* Set of bits to preserve across pte_modify() */
32 #define _PAGE_CHG_MASK (~(unsigned long)(_PAGE_PRESENT | _PAGE_READ | \
33 _PAGE_WRITE | _PAGE_EXEC | \
34 _PAGE_USER | _PAGE_GLOBAL))
36 static const __maybe_unused int pgtable_l4_enabled;
37 static const __maybe_unused int pgtable_l5_enabled;
39 #endif /* _ASM_RISCV_PGTABLE_32_H */