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

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

Version: ~ [ linux-6.3-rc3 ] ~ [ linux-6.2.7 ] ~ [ linux-6.1.20 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.103 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.175 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.237 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.278 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.310 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ 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  * linux/arch/unicore32/include/asm/page.h
  3  *
  4  * Code specific to PKUnity SoC and UniCore ISA
  5  *
  6  * Copyright (C) 2001-2010 GUAN Xue-tao
  7  *
  8  * This program is free software; you can redistribute it and/or modify
  9  * it under the terms of the GNU General Public License version 2 as
 10  * published by the Free Software Foundation.
 11  */
 12 #ifndef __UNICORE_PAGE_H__
 13 #define __UNICORE_PAGE_H__
 14 
 15 /* PAGE_SHIFT determines the page size */
 16 #define PAGE_SHIFT              12
 17 #define PAGE_SIZE               (_AC(1, UL) << PAGE_SHIFT)
 18 #define PAGE_MASK               (~(PAGE_SIZE-1))
 19 
 20 #ifndef __ASSEMBLY__
 21 
 22 struct page;
 23 struct vm_area_struct;
 24 
 25 #define clear_page(page)        memset((void *)(page), 0, PAGE_SIZE)
 26 extern void copy_page(void *to, const void *from);
 27 
 28 #define clear_user_page(page, vaddr, pg)        clear_page(page)
 29 #define copy_user_page(to, from, vaddr, pg)     copy_page(to, from)
 30 
 31 #undef STRICT_MM_TYPECHECKS
 32 
 33 #ifdef STRICT_MM_TYPECHECKS
 34 /*
 35  * These are used to make use of C type-checking..
 36  */
 37 typedef struct { unsigned long pte; } pte_t;
 38 typedef struct { unsigned long pgd; } pgd_t;
 39 typedef struct { unsigned long pgprot; } pgprot_t;
 40 
 41 #define pte_val(x)      ((x).pte)
 42 #define pgd_val(x)      ((x).pgd)
 43 #define pgprot_val(x)   ((x).pgprot)
 44 
 45 #define __pte(x)        ((pte_t) { (x) })
 46 #define __pgd(x)        ((pgd_t) { (x) })
 47 #define __pgprot(x)     ((pgprot_t) { (x) })
 48 
 49 #else
 50 /*
 51  * .. while these make it easier on the compiler
 52  */
 53 typedef unsigned long pte_t;
 54 typedef unsigned long pgd_t;
 55 typedef unsigned long pgprot_t;
 56 
 57 #define pte_val(x)      (x)
 58 #define pgd_val(x)      (x)
 59 #define pgprot_val(x)   (x)
 60 
 61 #define __pte(x)        (x)
 62 #define __pgd(x)        (x)
 63 #define __pgprot(x)     (x)
 64 
 65 #endif /* STRICT_MM_TYPECHECKS */
 66 
 67 typedef struct page *pgtable_t;
 68 
 69 extern int pfn_valid(unsigned long);
 70 
 71 #include <asm/memory.h>
 72 
 73 #endif /* !__ASSEMBLY__ */
 74 
 75 #define VM_DATA_DEFAULT_FLAGS \
 76         (VM_READ | VM_WRITE | VM_EXEC | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
 77 
 78 #include <asm-generic/getorder.h>
 79 
 80 #endif
 81 

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