00001 #ifndef pfndef_h
00002 #define pfndef_h
00003
00004 #include <shm_iddef.h>
00005
00006 #define PMAP_C_LENGTH 8
00007
00008 #define PLNK_C_LENGTH 8
00009
00010 #define PFN_M_PAGTYP 0x7
00011 #define PFN_M_LOC 0xF0
00012 #define PFN_M_BUFOBJ 0x100
00013 #define PFN_M_COLLISION 0x200
00014 #define PFN_M_BADPAG 0x400
00015 #define PFN_M_RPTEVT 0x800
00016 #define PFN_M_DELCON 0x1000
00017 #define PFN_M_MODIFY 0x2000
00018 #define PFN_M_UNAVAILABLE 0x4000
00019 #define PFN_M_SWPPAG_VALID 0x8000
00020 #define PFN_M_TOP_LEVEL_PT 0x10000
00021 #define PFN_M_SLOT 0x20000
00022 #define PFN_M_SHARED 0x40000
00023 #define PFN_M_ZEROED 0x80000
00024 #define PFN_S_INDEX_WIDTH 48
00025 #define PFN_M_TYP0 0x10000
00026 #define PFN_M_PARTIAL_SECTION 0x80000
00027 #define PFN_M_GBLBAK 0x80000000
00028 #define PFN_M_STX 0xFFFF00000000
00029 #define PFN_M_CRF 0x1000000000000
00030 #define PFN_M_DZRO 0x2000000000000
00031 #define PFN_M_WRT 0x4000000000000
00032 #define PFN_M_STX_HIBIT 0x8000000000000
00033 #define PFN_M_PGFLPAG 0xFFFFFF00000000
00034 #define PFN_M_PGFLX 0xFF00000000000000
00035 #define PFN_M_BAKX 0xFFFFFFFF00000000
00036 #define PFN_M_GPTX 0xFFFFFFFF00000000
00037 #define PFN_C_ENTRY_SIZE 40
00038 #define PFN_C_FREPAGLST 0
00039 #define PFN_C_MFYPAGLST 1
00040 #define PFN_C_BADPAGLST 2
00041 #define PFN_C_RELPEND 3
00042 #define PFN_C_UNTESTED 3
00043 #define PFN_C_RDERR 4
00044 #define PFN_C_WRTINPROG 5
00045 #define PFN_C_RDINPROG 6
00046 #define PFN_C_ZERO_LIST 7
00047 #define PFN_C_PRVPFN 8
00048 #define PFN_C_ACTIVE 15
00049 #define PFN_C_PROCESS 0
00050 #define PFN_C_SYSTEM 1
00051 #define PFN_C_GLOBAL 2
00052 #define PFN_C_GBLWRT 3
00053 #define PFN_C_PPGTBL 4
00054 #define PFN_C_GPGTBL 5
00055 #define PFN_C_RESERVED 6
00056 #define PFN_C_UNKNOWN 7
00057 #define PFN_C_PFNLST 1
00058 #define PFN_C_SHM_REG 3
00059 #define PFN_S_PFNDEF 40
00060
00061 #define PRVPFN_K_LENGTH 40
00062 #define PRVPFN_C_LENGTH 40
00063
00064 struct _pmap {
00065 unsigned int pmap_l_start_pfn;
00066 unsigned int pmap_l_pfn_count;
00067 };
00068
00069 struct _plnk {
00070 union {
00071 unsigned long long plnk_q_pfn_list_link;
00072 struct {
00073 unsigned int plnk_l_next_pfn;
00074 unsigned int plnk_l_pfn_count;
00075 };
00076 };
00077 };
00078
00079 #ifdef CONFIG_MM_VMS
00080 #define _pfn page
00081 typedef struct page {
00082 #else
00083 struct _pfn {
00084 #endif
00085 union {
00086 struct _plnk pfn_r_shm_list_link;
00087 struct _shm_id pfn_r_shm_reg_id;
00088 struct {
00089 union {
00090 unsigned int pfn_l_flink;
00091 unsigned int pfn_l_shrcnt;
00092 };
00093 union {
00094 unsigned int pfn_l_blink;
00095 unsigned int pfn_l_wslx_qw;
00096 unsigned int pfn_l_gbl_lck_cnt;
00097 };
00098 };
00099 };
00100 union {
00101 unsigned int pfn_l_page_state;
00102 struct {
00103 unsigned pfn_v_pagtyp : 3;
00104 unsigned pfndef_$_fill_1 : 1;
00105 unsigned pfn_v_loc : 4;
00106 unsigned pfn_v_bufobj : 1;
00107 unsigned pfn_v_collision : 1;
00108 unsigned pfn_v_badpag : 1;
00109 unsigned pfn_v_rptevt : 1;
00110 unsigned pfn_v_delcon : 1;
00111 unsigned pfn_v_modify : 1;
00112 unsigned pfn_v_unavailable : 1;
00113 unsigned pfn_v_swppag_valid : 1;
00114 unsigned pfn_v_top_level_pt : 1;
00115 unsigned pfn_v_slot : 1;
00116 unsigned pfn_v_shared : 1;
00117 unsigned pfn_v_zeroed : 1;
00118 unsigned pfndef_$_fill_3 : 12;
00119 };
00120 };
00121 union {
00122 unsigned int pfn_l_pt_pfn;
00123 unsigned int pfn_l_shm_cpp_id;
00124 };
00125 union {
00126 unsigned long long pfn_q_pte_index;
00127 struct {
00128 int pfn_l_refcnt_fill1;
00129
00130 union {
00131 unsigned long npfn_l_refcnt;
00132 atomic_t ncount;
00133 };
00134 };
00135 };
00136 union {
00137 unsigned long pfn_l_refcnt;
00138 atomic_t count;
00139 };
00140 union {
00141 unsigned long long pfn_q_bak;
00142 struct _phd *pfn_l_phd;
00143 struct {
00144 unsigned int pfn_l_color_flink;
00145 unsigned int pfn_l_color_blink;
00146 };
00147 struct {
00148 unsigned pfn_v_fill_5 : 16;
00149 unsigned pfn_v_typ0 : 1;
00150 unsigned pfn_v_fill_6 : 2;
00151 unsigned pfn_v_partial_section : 1;
00152 unsigned pfn_v_fill_7 : 11;
00153 unsigned pfn_v_gblbak : 1;
00154 };
00155 struct {
00156 unsigned pfn_v_fill_13 : 32;
00157 unsigned pfn_v_stx : 16;
00158 unsigned pfn_v_crf : 1;
00159 unsigned pfn_v_dzro : 1;
00160 unsigned pfn_v_wrt : 1;
00161 unsigned pfn_v_stx_hibit : 1;
00162 unsigned pfn_v_fill_0_ : 4;
00163 };
00164 struct {
00165 unsigned pfn_v_fill_9 : 32;
00166 unsigned pfn_v_pgflpag : 24;
00167 unsigned pfn_v_pgflx : 8;
00168 };
00169 struct {
00170 unsigned pfn_v_fill_11 : 32;
00171 unsigned pfn_v_bakx : 32;
00172 };
00173 struct {
00174 unsigned pfn_v_fill_12 : 32;
00175 unsigned pfn_v_gptx : 32;
00176 };
00177 unsigned long long pfn_q_bak_prvpfn;
00178 };
00179 union {
00180 unsigned short int pfn_w_swppag;
00181 unsigned short int pfn_w_bo_refc;
00182 unsigned short int pfn_w_io_sts;
00183 };
00184 unsigned short int pfn_w_pt_val_cnt;
00185 unsigned short int pfn_w_pt_lck_cnt;
00186 unsigned short int pfn_w_pt_win_cnt;
00187
00188 struct list_head list;
00189 #if 0
00190 struct address_space *mapping;
00191 unsigned long index;
00192 #endif
00193
00194
00195
00196
00197
00198
00199 ;
00200
00201
00202
00203
00204
00205
00206
00207
00208 #ifdef CONFIG_MM_VMS
00209 } mem_map_t;
00210 #else
00211 };
00212 #endif
00213
00214 struct _prvpfn {
00215 struct _prvpfn *prvpfn_l_sqfl;
00216 struct _prvpfn *prvpfn_l_sqbl;
00217 unsigned short int prvpfn_w_size;
00218 unsigned char prvpfn_b_type;
00219 unsigned char prvpfn_b_subtype;
00220 unsigned int prvpfn_l_count;
00221 unsigned int prvpfn_l_head;
00222 unsigned int prvpfn_l_tail;
00223 unsigned int prvpfn_l_reclaimable;
00224 unsigned int prvpfn_l_reclaimed;
00225 int prvpfn_l_priority;
00226 void (*prvpfn_a_callback)();
00227 };
00228
00229 typedef struct _pfn * PFN_PQ;
00230 typedef struct _pfn ** PFN_PPQ;
00231 typedef struct _prvpfn * PRVPFN_PQ;
00232 typedef struct _prvpfn ** PRVPFN_PPQ;
00233 typedef struct _pmap * PMAP_PQ;
00234 typedef struct _pmap ** PMAP_PPQ;
00235 typedef struct _plnk * PLNK_PQ;
00236
00237 #endif
00238
00239