diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2007-05-25 18:49:59 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-05-29 05:49:41 -0400 |
commit | 5cbc30737398b49f62ae8603129ce43ac7db1a41 (patch) | |
tree | 45d01a686865e6fd9c32b670f77af1e37db03008 /include/asm-sparc64/mdesc.h | |
parent | e01c0d6d8cf29c1c11725837b265598cab687952 (diff) |
[SPARC64]: Use machine description and OBP properly for cpu probing.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/asm-sparc64/mdesc.h')
-rw-r--r-- | include/asm-sparc64/mdesc.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/include/asm-sparc64/mdesc.h b/include/asm-sparc64/mdesc.h new file mode 100644 index 000000000000..124eb8ca2378 --- /dev/null +++ b/include/asm-sparc64/mdesc.h | |||
@@ -0,0 +1,39 @@ | |||
1 | #ifndef _SPARC64_MDESC_H | ||
2 | #define _SPARC64_MDESC_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | #include <asm/prom.h> | ||
6 | |||
7 | struct mdesc_node; | ||
8 | struct mdesc_arc { | ||
9 | const char *name; | ||
10 | struct mdesc_node *arc; | ||
11 | }; | ||
12 | |||
13 | struct mdesc_node { | ||
14 | const char *name; | ||
15 | u64 node; | ||
16 | unsigned int unique_id; | ||
17 | unsigned int num_arcs; | ||
18 | struct property *properties; | ||
19 | struct mdesc_node *hash_next; | ||
20 | struct mdesc_node *allnodes_next; | ||
21 | struct mdesc_arc arcs[0]; | ||
22 | }; | ||
23 | |||
24 | extern struct mdesc_node *md_find_node_by_name(struct mdesc_node *from, | ||
25 | const char *name); | ||
26 | #define md_for_each_node_by_name(__mn, __name) \ | ||
27 | for (__mn = md_find_node_by_name(NULL, __name); __mn; \ | ||
28 | __mn = md_find_node_by_name(__mn, __name)) | ||
29 | |||
30 | extern struct property *md_find_property(const struct mdesc_node *mp, | ||
31 | const char *name, | ||
32 | int *lenp); | ||
33 | extern const void *md_get_property(const struct mdesc_node *mp, | ||
34 | const char *name, | ||
35 | int *lenp); | ||
36 | |||
37 | extern void sun4v_mdesc_init(void); | ||
38 | |||
39 | #endif | ||