blob: b8355e4057cfcc3f1d6bfa321d42b9da5322cd05 [file] [log] [blame]
Matt Flemingb73c8062009-11-25 22:00:08 +00001#ifndef __ASM_SH_PGTABLE_NOPMD_H
2#define __ASM_SH_PGTABLE_NOPMD_H
3
4#include <asm-generic/pgtable-nopmd.h>
5
6/*
7 * traditional two-level paging structure
8 */
Paul Mundt782bb5a2010-01-13 19:11:14 +09009#define PAGETABLE_LEVELS 2
Matt Flemingb73c8062009-11-25 22:00:08 +000010
11/* PTE bits */
Paul Mundt782bb5a2010-01-13 19:11:14 +090012#define PTE_MAGNITUDE 2 /* 32-bit PTEs */
Matt Flemingb73c8062009-11-25 22:00:08 +000013
Paul Mundt782bb5a2010-01-13 19:11:14 +090014#define PTE_SHIFT PAGE_SHIFT
15#define PTE_BITS (PTE_SHIFT - PTE_MAGNITUDE)
Matt Flemingb73c8062009-11-25 22:00:08 +000016
17/* PGD bits */
Paul Mundt782bb5a2010-01-13 19:11:14 +090018#define PGDIR_SHIFT (PTE_SHIFT + PTE_BITS)
Matt Flemingb73c8062009-11-25 22:00:08 +000019
Paul Mundt782bb5a2010-01-13 19:11:14 +090020#define PTRS_PER_PGD (PAGE_SIZE / (1 << PTE_MAGNITUDE))
Matt Flemingb73c8062009-11-25 22:00:08 +000021#define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE)
22
23#endif /* __ASM_SH_PGTABLE_NOPMD_H */