Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros
addrspace.h File Reference
#include <spaces.h>

Go to the source code of this file.

Macros

#define _ATYPE_   __PTRDIFF_TYPE__
 
#define _ATYPE32_   int
 
#define _ATYPE64_   __s64
 
#define _CONST64_(x)   x ## LL
 
#define _ACAST32_   (_ATYPE_)(_ATYPE32_) /* widen if necessary */
 
#define _ACAST64_   (_ATYPE64_) /* do _not_ narrow */
 
#define KSEGX(a)   ((_ACAST32_ (a)) & 0xe0000000)
 
#define CPHYSADDR(a)   ((_ACAST32_(a)) & 0x1fffffff)
 
#define XPHYSADDR(a)
 
#define CKSEG0ADDR(a)   (CPHYSADDR(a) | KSEG0)
 
#define CKSEG1ADDR(a)   (CPHYSADDR(a) | KSEG1)
 
#define CKSEG2ADDR(a)   (CPHYSADDR(a) | KSEG2)
 
#define CKSEG3ADDR(a)   (CPHYSADDR(a) | KSEG3)
 
#define KSEG0ADDR(a)   (CPHYSADDR(a) | KSEG0)
 
#define KSEG1ADDR(a)   (CPHYSADDR(a) | KSEG1)
 
#define KSEG2ADDR(a)   (CPHYSADDR(a) | KSEG2)
 
#define KSEG3ADDR(a)   (CPHYSADDR(a) | KSEG3)
 
#define KUSEG   0x00000000
 
#define KSEG0   0x80000000
 
#define KSEG1   0xa0000000
 
#define KSEG2   0xc0000000
 
#define KSEG3   0xe0000000
 
#define CKUSEG   0x00000000
 
#define CKSEG0   0x80000000
 
#define CKSEG1   0xa0000000
 
#define CKSEG2   0xc0000000
 
#define CKSEG3   0xe0000000
 
#define K_CALG_COH_EXCL1_NOL2   0
 
#define K_CALG_COH_SHRL1_NOL2   1
 
#define K_CALG_UNCACHED   2
 
#define K_CALG_NONCOHERENT   3
 
#define K_CALG_COH_EXCL   4
 
#define K_CALG_COH_SHAREABLE   5
 
#define K_CALG_NOTUSED   6
 
#define K_CALG_UNCACHED_ACCEL   7
 
#define PHYS_TO_XKSEG_UNCACHED(p)   PHYS_TO_XKPHYS(K_CALG_UNCACHED, (p))
 
#define PHYS_TO_XKSEG_CACHED(p)   PHYS_TO_XKPHYS(K_CALG_COH_SHAREABLE, (p))
 
#define XKPHYS_TO_PHYS(p)   ((p) & TO_PHYS_MASK)
 
#define PHYS_TO_XKPHYS(cm, a)
 
#define TO_PHYS_MASK   _CONST64_(0x07ffffffffffffff) /* 2^^59 - 1 */
 
#define COMPAT_K1BASE32   _CONST64_(0xffffffffa0000000)
 
#define PHYS_TO_COMPATK1(x)   ((x) | COMPAT_K1BASE32) /* 32-bit compat k1 */
 
#define KDM_TO_PHYS(x)   (_ACAST64_ (x) & TO_PHYS_MASK)
 
#define PHYS_TO_K0(x)   (_ACAST64_ (x) | CAC_BASE)
 

Macro Definition Documentation

#define _ACAST32_   (_ATYPE_)(_ATYPE32_) /* widen if necessary */

Definition at line 41 of file addrspace.h.

#define _ACAST64_   (_ATYPE64_) /* do _not_ narrow */

Definition at line 42 of file addrspace.h.

#define _ATYPE32_   int

Definition at line 25 of file addrspace.h.

#define _ATYPE64_   __s64

Definition at line 26 of file addrspace.h.

#define _ATYPE_   __PTRDIFF_TYPE__

Definition at line 24 of file addrspace.h.

#define _CONST64_ (   x)    x ## LL

Definition at line 30 of file addrspace.h.

#define CKSEG0   0x80000000

Definition at line 104 of file addrspace.h.

#define CKSEG0ADDR (   a)    (CPHYSADDR(a) | KSEG0)

Definition at line 80 of file addrspace.h.

#define CKSEG1   0xa0000000

Definition at line 105 of file addrspace.h.

