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

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

Version: ~ [ linux-5.12-rc1 ] ~ [ linux-5.11.2 ] ~ [ linux-5.10.19 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.101 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.177 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.222 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.258 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.258 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.18.140 ] ~ [ linux-3.16.85 ] ~ [ linux-3.14.79 ] ~ [ linux-3.12.74 ] ~ [ 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 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef _ALPHA_PAGE_H
  3 #define _ALPHA_PAGE_H
  4 
  5 #include <linux/const.h>
  6 #include <asm/pal.h>
  7 
  8 /* PAGE_SHIFT determines the page size */
  9 #define PAGE_SHIFT      13
 10 #define PAGE_SIZE       (_AC(1,UL) << PAGE_SHIFT)
 11 #define PAGE_MASK       (~(PAGE_SIZE-1))
 12 
 13 #ifndef __ASSEMBLY__
 14 
 15 #define STRICT_MM_TYPECHECKS
 16 
 17 extern void clear_page(void *page);
 18 #define clear_user_page(page, vaddr, pg)        clear_page(page)
 19 
 20 #define __alloc_zeroed_user_highpage(movableflags, vma, vaddr) \
 21         alloc_page_vma(GFP_HIGHUSER | __GFP_ZERO | movableflags, vma, vmaddr)
 22 #define __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE
 23 
 24 extern void copy_page(void * _to, void * _from);
 25 #define copy_user_page(to, from, vaddr, pg)     copy_page(to, from)
 26 
 27 #ifdef STRICT_MM_TYPECHECKS
 28 /*
 29  * These are used to make use of C type-checking..
 30  */
 31 typedef struct { unsigned long pte; } pte_t;
 32 typedef struct { unsigned long pmd; } pmd_t;
 33 typedef struct { unsigned long pgd; } pgd_t;
 34 typedef struct { unsigned long pgprot; } pgprot_t;
 35 
 36 #define pte_val(x)      ((x).pte)
 37 #define pmd_val(x)      ((x).pmd)
 38 #define pgd_val(x)      ((x).pgd)
 39 #define pgprot_val(x)   ((x).pgprot)
 40 
 41 #define __pte(x)        ((pte_t) { (x) } )
 42 #define __pmd(x)        ((pmd_t) { (x) } )
 43 #define __pgd(x)        ((pgd_t) { (x) } )
 44 #define __pgprot(x)     ((pgprot_t) { (x) } )
 45 
 46 #else
 47 /*
 48  * .. while these make it easier on the compiler
 49  */
 50 typedef unsigned long pte_t;
 51 typedef unsigned long pmd_t;
 52 typedef unsigned long pgd_t;
 53 typedef unsigned long pgprot_t;
 54 
 55 #define pte_val(x)      (x)
 56 #define pmd_val(x)      (x)
 57 #define pgd_val(x)      (x)
 58 #define pgprot_val(x)   (x)
 59 
 60 #define __pte(x)        (x)
 61 #define __pgd(x)        (x)
 62 #define __pgprot(x)     (x)
 63 
 64 #endif /* STRICT_MM_TYPECHECKS */
 65 
 66 typedef struct page *pgtable_t;
 67 
 68 #ifdef USE_48_BIT_KSEG
 69 #define PAGE_OFFSET             0xffff800000000000UL
 70 #else
 71 #define PAGE_OFFSET             0xfffffc0000000000UL
 72 #endif
 73 
 74 #else
 75 
 76 #ifdef USE_48_BIT_KSEG
 77 #define PAGE_OFFSET             0xffff800000000000
 78 #else
 79 #define PAGE_OFFSET             0xfffffc0000000000
 80 #endif
 81 
 82 #endif /* !__ASSEMBLY__ */
 83 
 84 #define __pa(x)                 ((unsigned long) (x) - PAGE_OFFSET)
 85 #define __va(x)                 ((void *)((unsigned long) (x) + PAGE_OFFSET))
 86 #ifndef CONFIG_DISCONTIGMEM
 87 #define virt_to_page(kaddr)     pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
 88 
 89 #define pfn_valid(pfn)          ((pfn) < max_mapnr)
 90 #define virt_addr_valid(kaddr)  pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
 91 #endif /* CONFIG_DISCONTIGMEM */
 92 
 93 #define VM_DATA_DEFAULT_FLAGS           (VM_READ | VM_WRITE | VM_EXEC | \
 94                                          VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
 95 
 96 #include <asm-generic/memory_model.h>
 97 #include <asm-generic/getorder.h>
 98 
 99 #endif /* _ALPHA_PAGE_H */
100 

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