2010-01-13 17:18:39 +07:00
|
|
|
#ifndef __ASM_SH_PGTABLE_2LEVEL_H
|
|
|
|
#define __ASM_SH_PGTABLE_2LEVEL_H
|
2009-11-26 05:00:08 +07:00
|
|
|
|
|
|
|
#include <asm-generic/pgtable-nopmd.h>
|
|
|
|
|
|
|
|
/*
|
|
|
|
* traditional two-level paging structure
|
|
|
|
*/
|
2010-01-13 17:11:14 +07:00
|
|
|
#define PAGETABLE_LEVELS 2
|
2009-11-26 05:00:08 +07:00
|
|
|
|
|
|
|
/* PTE bits */
|
2010-01-13 17:11:14 +07:00
|
|
|
#define PTE_MAGNITUDE 2 /* 32-bit PTEs */
|
2009-11-26 05:00:08 +07:00
|
|
|
|
2010-01-13 17:11:14 +07:00
|
|
|
#define PTE_SHIFT PAGE_SHIFT
|
|
|
|
#define PTE_BITS (PTE_SHIFT - PTE_MAGNITUDE)
|
2009-11-26 05:00:08 +07:00
|
|
|
|
|
|
|
/* PGD bits */
|
2010-01-13 17:11:14 +07:00
|
|
|
#define PGDIR_SHIFT (PTE_SHIFT + PTE_BITS)
|
2009-11-26 05:00:08 +07:00
|
|
|
|
2010-01-13 17:11:14 +07:00
|
|
|
#define PTRS_PER_PGD (PAGE_SIZE / (1 << PTE_MAGNITUDE))
|
2009-11-26 05:00:08 +07:00
|
|
|
#define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE)
|
|
|
|
|
2010-01-13 17:18:39 +07:00
|
|
|
#endif /* __ASM_SH_PGTABLE_2LEVEL_H */
|