/*1* Copyright (C) 1999 Gerhard Wichert, Siemens AG2* [email protected]3* Copyright 2010 Tilera Corporation. All Rights Reserved.4*5* This program is free software; you can redistribute it and/or6* modify it under the terms of the GNU General Public License7* as published by the Free Software Foundation, version 2.8*9* This program is distributed in the hope that it will be useful, but10* WITHOUT ANY WARRANTY; without even the implied warranty of11* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or12* NON INFRINGEMENT. See the GNU General Public License for13* more details.14*15* Used in CONFIG_HIGHMEM systems for memory pages which16* are not addressable by direct kernel virtual addresses.17*18*/1920#ifndef _ASM_TILE_HIGHMEM_H21#define _ASM_TILE_HIGHMEM_H2223#include <linux/interrupt.h>24#include <linux/threads.h>25#include <asm/tlbflush.h>26#include <asm/homecache.h>2728/* declarations for highmem.c */29extern unsigned long highstart_pfn, highend_pfn;3031extern pte_t *pkmap_page_table;3233/*34* Ordering is:35*36* FIXADDR_TOP37* fixed_addresses38* FIXADDR_START39* temp fixed addresses40* FIXADDR_BOOT_START41* Persistent kmap area42* PKMAP_BASE43* VMALLOC_END44* Vmalloc area45* VMALLOC_START46* high_memory47*/48#define LAST_PKMAP_MASK (LAST_PKMAP-1)49#define PKMAP_NR(virt) ((virt-PKMAP_BASE) >> PAGE_SHIFT)50#define PKMAP_ADDR(nr) (PKMAP_BASE + ((nr) << PAGE_SHIFT))5152void *kmap_high(struct page *page);53void kunmap_high(struct page *page);54void *kmap(struct page *page);55void kunmap(struct page *page);56void *kmap_fix_kpte(struct page *page, int finished);5758/* This macro is used only in map_new_virtual() to map "page". */59#define kmap_prot page_to_kpgprot(page)6061void *__kmap_atomic(struct page *page);62void __kunmap_atomic(void *kvaddr);63void *kmap_atomic_pfn(unsigned long pfn);64void *kmap_atomic_prot_pfn(unsigned long pfn, pgprot_t prot);65struct page *kmap_atomic_to_page(void *ptr);66void *kmap_atomic_prot(struct page *page, pgprot_t prot);67void kmap_atomic_fix_kpte(struct page *page, int finished);6869#define flush_cache_kmaps() do { } while (0)7071#endif /* _ASM_TILE_HIGHMEM_H */727374