OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [rc203soc/] [sw/] [uClinux/] [include/] [asm-armnommu/] [proc-trio/] [page.h] - Blame information for rev 1782

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1633 jcastillo
/*
2
 * linux/include/asm-arm/proc-armv/page.h
3
 *
4
 * Copyright (C) 1995, 1996 Russell King
5
 */
6
 
7
#ifndef __ASM_PROC_PAGE_H
8
#define __ASM_PROC_PAGE_H
9
 
10
/* PAGE_SHIFT determines the page size */
11
#define PAGE_SHIFT      12
12
#define PAGE_SIZE       (1UL << PAGE_SHIFT)
13
#define PAGE_MASK       (~(PAGE_SIZE-1))
14
 
15
#ifdef __KERNEL__
16
 
17
#define STRICT_MM_TYPECHECKS
18
 
19
#ifdef STRICT_MM_TYPECHECKS
20
/*
21
 * These are used to make use of C type-checking..
22
 */
23
typedef struct { unsigned long pte; } pte_t;
24
typedef struct { unsigned long pmd; } pmd_t;
25
typedef struct { unsigned long pgd; } pgd_t;
26
typedef struct { unsigned long pgprot; } pgprot_t;
27
 
28
#define pte_val(x)      ((x).pte)
29
#define pmd_val(x)      ((x).pmd)
30
#define pgd_val(x)      ((x).pgd)
31
#define pgprot_val(x)   ((x).pgprot)
32
 
33
#define __pte(x)        ((pte_t) { (x) } )
34
#define __pmd(x)        ((pmd_t) { (x) } )
35
#define __pgd(x)        ((pgd_t) { (x) } )
36
#define __pgprot(x)     ((pgprot_t) { (x) } )
37
 
38
#else
39
/*
40
 * .. while these make it easier on the compiler
41
 */
42
typedef unsigned long pte_t;
43
typedef unsigned long pmd_t;
44
typedef unsigned long pgd_t;
45
typedef unsigned long pgprot_t;
46
 
47
#define pte_val(x)      (x)
48
#define pmd_val(x)      (x)
49
#define pgd_val(x)      (x)
50
#define pgprot_val(x)   (x)
51
 
52
#define __pte(x)        (x)
53
#define __pmd(x)        (x)
54
#define __pgd(x)        (x)
55
#define __pgprot(x)     (x)
56
 
57
#endif
58
 
59
/* to align the pointer to the (next) page boundary */
60
#define PAGE_ALIGN(addr)        (((addr)+PAGE_SIZE-1)&PAGE_MASK)
61
 
62
/* This handles the memory map.. */
63
#define PAGE_OFFSET             0xc0000000
64
#define MAP_NR(addr)            (((unsigned long)(addr) - PAGE_OFFSET) >> PAGE_SHIFT)
65
 
66
#endif /* __KERNEL__ */
67
 
68
#endif /* __ASM_PROC_PAGE_H */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.