Revert "Revert "and added files""
[bcm963xx.git] / userapps / opensource / net-snmp / agent / mibgroup / ucd-snmp / memory_dynix.h
1 /*
2  *  memory quantity mib groups
3  *
4  */
5 #ifndef _MIBGROUP_MEMORY_DYNIX_H
6 #define _MIBGROUP_MEMORY_DYNIX_H
7
8 #include "mibdefs.h"
9
10 /*
11  * from /usr/include/sys/mc_param.h 
12  */
13 #define MMU_PAGESIZE 0x1000     /* 4096 bytes */
14
15 /*
16  * Here's the correct way to convert sectors to KB
17  * #define S2KB(size) (((size)*DEV_BSIZE)/1024)
18  * Here's the quick way plus no fear of overflow
19  */
20 #define S2KB(size)  ((size)/2)  /* sectors to KB */
21 #define S2MB(size)  (((size)+1023)/2048)        /* sectors to MB */
22 #define P2KB(size)  ((size)*(MMU_PAGESIZE/1024))        /* pages to KB */
23 #define P2MB(size)  ((P2KB(size)+511)/1024)     /* pages to MB */
24
25 void            init_memory_dynix(void);
26
27 #endif                          /* _MIBGROUP_MEMORY_DYNIX_H */