x86: ordering functions in io_apic_32.c
[deliverable/linux.git] / include / asm-x86 / page_32.h
CommitLineData
77ef50a5
VN
1#ifndef ASM_X86__PAGE_32_H
2#define ASM_X86__PAGE_32_H
11b7c7dc
JF
3
4/*
5 * This handles the memory map.
6 *
7 * A __PAGE_OFFSET of 0xC0000000 means that the kernel has
8 * a virtual address space of one gigabyte, which limits the
9 * amount of physical memory you can use to about 950MB.
10 *
11 * If you want more physical memory than this then see the CONFIG_HIGHMEM4G
12 * and CONFIG_HIGHMEM64G options in the kernel configuration.
13 */
14#define __PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL)
15
b84200b3
CL
16#ifdef CONFIG_4KSTACKS
17#define THREAD_ORDER 0
18#else
19#define THREAD_ORDER 1
20#endif
21#define THREAD_SIZE (PAGE_SIZE << THREAD_ORDER)
22
699d2937
AH
23#define STACKFAULT_STACK 0
24#define DOUBLEFAULT_STACK 1
25#define NMI_STACK 0
26#define DEBUG_STACK 0
27#define MCE_STACK 0
28#define N_EXCEPTION_STACKS 1
b84200b3 29
11b7c7dc 30#ifdef CONFIG_X86_PAE
ad524d46
JF
31/* 44=32+12, the limit we can fit into an unsigned long pfn */
32#define __PHYSICAL_MASK_SHIFT 44
11b7c7dc
JF
33#define __VIRTUAL_MASK_SHIFT 32
34#define PAGETABLE_LEVELS 3
1da177e4 35
1da177e4 36#ifndef __ASSEMBLY__
11b7c7dc
JF
37typedef u64 pteval_t;
38typedef u64 pmdval_t;
39typedef u64 pudval_t;
40typedef u64 pgdval_t;
41typedef u64 pgprotval_t;
42typedef u64 phys_addr_t;
1da177e4 43
c8e5393a
JF
44typedef union {
45 struct {
46 unsigned long pte_low, pte_high;
47 };
48 pteval_t pte;
49} pte_t;
11b7c7dc 50#endif /* __ASSEMBLY__
1da177e4 51 */
11b7c7dc
JF
52#else /* !CONFIG_X86_PAE */
53#define __PHYSICAL_MASK_SHIFT 32
54#define __VIRTUAL_MASK_SHIFT 32
55#define PAGETABLE_LEVELS 2
56
57#ifndef __ASSEMBLY__
58typedef unsigned long pteval_t;
59typedef unsigned long pmdval_t;
60typedef unsigned long pudval_t;
61typedef unsigned long pgdval_t;
62typedef unsigned long pgprotval_t;
63typedef unsigned long phys_addr_t;
3dc494e8 64
095d1c4e
JP
65typedef union {
66 pteval_t pte;
67 pteval_t pte_low;
68} pte_t;
11b7c7dc 69
11b7c7dc
JF
70#endif /* __ASSEMBLY__ */
71#endif /* CONFIG_X86_PAE */
72
3bf8f5a9
IM
73#ifndef __ASSEMBLY__
74typedef struct page *pgtable_t;
75#endif
76
11b7c7dc
JF
77#ifdef CONFIG_HUGETLB_PAGE
78#define HAVE_ARCH_HUGETLB_UNMAPPED_AREA
79#endif
1da177e4 80
1da177e4 81#ifndef __ASSEMBLY__
af5c2bd1 82#define __phys_addr_nodebug(x) ((x) - PAGE_OFFSET)
a1bf9631 83#ifdef CONFIG_DEBUG_VIRTUAL
59ea7463 84extern unsigned long __phys_addr(unsigned long);
a1bf9631 85#else
af5c2bd1 86#define __phys_addr(x) __phys_addr_nodebug(x)
a1bf9631 87#endif
11b7c7dc
JF
88#define __phys_reloc_hide(x) RELOC_HIDE((x), 0)
89
90#ifdef CONFIG_FLATMEM
91#define pfn_valid(pfn) ((pfn) < max_mapnr)
92#endif /* CONFIG_FLATMEM */
93
94extern int nx_enabled;
95
96/*
97 * This much address space is reserved for vmalloc() and iomap()
98 * as well as fixmap mappings.
99 */
100extern unsigned int __VMALLOC_RESERVE;
101extern int sysctl_legacy_va_layout;
11b7c7dc 102
2ec65f8b 103extern void find_low_pfn_range(void);
4e29684c
YL
104extern unsigned long init_memory_mapping(unsigned long start,
105 unsigned long end);
2ec65f8b 106extern void initmem_init(unsigned long, unsigned long);
a80495ec 107extern void free_initmem(void);
b2ac82a0
YL
108extern void setup_bootmem_allocator(void);
109
110
11b7c7dc
JF
111#ifdef CONFIG_X86_USE_3DNOW
112#include <asm/mmx.h>
e6e5494c 113
11b7c7dc
JF
114static inline void clear_page(void *page)
115{
116 mmx_clear_page(page);
117}
1da177e4 118
11b7c7dc
JF
119static inline void copy_page(void *to, void *from)
120{
121 mmx_copy_page(to, from);
122}
123#else /* !CONFIG_X86_USE_3DNOW */
124#include <linux/string.h>
1da177e4 125
11b7c7dc
JF
126static inline void clear_page(void *page)
127{
128 memset(page, 0, PAGE_SIZE);
129}
fd4fd5aa 130
11b7c7dc
JF
131static inline void copy_page(void *to, void *from)
132{
133 memcpy(to, from, PAGE_SIZE);
134}
135#endif /* CONFIG_X86_3DNOW */
136#endif /* !__ASSEMBLY__ */
cd469e0c 137
77ef50a5 138#endif /* ASM_X86__PAGE_32_H */
This page took 0.477929 seconds and 5 git commands to generate.