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

TOMOYO Linux Cross Reference
Linux/arch/frv/include/asm/page.h

Version: ~ [ linux-6.1-rc7 ] ~ [ linux-6.0.10 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.80 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.156 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.225 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.267 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.300 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.334 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.302 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ 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 _ASM_PAGE_H
  3 #define _ASM_PAGE_H
  4 
  5 #include <asm/virtconvert.h>
  6 #include <asm/mem-layout.h>
  7 #include <asm/sections.h>
  8 #include <asm/setup.h>
  9 
 10 #ifndef __ASSEMBLY__
 11 
 12 #define clear_page(pgaddr)                      memset((pgaddr), 0, PAGE_SIZE)
 13 #define copy_page(to,from)                      memcpy((to), (from), PAGE_SIZE)
 14 
 15 #define clear_user_page(pgaddr, vaddr, page)    memset((pgaddr), 0, PAGE_SIZE)
 16 #define copy_user_page(vto, vfrom, vaddr, topg) memcpy((vto), (vfrom), PAGE_SIZE)
 17 
 18 /*
 19  * These are used to make use of C type-checking..
 20  */
 21 typedef struct { unsigned long  pte;    } pte_t;
 22 typedef struct { unsigned long  ste[64];} pmd_t;
 23 typedef struct { pmd_t          pue[1]; } pud_t;
 24 typedef struct { pud_t          pge[1]; } pgd_t;
 25 typedef struct { unsigned long  pgprot; } pgprot_t;
 26 typedef struct page *pgtable_t;
 27 
 28 #define pte_val(x)      ((x).pte)
 29 #define pmd_val(x)      ((x).ste[0])
 30 #define pud_val(x)      ((x).pue[0])
 31 #define pgd_val(x)      ((x).pge[0])
 32 #define pgprot_val(x)   ((x).pgprot)
 33 
 34 #define __pte(x)        ((pte_t) { (x) } )
 35 #define __pmd(x)        ((pmd_t) { { (x) } } )
 36 #define __pud(x)        ((pud_t) { (x) } )
 37 #define __pgd(x)        ((pgd_t) { (x) } )
 38 #define __pgprot(x)     ((pgprot_t) { (x) } )
 39 #define PTE_MASK        PAGE_MASK
 40 
 41 #define devmem_is_allowed(pfn)  1
 42 
 43 #define __pa(vaddr)             virt_to_phys((void *) (unsigned long) (vaddr))
 44 #define __va(paddr)             phys_to_virt((unsigned long) (paddr))
 45 
 46 #define pfn_to_kaddr(pfn)       __va((pfn) << PAGE_SHIFT)
 47 
 48 extern unsigned long max_low_pfn;
 49 extern unsigned long min_low_pfn;
 50 extern unsigned long max_pfn;
 51 
 52 #ifdef CONFIG_MMU
 53 #define pfn_valid(pfn)          ((pfn) < max_mapnr)
 54 #else
 55 #define ARCH_PFN_OFFSET         (PAGE_OFFSET >> PAGE_SHIFT)
 56 #define pfn_valid(pfn)          ((pfn) >= min_low_pfn && (pfn) < max_low_pfn)
 57 
 58 #endif
 59 
 60 #define virt_to_page(kaddr)     pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
 61 #define virt_addr_valid(kaddr)  pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
 62 
 63 
 64 #define VM_DATA_DEFAULT_FLAGS \
 65         (VM_READ | VM_WRITE | \
 66         ((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0 ) | \
 67                  VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
 68 
 69 #endif /* __ASSEMBLY__ */
 70 
 71 #include <asm-generic/memory_model.h>
 72 #include <asm-generic/getorder.h>
 73 
 74 #endif /* _ASM_PAGE_H */
 75 

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