pgtable-2level.h 528 字节
Newer Older
1 2
#ifndef __ASM_SH_PGTABLE_2LEVEL_H
#define __ASM_SH_PGTABLE_2LEVEL_H
3 4 5 6 7 8

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

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

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

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

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

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

23
#endif /* __ASM_SH_PGTABLE_2LEVEL_H */