root/include/asm-alpha/shmparam.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 #ifndef _ASMAXP_SHMPARAM_H
   2 #define _ASMAXP_SHMPARAM_H
   3 
   4 /*
   5  * Address range for shared memory attaches if no address passed to
   6  * shmat().  These ought to be changed to something >4GB so 32-bit
   7  * errors are caught more easily.  However, they don't seem to be used
   8  * execept for ELF stuff, so it's not really critical until we get ELF
   9  * support for the Alpha.
  10  */
  11 #define SHM_RANGE_START 0x50000000
  12 #define SHM_RANGE_END   0x60000000
  13 
  14 /*
  15  * Format of a swap-entry for shared memory pages currently out in
  16  * swap space (see also mm/swap.c).
  17  *
  18  * SWP_TYPE = SHM_SWP_TYPE
  19  * SWP_OFFSET is used as follows:
  20  *
  21  *  bits 0..6 : id of shared memory segment page belongs to (SHM_ID)
  22  *  bits 7..21: index of page within shared memory segment (SHM_IDX)
  23  *              (actually fewer bits get used since SHMMAX is so low)
  24  */
  25 
  26 /*
  27  * Keep _SHM_ID_BITS as low as possible since SHMMNI depends on it and
  28  * there is a static array of size SHMMNI.
  29  */
  30 #define _SHM_ID_BITS    7
  31 #define SHM_ID_MASK     ((1<<_SHM_ID_BITS)-1)
  32 
  33 #define SHM_IDX_SHIFT   (_SHM_ID_BITS)
  34 #define _SHM_IDX_BITS   15
  35 #define SHM_IDX_MASK    ((1<<_SHM_IDX_BITS)-1)
  36 
  37 /*
  38  * _SHM_ID_BITS + _SHM_IDX_BITS must be <= 24 on the Alpha and
  39  * SHMMAX <= (PAGE_SIZE << _SHM_IDX_BITS).
  40  */
  41 
  42 #define SHMMAX 0x3fa000                 /* max shared seg size (bytes) */
  43 #define SHMMIN 1 /* really PAGE_SIZE */ /* min shared seg size (bytes) */
  44 #define SHMMNI (1<<_SHM_ID_BITS)        /* max num of segs system wide */
  45 #define SHMALL                          /* max shm system wide (pages) */ \
  46         (1<<(_SHM_IDX_BITS+_SHM_ID_BITS))
  47 #define SHMLBA PAGE_SIZE                /* attach addr a multiple of this */
  48 #define SHMSEG SHMMNI                   /* max shared segs per process */
  49 
  50 #endif /* _ASMAXP_SHMPARAM_H */

/* [previous][next][first][last][top][bottom][index][help] */