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

TOMOYO Linux Cross Reference
Linux/arch/metag/include/asm/mmu.h

Version: ~ [ linux-5.9.1 ] ~ [ linux-5.8.16 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.72 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.152 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.202 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.240 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.240 ] ~ [ 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 __MMU_H
  2 #define __MMU_H
  3 
  4 #ifdef CONFIG_METAG_USER_TCM
  5 #include <linux/list.h>
  6 #endif
  7 
  8 #ifdef CONFIG_HUGETLB_PAGE
  9 #include <asm/page.h>
 10 #endif
 11 
 12 typedef struct {
 13         /* Software pgd base pointer used for Meta 1.x MMU. */
 14         unsigned long pgd_base;
 15 #ifdef CONFIG_METAG_USER_TCM
 16         struct list_head tcm;
 17 #endif
 18 #ifdef CONFIG_HUGETLB_PAGE
 19 #if HPAGE_SHIFT < HUGEPT_SHIFT
 20         /* last partially filled huge page table address */
 21         unsigned long part_huge;
 22 #endif
 23 #endif
 24 } mm_context_t;
 25 
 26 /* Given a virtual address, return the pte for the top level 4meg entry
 27  * that maps that address.
 28  * Returns 0 (an empty pte) if that range is not mapped.
 29  */
 30 unsigned long mmu_read_first_level_page(unsigned long vaddr);
 31 
 32 /* Given a linear (virtual) address, return the second level 4k pte
 33  * that maps that address.  Returns 0 if the address is not mapped.
 34  */
 35 unsigned long mmu_read_second_level_page(unsigned long vaddr);
 36 
 37 /* Get the virtual base address of the MMU */
 38 unsigned long mmu_get_base(void);
 39 
 40 /* Initialize the MMU. */
 41 void mmu_init(unsigned long mem_end);
 42 
 43 #ifdef CONFIG_METAG_META21_MMU
 44 /*
 45  * For cpu "cpu" calculate and return the address of the
 46  * MMCU_TnLOCAL_TABLE_PHYS0 if running in local-space or
 47  * MMCU_TnGLOBAL_TABLE_PHYS0 if running in global-space.
 48  */
 49 static inline unsigned long mmu_phys0_addr(unsigned int cpu)
 50 {
 51         unsigned long phys0;
 52 
 53         phys0 = (MMCU_T0LOCAL_TABLE_PHYS0 +
 54                 (MMCU_TnX_TABLE_PHYSX_STRIDE * cpu)) +
 55                 (MMCU_TXG_TABLE_PHYSX_OFFSET * is_global_space(PAGE_OFFSET));
 56 
 57         return phys0;
 58 }
 59 
 60 /*
 61  * For cpu "cpu" calculate and return the address of the
 62  * MMCU_TnLOCAL_TABLE_PHYS1 if running in local-space or
 63  * MMCU_TnGLOBAL_TABLE_PHYS1 if running in global-space.
 64  */
 65 static inline unsigned long mmu_phys1_addr(unsigned int cpu)
 66 {
 67         unsigned long phys1;
 68 
 69         phys1 = (MMCU_T0LOCAL_TABLE_PHYS1 +
 70                 (MMCU_TnX_TABLE_PHYSX_STRIDE * cpu)) +
 71                 (MMCU_TXG_TABLE_PHYSX_OFFSET * is_global_space(PAGE_OFFSET));
 72 
 73         return phys1;
 74 }
 75 #endif /* CONFIG_METAG_META21_MMU */
 76 
 77 #endif
 78 

~ [ 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