pgtable-2level.h 567 字节
Newer Older
1
/* SPDX-License-Identifier: GPL-2.0 */
2 3
#ifndef __ASM_SH_PGTABLE_2LEVEL_H
#define __ASM_SH_PGTABLE_2LEVEL_H
4 5 6 7 8 9

#include <asm-generic/pgtable-nopmd.h>

/*
 * traditional two-level paging structure
 */
10
#define PAGETABLE_LEVELS	2
11 12

/* PTE bits */
13
#define PTE_MAGNITUDE		2	/* 32-bit PTEs */
14

15 16
#define PTE_SHIFT		PAGE_SHIFT
#define PTE_BITS		(PTE_SHIFT - PTE_MAGNITUDE)
17 18

/* PGD bits */
19
#define PGDIR_SHIFT		(PTE_SHIFT + PTE_BITS)
20

21
#define PTRS_PER_PGD		(PAGE_SIZE / (1 << PTE_MAGNITUDE))
22 23
#define USER_PTRS_PER_PGD	(TASK_SIZE/PGDIR_SIZE)

24
#endif /* __ASM_SH_PGTABLE_2LEVEL_H */