mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
sparc64: expand MDESC interface
Add the following two APIs to Machine Description (MDESC) - mdesc_get_node: Searches for a node in the Machine Description tree based on given information about that node. - mdesc_get_node_info: Retrieves information about a given node. Signed-off-by: Jagannathan Raman <jag.raman@oracle.com> Reviewed-by: Liam Merwick <liam.merwick@oracle.com> Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
01b7a47138
commit
411cb4a0b3
2 changed files with 233 additions and 0 deletions
|
@ -16,6 +16,7 @@ struct mdesc_handle *mdesc_grab(void);
|
|||
void mdesc_release(struct mdesc_handle *);
|
||||
|
||||
#define MDESC_NODE_NULL (~(u64)0)
|
||||
#define MDESC_MAX_STR_LEN 256
|
||||
|
||||
u64 mdesc_node_by_name(struct mdesc_handle *handle,
|
||||
u64 from_node, const char *name);
|
||||
|
@ -71,6 +72,22 @@ struct mdesc_notifier_client {
|
|||
|
||||
void mdesc_register_notifier(struct mdesc_notifier_client *client);
|
||||
|
||||
union md_node_info {
|
||||
struct vdev_port {
|
||||
u64 id; /* id */
|
||||
u64 parent_cfg_hdl; /* parent config handle */
|
||||
const char *name; /* name (property) */
|
||||
} vdev_port;
|
||||
struct ds_port {
|
||||
u64 id; /* id */
|
||||
} ds_port;
|
||||
};
|
||||
|
||||
u64 mdesc_get_node(struct mdesc_handle *hp, const char *node_name,
|
||||
union md_node_info *node_info);
|
||||
int mdesc_get_node_info(struct mdesc_handle *hp, u64 node,
|
||||
const char *node_name, union md_node_info *node_info);
|
||||
|
||||
void mdesc_fill_in_cpu_data(cpumask_t *mask);
|
||||
void mdesc_populate_present_mask(cpumask_t *mask);
|
||||
void mdesc_get_page_sizes(cpumask_t *mask, unsigned long *pgsz_mask);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue