xref: /kernel/linux/linux-5.10/arch/sh/include/asm/pgtable-2level.h
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /kernel/linux/linux-5.10/arch/sh/include/asm/
18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci#ifndef __ASM_SH_PGTABLE_2LEVEL_H
38c2ecf20Sopenharmony_ci#define __ASM_SH_PGTABLE_2LEVEL_H
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci#include <asm-generic/pgtable-nopmd.h>
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci/*
88c2ecf20Sopenharmony_ci * traditional two-level paging structure
98c2ecf20Sopenharmony_ci */
108c2ecf20Sopenharmony_ci#define PAGETABLE_LEVELS	2
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ci/* PTE bits */
138c2ecf20Sopenharmony_ci#define PTE_MAGNITUDE		2	/* 32-bit PTEs */
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ci#define PTE_SHIFT		PAGE_SHIFT
168c2ecf20Sopenharmony_ci#define PTE_BITS		(PTE_SHIFT - PTE_MAGNITUDE)
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ci/* PGD bits */
198c2ecf20Sopenharmony_ci#define PGDIR_SHIFT		(PTE_SHIFT + PTE_BITS)
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ci#define PTRS_PER_PGD		(PAGE_SIZE / (1 << PTE_MAGNITUDE))
228c2ecf20Sopenharmony_ci#define USER_PTRS_PER_PGD	(TASK_SIZE/PGDIR_SIZE)
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ci#endif /* __ASM_SH_PGTABLE_2LEVEL_H */
25

Indexes created Thu Nov 07 10:32:03 CST 2024