commented early_printk patch because of rejects.
[linux-flexiantxendom0-3.2.10.git] / include / asm-ia64 / sn / hcl.h
1 /* $Id$
2  *
3  * This file is subject to the terms and conditions of the GNU General Public
4  * License.  See the file "COPYING" in the main directory of this archive
5  * for more details.
6  *
7  * Copyright (C) 1992-1997,2000-2003 Silicon Graphics, Inc. All rights reserved.
8  */
9 #ifndef _ASM_IA64_SN_HCL_H
10 #define _ASM_IA64_SN_HCL_H
11
12 #include <asm/sn/sgi.h>
13
14 extern vertex_hdl_t hwgraph_root;
15 extern vertex_hdl_t linux_busnum;
16
17
18 typedef long            labelcl_info_place_t;
19 typedef long            arbitrary_info_t;
20 typedef long            arb_info_desc_t;
21
22 /* Support for INVENTORY */
23 struct inventory_s;
24 struct invplace_s;
25
26
27 /* 
28  * Reserve room in every vertex for 2 pieces of fast access indexed information 
29  * Note that we do not save a pointer to the bdevsw or cdevsw[] tables anymore.
30  */
31 #define HWGRAPH_NUM_INDEX_INFO  2       /* MAX Entries */
32 #define HWGRAPH_CONNECTPT       0       /* connect point (aprent) */
33 #define HWGRAPH_FASTINFO        1       /* callee's private handle */
34
35 /*
36  * Reserved edge_place_t values, used as the "place" parameter to edge_get_next.
37  * Every vertex in the hwgraph has up to 2 *implicit* edges.  There is an implicit
38  * edge called "." that points to the current vertex.  There is an implicit edge
39  * called ".." that points to the vertex' connect point.
40  */
41 #define EDGE_PLACE_WANT_CURRENT 0       /* "." */
42 #define EDGE_PLACE_WANT_CONNECTPT 1     /* ".." */
43 #define EDGE_PLACE_WANT_REAL_EDGES 2    /* Get the first real edge */
44 #define HWGRAPH_RESERVED_PLACES 2
45
46
47 /*
48  * Special pre-defined edge labels.
49  */
50 #define HWGRAPH_EDGELBL_HW      "hw"
51 #define HWGRAPH_EDGELBL_DOT     "."
52 #define HWGRAPH_EDGELBL_DOTDOT  ".."
53 #define graph_edge_place_t uint
54
55 /*
56  * External declarations of EXPORTED SYMBOLS in hcl.c
57  */
58 extern vertex_hdl_t hwgraph_register(vertex_hdl_t, const char *,
59         unsigned int, unsigned int, unsigned int, unsigned int,
60         umode_t, uid_t, gid_t, struct file_operations *, void *);
61
62 extern int hwgraph_mk_symlink(vertex_hdl_t, const char *, unsigned int,
63         unsigned int, const char *, unsigned int, vertex_hdl_t *, void *);
64
65 extern int hwgraph_vertex_destroy(vertex_hdl_t);
66
67 extern int hwgraph_edge_add(vertex_hdl_t, vertex_hdl_t, char *);
68 extern int hwgraph_edge_get(vertex_hdl_t, char *, vertex_hdl_t *);
69
70 extern arbitrary_info_t hwgraph_fastinfo_get(vertex_hdl_t);
71 extern void hwgraph_fastinfo_set(vertex_hdl_t, arbitrary_info_t );
72 extern vertex_hdl_t hwgraph_mk_dir(vertex_hdl_t, const char *, unsigned int, void *);
73
74 extern int hwgraph_connectpt_set(vertex_hdl_t, vertex_hdl_t);
75 extern vertex_hdl_t hwgraph_connectpt_get(vertex_hdl_t);
76 extern int hwgraph_edge_get_next(vertex_hdl_t, char *, vertex_hdl_t *, uint *);
77 extern graph_error_t hwgraph_edge_remove(vertex_hdl_t, char *, vertex_hdl_t *);
78
79 extern graph_error_t hwgraph_traverse(vertex_hdl_t, char *, vertex_hdl_t *);
80
81 extern int hwgraph_vertex_get_next(vertex_hdl_t *, vertex_hdl_t *);
82 extern int hwgraph_inventory_get_next(vertex_hdl_t, invplace_t *, 
83                                       inventory_t **);
84 extern int hwgraph_inventory_add(vertex_hdl_t, int, int, major_t, minor_t, int);
85 extern int hwgraph_inventory_remove(vertex_hdl_t, int, int, major_t, minor_t, int);
86 extern int hwgraph_controller_num_get(vertex_hdl_t);
87 extern void hwgraph_controller_num_set(vertex_hdl_t, int);
88 extern int hwgraph_path_ad(vertex_hdl_t, char *, vertex_hdl_t *);
89 extern vertex_hdl_t hwgraph_path_to_vertex(char *);
90 extern vertex_hdl_t hwgraph_path_to_dev(char *);
91 extern vertex_hdl_t hwgraph_block_device_get(vertex_hdl_t);
92 extern vertex_hdl_t hwgraph_char_device_get(vertex_hdl_t);
93 extern graph_error_t hwgraph_char_device_add(vertex_hdl_t, char *, char *, vertex_hdl_t *);
94 extern int hwgraph_path_add(vertex_hdl_t, char *, vertex_hdl_t *);
95 extern int hwgraph_info_add_LBL(vertex_hdl_t, char *, arbitrary_info_t);
96 extern int hwgraph_info_get_LBL(vertex_hdl_t, char *, arbitrary_info_t *);
97 extern int hwgraph_info_replace_LBL(vertex_hdl_t, char *, arbitrary_info_t,
98                                     arbitrary_info_t *);
99 extern int hwgraph_info_get_exported_LBL(vertex_hdl_t, char *, int *, arbitrary_info_t *);
100 extern int hwgraph_info_get_next_LBL(vertex_hdl_t, char *, arbitrary_info_t *,
101                                 labelcl_info_place_t *);
102 extern int hwgraph_info_export_LBL(vertex_hdl_t, char *, int);
103 extern int hwgraph_info_unexport_LBL(vertex_hdl_t, char *);
104 extern int hwgraph_info_remove_LBL(vertex_hdl_t, char *, arbitrary_info_t *);
105 extern char * vertex_to_name(vertex_hdl_t, char *, uint);
106 extern graph_error_t hwgraph_vertex_unref(vertex_hdl_t);
107
108 extern int init_hcl(void);
109
110 #endif /* _ASM_IA64_SN_HCL_H */