Standardize License information
[openafs.git] / src / afs / IRIX / osi_misc.c
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  * 
5  * This software has been released under the terms of the IBM Public
6  * License.  For details, see the LICENSE file in the top-level source
7  * directory or online at http://www.openafs.org/dl/license10.html
8  */
9
10 /*
11  * Implementation of miscellaneous Irix routines.
12  */
13 #include "../afs/param.h"       /* Should be always first */
14 #ifdef  AFS_SGI62_ENV
15 #include "../afs/sysincludes.h" /* Standard vendor system headers */
16 #include "../afs/afsincludes.h" /* Afs-based standard headers */
17 #include "../afs/afs_stats.h"  /* statistics */
18
19
20
21
22 /*
23  * various special purpose routines
24  */
25 void afs_mpservice(void *a) {}
26
27 #ifdef AFS_SGI_VNODE_GLUE
28 #include <sys/invent.h>
29 extern mutex_t afs_init_kern_lock;
30
31 /* afs_init_kernel_config
32  *
33  * initialize vnode glue layer by testing for NUMA.
34  * Argument: flag
35  * 0 = no numa, 1 = has numa, -1 = test for numa.
36  */
37 int afs_init_kernel_config(int flag)
38 {
39     static int afs_kern_inited = 0;
40     int code = 0;
41     
42     mutex_enter(&afs_init_kern_lock);
43     if (!afs_kern_inited) {
44         afs_kern_inited = 1;
45         
46         if (flag == -1) {
47             inventory_t *pinv;
48             /* test for numa arch. */
49             /* Determine if thisis a NUMA platform. Currently, this is true
50              * only if it's an IP27.
51              */
52             pinv = find_inventory((inventory_t*)NULL, INV_PROCESSOR,
53                                   INV_CPUBOARD, -1, -1, -1);
54             if (!pinv)
55                 code = ENODEV;
56             else
57                 afs_is_numa_arch = (pinv->inv_state == INV_IP27BOARD) ? 1 : 0;
58         }
59         else
60             afs_is_numa_arch = flag;
61     }
62     mutex_exit(&afs_init_kern_lock);
63     return code;
64 }
65 #endif /* AFS_SGI_VNODE_GLUE */
66
67 /* And just so we know what someone is _really_ running */
68 #ifdef IP19
69 int afs_ipno = 19;
70 #elif defined(IP20)
71 int afs_ipno = 20;
72 #elif defined(IP21)
73 int afs_ipno = 21;
74 #elif defined(IP25)
75 int afs_ipno = 25;
76 #elif defined(IP26)
77 int afs_ipno = 26;
78 #elif defined(IP27)
79 int afs_ipno = 27;
80 #elif defined(IP28)
81 int afs_ipno = 28;
82 #elif defined(IP30)
83 int afs_ipno = 30;
84 #else
85 int afs_ipno = -1;
86 #endif
87
88
89 #endif /* AFS_SGI62_ENV */