Path: blob/master/arch/microblaze/include/asm/highmem.h
26439 views
/* SPDX-License-Identifier: GPL-2.0 */1/*2* highmem.h: virtual kernel memory mappings for high memory3*4* Used in CONFIG_HIGHMEM systems for memory pages which5* are not addressable by direct kernel virtual addresses.6*7* Copyright (C) 1999 Gerhard Wichert, Siemens AG8* [email protected]9*10*11* Redesigned the x86 32-bit VM architecture to deal with12* up to 16 Terabyte physical memory. With current x86 CPUs13* we now support up to 64 Gigabytes physical RAM.14*15* Copyright (C) 1999 Ingo Molnar <[email protected]>16*/17#ifndef _ASM_HIGHMEM_H18#define _ASM_HIGHMEM_H1920#ifdef __KERNEL__2122#include <linux/init.h>23#include <linux/interrupt.h>24#include <linux/uaccess.h>25#include <asm/fixmap.h>2627extern pte_t *pkmap_page_table;2829/*30* Right now we initialize only a single pte table. It can be extended31* easily, subsequent pte tables have to be allocated in one physical32* chunk of RAM.33*/34/*35* We use one full pte table with 4K pages. And with 16K/64K/256K pages pte36* table covers enough memory (32MB/512MB/2GB resp.), so that both FIXMAP37* and PKMAP can be placed in a single pte table. We use 512 pages for PKMAP38* in case of 16K/64K/256K page sizes.39*/4041#define PKMAP_ORDER PTE_SHIFT42#define LAST_PKMAP (1 << PKMAP_ORDER)4344#define PKMAP_BASE ((FIXADDR_START - PAGE_SIZE * (LAST_PKMAP + 1)) \45& PMD_MASK)4647#define LAST_PKMAP_MASK (LAST_PKMAP - 1)48#define PKMAP_NR(virt) ((virt - PKMAP_BASE) >> PAGE_SHIFT)49#define PKMAP_ADDR(nr) (PKMAP_BASE + ((nr) << PAGE_SHIFT))5051#define flush_cache_kmaps() { flush_icache(); flush_dcache(); }5253#define arch_kmap_local_post_map(vaddr, pteval) \54local_flush_tlb_page(NULL, vaddr);55#define arch_kmap_local_post_unmap(vaddr) \56local_flush_tlb_page(NULL, vaddr);5758#endif /* __KERNEL__ */5960#endif /* _ASM_HIGHMEM_H */616263