1
2
3
4
5
6
7
8
9
10#ifndef _ASM_MACH_GENERIC_SPACES_H
11#define _ASM_MACH_GENERIC_SPACES_H
12
13#include <linux/const.h>
14
15
16
17
18#ifndef PHYS_OFFSET
19#define PHYS_OFFSET _AC(0, UL)
20#endif
21
22#ifdef CONFIG_32BIT
23#ifdef CONFIG_KVM_GUEST
24#define CAC_BASE _AC(0x40000000, UL)
25#else
26#define CAC_BASE _AC(0x80000000, UL)
27#endif
28#ifndef IO_BASE
29#define IO_BASE _AC(0xa0000000, UL)
30#endif
31#ifndef UNCAC_BASE
32#define UNCAC_BASE _AC(0xa0000000, UL)
33#endif
34
35#ifndef MAP_BASE
36#ifdef CONFIG_KVM_GUEST
37#define MAP_BASE _AC(0x60000000, UL)
38#else
39#define MAP_BASE _AC(0xc0000000, UL)
40#endif
41#endif
42
43
44
45
46#ifndef HIGHMEM_START
47#define HIGHMEM_START _AC(0x20000000, UL)
48#endif
49
50#endif
51
52#ifdef CONFIG_64BIT
53
54#ifndef CAC_BASE
55#ifdef CONFIG_DMA_NONCOHERENT
56#define CAC_BASE _AC(0x9800000000000000, UL)
57#else
58#define CAC_BASE _AC(0xa800000000000000, UL)
59#endif
60#endif
61
62#ifndef IO_BASE
63#define IO_BASE _AC(0x9000000000000000, UL)
64#endif
65
66#ifndef UNCAC_BASE
67#define UNCAC_BASE _AC(0x9000000000000000, UL)
68#endif
69
70#ifndef MAP_BASE
71#define MAP_BASE _AC(0xc000000000000000, UL)
72#endif
73
74
75
76
77
78
79#ifndef HIGHMEM_START
80#define HIGHMEM_START (_AC(1, UL) << _AC(59, UL))
81#endif
82
83#define TO_PHYS(x) ( ((x) & TO_PHYS_MASK))
84#define TO_CAC(x) (CAC_BASE | ((x) & TO_PHYS_MASK))
85#define TO_UNCAC(x) (UNCAC_BASE | ((x) & TO_PHYS_MASK))
86
87#endif
88
89
90
91
92#ifndef PAGE_OFFSET
93#define PAGE_OFFSET (CAC_BASE + PHYS_OFFSET)
94#endif
95
96#ifndef FIXADDR_TOP
97#define FIXADDR_TOP ((unsigned long)(long)(int)0xfffe0000)
98#endif
99
100#endif
101