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