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

TOMOYO Linux Cross Reference
Linux/arch/sh/include/asm/mmu.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 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef __MMU_H
  3 #define __MMU_H
  4 
  5 /*
  6  * Privileged Space Mapping Buffer (PMB) definitions
  7  */
  8 #define PMB_PASCR               0xff000070
  9 #define PMB_IRMCR               0xff000078
 10 
 11 #define PASCR_SE                0x80000000
 12 
 13 #define PMB_ADDR                0xf6100000
 14 #define PMB_DATA                0xf7100000
 15 
 16 #define NR_PMB_ENTRIES          16
 17 
 18 #define PMB_E_MASK              0x0000000f
 19 #define PMB_E_SHIFT             8
 20 
 21 #define PMB_PFN_MASK            0xff000000
 22 
 23 #define PMB_SZ_16M              0x00000000
 24 #define PMB_SZ_64M              0x00000010
 25 #define PMB_SZ_128M             0x00000080
 26 #define PMB_SZ_512M             0x00000090
 27 #define PMB_SZ_MASK             PMB_SZ_512M
 28 #define PMB_C                   0x00000008
 29 #define PMB_WT                  0x00000001
 30 #define PMB_UB                  0x00000200
 31 #define PMB_CACHE_MASK          (PMB_C | PMB_WT | PMB_UB)
 32 #define PMB_V                   0x00000100
 33 
 34 #define PMB_NO_ENTRY            (-1)
 35 
 36 #ifndef __ASSEMBLY__
 37 #include <linux/errno.h>
 38 #include <linux/threads.h>
 39 #include <asm/page.h>
 40 
 41 /* Default "unsigned long" context */
 42 typedef unsigned long mm_context_id_t[NR_CPUS];
 43 
 44 typedef struct {
 45 #ifdef CONFIG_MMU
 46         mm_context_id_t         id;
 47         void                    *vdso;
 48 #else
 49         unsigned long           end_brk;
 50 #endif
 51 #ifdef CONFIG_BINFMT_ELF_FDPIC
 52         unsigned long           exec_fdpic_loadmap;
 53         unsigned long           interp_fdpic_loadmap;
 54 #endif
 55 } mm_context_t;
 56 
 57 #ifdef CONFIG_PMB
 58 /* arch/sh/mm/pmb.c */
 59 bool __in_29bit_mode(void);
 60 
 61 void pmb_init(void);
 62 int pmb_bolt_mapping(unsigned long virt, phys_addr_t phys,
 63                      unsigned long size, pgprot_t prot);
 64 void __iomem *pmb_remap_caller(phys_addr_t phys, unsigned long size,
 65                                pgprot_t prot, void *caller);
 66 int pmb_unmap(void __iomem *addr);
 67 
 68 #else
 69 
 70 static inline int
 71 pmb_bolt_mapping(unsigned long virt, phys_addr_t phys,
 72                  unsigned long size, pgprot_t prot)
 73 {
 74         return -EINVAL;
 75 }
 76 
 77 static inline void __iomem *
 78 pmb_remap_caller(phys_addr_t phys, unsigned long size,
 79                  pgprot_t prot, void *caller)
 80 {
 81         return NULL;
 82 }
 83 
 84 static inline int pmb_unmap(void __iomem *addr)
 85 {
 86         return -EINVAL;
 87 }
 88 
 89 #define pmb_init(addr)          do { } while (0)
 90 
 91 #ifdef CONFIG_29BIT
 92 #define __in_29bit_mode()       (1)
 93 #else
 94 #define __in_29bit_mode()       (0)
 95 #endif
 96 
 97 #endif /* CONFIG_PMB */
 98 
 99 static inline void __iomem *
100 pmb_remap(phys_addr_t phys, unsigned long size, pgprot_t prot)
101 {
102         return pmb_remap_caller(phys, size, prot, __builtin_return_address(0));
103 }
104 
105 #endif /* __ASSEMBLY__ */
106 
107 #endif /* __MMU_H */
108 

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