Rev 3467 | Rev 3672 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3467 | Rev 3582 | ||
---|---|---|---|
Line 35... | Line 35... | ||
35 | #ifndef KERN_sparc64_CPU_NODE_H_ |
35 | #ifndef KERN_sparc64_CPU_NODE_H_ |
36 | #define KERN_sparc64_CPU_NODE_H_ |
36 | #define KERN_sparc64_CPU_NODE_H_ |
37 | 37 | ||
38 | #include <genarch/ofw/ofw_tree.h> |
38 | #include <genarch/ofw/ofw_tree.h> |
39 | 39 | ||
40 | /* |
- | |
41 | * Name of the CPU OFW node property, which holds the MID (processor ID). |
- | |
42 | * US uses UPA, US3 uses Fireplane, hence the properties names are different. |
- | |
43 | */ |
- | |
44 | #if defined (US) |
- | |
45 | #define PORTID_NAME "upa-portid" |
- | |
46 | #elif defined (US3) |
- | |
47 | #define PORTID_NAME "portid" |
- | |
48 | #endif |
- | |
49 | 40 | ||
50 | /** Finds the parent node of all the CPU nodes. |
41 | /** Finds the parent node of all the CPU nodes (nodes named "cpu" or "cmp"). |
51 | * |
42 | * |
52 | * Depending on the OFW version, CPUS can be at "/" or at "/ssm@0,0". |
43 | * Depending on the machine type (and possibly the OFW version), CPUs can be |
- | 44 | * at "/" or at "/ssm@0,0". |
|
53 | */ |
45 | */ |
54 | static inline ofw_tree_node_t *cpus_parent(void) |
46 | static inline ofw_tree_node_t *cpus_parent(void) |
55 | { |
47 | { |
56 | ofw_tree_node_t *parent; |
48 | ofw_tree_node_t *parent; |
57 | parent = ofw_tree_find_child(ofw_tree_lookup("/"), "ssm@0,0"); |
49 | parent = ofw_tree_find_child(ofw_tree_lookup("/"), "ssm@0,0"); |