123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- /*
- * Copyright (C) 2012 ARM Ltd.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
- #ifndef __ASM_PGTABLE_H
- #define __ASM_PGTABLE_H
- #include <asm/proc-fns.h>
- #include <asm/memory.h>
- #include <asm/pgtable-hwdef.h>
- /*
- * Software defined PTE bits definition.
- */
- #define PTE_VALID (_AT(pteval_t, 1) << 0)
- #define PTE_PROT_NONE (_AT(pteval_t, 1) << 1) /* only when !PTE_VALID */
- #define PTE_FILE (_AT(pteval_t, 1) << 2) /* only when !pte_present() */
- #define PTE_DIRTY (_AT(pteval_t, 1) << 55)
- #define PTE_SPECIAL (_AT(pteval_t, 1) << 56)
- /*
- * VMALLOC and SPARSEMEM_VMEMMAP ranges.
- */
- #define VMALLOC_START UL(0xffffff8000000000)
- #define VMALLOC_END (PAGE_OFFSET - UL(0x400000000) - SZ_64K)
- #define vmemmap ((struct page *)(VMALLOC_END + SZ_64K))
- #define FIRST_USER_ADDRESS 0
- #ifndef __ASSEMBLY__
- extern void __pte_error(const char *file, int line, unsigned long val);
- extern void __pmd_error(const char *file, int line, unsigned long val);
- extern void __pgd_error(const char *file, int line, unsigned long val);
- #define pte_ERROR(pte) __pte_error(__FILE__, __LINE__, pte_val(pte))
- #ifndef CONFIG_ARM64_64K_PAGES
- #define pmd_ERROR(pmd) __pmd_error(__FILE__, __LINE__, pmd_val(pmd))
- #endif
- #define pgd_ERROR(pgd) __pgd_error(__FILE__, __LINE__, pgd_val(pgd))
- /*
- * The pgprot_* and protection_map entries will be fixed up at runtime to
- * include the cachable and bufferable bits based on memory policy, as well as
- * any architecture dependent bits like global/ASID and SMP shared mapping
|