OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [include/] [asm-ia64/] [sn/] [hcl.h] - Blame information for rev 1774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
/* $Id: hcl.h,v 1.1.1.1 2004-04-15 02:42:28 phoenix Exp $
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
void hwgraph_debug(char *, char *, int, vertex_hdl_t, vertex_hdl_t, char *, ...);
18
 
19
#if 1
20
#define HWGRAPH_DEBUG(args) hwgraph_debug args ;
21
#else   
22
#define HWGRAPH_DEBUG(args)
23
#endif  
24
 
25
typedef long            labelcl_info_place_t;
26
typedef long            arbitrary_info_t;
27
typedef long            arb_info_desc_t;
28
 
29
/* Support for INVENTORY */
30
struct inventory_s;
31
struct invplace_s;
32
 
33
 
34
/*
35
 * Reserve room in every vertex for 2 pieces of fast access indexed information
36
 * Note that we do not save a pointer to the bdevsw or cdevsw[] tables anymore.
37
 */
38
#define HWGRAPH_NUM_INDEX_INFO  2       /* MAX Entries */
39
#define HWGRAPH_CONNECTPT       0        /* connect point (aprent) */
40
#define HWGRAPH_FASTINFO        1       /* callee's private handle */
41
 
42
/*
43
 * Reserved edge_place_t values, used as the "place" parameter to edge_get_next.
44
 * Every vertex in the hwgraph has up to 2 *implicit* edges.  There is an implicit
45
 * edge called "." that points to the current vertex.  There is an implicit edge
46
 * called ".." that points to the vertex' connect point.
47
 */
48
#define EDGE_PLACE_WANT_CURRENT 0       /* "." */
49
#define EDGE_PLACE_WANT_CONNECTPT 1     /* ".." */
50
#define EDGE_PLACE_WANT_REAL_EDGES 2    /* Get the first real edge */
51
#define HWGRAPH_RESERVED_PLACES 2
52
 
53
 
54
/*
55
 * Special pre-defined edge labels.
56
 */
57
#define HWGRAPH_EDGELBL_HW      "hw"
58
#define HWGRAPH_EDGELBL_DOT     "."
59
#define HWGRAPH_EDGELBL_DOTDOT  ".."
60
#define graph_edge_place_t uint
61
 
62
/*
63
 * External declarations of EXPORTED SYMBOLS in hcl.c
64
 */
65
extern int hwgraph_generate_path(vertex_hdl_t, char *, int);
66
extern vertex_hdl_t hwgraph_register(vertex_hdl_t, const char *,
67
        unsigned int, unsigned int, unsigned int, unsigned int,
68
        umode_t, uid_t, gid_t, struct file_operations *, void *);
69
 
70
extern int hwgraph_mk_symlink(vertex_hdl_t, const char *, unsigned int,
71
        unsigned int, const char *, unsigned int, vertex_hdl_t *, void *);
72
 
73
extern int hwgraph_vertex_destroy(vertex_hdl_t);
74
 
75
extern int hwgraph_edge_add(vertex_hdl_t, vertex_hdl_t, char *);
76
extern int hwgraph_edge_get(vertex_hdl_t, char *, vertex_hdl_t *);
77
 
78
extern arbitrary_info_t hwgraph_fastinfo_get(vertex_hdl_t);
79
extern void hwgraph_fastinfo_set(vertex_hdl_t, arbitrary_info_t );
80
extern vertex_hdl_t hwgraph_mk_dir(vertex_hdl_t, const char *, unsigned int, void *);
81
 
82
extern int hwgraph_connectpt_set(vertex_hdl_t, vertex_hdl_t);
83
extern vertex_hdl_t hwgraph_connectpt_get(vertex_hdl_t);
84
extern int hwgraph_edge_get_next(vertex_hdl_t, char *, vertex_hdl_t *, uint *);
85
extern graph_error_t hwgraph_edge_remove(vertex_hdl_t, char *, vertex_hdl_t *);
86
 
87
extern graph_error_t hwgraph_traverse(vertex_hdl_t, char *, vertex_hdl_t *);
88
 
89
extern int hwgraph_vertex_get_next(vertex_hdl_t *, vertex_hdl_t *);
90
extern int hwgraph_inventory_get_next(vertex_hdl_t, invplace_t *,
91
                                      inventory_t **);
92
extern int hwgraph_inventory_add(vertex_hdl_t, int, int, major_t, minor_t, int);
93
extern int hwgraph_inventory_remove(vertex_hdl_t, int, int, major_t, minor_t, int);
94
extern int hwgraph_controller_num_get(vertex_hdl_t);
95
extern void hwgraph_controller_num_set(vertex_hdl_t, int);
96
extern int hwgraph_path_ad(vertex_hdl_t, char *, vertex_hdl_t *);
97
extern vertex_hdl_t hwgraph_path_to_vertex(char *);
98
extern vertex_hdl_t hwgraph_path_to_dev(char *);
99
extern vertex_hdl_t hwgraph_block_device_get(vertex_hdl_t);
100
extern vertex_hdl_t hwgraph_char_device_get(vertex_hdl_t);
101
extern graph_error_t hwgraph_char_device_add(vertex_hdl_t, char *, char *, vertex_hdl_t *);
102
extern int hwgraph_path_add(vertex_hdl_t, char *, vertex_hdl_t *);
103
extern int hwgraph_info_add_LBL(vertex_hdl_t, char *, arbitrary_info_t);
104
extern int hwgraph_info_get_LBL(vertex_hdl_t, char *, arbitrary_info_t *);
105
extern int hwgraph_info_replace_LBL(vertex_hdl_t, char *, arbitrary_info_t,
106
                                    arbitrary_info_t *);
107
extern int hwgraph_info_get_exported_LBL(vertex_hdl_t, char *, int *, arbitrary_info_t *);
108
extern int hwgraph_info_get_next_LBL(vertex_hdl_t, char *, arbitrary_info_t *,
109
                                labelcl_info_place_t *);
110
extern int hwgraph_path_lookup(vertex_hdl_t, char *, vertex_hdl_t *, char **);
111
extern int hwgraph_info_export_LBL(vertex_hdl_t, char *, int);
112
extern int hwgraph_info_unexport_LBL(vertex_hdl_t, char *);
113
extern int hwgraph_info_remove_LBL(vertex_hdl_t, char *, arbitrary_info_t *);
114
extern char * vertex_to_name(vertex_hdl_t, char *, uint);
115
extern graph_error_t hwgraph_vertex_unref(vertex_hdl_t);
116
 
117
 
118
#endif /* _ASM_IA64_SN_HCL_H */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.