err_impl.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. * linux/arch/alpha/kernel/err_impl.h
  3. *
  4. * Copyright (C) 2000 Jeff Wiedemeier (Compaq Computer Corporation)
  5. *
  6. * Contains declarations and macros to support Alpha error handling
  7. * implementations.
  8. */
  9. union el_timestamp;
  10. struct el_subpacket;
  11. struct ev7_lf_subpackets;
  12. struct el_subpacket_annotation {
  13. struct el_subpacket_annotation *next;
  14. u16 class;
  15. u16 type;
  16. u16 revision;
  17. char *description;
  18. char **annotation;
  19. };
  20. #define SUBPACKET_ANNOTATION(c, t, r, d, a) {NULL, (c), (t), (r), (d), (a)}
  21. struct el_subpacket_handler {
  22. struct el_subpacket_handler *next;
  23. u16 class;
  24. struct el_subpacket *(*handler)(struct el_subpacket *);
  25. };
  26. #define SUBPACKET_HANDLER_INIT(c, h) {NULL, (c), (h)}
  27. /*
  28. * Manipulate a field from a register given it's name. defines
  29. * for the LSB (__S - shift count) and bitmask (__M) are required
  30. *
  31. * EXTRACT(u, f) - extracts the field and places it at bit position 0
  32. * GEN_MASK(f) - creates an in-position mask for the field
  33. */
  34. #define EXTRACT(u, f) (((u) >> f##__S) & f##__M)
  35. #define GEN_MASK(f) ((u64)f##__M << f##__S)
  36. /*
  37. * err_common.c
  38. */
  39. extern char *err_print_prefix;
  40. extern void mchk_dump_mem(void *, size_t, char **);
  41. extern void mchk_dump_logout_frame(struct el_common *);
  42. extern void el_print_timestamp(union el_timestamp *);
  43. extern void el_process_subpackets(struct el_subpacket *, int);
  44. extern struct el_subpacket *el_process_subpacket(struct el_subpacket *);
  45. extern void el_annotate_subpacket(struct el_subpacket *);
  46. extern void cdl_check_console_data_log(void);
  47. extern int cdl_register_subpacket_annotation(struct el_subpacket_annotation *);
  48. extern int cdl_register_subpacket_handler(struct el_subpacket_handler *);
  49. /*
  50. * err_ev7.c
  51. */
  52. extern struct ev7_lf_subpackets *
  53. ev7_collect_logout_frame_subpackets(struct el_subpacket *,
  54. struct ev7_lf_subpackets *);
  55. extern void ev7_register_error_handlers(void);
  56. extern void ev7_machine_check(unsigned long, unsigned long);
  57. /*
  58. * err_ev6.c
  59. */
  60. extern void ev6_register_error_handlers(void);
  61. extern int ev6_process_logout_frame(struct el_common *, int);
  62. extern void ev6_machine_check(unsigned long, unsigned long);
  63. /*
  64. * err_marvel.c
  65. */
  66. extern void marvel_machine_check(unsigned long, unsigned long);
  67. extern void marvel_register_error_handlers(void);
  68. /*
  69. * err_titan.c
  70. */
  71. extern int titan_process_logout_frame(struct el_common *, int);
  72. extern void titan_machine_check(unsigned long, unsigned long);
  73. extern void titan_register_error_handlers(void);
  74. extern int privateer_process_logout_frame(struct el_common *, int);
  75. extern void privateer_machine_check(unsigned long, unsigned long);