mdesc.h 942 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef _SPARC64_MDESC_H
  2. #define _SPARC64_MDESC_H
  3. #include <linux/types.h>
  4. #include <asm/prom.h>
  5. struct mdesc_node;
  6. struct mdesc_arc {
  7. const char *name;
  8. struct mdesc_node *arc;
  9. };
  10. struct mdesc_node {
  11. const char *name;
  12. u64 node;
  13. unsigned int unique_id;
  14. unsigned int num_arcs;
  15. struct property *properties;
  16. struct mdesc_node *hash_next;
  17. struct mdesc_node *allnodes_next;
  18. struct mdesc_arc arcs[0];
  19. };
  20. extern struct mdesc_node *md_find_node_by_name(struct mdesc_node *from,
  21. const char *name);
  22. #define md_for_each_node_by_name(__mn, __name) \
  23. for (__mn = md_find_node_by_name(NULL, __name); __mn; \
  24. __mn = md_find_node_by_name(__mn, __name))
  25. extern struct property *md_find_property(const struct mdesc_node *mp,
  26. const char *name,
  27. int *lenp);
  28. extern const void *md_get_property(const struct mdesc_node *mp,
  29. const char *name,
  30. int *lenp);
  31. extern void sun4v_mdesc_init(void);
  32. #endif