]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - arch/sh/include/asm/pgtable-2level.h
Merge remote-tracking branches 'asoc/topic/adsp', 'asoc/topic/ak4613', 'asoc/topic...
[mirror_ubuntu-bionic-kernel.git] / arch / sh / include / asm / pgtable-2level.h
CommitLineData
e44d6c40
PM
1#ifndef __ASM_SH_PGTABLE_2LEVEL_H
2#define __ASM_SH_PGTABLE_2LEVEL_H
b73c8063 3
9849a569 4#define __ARCH_USE_5LEVEL_HACK
b73c8063
MF
5#include <asm-generic/pgtable-nopmd.h>
6
7/*
8 * traditional two-level paging structure
9 */
782bb5a5 10#define PAGETABLE_LEVELS 2
b73c8063
MF
11
12/* PTE bits */
782bb5a5 13#define PTE_MAGNITUDE 2 /* 32-bit PTEs */
b73c8063 14
782bb5a5
PM
15#define PTE_SHIFT PAGE_SHIFT
16#define PTE_BITS (PTE_SHIFT - PTE_MAGNITUDE)
b73c8063
MF
17
18/* PGD bits */
782bb5a5 19#define PGDIR_SHIFT (PTE_SHIFT + PTE_BITS)
b73c8063 20
782bb5a5 21#define PTRS_PER_PGD (PAGE_SIZE / (1 << PTE_MAGNITUDE))
b73c8063
MF
22#define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE)
23
e44d6c40 24#endif /* __ASM_SH_PGTABLE_2LEVEL_H */