highmem.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __ASM_CSKY_HIGHMEM_H
  3. #define __ASM_CSKY_HIGHMEM_H
  4. #ifdef __KERNEL__
  5. #include <linux/init.h>
  6. #include <linux/interrupt.h>
  7. #include <linux/uaccess.h>
  8. #include <asm/kmap_size.h>
  9. #include <asm/cache.h>
  10. /* undef for production */
  11. #define HIGHMEM_DEBUG 1
  12. /* declarations for highmem.c */
  13. extern unsigned long highstart_pfn, highend_pfn;
  14. extern pte_t *pkmap_page_table;
  15. /*
  16. * Right now we initialize only a single pte table. It can be extended
  17. * easily, subsequent pte tables have to be allocated in one physical
  18. * chunk of RAM.
  19. */
  20. #define LAST_PKMAP 1024
  21. #define LAST_PKMAP_MASK (LAST_PKMAP-1)
  22. #define PKMAP_NR(virt) ((virt-PKMAP_BASE) >> PAGE_SHIFT)
  23. #define PKMAP_ADDR(nr) (PKMAP_BASE + ((nr) << PAGE_SHIFT))
  24. #define ARCH_HAS_KMAP_FLUSH_TLB
  25. extern void kmap_flush_tlb(unsigned long addr);
  26. #define flush_cache_kmaps() do {} while (0)
  27. #define arch_kmap_local_post_map(vaddr, pteval) kmap_flush_tlb(vaddr)
  28. #define arch_kmap_local_post_unmap(vaddr) kmap_flush_tlb(vaddr)
  29. extern void kmap_init(void);
  30. #endif /* __KERNEL__ */
  31. #endif /* __ASM_CSKY_HIGHMEM_H */