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

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

Version: ~ [ linux-5.9-rc5 ] ~ [ linux-5.8.10 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.66 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.146 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.198 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.236 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.236 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.85 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ 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.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef _ASM_HIGHMEM_H
  2 #define _ASM_HIGHMEM_H
  3 
  4 #include <asm/kmap_types.h>
  5 
  6 #define PKMAP_BASE              (PAGE_OFFSET - PMD_SIZE)
  7 #define LAST_PKMAP              PTRS_PER_PTE
  8 #define LAST_PKMAP_MASK         (LAST_PKMAP - 1)
  9 #define PKMAP_NR(virt)          (((virt) - PKMAP_BASE) >> PAGE_SHIFT)
 10 #define PKMAP_ADDR(nr)          (PKMAP_BASE + ((nr) << PAGE_SHIFT))
 11 
 12 #define kmap_prot               PAGE_KERNEL
 13 
 14 #define flush_cache_kmaps() \
 15         do { \
 16                 if (cache_is_vivt()) \
 17                         flush_cache_all(); \
 18         } while (0)
 19 
 20 extern pte_t *pkmap_page_table;
 21 
 22 extern void *kmap_high(struct page *page);
 23 extern void kunmap_high(struct page *page);
 24 
 25 /*
 26  * The reason for kmap_high_get() is to ensure that the currently kmap'd
 27  * page usage count does not decrease to zero while we're using its
 28  * existing virtual mapping in an atomic context.  With a VIVT cache this
 29  * is essential to do, but with a VIPT cache this is only an optimization
 30  * so not to pay the price of establishing a second mapping if an existing
 31  * one can be used.  However, on platforms without hardware TLB maintenance
 32  * broadcast, we simply cannot use ARCH_NEEDS_KMAP_HIGH_GET at all since
 33  * the locking involved must also disable IRQs which is incompatible with
 34  * the IPI mechanism used by global TLB operations.
 35  */
 36 #define ARCH_NEEDS_KMAP_HIGH_GET
 37 #if defined(CONFIG_SMP) && defined(CONFIG_CPU_TLB_V6)
 38 #undef ARCH_NEEDS_KMAP_HIGH_GET
 39 #if defined(CONFIG_HIGHMEM) && defined(CONFIG_CPU_CACHE_VIVT)
 40 #error "The sum of features in your kernel config cannot be supported together"
 41 #endif
 42 #endif
 43 
 44 /*
 45  * Needed to be able to broadcast the TLB invalidation for kmap.
 46  */
 47 #ifdef CONFIG_ARM_ERRATA_798181
 48 #undef ARCH_NEEDS_KMAP_HIGH_GET
 49 #endif
 50 
 51 #ifdef ARCH_NEEDS_KMAP_HIGH_GET
 52 extern void *kmap_high_get(struct page *page);
 53 #else
 54 static inline void *kmap_high_get(struct page *page)
 55 {
 56         return NULL;
 57 }
 58 #endif
 59 
 60 /*
 61  * The following functions are already defined by <linux/highmem.h>
 62  * when CONFIG_HIGHMEM is not set.
 63  */
 64 #ifdef CONFIG_HIGHMEM
 65 extern void *kmap(struct page *page);
 66 extern void kunmap(struct page *page);
 67 extern void *kmap_atomic(struct page *page);
 68 extern void __kunmap_atomic(void *kvaddr);
 69 extern void *kmap_atomic_pfn(unsigned long pfn);
 70 extern struct page *kmap_atomic_to_page(const void *ptr);
 71 #endif
 72 
 73 #endif
 74 

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

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | 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.

osdn.jp