~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/xtensa/include/asm/highmem.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * include/asm-xtensa/highmem.h
  3  *
  4  * This file is subject to the terms and conditions of the GNU General
  5  * Public License.  See the file "COPYING" in the main directory of
  6  * this archive for more details.
  7  *
  8  * Copyright (C) 2003 - 2005 Tensilica Inc.
  9  * Copyright (C) 2014 Cadence Design Systems Inc.
 10  */
 11 
 12 #ifndef _XTENSA_HIGHMEM_H
 13 #define _XTENSA_HIGHMEM_H
 14 
 15 #ifdef CONFIG_HIGHMEM
 16 #include <linux/wait.h>
 17 #include <linux/pgtable.h>
 18 #include <asm/cacheflush.h>
 19 #include <asm/fixmap.h>
 20 
 21 #define PKMAP_BASE              ((FIXADDR_START -                       \
 22                                   (LAST_PKMAP + 1) * PAGE_SIZE) & PMD_MASK)
 23 #define LAST_PKMAP              (PTRS_PER_PTE * DCACHE_N_COLORS)
 24 #define LAST_PKMAP_MASK         (LAST_PKMAP - 1)
 25 #define PKMAP_NR(virt)          (((virt) - PKMAP_BASE) >> PAGE_SHIFT)
 26 #define PKMAP_ADDR(nr)          (PKMAP_BASE + ((nr) << PAGE_SHIFT))
 27 
 28 #define kmap_prot               PAGE_KERNEL_EXEC
 29 
 30 #if DCACHE_WAY_SIZE > PAGE_SIZE
 31 #define get_pkmap_color get_pkmap_color
 32 static inline int get_pkmap_color(struct page *page)
 33 {
 34         return DCACHE_ALIAS(page_to_phys(page));
 35 }
 36 
 37 extern unsigned int last_pkmap_nr_arr[];
 38 
 39 static inline unsigned int get_next_pkmap_nr(unsigned int color)
 40 {
 41         last_pkmap_nr_arr[color] =
 42                 (last_pkmap_nr_arr[color] + DCACHE_N_COLORS) & LAST_PKMAP_MASK;
 43         return last_pkmap_nr_arr[color] + color;
 44 }
 45 
 46 static inline int no_more_pkmaps(unsigned int pkmap_nr, unsigned int color)
 47 {
 48         return pkmap_nr < DCACHE_N_COLORS;
 49 }
 50 
 51 static inline int get_pkmap_entries_count(unsigned int color)
 52 {
 53         return LAST_PKMAP / DCACHE_N_COLORS;
 54 }
 55 
 56 extern wait_queue_head_t pkmap_map_wait_arr[];
 57 
 58 static inline wait_queue_head_t *get_pkmap_wait_queue_head(unsigned int color)
 59 {
 60         return pkmap_map_wait_arr + color;
 61 }
 62 
 63 enum fixed_addresses kmap_local_map_idx(int type, unsigned long pfn);
 64 #define arch_kmap_local_map_idx         kmap_local_map_idx
 65 
 66 enum fixed_addresses kmap_local_unmap_idx(int type, unsigned long addr);
 67 #define arch_kmap_local_unmap_idx       kmap_local_unmap_idx
 68 
 69 #endif
 70 
 71 extern pte_t *pkmap_page_table;
 72 
 73 static inline void flush_cache_kmaps(void)
 74 {
 75         flush_cache_all();
 76 }
 77 
 78 #define arch_kmap_local_post_unmap(vaddr)       \
 79         local_flush_tlb_kernel_range(vaddr, vaddr + PAGE_SIZE)
 80 
 81 void kmap_init(void);
 82 
 83 #endif /* CONFIG_HIGHMEM */
 84 #endif
 85 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php