radix.h (16ba7e312045cd5d32fba0156312b4303f200787) | radix.h (2fb4706057bcf8261b3b0521ec7a62b54b82ce48) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0 */ 2#ifndef _ASM_POWERPC_PGTABLE_RADIX_H 3#define _ASM_POWERPC_PGTABLE_RADIX_H 4 5#include <asm/asm-const.h> 6 7#ifndef __ASSEMBLY__ 8#include <asm/cmpxchg.h> --- 16 unchanged lines hidden (view full) --- 25/* Bits to set in a RPMD/RPUD/RPGD */ 26#define RADIX_PMD_VAL_BITS (0x8000000000000000UL | RADIX_PTE_INDEX_SIZE) 27#define RADIX_PUD_VAL_BITS (0x8000000000000000UL | RADIX_PMD_INDEX_SIZE) 28#define RADIX_PGD_VAL_BITS (0x8000000000000000UL | RADIX_PUD_INDEX_SIZE) 29 30/* Don't have anything in the reserved bits and leaf bits */ 31#define RADIX_PMD_BAD_BITS 0x60000000000000e0UL 32#define RADIX_PUD_BAD_BITS 0x60000000000000e0UL | 1/* SPDX-License-Identifier: GPL-2.0 */ 2#ifndef _ASM_POWERPC_PGTABLE_RADIX_H 3#define _ASM_POWERPC_PGTABLE_RADIX_H 4 5#include <asm/asm-const.h> 6 7#ifndef __ASSEMBLY__ 8#include <asm/cmpxchg.h> --- 16 unchanged lines hidden (view full) --- 25/* Bits to set in a RPMD/RPUD/RPGD */ 26#define RADIX_PMD_VAL_BITS (0x8000000000000000UL | RADIX_PTE_INDEX_SIZE) 27#define RADIX_PUD_VAL_BITS (0x8000000000000000UL | RADIX_PMD_INDEX_SIZE) 28#define RADIX_PGD_VAL_BITS (0x8000000000000000UL | RADIX_PUD_INDEX_SIZE) 29 30/* Don't have anything in the reserved bits and leaf bits */ 31#define RADIX_PMD_BAD_BITS 0x60000000000000e0UL 32#define RADIX_PUD_BAD_BITS 0x60000000000000e0UL |
33#define RADIX_PGD_BAD_BITS 0x60000000000000e0UL | 33#define RADIX_P4D_BAD_BITS 0x60000000000000e0UL |
34 35#define RADIX_PMD_SHIFT (PAGE_SHIFT + RADIX_PTE_INDEX_SIZE) 36#define RADIX_PUD_SHIFT (RADIX_PMD_SHIFT + RADIX_PMD_INDEX_SIZE) 37#define RADIX_PGD_SHIFT (RADIX_PUD_SHIFT + RADIX_PUD_INDEX_SIZE) 38/* 39 * Size of EA range mapped by our pagetables. 40 */ 41#define RADIX_PGTABLE_EADDR_SIZE (RADIX_PTE_INDEX_SIZE + RADIX_PMD_INDEX_SIZE + \ --- 180 unchanged lines hidden (view full) --- 222} 223 224static inline int radix__pud_bad(pud_t pud) 225{ 226 return !!(pud_val(pud) & RADIX_PUD_BAD_BITS); 227} 228 229 | 34 35#define RADIX_PMD_SHIFT (PAGE_SHIFT + RADIX_PTE_INDEX_SIZE) 36#define RADIX_PUD_SHIFT (RADIX_PMD_SHIFT + RADIX_PMD_INDEX_SIZE) 37#define RADIX_PGD_SHIFT (RADIX_PUD_SHIFT + RADIX_PUD_INDEX_SIZE) 38/* 39 * Size of EA range mapped by our pagetables. 40 */ 41#define RADIX_PGTABLE_EADDR_SIZE (RADIX_PTE_INDEX_SIZE + RADIX_PMD_INDEX_SIZE + \ --- 180 unchanged lines hidden (view full) --- 222} 223 224static inline int radix__pud_bad(pud_t pud) 225{ 226 return !!(pud_val(pud) & RADIX_PUD_BAD_BITS); 227} 228 229 |
230static inline int radix__pgd_bad(pgd_t pgd) | 230static inline int radix__p4d_bad(p4d_t p4d) |
231{ | 231{ |
232 return !!(pgd_val(pgd) & RADIX_PGD_BAD_BITS); | 232 return !!(p4d_val(p4d) & RADIX_P4D_BAD_BITS); |
233} 234 235#ifdef CONFIG_TRANSPARENT_HUGEPAGE 236 237static inline int radix__pmd_trans_huge(pmd_t pmd) 238{ 239 return (pmd_val(pmd) & (_PAGE_PTE | _PAGE_DEVMAP)) == _PAGE_PTE; 240} --- 62 unchanged lines hidden --- | 233} 234 235#ifdef CONFIG_TRANSPARENT_HUGEPAGE 236 237static inline int radix__pmd_trans_huge(pmd_t pmd) 238{ 239 return (pmd_val(pmd) & (_PAGE_PTE | _PAGE_DEVMAP)) == _PAGE_PTE; 240} --- 62 unchanged lines hidden --- |