#define CKSEG1ADDR (   a)    (CPHYSADDR(a) | KSEG1)

Definition at line 81 of file addrspace.h.

#define CKSEG2   0xc0000000

Definition at line 106 of file addrspace.h.

#define CKSEG2ADDR (   a)    (CPHYSADDR(a) | KSEG2)

Definition at line 82 of file addrspace.h.

#define CKSEG3   0xe0000000

Definition at line 107 of file addrspace.h.

#define CKSEG3ADDR (   a)    (CPHYSADDR(a) | KSEG3)

Definition at line 83 of file addrspace.h.

#define CKUSEG   0x00000000

Definition at line 103 of file addrspace.h.

#define COMPAT_K1BASE32   _CONST64_(0xffffffffa0000000)

Definition at line 146 of file addrspace.h.

#define CPHYSADDR (   a)    ((_ACAST32_(a)) & 0x1fffffff)

Definition at line 53 of file addrspace.h.

#define K_CALG_COH_EXCL   4

Definition at line 118 of file addrspace.h.

#define K_CALG_COH_EXCL1_NOL2   0

Definition at line 114 of file addrspace.h.

#define K_CALG_COH_SHAREABLE   5

Definition at line 119 of file addrspace.h.

#define K_CALG_COH_SHRL1_NOL2   1

Definition at line 115 of file addrspace.h.

#define K_CALG_NONCOHERENT   3

Definition at line 117 of file addrspace.h.

#define K_CALG_NOTUSED   6

Definition at line 120 of file addrspace.h.

#define K_CALG_UNCACHED   2

Definition at line 116 of file addrspace.h.

#define K_CALG_UNCACHED_ACCEL   7

Definition at line 121 of file addrspace.h.

#define KDM_TO_PHYS (   x)    (_ACAST64_ (x) & TO_PHYS_MASK)

Definition at line 151 of file addrspace.h.

#define KSEG0   0x80000000

Definition at line 98 of file addrspace.h.

#define KSEG0ADDR (   a)    (CPHYSADDR(a) | KSEG0)

Definition at line 88 of file addrspace.h.

#define KSEG1   0xa0000000

Definition at line 99 of file addrspace.h.

#define KSEG1ADDR (   a)    (CPHYSADDR(a) | KSEG1)

Definition at line 89 of file addrspace.h.

#define KSEG2   0xc0000000

Definition at line 100 of file addrspace.h.

#define KSEG2ADDR (   a)    (CPHYSADDR(a) | KSEG2)

Definition at line 90 of file addrspace.h.

#define KSEG3   0xe0000000

Definition at line 101 of file addrspace.h.

#define KSEG3ADDR (   a)    (CPHYSADDR(a) | KSEG3)

Definition at line 91 of file addrspace.h.

#define KSEGX (   a)    ((_ACAST32_ (a)) & 0xe0000000)

Definition at line 48 of file addrspace.h.

#define KUSEG   0x00000000

Definition at line 97 of file addrspace.h.

#define PHYS_TO_COMPATK1 (   x)    ((x) | COMPAT_K1BASE32) /* 32-bit compat k1 */

Definition at line 147 of file addrspace.h.

#define PHYS_TO_K0 (   x)    (_ACAST64_ (x) | CAC_BASE)

Definition at line 152 of file addrspace.h.

#define PHYS_TO_XKPHYS (   cm,
  a 
)
Value:
(_CONST64_(0x8000000000000000) | \
(_CONST64_(cm) << 59) | (a))

Definition at line 129 of file addrspace.h.

#define PHYS_TO_XKSEG_CACHED (   p)    PHYS_TO_XKPHYS(K_CALG_COH_SHAREABLE, (p))

Definition at line 127 of file addrspace.h.

#define PHYS_TO_XKSEG_UNCACHED (   p)    PHYS_TO_XKPHYS(K_CALG_UNCACHED, (p))

Definition at line 126 of file addrspace.h.

#define TO_PHYS_MASK   _CONST64_(0x07ffffffffffffff) /* 2^^59 - 1 */

Definition at line 137 of file addrspace.h.

#define XKPHYS_TO_PHYS (   p)    ((p) & TO_PHYS_MASK)

Definition at line 128 of file addrspace.h.

#define XPHYSADDR (   a)
Value:
((_ACAST64_(a)) & \
_CONST64_(0x000000ffffffffff))

Definition at line 54 of file addrspace.h.