mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-16 23:45:31 +08:00
874e2cc189
Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate and remove usage of __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapoport <rppt@linux.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Brian Cain <bcain@codeaurora.org> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Christophe Leroy <christophe.leroy@c-s.fr> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Geert Uytterhoeven <geert+renesas@glider.be> Cc: Guan Xuetao <gxt@pku.edu.cn> Cc: James Morse <james.morse@arm.com> Cc: Jonas Bonn <jonas@southpole.se> Cc: Julien Thierry <julien.thierry.kdev@gmail.com> Cc: Ley Foon Tan <ley.foon.tan@intel.com> Cc: Marc Zyngier <maz@kernel.org> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Paul Mackerras <paulus@samba.org> Cc: Rich Felker <dalias@libc.org> Cc: Russell King <linux@armlinux.org.uk> Cc: Stafford Horne <shorne@gmail.com> Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi> Cc: Suzuki K Poulose <suzuki.poulose@arm.com> Cc: Tony Luck <tony.luck@intel.com> Cc: Will Deacon <will@kernel.org> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Link: http://lkml.kernel.org/r/20200414153455.21744-12-rppt@kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
25 lines
567 B
C
25 lines
567 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __ASM_SH_PGTABLE_2LEVEL_H
|
|
#define __ASM_SH_PGTABLE_2LEVEL_H
|
|
|
|
#include <asm-generic/pgtable-nopmd.h>
|
|
|
|
/*
|
|
* traditional two-level paging structure
|
|
*/
|
|
#define PAGETABLE_LEVELS 2
|
|
|
|
/* PTE bits */
|
|
#define PTE_MAGNITUDE 2 /* 32-bit PTEs */
|
|
|
|
#define PTE_SHIFT PAGE_SHIFT
|
|
#define PTE_BITS (PTE_SHIFT - PTE_MAGNITUDE)
|
|
|
|
/* PGD bits */
|
|
#define PGDIR_SHIFT (PTE_SHIFT + PTE_BITS)
|
|
|
|
#define PTRS_PER_PGD (PAGE_SIZE / (1 << PTE_MAGNITUDE))
|
|
#define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE)
|
|
|
|
#endif /* __ASM_SH_PGTABLE_2LEVEL_H */
|