18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci// Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd. 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ci#ifndef __ASM_CSKY_FIXMAP_H 58c2ecf20Sopenharmony_ci#define __ASM_CSKY_FIXMAP_H 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci#include <asm/page.h> 88c2ecf20Sopenharmony_ci#include <asm/memory.h> 98c2ecf20Sopenharmony_ci#ifdef CONFIG_HIGHMEM 108c2ecf20Sopenharmony_ci#include <linux/threads.h> 118c2ecf20Sopenharmony_ci#include <asm/kmap_types.h> 128c2ecf20Sopenharmony_ci#endif 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_cienum fixed_addresses { 158c2ecf20Sopenharmony_ci#ifdef CONFIG_HAVE_TCM 168c2ecf20Sopenharmony_ci FIX_TCM = TCM_NR_PAGES, 178c2ecf20Sopenharmony_ci#endif 188c2ecf20Sopenharmony_ci#ifdef CONFIG_HIGHMEM 198c2ecf20Sopenharmony_ci FIX_KMAP_BEGIN, 208c2ecf20Sopenharmony_ci FIX_KMAP_END = FIX_KMAP_BEGIN + (KM_TYPE_NR * NR_CPUS) - 1, 218c2ecf20Sopenharmony_ci#endif 228c2ecf20Sopenharmony_ci __end_of_fixed_addresses 238c2ecf20Sopenharmony_ci}; 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ci#define FIXADDR_SIZE (__end_of_fixed_addresses << PAGE_SHIFT) 268c2ecf20Sopenharmony_ci#define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE) 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ci#include <asm-generic/fixmap.h> 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ciextern void fixrange_init(unsigned long start, unsigned long end, 318c2ecf20Sopenharmony_ci pgd_t *pgd_base); 328c2ecf20Sopenharmony_ciextern void __init fixaddr_init(void); 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ci#endif /* __ASM_CSKY_FIXMAP_H */ 35