1
2
3
4
5
6
7
8
9
10#ifndef __ASM_SH_ADDRSPACE_H
11#define __ASM_SH_ADDRSPACE_H
12
13#ifdef __KERNEL__
14
15#include <cpu/addrspace.h>
16
17
18#ifdef P1SEG
19
20
21
22
23
24
25
26
27
28
29#define PXSEG(a) (((unsigned long)(a)) & 0xe0000000)
30
31#ifdef CONFIG_29BIT
32
33
34
35#define P1SEGADDR(a) \
36 ((__typeof__(a))(((unsigned long)(a) & 0x1fffffff) | P1SEG))
37#define P2SEGADDR(a) \
38 ((__typeof__(a))(((unsigned long)(a) & 0x1fffffff) | P2SEG))
39#define P3SEGADDR(a) \
40 ((__typeof__(a))(((unsigned long)(a) & 0x1fffffff) | P3SEG))
41#define P4SEGADDR(a) \
42 ((__typeof__(a))(((unsigned long)(a) & 0x1fffffff) | P4SEG))
43#else
44
45
46
47#define P1SEGADDR(a) ({ (void)(a); BUG(); NULL; })
48#define P2SEGADDR(a) ({ (void)(a); BUG(); NULL; })
49#define P3SEGADDR(a) ({ (void)(a); BUG(); NULL; })
50#define P4SEGADDR(a) ({ (void)(a); BUG(); NULL; })
51#endif
52#endif
53
54
55#define IS_29BIT(a) (((unsigned long)(a)) < 0x20000000)
56
57#ifdef CONFIG_SH_STORE_QUEUES
58
59
60
61
62
63#define P3_ADDR_MAX (P4SEG_STORE_QUE + 0x04000000)
64#else
65#define P3_ADDR_MAX P4SEG
66#endif
67
68#endif
69#endif
70